From 2db6dfd99088e4ae2db6fb4a69ef5f1483abeb6b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 28 Oct 2022 10:19:59 +0000 Subject: [PATCH] CodeGen from PR 21241 in Azure/azure-rest-api-specs Migrate to net track2 for some resource-manager readmes batch 3 (#21241) * migrate to track 2 * revert configs for machinelearning and managementgroups * resolve Go SDK automation failure Co-authored-by: Chenjie Shi --- ...zure.ResourceManager.Cdn.netstandard2.0.cs | 81 ++++++- .../src/Generated/CdnEndpointData.cs | 6 +- .../CdnWebApplicationFirewallPolicyData.cs | 7 +- .../src/Generated/Extensions/CdnExtensions.cs | 66 +++++ .../ResourceGroupResourceExtensionClient.cs | 104 ++++++++ .../Generated/FrontDoorCustomDomainData.cs | 8 +- .../Generated/FrontDoorEndpointResource.cs | 8 +- .../Generated/FrontDoorOriginGroupResource.cs | 4 +- .../src/Generated/FrontDoorRuleSetResource.cs | 4 +- .../MigrateResultOperationSource.cs | 31 +++ .../Models/CanMigrateContent.Serialization.cs | 22 ++ .../src/Generated/Models/CanMigrateContent.cs | 35 +++ .../Generated/Models/CanMigrateDefaultSku.cs | 51 ++++ .../Models/CanMigrateResult.Serialization.cs | 62 +++++ .../src/Generated/Models/CanMigrateResult.cs | 40 +++ .../Models/CdnEndpointData.Serialization.cs | 6 +- ...icationFirewallPolicyData.Serialization.cs | 29 ++- .../DeepCreatedCustomDomain.Serialization.cs | 53 ++++ .../Models/DeepCreatedCustomDomain.cs | 44 ++++ ...FrontDoorCustomDomainData.Serialization.cs | 30 ++- .../Models/ManagedRuleGroupOverrideSetting.cs | 4 +- .../Models/MigrateResult.Serialization.cs | 52 ++++ .../src/Generated/Models/MigrateResult.cs | 43 ++++ .../Models/MigrationContent.Serialization.cs | 36 +++ .../src/Generated/Models/MigrationContent.cs | 56 +++++ .../MigrationErrorType.Serialization.cs | 47 ++++ .../Generated/Models/MigrationErrorType.cs | 40 +++ ...pplicationFirewallMapping.Serialization.cs | 31 +++ .../MigrationWebApplicationFirewallMapping.cs | 49 ++++ .../Models/ProfileData.Serialization.cs | 29 ++- .../Generated/Models/ProfileResourceState.cs | 15 ++ .../src/Generated/ProfileData.cs | 7 +- .../src/Generated/ProfileResource.cs | 60 ++++- .../CdnCustomDomainsRestOperations.cs | 2 +- .../CdnEndpointsRestOperations.cs | 2 +- .../CdnManagementRestOperations.cs | 2 +- .../CdnOriginGroupsRestOperations.cs | 2 +- .../CdnOriginsRestOperations.cs | 2 +- .../RestOperations/EdgeNodesRestOperations.cs | 2 +- .../FrontDoorCustomDomainsRestOperations.cs | 2 +- .../FrontDoorEndpointsRestOperations.cs | 14 +- .../FrontDoorOriginGroupsRestOperations.cs | 10 +- .../FrontDoorOriginsRestOperations.cs | 2 +- .../FrontDoorProfilesRestOperations.cs | 14 +- .../FrontDoorRoutesRestOperations.cs | 2 +- .../FrontDoorRuleSetsRestOperations.cs | 10 +- .../FrontDoorRulesRestOperations.cs | 2 +- .../FrontDoorSecretsRestOperations.cs | 2 +- ...FrontDoorSecurityPoliciesRestOperations.cs | 2 +- .../LogAnalyticsRestOperations.cs | 2 +- .../ManagedRuleSetsRestOperations.cs | 2 +- .../RestOperations/PoliciesRestOperations.cs | 2 +- .../RestOperations/ProfilesRestOperations.cs | 227 +++++++++++++++++- .../ResourceUsageRestOperations.cs | 2 +- .../Azure.ResourceManager.Cdn/src/autorest.md | 2 +- 55 files changed, 1400 insertions(+), 69 deletions(-) create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/MigrateResultOperationSource.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs b/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs index 63cde2ec8ec7..d0e489084185 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs @@ -63,7 +63,7 @@ public partial class CdnEndpointData : Azure.ResourceManager.Models.TrackedResou { public CdnEndpointData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public System.Collections.Generic.IList ContentTypesToCompress { get { throw null; } } - public System.Collections.Generic.IReadOnlyList CustomDomains { get { throw null; } } + public System.Collections.Generic.IReadOnlyList CustomDomains { get { throw null; } } public Azure.Core.ResourceIdentifier DefaultOriginGroupId { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.EndpointDeliveryPolicy DeliveryPolicy { get { throw null; } set { } } public System.Collections.Generic.IList GeoFilters { get { throw null; } } @@ -126,6 +126,8 @@ protected CdnEndpointResource() { } } public static partial class CdnExtensions { + public static Azure.Response CanMigrateProfile(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.Cdn.Models.CanMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> CanMigrateProfileAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.ResourceManager.Cdn.Models.CanMigrateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckCdnNameAvailability(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Cdn.Models.CdnNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckCdnNameAvailabilityAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Cdn.Models.CdnNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckCdnNameAvailabilityWithSubscription(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Cdn.Models.CdnNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -161,6 +163,8 @@ public static partial class CdnExtensions public static Azure.AsyncPageable GetProfilesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetResourceUsages(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetResourceUsagesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ArmOperation MigrateProfile(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.MigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> MigrateProfileAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.MigrationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response ValidateProbe(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Cdn.Models.ValidateProbeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> ValidateProbeAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Cdn.Models.ValidateProbeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -271,6 +275,7 @@ public CdnWebApplicationFirewallPolicyData(Azure.Core.AzureLocation location, Az public System.Collections.Generic.IList CustomRules { get { throw null; } } public System.Collections.Generic.IReadOnlyList EndpointLinks { get { throw null; } } public Azure.ETag? ETag { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ExtendedProperties { get { throw null; } } public System.Collections.Generic.IList ManagedRuleSets { get { throw null; } } public Azure.ResourceManager.Cdn.Models.WafPolicySettings PolicySettings { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.WebApplicationFirewallPolicyProvisioningState? ProvisioningState { get { throw null; } } @@ -319,6 +324,7 @@ public FrontDoorCustomDomainData() { } public Azure.ResourceManager.Cdn.Models.FrontDoorDeploymentStatus? DeploymentStatus { get { throw null; } } public Azure.Core.ResourceIdentifier DnsZoneId { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.DomainValidationState? DomainValidationState { get { throw null; } } + public System.Collections.Generic.IDictionary ExtendedProperties { get { throw null; } } public string HostName { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PreValidatedCustomDomainResourceId { get { throw null; } set { } } public string ProfileName { get { throw null; } } @@ -707,6 +713,7 @@ protected ProfileCollection() { } public partial class ProfileData : Azure.ResourceManager.Models.TrackedResourceData { public ProfileData(Azure.Core.AzureLocation location, Azure.ResourceManager.Cdn.Models.CdnSku sku) : base (default(Azure.Core.AzureLocation)) { } + public System.Collections.Generic.IDictionary ExtendedProperties { get { throw null; } } public System.Guid? FrontDoorId { get { throw null; } } public string Kind { get { throw null; } } public int? OriginResponseTimeoutSeconds { get { throw null; } set { } } @@ -770,6 +777,8 @@ protected ProfileResource() { } public virtual System.Threading.Tasks.Task> GetWafLogAnalyticsMetricsAsync(System.Collections.Generic.IEnumerable metrics, System.DateTimeOffset dateTimeBegin, System.DateTimeOffset dateTimeEnd, Azure.ResourceManager.Cdn.Models.WafGranularity granularity, System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable groupBy = null, System.Collections.Generic.IEnumerable ruleTypes = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetWafLogAnalyticsRankings(System.Collections.Generic.IEnumerable metrics, System.DateTimeOffset dateTimeBegin, System.DateTimeOffset dateTimeEnd, int maxRanking, System.Collections.Generic.IEnumerable rankings, System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable ruleTypes = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWafLogAnalyticsRankingsAsync(System.Collections.Generic.IEnumerable metrics, System.DateTimeOffset dateTimeBegin, System.DateTimeOffset dateTimeEnd, int maxRanking, System.Collections.Generic.IEnumerable rankings, System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable ruleTypes = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation MigrationCommit(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task MigrationCommitAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -861,6 +870,36 @@ public CacheKeyQueryStringActionProperties(Azure.ResourceManager.Cdn.Models.Cach public static bool operator !=(Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionType left, Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionType right) { throw null; } public override string ToString() { throw null; } } + public partial class CanMigrateContent + { + public CanMigrateContent(Azure.ResourceManager.Resources.Models.WritableSubResource classicResourceReference) { } + public Azure.Core.ResourceIdentifier ClassicResourceReferenceId { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CanMigrateDefaultSku : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CanMigrateDefaultSku(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku PremiumAzureFrontDoor { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku StandardAzureFrontDoor { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku left, Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku left, Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku right) { throw null; } + public override string ToString() { throw null; } + } + public partial class CanMigrateResult + { + internal CanMigrateResult() { } + public bool? CanMigrate { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? DefaultSku { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CdnCacheLevel : System.IEquatable { @@ -1395,6 +1434,13 @@ public CustomRuleMatchCondition(Azure.ResourceManager.Cdn.Models.WafMatchVariabl public string Selector { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } } + public partial class DeepCreatedCustomDomain + { + internal DeepCreatedCustomDomain() { } + public string HostName { get { throw null; } } + public string Name { get { throw null; } } + public string ValidationData { get { throw null; } } + } public partial class DeepCreatedOrigin { public DeepCreatedOrigin(string name) { } @@ -2599,6 +2645,34 @@ internal MetricsResponseSeriesPropertiesItemsItem() { } public string Name { get { throw null; } } public string Value { get { throw null; } } } + public partial class MigrateResult + { + internal MigrateResult() { } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public Azure.Core.ResourceIdentifier MigratedProfileResourceIdId { get { throw null; } } + } + public partial class MigrationContent + { + public MigrationContent(Azure.ResourceManager.Cdn.Models.CdnSku sku, Azure.ResourceManager.Resources.Models.WritableSubResource classicResourceReference, string profileName) { } + public Azure.Core.ResourceIdentifier ClassicResourceReferenceId { get { throw null; } } + public System.Collections.Generic.IList MigrationWebApplicationFirewallMappings { get { throw null; } } + public string ProfileName { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.CdnSkuName? SkuName { get { throw null; } } + } + public partial class MigrationErrorType + { + internal MigrationErrorType() { } + public string Code { get { throw null; } } + public string ErrorMessage { get { throw null; } } + public string NextSteps { get { throw null; } } + public string ResourceName { get { throw null; } } + } + public partial class MigrationWebApplicationFirewallMapping + { + public MigrationWebApplicationFirewallMapping() { } + public Azure.Core.ResourceIdentifier MigratedFromId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier MigratedToId { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct OptimizationType : System.IEquatable { @@ -2980,10 +3054,15 @@ public ProfilePatch() { } private readonly object _dummy; private readonly int _dummyPrimitive; public ProfileResourceState(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.ProfileResourceState AbortingMigration { get { throw null; } } public static Azure.ResourceManager.Cdn.Models.ProfileResourceState Active { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.ProfileResourceState CommittingMigration { get { throw null; } } public static Azure.ResourceManager.Cdn.Models.ProfileResourceState Creating { get { throw null; } } public static Azure.ResourceManager.Cdn.Models.ProfileResourceState Deleting { get { throw null; } } public static Azure.ResourceManager.Cdn.Models.ProfileResourceState Disabled { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.ProfileResourceState Migrated { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.ProfileResourceState Migrating { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.ProfileResourceState PendingMigrationCommit { get { throw null; } } public bool Equals(Azure.ResourceManager.Cdn.Models.ProfileResourceState other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs index 6b5979ceac0b..d577481671bc 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs @@ -24,7 +24,7 @@ public CdnEndpointData(AzureLocation location) : base(location) UriSigningKeys = new ChangeTrackingList(); Origins = new ChangeTrackingList(); OriginGroups = new ChangeTrackingList(); - CustomDomains = new ChangeTrackingList(); + CustomDomains = new ChangeTrackingList(); } /// Initializes a new instance of CdnEndpointData. @@ -54,7 +54,7 @@ public CdnEndpointData(AzureLocation location) : base(location) /// The custom domains under the endpoint. /// Resource status of the endpoint. /// Provisioning status of the endpoint. - internal CdnEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string originPath, IList contentTypesToCompress, string originHostHeader, bool? isCompressionEnabled, bool? isHttpAllowed, bool? isHttpsAllowed, QueryStringCachingBehavior? queryStringCachingBehavior, OptimizationType? optimizationType, string probePath, IList geoFilters, EndpointPropertiesUpdateParametersDefaultOriginGroup defaultOriginGroup, IList uriSigningKeys, EndpointDeliveryPolicy deliveryPolicy, EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink, string hostName, IList origins, IList originGroups, IReadOnlyList customDomains, EndpointResourceState? resourceState, CdnEndpointProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + internal CdnEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string originPath, IList contentTypesToCompress, string originHostHeader, bool? isCompressionEnabled, bool? isHttpAllowed, bool? isHttpsAllowed, QueryStringCachingBehavior? queryStringCachingBehavior, OptimizationType? optimizationType, string probePath, IList geoFilters, EndpointPropertiesUpdateParametersDefaultOriginGroup defaultOriginGroup, IList uriSigningKeys, EndpointDeliveryPolicy deliveryPolicy, EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink, string hostName, IList origins, IList originGroups, IReadOnlyList customDomains, EndpointResourceState? resourceState, CdnEndpointProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) { OriginPath = originPath; ContentTypesToCompress = contentTypesToCompress; @@ -137,7 +137,7 @@ public ResourceIdentifier WebApplicationFirewallPolicyLinkId /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. public IList OriginGroups { get; } /// The custom domains under the endpoint. - public IReadOnlyList CustomDomains { get; } + public IReadOnlyList CustomDomains { get; } /// Resource status of the endpoint. public EndpointResourceState? ResourceState { get; } /// Provisioning status of the endpoint. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs index 39b2dd0670f2..72da2d44152e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs @@ -28,6 +28,7 @@ public CdnWebApplicationFirewallPolicyData(AzureLocation location, CdnSku sku) : Sku = sku; EndpointLinks = new ChangeTrackingList(); + ExtendedProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of CdnWebApplicationFirewallPolicyData. @@ -44,9 +45,10 @@ public CdnWebApplicationFirewallPolicyData(AzureLocation location, CdnSku sku) : /// Describes custom rules inside the policy. /// Describes managed rules inside the policy. /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. + /// Key-Value pair representing additional properties for Web Application Firewall policy. /// Provisioning state of the WebApplicationFirewallPolicy. /// Resource status of the policy. - internal CdnWebApplicationFirewallPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, CdnSku sku, WafPolicySettings policySettings, RateLimitRuleList rateLimitSettings, CustomRuleList customSettings, ManagedRuleSetList managedRules, IReadOnlyList endpointLinks, WebApplicationFirewallPolicyProvisioningState? provisioningState, PolicyResourceState? resourceState) : base(id, name, resourceType, systemData, tags, location) + internal CdnWebApplicationFirewallPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, CdnSku sku, WafPolicySettings policySettings, RateLimitRuleList rateLimitSettings, CustomRuleList customSettings, ManagedRuleSetList managedRules, IReadOnlyList endpointLinks, IDictionary extendedProperties, WebApplicationFirewallPolicyProvisioningState? provisioningState, PolicyResourceState? resourceState) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; Sku = sku; @@ -55,6 +57,7 @@ internal CdnWebApplicationFirewallPolicyData(ResourceIdentifier id, string name, CustomSettings = customSettings; ManagedRules = managedRules; EndpointLinks = endpointLinks; + ExtendedProperties = extendedProperties; ProvisioningState = provisioningState; ResourceState = resourceState; } @@ -118,6 +121,8 @@ public IList ManagedRuleSets /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. public IReadOnlyList EndpointLinks { get; } + /// Key-Value pair representing additional properties for Web Application Firewall policy. + public IDictionary ExtendedProperties { get; } /// Provisioning state of the WebApplicationFirewallPolicy. public WebApplicationFirewallPolicyProvisioningState? ProvisioningState { get; } /// Resource status of the policy. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs index f9a7f5890119..fa22a1ac7054 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs @@ -358,6 +358,72 @@ public static Response CheckEndpointNameAvailabi return GetExtensionClient(resourceGroupResource).CheckEndpointNameAvailability(content, cancellationToken); } + /// + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate + /// Operation Id: Profiles_CanMigrate + /// + /// The instance the method will execute against. + /// Properties needed to check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + /// is null. + public static async Task> CanMigrateProfileAsync(this ResourceGroupResource resourceGroupResource, CanMigrateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return await GetExtensionClient(resourceGroupResource).CanMigrateProfileAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate + /// Operation Id: Profiles_CanMigrate + /// + /// The instance the method will execute against. + /// Properties needed to check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + /// is null. + public static Response CanMigrateProfile(this ResourceGroupResource resourceGroupResource, CanMigrateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return GetExtensionClient(resourceGroupResource).CanMigrateProfile(content, cancellationToken); + } + + /// + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate + /// Operation Id: Profiles_Migrate + /// + /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// is null. + public static async Task> MigrateProfileAsync(this ResourceGroupResource resourceGroupResource, WaitUntil waitUntil, MigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return await GetExtensionClient(resourceGroupResource).MigrateProfileAsync(waitUntil, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate + /// Operation Id: Profiles_Migrate + /// + /// The instance the method will execute against. + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// is null. + public static ArmOperation MigrateProfile(this ResourceGroupResource resourceGroupResource, WaitUntil waitUntil, MigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return GetExtensionClient(resourceGroupResource).MigrateProfile(waitUntil, content, cancellationToken); + } + #region FrontDoorCustomDomainResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index b4f0b8c7fc59..d2df35eefc3f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -21,6 +21,8 @@ internal partial class ResourceGroupResourceExtensionClient : ArmResource { private ClientDiagnostics _defaultClientDiagnostics; private CdnManagementRestOperations _defaultRestClient; + private ClientDiagnostics _profileClientDiagnostics; + private ProfilesRestOperations _profileRestClient; /// Initializes a new instance of the class for mocking. protected ResourceGroupResourceExtensionClient() @@ -36,6 +38,8 @@ internal ResourceGroupResourceExtensionClient(ArmClient client, ResourceIdentifi private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Cdn", ProviderConstants.DefaultProviderNamespace, Diagnostics); private CdnManagementRestOperations DefaultRestClient => _defaultRestClient ??= new CdnManagementRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ProfileClientDiagnostics => _profileClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Cdn", ProfileResource.ResourceType.Namespace, Diagnostics); + private ProfilesRestOperations ProfileRestClient => _profileRestClient ??= new ProfilesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ProfileResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -102,5 +106,105 @@ public virtual Response CheckEndpointNameAvailab throw; } } + + /// + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate + /// Operation Id: Profiles_CanMigrate + /// + /// Properties needed to check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + public virtual async Task> CanMigrateProfileAsync(CanMigrateContent content, CancellationToken cancellationToken = default) + { + using var scope = ProfileClientDiagnostics.CreateScope("ResourceGroupResourceExtensionClient.CanMigrateProfile"); + scope.Start(); + try + { + var response = await ProfileRestClient.CanMigrateAsync(Id.SubscriptionId, Id.ResourceGroupName, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/canMigrate + /// Operation Id: Profiles_CanMigrate + /// + /// Properties needed to check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + public virtual Response CanMigrateProfile(CanMigrateContent content, CancellationToken cancellationToken = default) + { + using var scope = ProfileClientDiagnostics.CreateScope("ResourceGroupResourceExtensionClient.CanMigrateProfile"); + scope.Start(); + try + { + var response = ProfileRestClient.CanMigrate(Id.SubscriptionId, Id.ResourceGroupName, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate + /// Operation Id: Profiles_Migrate + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + public virtual async Task> MigrateProfileAsync(WaitUntil waitUntil, MigrationContent content, CancellationToken cancellationToken = default) + { + using var scope = ProfileClientDiagnostics.CreateScope("ResourceGroupResourceExtensionClient.MigrateProfile"); + scope.Start(); + try + { + var response = await ProfileRestClient.MigrateAsync(Id.SubscriptionId, Id.ResourceGroupName, content, cancellationToken).ConfigureAwait(false); + var operation = new CdnArmOperation(new MigrateResultOperationSource(), ProfileClientDiagnostics, Pipeline, ProfileRestClient.CreateMigrateRequest(Id.SubscriptionId, Id.ResourceGroupName, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/migrate + /// Operation Id: Profiles_Migrate + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + public virtual ArmOperation MigrateProfile(WaitUntil waitUntil, MigrationContent content, CancellationToken cancellationToken = default) + { + using var scope = ProfileClientDiagnostics.CreateScope("ResourceGroupResourceExtensionClient.MigrateProfile"); + scope.Start(); + try + { + var response = ProfileRestClient.Migrate(Id.SubscriptionId, Id.ResourceGroupName, content, cancellationToken); + var operation = new CdnArmOperation(new MigrateResultOperationSource(), ProfileClientDiagnostics, Pipeline, ProfileRestClient.CreateMigrateRequest(Id.SubscriptionId, Id.ResourceGroupName, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs index e13992738b12..c984a325acd9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Cdn.Models; using Azure.ResourceManager.Models; @@ -18,6 +19,7 @@ public partial class FrontDoorCustomDomainData : ResourceData /// Initializes a new instance of FrontDoorCustomDomainData. public FrontDoorCustomDomainData() { + ExtendedProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of FrontDoorCustomDomainData. @@ -33,8 +35,9 @@ public FrontDoorCustomDomainData() /// /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. /// The host name of the domain. Must be a domain name. + /// Key-Value pair representing migration properties for domains. /// Values the customer needs to validate domain ownership. - internal FrontDoorCustomDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string profileName, FrontDoorCustomDomainHttpsContent tlsSettings, WritableSubResource dnsZone, FrontDoorCustomDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId preValidatedCustomDomainResource, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, DomainValidationState? domainValidationState, string hostName, DomainValidationProperties validationProperties) : base(id, name, resourceType, systemData) + internal FrontDoorCustomDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string profileName, FrontDoorCustomDomainHttpsContent tlsSettings, WritableSubResource dnsZone, FrontDoorCustomDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId preValidatedCustomDomainResource, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, DomainValidationState? domainValidationState, string hostName, IDictionary extendedProperties, DomainValidationProperties validationProperties) : base(id, name, resourceType, systemData) { ProfileName = profileName; TlsSettings = tlsSettings; @@ -44,6 +47,7 @@ internal FrontDoorCustomDomainData(ResourceIdentifier id, string name, ResourceT DeploymentStatus = deploymentStatus; DomainValidationState = domainValidationState; HostName = hostName; + ExtendedProperties = extendedProperties; ValidationProperties = validationProperties; } @@ -87,6 +91,8 @@ public ResourceIdentifier PreValidatedCustomDomainResourceId public DomainValidationState? DomainValidationState { get; } /// The host name of the domain. Must be a domain name. public string HostName { get; set; } + /// Key-Value pair representing migration properties for domains. + public IDictionary ExtendedProperties { get; } /// Values the customer needs to validate domain ownership. public DomainValidationProperties ValidationProperties { get; } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs index 1dc17124bd31..e24cc8858e11 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs @@ -346,7 +346,7 @@ public virtual ArmOperation PurgeContent(WaitUntil waitUntil, FrontDoorPurgeCont } /// - /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages /// Operation Id: FrontDoorEndpoints_ListResourceUsage /// @@ -388,7 +388,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint } /// - /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/usages /// Operation Id: FrontDoorEndpoints_ListResourceUsage /// @@ -430,7 +430,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) } /// - /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain /// Operation Id: FrontDoorEndpoints_ValidateCustomDomain /// @@ -456,7 +456,7 @@ public virtual async Task> ValidateCustomDo } /// - /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/validateCustomDomain /// Operation Id: FrontDoorEndpoints_ValidateCustomDomain /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs index 73ff895859c1..057bdb0f3ae2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs @@ -285,7 +285,7 @@ public virtual ArmOperation Update(WaitUntil waitU } /// - /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages /// Operation Id: FrontDoorOriginGroups_ListResourceUsage /// @@ -327,7 +327,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint } /// - /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/originGroups/{originGroupName}/usages /// Operation Id: FrontDoorOriginGroups_ListResourceUsage /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs index d788b28e4d3b..59b976490d3c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs @@ -277,7 +277,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil } /// - /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages /// Operation Id: FrontDoorRuleSets_ListResourceUsage /// @@ -319,7 +319,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint } /// - /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}/usages /// Operation Id: FrontDoorRuleSets_ListResourceUsage /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/MigrateResultOperationSource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/MigrateResultOperationSource.cs new file mode 100644 index 000000000000..a9d8c4126675 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/MigrateResultOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Cdn.Models; + +namespace Azure.ResourceManager.Cdn +{ + internal class MigrateResultOperationSource : IOperationSource + { + MigrateResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return MigrateResult.DeserializeMigrateResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return MigrateResult.DeserializeMigrateResult(document.RootElement); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.Serialization.cs new file mode 100644 index 000000000000..e96b8f341be9 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.Serialization.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class CanMigrateContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("classicResourceReference"); + JsonSerializer.Serialize(writer, ClassicResourceReference); writer.WriteEndObject(); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs new file mode 100644 index 000000000000..2796df2e8d45 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Request body for CanMigrate operation. + public partial class CanMigrateContent + { + /// Initializes a new instance of CanMigrateContent. + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// is null. + public CanMigrateContent(WritableSubResource classicResourceReference) + { + Argument.AssertNotNull(classicResourceReference, nameof(classicResourceReference)); + + ClassicResourceReference = classicResourceReference; + } + + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + internal WritableSubResource ClassicResourceReference { get; } + /// Gets or sets Id. + public ResourceIdentifier ClassicResourceReferenceId + { + get => ClassicResourceReference?.Id; + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs new file mode 100644 index 000000000000..84c5756df397 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Recommended sku for the migration. + public readonly partial struct CanMigrateDefaultSku : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CanMigrateDefaultSku(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardAzureFrontDoorValue = "Standard_AzureFrontDoor"; + private const string PremiumAzureFrontDoorValue = "Premium_AzureFrontDoor"; + + /// Standard_AzureFrontDoor. + public static CanMigrateDefaultSku StandardAzureFrontDoor { get; } = new CanMigrateDefaultSku(StandardAzureFrontDoorValue); + /// Premium_AzureFrontDoor. + public static CanMigrateDefaultSku PremiumAzureFrontDoor { get; } = new CanMigrateDefaultSku(PremiumAzureFrontDoorValue); + /// Determines if two values are the same. + public static bool operator ==(CanMigrateDefaultSku left, CanMigrateDefaultSku right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CanMigrateDefaultSku left, CanMigrateDefaultSku right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CanMigrateDefaultSku(string value) => new CanMigrateDefaultSku(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CanMigrateDefaultSku other && Equals(other); + /// + public bool Equals(CanMigrateDefaultSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs new file mode 100644 index 000000000000..b643184e0871 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class CanMigrateResult + { + internal static CanMigrateResult DeserializeCanMigrateResult(JsonElement element) + { + Optional canMigrate = default; + Optional defaultSku = default; + Optional> errors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("canMigrate")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + canMigrate = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultSku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + defaultSku = new CanMigrateDefaultSku(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MigrationErrorType.DeserializeMigrationErrorType(item)); + } + errors = array; + continue; + } + } + return new CanMigrateResult(Optional.ToNullable(canMigrate), Optional.ToNullable(defaultSku), Optional.ToList(errors)); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs new file mode 100644 index 000000000000..a34a0e568ce3 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Result for canMigrate operation. + public partial class CanMigrateResult + { + /// Initializes a new instance of CanMigrateResult. + internal CanMigrateResult() + { + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of CanMigrateResult. + /// Flag that says if the profile can be migrated. + /// Recommended sku for the migration. + /// + internal CanMigrateResult(bool? canMigrate, CanMigrateDefaultSku? defaultSku, IReadOnlyList errors) + { + CanMigrate = canMigrate; + DefaultSku = defaultSku; + Errors = errors; + } + + /// Flag that says if the profile can be migrated. + public bool? CanMigrate { get; } + /// Recommended sku for the migration. + public CanMigrateDefaultSku? DefaultSku { get; } + /// Gets the errors. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointData.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointData.Serialization.cs index 3d2c4e183389..52250f6c4b7d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointData.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointData.Serialization.cs @@ -202,7 +202,7 @@ internal static CdnEndpointData DeserializeCdnEndpointData(JsonElement element) Optional hostName = default; Optional> origins = default; Optional> originGroups = default; - Optional> customDomains = default; + Optional> customDomains = default; Optional resourceState = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) @@ -443,10 +443,10 @@ internal static CdnEndpointData DeserializeCdnEndpointData(JsonElement element) property0.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(CdnCustomDomainData.DeserializeCdnCustomDomainData(item)); + array.Add(DeepCreatedCustomDomain.DeserializeDeepCreatedCustomDomain(item)); } customDomains = array; continue; diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyData.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyData.Serialization.cs index 9d472c1a4ab1..f9fc68debbc4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyData.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyData.Serialization.cs @@ -62,6 +62,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("managedRules"); writer.WriteObjectValue(ManagedRules); } + if (Optional.IsCollectionDefined(ExtendedProperties)) + { + writer.WritePropertyName("extendedProperties"); + writer.WriteStartObject(); + foreach (var item in ExtendedProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -81,6 +92,7 @@ internal static CdnWebApplicationFirewallPolicyData DeserializeCdnWebApplication Optional customRules = default; Optional managedRules = default; Optional> endpointLinks = default; + Optional> extendedProperties = default; Optional provisioningState = default; Optional resourceState = default; foreach (var property in element.EnumerateObject()) @@ -209,6 +221,21 @@ internal static CdnWebApplicationFirewallPolicyData DeserializeCdnWebApplication endpointLinks = array; continue; } + if (property0.NameEquals("extendedProperties")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + extendedProperties = dictionary; + continue; + } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -233,7 +260,7 @@ internal static CdnWebApplicationFirewallPolicyData DeserializeCdnWebApplication continue; } } - return new CdnWebApplicationFirewallPolicyData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(etag), sku, policySettings.Value, rateLimitRules.Value, customRules.Value, managedRules.Value, Optional.ToList(endpointLinks), Optional.ToNullable(provisioningState), Optional.ToNullable(resourceState)); + return new CdnWebApplicationFirewallPolicyData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(etag), sku, policySettings.Value, rateLimitRules.Value, customRules.Value, managedRules.Value, Optional.ToList(endpointLinks), Optional.ToDictionary(extendedProperties), Optional.ToNullable(provisioningState), Optional.ToNullable(resourceState)); } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.Serialization.cs new file mode 100644 index 000000000000..8171cbbab759 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class DeepCreatedCustomDomain + { + internal static DeepCreatedCustomDomain DeserializeDeepCreatedCustomDomain(JsonElement element) + { + string name = default; + Optional hostName = default; + Optional validationData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("hostName")) + { + hostName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("validationData")) + { + validationData = property0.Value.GetString(); + continue; + } + } + continue; + } + } + return new DeepCreatedCustomDomain(name, hostName.Value, validationData.Value); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs new file mode 100644 index 000000000000..79da00630d2b --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Custom domains created on the CDN endpoint. + public partial class DeepCreatedCustomDomain + { + /// Initializes a new instance of DeepCreatedCustomDomain. + /// Custom domain name. + /// is null. + internal DeepCreatedCustomDomain(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of DeepCreatedCustomDomain. + /// Custom domain name. + /// The host name of the custom domain. Must be a domain name. + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + internal DeepCreatedCustomDomain(string name, string hostName, string validationData) + { + Name = name; + HostName = hostName; + ValidationData = validationData; + } + + /// Custom domain name. + public string Name { get; } + /// The host name of the custom domain. Must be a domain name. + public string HostName { get; } + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + public string ValidationData { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainData.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainData.Serialization.cs index 9fa6cf9417c9..f1fd3e3f9478 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainData.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainData.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Cdn.Models; @@ -47,6 +48,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("hostName"); writer.WriteStringValue(HostName); } + if (Optional.IsCollectionDefined(ExtendedProperties)) + { + writer.WritePropertyName("extendedProperties"); + writer.WriteStartObject(); + foreach (var item in ExtendedProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -65,6 +77,7 @@ internal static FrontDoorCustomDomainData DeserializeFrontDoorCustomDomainData(J Optional deploymentStatus = default; Optional domainValidationState = default; Optional hostName = default; + Optional> extendedProperties = default; Optional validationProperties = default; foreach (var property in element.EnumerateObject()) { @@ -172,6 +185,21 @@ internal static FrontDoorCustomDomainData DeserializeFrontDoorCustomDomainData(J hostName = property0.Value.GetString(); continue; } + if (property0.NameEquals("extendedProperties")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + extendedProperties = dictionary; + continue; + } if (property0.NameEquals("validationProperties")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -186,7 +214,7 @@ internal static FrontDoorCustomDomainData DeserializeFrontDoorCustomDomainData(J continue; } } - return new FrontDoorCustomDomainData(id, name, type, systemData.Value, profileName.Value, tlsSettings.Value, azureDnsZone, preValidatedCustomDomainResourceId.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(deploymentStatus), Optional.ToNullable(domainValidationState), hostName.Value, validationProperties.Value); + return new FrontDoorCustomDomainData(id, name, type, systemData.Value, profileName.Value, tlsSettings.Value, azureDnsZone, preValidatedCustomDomainResourceId.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(deploymentStatus), Optional.ToNullable(domainValidationState), hostName.Value, Optional.ToDictionary(extendedProperties), validationProperties.Value); } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs index 854340c2a470..fbb188d92340 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs @@ -27,7 +27,7 @@ public ManagedRuleGroupOverrideSetting(string ruleGroupName) /// Initializes a new instance of ManagedRuleGroupOverrideSetting. /// Describes the managed rule group within the rule set to override. - /// List of rules that will be disabled. If none specified, all rules in the group will be disabled. + /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. internal ManagedRuleGroupOverrideSetting(string ruleGroupName, IList rules) { RuleGroupName = ruleGroupName; @@ -36,7 +36,7 @@ internal ManagedRuleGroupOverrideSetting(string ruleGroupName, IList Describes the managed rule group within the rule set to override. public string RuleGroupName { get; set; } - /// List of rules that will be disabled. If none specified, all rules in the group will be disabled. + /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. public IList Rules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs new file mode 100644 index 000000000000..5e7588d13efd --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class MigrateResult + { + internal static MigrateResult DeserializeMigrateResult(JsonElement element) + { + Optional migratedProfileResourceId = default; + Optional> errors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("migratedProfileResourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + migratedProfileResourceId = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + if (property.NameEquals("errors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MigrationErrorType.DeserializeMigrationErrorType(item)); + } + errors = array; + continue; + } + } + return new MigrateResult(migratedProfileResourceId, Optional.ToList(errors)); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs new file mode 100644 index 000000000000..acfb022765e3 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Result for migrate operation. + public partial class MigrateResult + { + /// Initializes a new instance of MigrateResult. + internal MigrateResult() + { + Errors = new ChangeTrackingList(); + } + + /// Initializes a new instance of MigrateResult. + /// Arm resource id of the migrated profile. + /// + internal MigrateResult(WritableSubResource migratedProfileResourceId, IReadOnlyList errors) + { + MigratedProfileResourceId = migratedProfileResourceId; + Errors = errors; + } + + /// Arm resource id of the migrated profile. + internal WritableSubResource MigratedProfileResourceId { get; } + /// Gets or sets Id. + public ResourceIdentifier MigratedProfileResourceIdId + { + get => MigratedProfileResourceId?.Id; + } + + /// Gets the errors. + public IReadOnlyList Errors { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.Serialization.cs new file mode 100644 index 000000000000..75e789bc625c --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class MigrationContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + writer.WritePropertyName("classicResourceReference"); + JsonSerializer.Serialize(writer, ClassicResourceReference); writer.WritePropertyName("profileName"); + writer.WriteStringValue(ProfileName); + if (Optional.IsCollectionDefined(MigrationWebApplicationFirewallMappings)) + { + writer.WritePropertyName("migrationWebApplicationFirewallMappings"); + writer.WriteStartArray(); + foreach (var item in MigrationWebApplicationFirewallMappings) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs new file mode 100644 index 000000000000..f8bd3ca169e5 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Request body for Migrate operation. + public partial class MigrationContent + { + /// Initializes a new instance of MigrationContent. + /// Sku for the migration. + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Name of the new profile that need to be created. + /// , or is null. + public MigrationContent(CdnSku sku, WritableSubResource classicResourceReference, string profileName) + { + Argument.AssertNotNull(sku, nameof(sku)); + Argument.AssertNotNull(classicResourceReference, nameof(classicResourceReference)); + Argument.AssertNotNull(profileName, nameof(profileName)); + + Sku = sku; + ClassicResourceReference = classicResourceReference; + ProfileName = profileName; + MigrationWebApplicationFirewallMappings = new ChangeTrackingList(); + } + + /// Sku for the migration. + internal CdnSku Sku { get; } + /// Name of the pricing tier. + public CdnSkuName? SkuName + { + get => Sku?.Name; + } + + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + internal WritableSubResource ClassicResourceReference { get; } + /// Gets or sets Id. + public ResourceIdentifier ClassicResourceReferenceId + { + get => ClassicResourceReference?.Id; + } + + /// Name of the new profile that need to be created. + public string ProfileName { get; } + /// Waf mapping for the migrated profile. + public IList MigrationWebApplicationFirewallMappings { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.Serialization.cs new file mode 100644 index 000000000000..ff9a536c6c18 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class MigrationErrorType + { + internal static MigrationErrorType DeserializeMigrationErrorType(JsonElement element) + { + Optional code = default; + Optional resourceName = default; + Optional errorMessage = default; + Optional nextSteps = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceName")) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorMessage")) + { + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextSteps")) + { + nextSteps = property.Value.GetString(); + continue; + } + } + return new MigrationErrorType(code.Value, resourceName.Value, errorMessage.Value, nextSteps.Value); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs new file mode 100644 index 000000000000..5cfde5ef67ba --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. + public partial class MigrationErrorType + { + /// Initializes a new instance of MigrationErrorType. + internal MigrationErrorType() + { + } + + /// Initializes a new instance of MigrationErrorType. + /// Error code. + /// Resource which has the problem. + /// Error message indicating why the operation failed. + /// Describes what needs to be done to fix the problem. + internal MigrationErrorType(string code, string resourceName, string errorMessage, string nextSteps) + { + Code = code; + ResourceName = resourceName; + ErrorMessage = errorMessage; + NextSteps = nextSteps; + } + + /// Error code. + public string Code { get; } + /// Resource which has the problem. + public string ResourceName { get; } + /// Error message indicating why the operation failed. + public string ErrorMessage { get; } + /// Describes what needs to be done to fix the problem. + public string NextSteps { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.Serialization.cs new file mode 100644 index 000000000000..c5b42aa5dc2b --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class MigrationWebApplicationFirewallMapping : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MigratedFrom)) + { + writer.WritePropertyName("migratedFrom"); + JsonSerializer.Serialize(writer, MigratedFrom); + } + if (Optional.IsDefined(MigratedTo)) + { + writer.WritePropertyName("migratedTo"); + JsonSerializer.Serialize(writer, MigratedTo); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs new file mode 100644 index 000000000000..731965a2a4c5 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Web Application Firewall Mapping. + public partial class MigrationWebApplicationFirewallMapping + { + /// Initializes a new instance of MigrationWebApplicationFirewallMapping. + public MigrationWebApplicationFirewallMapping() + { + } + + /// Migration From Waf policy. + internal WritableSubResource MigratedFrom { get; set; } + /// Gets or sets Id. + public ResourceIdentifier MigratedFromId + { + get => MigratedFrom is null ? default : MigratedFrom.Id; + set + { + if (MigratedFrom is null) + MigratedFrom = new WritableSubResource(); + MigratedFrom.Id = value; + } + } + + /// Migration to Waf policy. + internal WritableSubResource MigratedTo { get; set; } + /// Gets or sets Id. + public ResourceIdentifier MigratedToId + { + get => MigratedTo is null ? default : MigratedTo.Id; + set + { + if (MigratedTo is null) + MigratedTo = new WritableSubResource(); + MigratedTo.Id = value; + } + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileData.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileData.Serialization.cs index 77041e132342..a49d0b8b1240 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileData.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileData.Serialization.cs @@ -36,6 +36,17 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Location); writer.WritePropertyName("properties"); writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ExtendedProperties)) + { + writer.WritePropertyName("extendedProperties"); + writer.WriteStartObject(); + foreach (var item in ExtendedProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(OriginResponseTimeoutSeconds)) { if (OriginResponseTimeoutSeconds != null) @@ -64,6 +75,7 @@ internal static ProfileData DeserializeProfileData(JsonElement element) Optional systemData = default; Optional resourceState = default; Optional provisioningState = default; + Optional> extendedProperties = default; Optional frontDoorId = default; Optional originResponseTimeoutSeconds = default; foreach (var property in element.EnumerateObject()) @@ -152,6 +164,21 @@ internal static ProfileData DeserializeProfileData(JsonElement element) provisioningState = new ProfileProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("extendedProperties")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + extendedProperties = dictionary; + continue; + } if (property0.NameEquals("frontDoorId")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -176,7 +203,7 @@ internal static ProfileData DeserializeProfileData(JsonElement element) continue; } } - return new ProfileData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku, kind.Value, Optional.ToNullable(resourceState), Optional.ToNullable(provisioningState), Optional.ToNullable(frontDoorId), Optional.ToNullable(originResponseTimeoutSeconds)); + return new ProfileData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku, kind.Value, Optional.ToNullable(resourceState), Optional.ToNullable(provisioningState), Optional.ToDictionary(extendedProperties), Optional.ToNullable(frontDoorId), Optional.ToNullable(originResponseTimeoutSeconds)); } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs index 141ea6dbeb57..034bb143dc23 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs @@ -26,6 +26,11 @@ public ProfileResourceState(string value) private const string ActiveValue = "Active"; private const string DeletingValue = "Deleting"; private const string DisabledValue = "Disabled"; + private const string MigratingValue = "Migrating"; + private const string MigratedValue = "Migrated"; + private const string PendingMigrationCommitValue = "PendingMigrationCommit"; + private const string CommittingMigrationValue = "CommittingMigration"; + private const string AbortingMigrationValue = "AbortingMigration"; /// Creating. public static ProfileResourceState Creating { get; } = new ProfileResourceState(CreatingValue); @@ -35,6 +40,16 @@ public ProfileResourceState(string value) public static ProfileResourceState Deleting { get; } = new ProfileResourceState(DeletingValue); /// Disabled. public static ProfileResourceState Disabled { get; } = new ProfileResourceState(DisabledValue); + /// Migrating. + public static ProfileResourceState Migrating { get; } = new ProfileResourceState(MigratingValue); + /// Migrated. + public static ProfileResourceState Migrated { get; } = new ProfileResourceState(MigratedValue); + /// PendingMigrationCommit. + public static ProfileResourceState PendingMigrationCommit { get; } = new ProfileResourceState(PendingMigrationCommitValue); + /// CommittingMigration. + public static ProfileResourceState CommittingMigration { get; } = new ProfileResourceState(CommittingMigrationValue); + /// AbortingMigration. + public static ProfileResourceState AbortingMigration { get; } = new ProfileResourceState(AbortingMigrationValue); /// Determines if two values are the same. public static bool operator ==(ProfileResourceState left, ProfileResourceState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs index 8e6fb6c505c5..cf08d637baf4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs @@ -25,6 +25,7 @@ public ProfileData(AzureLocation location, CdnSku sku) : base(location) Argument.AssertNotNull(sku, nameof(sku)); Sku = sku; + ExtendedProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of ProfileData. @@ -38,14 +39,16 @@ public ProfileData(AzureLocation location, CdnSku sku) : base(location) /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. /// Resource status of the profile. /// Provisioning status of the profile. + /// Key-Value pair representing additional properties for profiles. /// The Id of the frontdoor. /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. - internal ProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CdnSku sku, string kind, ProfileResourceState? resourceState, ProfileProvisioningState? provisioningState, Guid? frontDoorId, int? originResponseTimeoutSeconds) : base(id, name, resourceType, systemData, tags, location) + internal ProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CdnSku sku, string kind, ProfileResourceState? resourceState, ProfileProvisioningState? provisioningState, IDictionary extendedProperties, Guid? frontDoorId, int? originResponseTimeoutSeconds) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Kind = kind; ResourceState = resourceState; ProvisioningState = provisioningState; + ExtendedProperties = extendedProperties; FrontDoorId = frontDoorId; OriginResponseTimeoutSeconds = originResponseTimeoutSeconds; } @@ -70,6 +73,8 @@ public CdnSkuName? SkuName public ProfileResourceState? ResourceState { get; } /// Provisioning status of the profile. public ProfileProvisioningState? ProvisioningState { get; } + /// Key-Value pair representing additional properties for profiles. + public IDictionary ExtendedProperties { get; } /// The Id of the frontdoor. public Guid? FrontDoorId { get; } /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs index 240d6b84c6e0..24644bcb9f1c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs @@ -517,7 +517,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Profile } /// - /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages /// Operation Id: FrontDoorProfiles_ListResourceUsage /// @@ -559,7 +559,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint } /// - /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/usages /// Operation Id: FrontDoorProfiles_ListResourceUsage /// @@ -601,7 +601,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) } /// - /// Check the name availability of a host name. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability /// Operation Id: FrontDoorProfiles_CheckHostNameAvailability /// @@ -627,7 +627,7 @@ public virtual async Task> CheckFrontDoorPro } /// - /// Check the name availability of a host name. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkHostNameAvailability /// Operation Id: FrontDoorProfiles_CheckHostNameAvailability /// @@ -1006,6 +1006,58 @@ public virtual Response GetWafLogAnalyticsRankings(IEnumera } } + /// + /// Commit the migrated Azure Frontdoor(Standard/Premium) profile. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit + /// Operation Id: Profiles_MigrationCommit + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task MigrationCommitAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.MigrationCommit"); + scope.Start(); + try + { + var response = await _profileRestClient.MigrationCommitAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CdnArmOperation(_profileClientDiagnostics, Pipeline, _profileRestClient.CreateMigrationCommitRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Commit the migrated Azure Frontdoor(Standard/Premium) profile. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit + /// Operation Id: Profiles_MigrationCommit + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation MigrationCommit(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.MigrationCommit"); + scope.Start(); + try + { + var response = _profileRestClient.MigrationCommit(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CdnArmOperation(_profileClientDiagnostics, Pipeline, _profileRestClient.CreateMigrationCommitRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The SSO URI changes approximately every 10 minutes. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs index ba164bc3a5f2..56db6f8be13d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs @@ -33,7 +33,7 @@ public CdnCustomDomainsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs index 02fe71027d7b..24dfe72c5521 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs @@ -33,7 +33,7 @@ public CdnEndpointsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs index dc5f239a4d52..0ed122bc3eb3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs @@ -33,7 +33,7 @@ public CdnManagementRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs index d4b57e83284b..742ec31d053c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs @@ -33,7 +33,7 @@ public CdnOriginGroupsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs index f403e355d862..1fba2e57ab6e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs @@ -33,7 +33,7 @@ public CdnOriginsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs index 6609c9fbf1df..7ce86d6615f0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs @@ -33,7 +33,7 @@ public EdgeNodesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs index 878bcc896906..31cd435f1bac 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorCustomDomainsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs index 884d8f31de52..3005e5d7e4ea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorEndpointsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -560,7 +560,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin return message; } - /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -591,7 +591,7 @@ public async Task> ListResourceUsageAsync(string subs } } - /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -649,7 +649,7 @@ internal HttpMessage CreateValidateCustomDomainRequest(string subscriptionId, st return message; } - /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -682,7 +682,7 @@ public async Task> ValidateCustomDomainAsyn } } - /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS.This api isn't work for apex domain. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -805,7 +805,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str return message; } - /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. @@ -838,7 +838,7 @@ public async Task> ListResourceUsageNextPageAsync(str } } - /// Checks the quota and actual usage of the given AzureFrontDoor endpoint under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs index d1ba5c828d11..a04b5d50a9f5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorOriginGroupsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -475,7 +475,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin return message; } - /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -506,7 +506,7 @@ public async Task> ListResourceUsageAsync(string subs } } - /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -627,7 +627,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str return message; } - /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. @@ -660,7 +660,7 @@ public async Task> ListResourceUsageNextPageAsync(str } } - /// Checks the quota and actual usage of the given AzureFrontDoor origin group under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs index 5163902d5d34..1dfa414b9eee 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorOriginsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs index ed9b79a31042..301d5eb342a0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorProfilesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -58,7 +58,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin return message; } - /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. @@ -87,7 +87,7 @@ public async Task> ListResourceUsageAsync(string subs } } - /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. @@ -141,7 +141,7 @@ internal HttpMessage CreateCheckHostNameAvailabilityRequest(string subscriptionI return message; } - /// Check the name availability of a host name. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. @@ -172,7 +172,7 @@ public async Task> CheckHostNameAvailability } } - /// Check the name availability of a host name. + /// Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium or CDN profile which is unique within the resource group. @@ -217,7 +217,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str return message; } - /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. @@ -248,7 +248,7 @@ public async Task> ListResourceUsageNextPageAsync(str } } - /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs index e58a00fc1cf0..08746cc47672 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorRoutesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs index 83d13aaf4845..7b149fd1b95d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorRuleSetsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -391,7 +391,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin return message; } - /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -422,7 +422,7 @@ public async Task> ListResourceUsageAsync(string subs } } - /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. @@ -543,7 +543,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str return message; } - /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. @@ -576,7 +576,7 @@ public async Task> ListResourceUsageNextPageAsync(str } } - /// Checks the quota and actual usage of the given AzureFrontDoor rule set under the given CDN profile. + /// Checks the quota and actual usage of endpoints under the given CDN profile. /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs index 737871f392df..3e335d5ffa2b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs index df30aa50f99e..5ec43acbd164 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorSecretsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs index e2f817782ea5..f85cbc8d3f3e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs @@ -33,7 +33,7 @@ public FrontDoorSecurityPoliciesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs index b2a620cc50ed..36277581a990 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs @@ -34,7 +34,7 @@ public LogAnalyticsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs index d9da272d5bc3..c7ce099038f9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs @@ -33,7 +33,7 @@ public ManagedRuleSetsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs index 18e1a4702e7e..93c0d3ac905d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs @@ -33,7 +33,7 @@ public PoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs index 9fa159c3bef4..7f35163287e0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs @@ -33,7 +33,7 @@ public ProfilesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -489,6 +489,231 @@ public Response Delete(string subscriptionId, string resourceGroupName, string p } } + internal HttpMessage CreateCanMigrateRequest(string subscriptionId, string resourceGroupName, CanMigrateContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Cdn/canMigrate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Properties needed to check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> CanMigrateAsync(string subscriptionId, string resourceGroupName, CanMigrateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCanMigrateRequest(subscriptionId, resourceGroupName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CanMigrateResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = CanMigrateResult.DeserializeCanMigrateResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Properties needed to check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response CanMigrate(string subscriptionId, string resourceGroupName, CanMigrateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCanMigrateRequest(subscriptionId, resourceGroupName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CanMigrateResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = CanMigrateResult.DeserializeCanMigrateResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateMigrateRequest(string subscriptionId, string resourceGroupName, MigrationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Cdn/migrate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task MigrateAsync(string subscriptionId, string resourceGroupName, MigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateMigrateRequest(subscriptionId, resourceGroupName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Migrate(string subscriptionId, string resourceGroupName, MigrationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateMigrateRequest(subscriptionId, resourceGroupName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateMigrationCommitRequest(string subscriptionId, string resourceGroupName, string profileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Cdn/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/migrationCommit", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Commit the migrated Azure Frontdoor(Standard/Premium) profile. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task MigrationCommitAsync(string subscriptionId, string resourceGroupName, string profileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + + using var message = CreateMigrationCommitRequest(subscriptionId, resourceGroupName, profileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Commit the migrated Azure Frontdoor(Standard/Premium) profile. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the CDN profile which is unique within the resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response MigrationCommit(string subscriptionId, string resourceGroupName, string profileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + + using var message = CreateMigrationCommitRequest(subscriptionId, resourceGroupName, profileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateGenerateSsoUriRequest(string subscriptionId, string resourceGroupName, string profileName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs index 091cd1ccb0fc..0fc45b3c1a30 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs @@ -33,7 +33,7 @@ public ResourceUsageRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-01"; + _apiVersion = apiVersion ?? "2022-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md b/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md index 404b36882e39..9e9e1cb3eb74 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true library-name: Cdn namespace: Azure.ResourceManager.Cdn title: CdnManagementClient -require: https://github.com/Azure/azure-rest-api-specs/blob/236c7ce93e9bcb875e1fbe1db8602a3a159ee2ae/specification/cdn/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/cdn/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true