Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,7 @@
"filename": "**/sdk/providerhub/**/*.cs",
"words": [
"checkin",
"dsts",
"regionality"
]
},
Expand Down
17 changes: 10 additions & 7 deletions sdk/providerhub/Azure.ResourceManager.ProviderHub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
# Release History

## 1.2.0-beta.1 (Unreleased)
## 1.2.0 (2025-10-21)

### Features Added

### Breaking Changes

### Bugs Fixed
- Upgraded api-version tag from 'package-2020-11-20' to 'package-2024-09-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/247a38a5fea02ac50132f591f3b53fec06e9377b/specification/providerhub/resource-manager/readme.md.
- Make `Azure.ResourceManager.ProviderHub` AOT-compatible.

### Other Changes

- Upgraded Azure.Core from 1.45.0 to 1.49.0
- Upgraded Azure.ResourceManager from 1.13.0 to 1.13.2
- Obsoleted property 'IList<BinaryData> ResourceAccessRoles' in type Azure.ResourceManager.ProviderHub.Models.ResourceProviderManagement

## 1.1.1 (2025-03-11)

### Features Added

- Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details.
- Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details.
- Exposed `JsonModelWriteCore` for model serialization procedure.

## 1.1.0 (2023-11-29)

### Features Added

- Enable mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details.
- Enabled mocking for extension methods, refer this [document](https://aka.ms/azsdk/net/mocking) for more details.

### Other Changes

Expand All @@ -31,7 +34,7 @@

### Features Added

- Enable the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder).
- Enabled the model factory feature for model mocking, more information can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-mocking-factory-builder).

### Other Changes

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.2.0-beta.1</Version>
<Version>1.2.0</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.1.1</ApiCompatVersion>
<PackageId>Azure.ResourceManager.ProviderHub</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Azure.Core;

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> Model factory for models. </summary>
public static partial class ArmProviderHubModelFactory
{
/// <summary> Initializes a new instance of <see cref="Models.CheckinManifestInfo"/>. </summary>
/// <param name="isCheckedIn"></param>
/// <param name="statusMessage"></param>
/// <param name="pullRequest"></param>
/// <param name="commitId"></param>
/// <returns> A new <see cref="Models.CheckinManifestInfo"/> instance for mocking. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static CheckinManifestInfo CheckinManifestInfo(bool isCheckedIn = default, string statusMessage = null, string pullRequest = null, string commitId = null)
=> new CheckinManifestInfo(isCheckedIn, statusMessage, pullRequest, commitId, null);

/// <summary> Initializes a new instance of <see cref="Models.LinkedOperationRule"/>. </summary>
/// <param name="linkedOperation"></param>
/// <param name="linkedAction"></param>
/// <returns> A new <see cref="Models.LinkedOperationRule"/> instance for mocking. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static LinkedOperationRule LinkedOperationRule(LinkedOperation linkedOperation = default, LinkedAction linkedAction = default)
=> new LinkedOperationRule(linkedOperation, linkedAction, new ChangeTrackingList<string>(), null);

/// <summary> Initializes a new instance of <see cref="Models.ProviderResourceType"/>. </summary>
/// <param name="name"></param>
/// <param name="routingType"></param>
/// <param name="resourceValidation"></param>
/// <param name="allowedUnauthorizedActions"></param>
/// <param name="authorizationActionMappings"></param>
/// <param name="linkedAccessChecks"></param>
/// <param name="defaultApiVersion"></param>
/// <param name="loggingRules"></param>
/// <param name="throttlingRules"></param>
/// <param name="endpoints"></param>
/// <param name="marketplaceType"></param>
/// <param name="managementType"></param>
/// <param name="metadata"> Anything. </param>
/// <param name="requiredFeatures"></param>
/// <param name="requiredFeaturesPolicy"></param>
/// <param name="subscriptionStateRules"></param>
/// <param name="serviceTreeInfos"></param>
/// <param name="optInHeaders"></param>
/// <param name="skuLink"></param>
/// <param name="disallowedActionVerbs"></param>
/// <param name="templateDeploymentPolicy"></param>
/// <param name="extendedLocations"></param>
/// <param name="linkedOperationRules"></param>
/// <param name="resourceDeletionPolicy"></param>
/// <returns> A new <see cref="Models.ProviderResourceType"/> instance for mocking. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static ProviderResourceType ProviderResourceType(string name = null, ResourceRoutingType? routingType = null, ResourceValidation? resourceValidation = null, IEnumerable<string> allowedUnauthorizedActions = null, IEnumerable<AuthorizationActionMapping> authorizationActionMappings = null, IEnumerable<LinkedAccessCheck> linkedAccessChecks = null, string defaultApiVersion = null, IEnumerable<LoggingRule> loggingRules = null, IEnumerable<ThrottlingRule> throttlingRules = null, IEnumerable<ResourceProviderEndpoint> endpoints = null, MarketplaceType? marketplaceType = null, IdentityManagementType? managementType = null, BinaryData metadata = null, IEnumerable<string> requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, IEnumerable<ProviderSubscriptionStateRule> subscriptionStateRules = null, IEnumerable<ServiceTreeInfo> serviceTreeInfos = null, OptInHeaderType? optInHeaders = null, string skuLink = null, IEnumerable<string> disallowedActionVerbs = null, TemplateDeploymentPolicy templateDeploymentPolicy = null, IEnumerable<ProviderHubExtendedLocationOptions> extendedLocations = null, IEnumerable<LinkedOperationRule> linkedOperationRules = null, ManifestResourceDeletionPolicy? resourceDeletionPolicy = null)
=> new ProviderResourceType(name, routingType, null, null, resourceValidation, allowedUnauthorizedActions.ToList(), null, authorizationActionMappings.ToList(), linkedAccessChecks.ToList(), defaultApiVersion, loggingRules.ToList(), throttlingRules.ToList(), endpoints.ToList(), marketplaceType, null, metadata, requiredFeatures.ToList(), null, subscriptionStateRules.ToList(), null, null, skuLink, disallowedActionVerbs.ToList(), templateDeploymentPolicy, extendedLocations.ToList(), linkedOperationRules.ToList(), resourceDeletionPolicy, null, null, null, null, null);

/// <summary> Initializes a new instance of <see cref="Models.ResourceProviderEndpoint"/>. </summary>
/// <param name="isEnabled"></param>
/// <param name="apiVersions"></param>
/// <param name="endpointUri"></param>
/// <param name="locations"></param>
/// <param name="requiredFeatures"></param>
/// <param name="requiredFeaturesPolicy"></param>
/// <param name="timeout"></param>
/// <returns> A new <see cref="Models.ResourceProviderEndpoint"/> instance for mocking. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static ResourceProviderEndpoint ResourceProviderEndpoint(bool? isEnabled = null, IEnumerable<string> apiVersions = null, Uri endpointUri = null, IEnumerable<AzureLocation> locations = null, IEnumerable<string> requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, TimeSpan? timeout = null)
=> new ResourceProviderEndpoint(isEnabled, apiVersions.ToList(), endpointUri, locations.ToList(), requiredFeatures.ToList(), null, timeout, null, null, null);

/// <summary> Initializes a new instance of <see cref="Models.ResourceProviderManifest"/>. </summary>
/// <param name="providerAuthenticationAllowedAudiences"></param>
/// <param name="providerAuthorizations"></param>
/// <param name="namespace"></param>
/// <param name="providerVersion"></param>
/// <param name="providerType"></param>
/// <param name="requiredFeatures"></param>
/// <param name="requiredFeaturesPolicy"></param>
/// <param name="optInHeaders"></param>
/// <param name="resourceTypes"></param>
/// <param name="management"></param>
/// <param name="capabilities"></param>
/// <param name="metadata"> Anything. </param>
/// <param name="globalNotificationEndpoints"></param>
/// <param name="reRegisterSubscriptionMetadata"></param>
/// <returns> A new <see cref="Models.ResourceProviderManifest"/> instance for mocking. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static ResourceProviderManifest ResourceProviderManifest(IEnumerable<string> providerAuthenticationAllowedAudiences = null, IEnumerable<ResourceProviderAuthorization> providerAuthorizations = null, string @namespace = null, string providerVersion = null, ResourceProviderType? providerType = null, IEnumerable<string> requiredFeatures = null, FeaturesPolicy? requiredFeaturesPolicy = null, OptInHeaderType? optInHeaders = null, IEnumerable<ProviderResourceType> resourceTypes = null, ResourceProviderManagement management = null, IEnumerable<ResourceProviderCapabilities> capabilities = null, BinaryData metadata = null, IEnumerable<ResourceProviderEndpoint> globalNotificationEndpoints = null, ReRegisterSubscriptionMetadata reRegisterSubscriptionMetadata = null)
=> new ResourceProviderManifest(null, providerAuthorizations.ToList(), @namespace, null, null, providerVersion, providerType, requiredFeatures.ToList(), null, null, resourceTypes.ToList(), management, capabilities.ToList(), null, metadata, globalNotificationEndpoints.ToList(), reRegisterSubscriptionMetadata, null, null, null, null, null);

/// <summary> Initializes a new instance of <see cref="Models.TemplateDeploymentPolicy"/>. </summary>
/// <param name="capabilities"></param>
/// <param name="preflightOptions"></param>
/// <returns> A new <see cref="Models.TemplateDeploymentPolicy"/> instance for mocking. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public static TemplateDeploymentPolicy TemplateDeploymentPolicy(TemplateDeploymentCapability capabilities = default, TemplateDeploymentPreflightOption preflightOptions = default)
=> new TemplateDeploymentPolicy(capabilities, preflightOptions, null, null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The CustomRolloutProperties. </summary>
public partial class CustomRolloutProperties
{
/// <summary> Gets or sets the provisioning state. </summary>
public ProviderHubProvisioningState? ProvisioningState { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The CustomRolloutSpecification. </summary>
public partial class CustomRolloutSpecification
{
/// <summary> Initializes a new instance of <see cref="CustomRolloutSpecification"/>. </summary>
/// <param name="canary"></param>
/// <exception cref="ArgumentNullException"> <paramref name="canary"/> is null. </exception>
public CustomRolloutSpecification(TrafficRegions canary)
{
Argument.AssertNotNull(canary, nameof(canary));

Canary = canary;
ReleaseScopes = new ChangeTrackingList<string>();
ResourceTypeRegistrations = new ChangeTrackingList<ResourceTypeRegistrationData>();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The DefaultRolloutProperties. </summary>
public partial class DefaultRolloutProperties
{
/// <summary> Gets or sets the provisioning state. </summary>
public ProviderHubProvisioningState? ProvisioningState { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The NotificationRegistrationProperties. </summary>
public partial class NotificationRegistrationProperties
{
/// <summary> Gets or sets the provisioning state. </summary>
public ProviderHubProvisioningState? ProvisioningState { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The ProviderHubExtendedLocationOptions. </summary>
public partial class ProviderHubExtendedLocationOptions
{
/// <summary> Gets or sets the extended location options type. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public string ExtendedLocationOptionsType { get => LocationType?.ToString(); set => LocationType = new ProviderExtendedLocationType(value); }
/// <summary> Gets or sets the supported policy. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public string SupportedPolicy { get => SupportedLocationPolicy.ToString(); set => SupportedLocationPolicy = new ResourceTypeExtendedLocationPolicy(value); }
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
Expand All @@ -16,6 +14,7 @@ internal static partial class ProviderHubExtendedLocationTypeExtensions
ProviderHubExtendedLocationType.NotSpecified => "NotSpecified",
ProviderHubExtendedLocationType.EdgeZone => "EdgeZone",
ProviderHubExtendedLocationType.ArcZone => "ArcZone",
ProviderHubExtendedLocationType.CustomLocation => "CustomLocation",
_ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProviderHubExtendedLocationType value.")
};

Expand All @@ -24,6 +23,7 @@ public static ProviderHubExtendedLocationType ToProviderHubExtendedLocationType(
if (StringComparer.OrdinalIgnoreCase.Equals(value, "NotSpecified")) return ProviderHubExtendedLocationType.NotSpecified;
if (StringComparer.OrdinalIgnoreCase.Equals(value, "EdgeZone")) return ProviderHubExtendedLocationType.EdgeZone;
if (StringComparer.OrdinalIgnoreCase.Equals(value, "ArcZone")) return ProviderHubExtendedLocationType.ArcZone;
if (StringComparer.OrdinalIgnoreCase.Equals(value, "CustomLocation")) return ProviderHubExtendedLocationType.CustomLocation;
throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProviderHubExtendedLocationType value.");
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System.ComponentModel;

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The ProviderHubExtendedLocationType. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public enum ProviderHubExtendedLocationType
{
/// <summary> NotSpecified. </summary>
NotSpecified,
/// <summary> EdgeZone. </summary>
EdgeZone,
/// <summary> ArcZone. </summary>
ArcZone
ArcZone,
/// <summary> CustomLocation. </summary>
CustomLocation
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The ProviderRegistrationProperties. </summary>
public partial class ProviderRegistrationProperties : ResourceProviderManifestProperties
{
/// <summary> Gets or sets the provisioning state. </summary>
public ProviderHubProvisioningState? ProvisioningState { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The ProviderResourceType. </summary>
public partial class ProviderResourceType
{
/// <summary> Gets the opt in headers. </summary>
public OptInHeaderType? OptInHeaders
{
get => RequestHeaderOptions?.OptInHeaders;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;

namespace Azure.ResourceManager.ProviderHub.Models
{
/// <summary> The ResourceProviderEndpoint. </summary>
public partial class ResourceProviderEndpoint
{
/// <summary> The api versions. </summary>
public IReadOnlyList<string> ApiVersions { get; }
/// <summary> The locations. </summary>
public IReadOnlyList<AzureLocation> Locations { get; }
/// <summary> The required features. </summary>
public IReadOnlyList<string> RequiredFeatures { get; }
}
}
Loading