From 6438adf1ada076b32e226f790c071afa77e30bd6 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 18 Apr 2023 22:53:43 +0000 Subject: [PATCH] CodeGen from PR 23615 in Azure/azure-rest-api-specs Merge 8187db92417c65b4bf9b065791ff827ef9fee7d1 into 351c8598465737e5a64dd4b65b57738dc8cf9bf7 --- ...zure.ResourceManager.Cdn.netstandard2.0.cs | 285 +++++++++++++---- .../src/Generated/CdnEndpointData.cs | 6 +- .../CdnWebApplicationFirewallPolicyData.cs | 7 +- .../src/Generated/Extensions/CdnExtensions.cs | 100 ++++++ .../ResourceGroupResourceExtensionClient.cs | 144 +++++++++ .../Generated/FrontDoorCustomDomainData.cs | 8 +- .../src/Generated/FrontDoorEndpointData.cs | 2 +- .../Generated/FrontDoorEndpointResource.cs | 8 +- .../src/Generated/FrontDoorOriginData.cs | 6 +- .../src/Generated/FrontDoorOriginGroupData.cs | 2 +- .../Generated/FrontDoorOriginGroupResource.cs | 4 +- .../src/Generated/FrontDoorRuleSetResource.cs | 4 +- .../CanMigrateResultOperationSource.cs | 31 ++ .../MigrateResultOperationSource.cs | 31 ++ ...agedCertificateProperties.Serialization.cs | 63 +++- ...eFirstPartyManagedCertificateProperties.cs | 38 ++- .../Models/CanMigrateContent.Serialization.cs | 22 ++ .../src/Generated/Models/CanMigrateContent.cs | 35 +++ .../Generated/Models/CanMigrateDefaultSku.cs | 51 ++++ .../Models/CanMigrateResult.Serialization.cs | 63 ++++ .../src/Generated/Models/CanMigrateResult.cs | 40 +++ .../Models/CdnEndpointData.Serialization.cs | 6 +- ...icationFirewallPolicyData.Serialization.cs | 28 +- .../DeepCreatedCustomDomain.Serialization.cs | 57 ++++ .../Models/DeepCreatedCustomDomain.cs | 44 +++ ...FrontDoorCustomDomainData.Serialization.cs | 29 +- .../Models/FrontDoorOriginGroupListResult.cs | 4 +- .../Models/FrontDoorOriginListResult.cs | 4 +- .../Generated/Models/FrontDoorOriginPatch.cs | 2 +- .../Models/ManagedRuleGroupOverrideSetting.cs | 4 +- .../Generated/Models/MetricsGranularity.cs | 54 ++++ .../Models/MetricsResponse.Serialization.cs | 4 +- .../src/Generated/Models/MetricsResponse.cs | 4 +- .../Models/MetricsResponseGranularity.cs | 54 ---- ...MetricsResponseSeriesItem.Serialization.cs | 4 +- .../Models/MetricsResponseSeriesItem.cs | 4 +- .../Models/MetricsResponseSeriesItemUnit.cs | 57 ---- .../src/Generated/Models/MetricsSeriesUnit.cs | 57 ++++ .../Models/MigrateResult.Serialization.cs | 54 ++++ .../src/Generated/Models/MigrateResult.cs | 43 +++ .../Models/MigrationContent.Serialization.cs | 36 +++ .../src/Generated/Models/MigrationContent.cs | 56 ++++ .../MigrationErrorType.Serialization.cs | 51 ++++ .../Generated/Models/MigrationErrorType.cs | 40 +++ ...pplicationFirewallMapping.Serialization.cs | 31 ++ .../MigrationWebApplicationFirewallMapping.cs | 49 +++ ...rofileChangeSkuWafMapping.Serialization.cs | 24 ++ .../Models/ProfileChangeSkuWafMapping.cs | 40 +++ .../Models/ProfileData.Serialization.cs | 32 +- .../Models/ProfilePatch.Serialization.cs | 5 + .../src/Generated/Models/ProfilePatch.cs | 3 + .../Generated/Models/ProfileResourceState.cs | 15 + .../ProfileUpgradeContent.Serialization.cs | 28 ++ .../Generated/Models/ProfileUpgradeContent.cs | 31 ++ .../src/Generated/Models/SecretType.cs | 2 +- .../ValidateSecretContent.Serialization.cs | 29 ++ .../Generated/Models/ValidateSecretContent.cs | 42 +++ .../ValidateSecretResult.Serialization.cs | 43 +++ .../Generated/Models/ValidateSecretResult.cs | 32 ++ .../src/Generated/Models/ValidationStatus.cs | 57 ++++ .../Generated/Models/WafMetricsGranularity.cs | 54 ++++ .../WafMetricsResponse.Serialization.cs | 4 +- .../Generated/Models/WafMetricsResponse.cs | 4 +- .../Models/WafMetricsResponseGranularity.cs | 54 ---- ...MetricsResponseSeriesItem.Serialization.cs | 4 +- .../Models/WafMetricsResponseSeriesItem.cs | 4 +- .../WafMetricsResponseSeriesItemUnit.cs | 48 --- .../Generated/Models/WafMetricsSeriesUnit.cs | 48 +++ .../src/Generated/ProfileData.cs | 11 +- .../src/Generated/ProfileResource.cs | 288 +++++++++++++++++- .../CdnCustomDomainsRestOperations.cs | 2 +- .../CdnEndpointsRestOperations.cs | 2 +- .../CdnManagementRestOperations.cs | 2 +- .../CdnOriginGroupsRestOperations.cs | 2 +- .../CdnOriginsRestOperations.cs | 2 +- .../RestOperations/EdgeNodesRestOperations.cs | 2 +- .../FrontDoorCustomDomainsRestOperations.cs | 10 +- .../FrontDoorEndpointsRestOperations.cs | 14 +- .../FrontDoorOriginGroupsRestOperations.cs | 10 +- .../FrontDoorOriginsRestOperations.cs | 2 +- .../FrontDoorProfilesRestOperations.cs | 279 ++++++++++++++++- .../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 | 219 ++++++++++++- .../ResourceUsageRestOperations.cs | 2 +- .../Azure.ResourceManager.Cdn/src/autorest.md | 2 +- 92 files changed, 2818 insertions(+), 384 deletions(-) create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/CanMigrateResultOperationSource.cs 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/MetricsGranularity.cs delete mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs delete mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsSeriesUnit.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 create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.Serialization.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsGranularity.cs delete mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs delete mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs create mode 100644 sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsSeriesUnit.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 f33d823992f39..3cc2c5445517b 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.ResourceManager.ArmOperation CanMigrateProfile(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, Azure.WaitUntil waitUntil, 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.WaitUntil waitUntil, 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,7 +713,9 @@ 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.IReadOnlyDictionary ExtendedProperties { get { throw null; } } public System.Guid? FrontDoorId { get { throw null; } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string Kind { get { throw null; } } public int? OriginResponseTimeoutSeconds { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.ProfileProvisioningState? ProvisioningState { get { throw null; } } @@ -722,6 +730,8 @@ protected ProfileResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CheckEndpointNameAvailabilityFrontDoorProfile(Azure.ResourceManager.Cdn.Models.EndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckEndpointNameAvailabilityFrontDoorProfileAsync(Azure.ResourceManager.Cdn.Models.EndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckFrontDoorProfileHostNameAvailability(Azure.ResourceManager.Cdn.Models.HostNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckFrontDoorProfileHostNameAvailabilityAsync(Azure.ResourceManager.Cdn.Models.HostNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string profileName) { throw null; } @@ -778,12 +788,18 @@ protected ProfileResource() { } 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(Azure.ResourceManager.Cdn.Models.ProfileResourceGetWafLogAnalyticsRankingsOptions options, 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; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.ProfilePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.ProfilePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpgradeFrontDoorProfile(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.ProfileUpgradeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpgradeFrontDoorProfileAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.ProfileUpgradeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateSecretFrontDoorProfile(Azure.ResourceManager.Cdn.Models.ValidateSecretContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateSecretFrontDoorProfileAsync(Azure.ResourceManager.Cdn.Models.ValidateSecretContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Cdn.Models @@ -791,6 +807,12 @@ namespace Azure.ResourceManager.Cdn.Models public partial class AzureFirstPartyManagedCertificateProperties : Azure.ResourceManager.Cdn.Models.FrontDoorSecretProperties { public AzureFirstPartyManagedCertificateProperties() { } + public string CertificateAuthority { get { throw null; } } + public string ExpirationDate { get { throw null; } } + public Azure.Core.ResourceIdentifier SecretSourceId { get { throw null; } } + public string Subject { get { throw null; } } + public System.Collections.Generic.IList SubjectAlternativeNames { get { throw null; } } + public string Thumbprint { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct CacheBehaviorSetting : System.IEquatable @@ -869,6 +891,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 { @@ -1403,6 +1455,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) { } @@ -2546,66 +2605,94 @@ public ManagedRuleSetDefinition() { } public static bool operator !=(Azure.ResourceManager.Cdn.Models.MatchProcessingBehavior left, Azure.ResourceManager.Cdn.Models.MatchProcessingBehavior right) { throw null; } public override string ToString() { throw null; } } - public partial class MetricsResponse - { - internal MetricsResponse() { } - public System.DateTimeOffset? DateTimeBegin { get { throw null; } } - public System.DateTimeOffset? DateTimeEnd { get { throw null; } } - public Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity? Granularity { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Series { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MetricsResponseGranularity : System.IEquatable + public readonly partial struct MetricsGranularity : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public MetricsResponseGranularity(string value) { throw null; } - public static Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity P1D { get { throw null; } } - public static Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity PT1H { get { throw null; } } - public static Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity PT5M { get { throw null; } } - public bool Equals(Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity other) { throw null; } + public MetricsGranularity(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.MetricsGranularity P1D { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.MetricsGranularity PT1H { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.MetricsGranularity PT5M { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.MetricsGranularity 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.MetricsResponseGranularity left, Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity right) { throw null; } - public static implicit operator Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity left, Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity right) { throw null; } + public static bool operator ==(Azure.ResourceManager.Cdn.Models.MetricsGranularity left, Azure.ResourceManager.Cdn.Models.MetricsGranularity right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.MetricsGranularity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.MetricsGranularity left, Azure.ResourceManager.Cdn.Models.MetricsGranularity right) { throw null; } public override string ToString() { throw null; } } + public partial class MetricsResponse + { + internal MetricsResponse() { } + public System.DateTimeOffset? DateTimeBegin { get { throw null; } } + public System.DateTimeOffset? DateTimeEnd { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.MetricsGranularity? Granularity { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Series { get { throw null; } } + } public partial class MetricsResponseSeriesItem { internal MetricsResponseSeriesItem() { } public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } public string Metric { get { throw null; } } - public Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit? Unit { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit? Unit { get { throw null; } } + } + public partial class MetricsResponseSeriesPropertiesItemsItem + { + internal MetricsResponseSeriesPropertiesItemsItem() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MetricsResponseSeriesItemUnit : System.IEquatable + public readonly partial struct MetricsSeriesUnit : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public MetricsResponseSeriesItemUnit(string value) { throw null; } - public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit BitsPerSecond { get { throw null; } } - public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit Bytes { get { throw null; } } - public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit Count { get { throw null; } } - public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit MilliSeconds { get { throw null; } } - public bool Equals(Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit other) { throw null; } + public MetricsSeriesUnit(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit BitsPerSecond { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit Bytes { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit Count { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit MilliSeconds { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit 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.MetricsResponseSeriesItemUnit left, Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit right) { throw null; } - public static implicit operator Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit left, Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit right) { throw null; } + public static bool operator ==(Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit left, Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit left, Azure.ResourceManager.Cdn.Models.MetricsSeriesUnit right) { throw null; } public override string ToString() { throw null; } } - public partial class MetricsResponseSeriesPropertiesItemsItem + public partial class MigrateResult { - internal MetricsResponseSeriesPropertiesItemsItem() { } - public string Name { get { throw null; } } - public string Value { get { throw null; } } + 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 @@ -2955,9 +3042,16 @@ public PostArgsMatchCondition(Azure.ResourceManager.Cdn.Models.PostArgsMatchCond public static bool operator !=(Azure.ResourceManager.Cdn.Models.PrivateEndpointStatus left, Azure.ResourceManager.Cdn.Models.PrivateEndpointStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class ProfileChangeSkuWafMapping + { + public ProfileChangeSkuWafMapping(string securityPolicyName, Azure.ResourceManager.Resources.Models.WritableSubResource changeToWafPolicy) { } + public Azure.Core.ResourceIdentifier ChangeToWafPolicyId { get { throw null; } } + public string SecurityPolicyName { get { throw null; } } + } public partial class ProfilePatch { public ProfilePatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public int? OriginResponseTimeoutSeconds { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } @@ -3033,10 +3127,15 @@ public ProfileResourceGetWafLogAnalyticsRankingsOptions(System.Collections.Gener 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; } @@ -3047,6 +3146,11 @@ public ProfileResourceGetWafLogAnalyticsRankingsOptions(System.Collections.Gener public static bool operator !=(Azure.ResourceManager.Cdn.Models.ProfileResourceState left, Azure.ResourceManager.Cdn.Models.ProfileResourceState right) { throw null; } public override string ToString() { throw null; } } + public partial class ProfileUpgradeContent + { + public ProfileUpgradeContent(System.Collections.Generic.IEnumerable wafMappingList) { } + public System.Collections.Generic.IList WafMappingList { get { throw null; } } + } public partial class PurgeContent { public PurgeContent(System.Collections.Generic.IEnumerable contentPaths) { } @@ -3643,6 +3747,26 @@ public RouteConfigurationOverrideActionProperties(Azure.ResourceManager.Cdn.Mode public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecretType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecretType(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.SecretType AzureFirstPartyManagedCertificate { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.SecretType CustomerCertificate { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.SecretType ManagedCertificate { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.SecretType UriSigningKey { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.SecretType 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.SecretType left, Azure.ResourceManager.Cdn.Models.SecretType right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.SecretType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.SecretType left, Azure.ResourceManager.Cdn.Models.SecretType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SecureDeliveryProtocolType : System.IEquatable { private readonly object _dummy; @@ -4169,6 +4293,39 @@ internal ValidateProbeResult() { } public bool? IsValid { get { throw null; } } public string Message { get { throw null; } } } + public partial class ValidateSecretContent + { + public ValidateSecretContent(Azure.ResourceManager.Cdn.Models.SecretType secretType, Azure.ResourceManager.Resources.Models.WritableSubResource secretSource) { } + public Azure.Core.ResourceIdentifier SecretSourceId { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.SecretType SecretType { get { throw null; } } + public string SecretVersion { get { throw null; } set { } } + } + public partial class ValidateSecretResult + { + internal ValidateSecretResult() { } + public string Message { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.ValidationStatus? Status { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ValidationStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ValidationStatus(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.ValidationStatus AccessDenied { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.ValidationStatus CertificateExpired { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.ValidationStatus Invalid { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.ValidationStatus Valid { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.ValidationStatus 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.ValidationStatus left, Azure.ResourceManager.Cdn.Models.ValidationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.ValidationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.ValidationStatus left, Azure.ResourceManager.Cdn.Models.ValidationStatus right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct WafAction : System.IEquatable { @@ -4250,64 +4407,64 @@ internal ValidateProbeResult() { } public static bool operator !=(Azure.ResourceManager.Cdn.Models.WafMetric left, Azure.ResourceManager.Cdn.Models.WafMetric right) { throw null; } public override string ToString() { throw null; } } - public partial class WafMetricsResponse - { - internal WafMetricsResponse() { } - public System.DateTimeOffset? DateTimeBegin { get { throw null; } } - public System.DateTimeOffset? DateTimeEnd { get { throw null; } } - public Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity? Granularity { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Series { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct WafMetricsResponseGranularity : System.IEquatable + public readonly partial struct WafMetricsGranularity : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public WafMetricsResponseGranularity(string value) { throw null; } - public static Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity P1D { get { throw null; } } - public static Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity PT1H { get { throw null; } } - public static Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity PT5M { get { throw null; } } - public bool Equals(Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity other) { throw null; } + public WafMetricsGranularity(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.WafMetricsGranularity P1D { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.WafMetricsGranularity PT1H { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.WafMetricsGranularity PT5M { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.WafMetricsGranularity 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.WafMetricsResponseGranularity left, Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity right) { throw null; } - public static implicit operator Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity left, Azure.ResourceManager.Cdn.Models.WafMetricsResponseGranularity right) { throw null; } + public static bool operator ==(Azure.ResourceManager.Cdn.Models.WafMetricsGranularity left, Azure.ResourceManager.Cdn.Models.WafMetricsGranularity right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.WafMetricsGranularity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.WafMetricsGranularity left, Azure.ResourceManager.Cdn.Models.WafMetricsGranularity right) { throw null; } public override string ToString() { throw null; } } + public partial class WafMetricsResponse + { + internal WafMetricsResponse() { } + public System.DateTimeOffset? DateTimeBegin { get { throw null; } } + public System.DateTimeOffset? DateTimeEnd { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.WafMetricsGranularity? Granularity { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Series { get { throw null; } } + } public partial class WafMetricsResponseSeriesItem { internal WafMetricsResponseSeriesItem() { } public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } public System.Collections.Generic.IReadOnlyList Groups { get { throw null; } } public string Metric { get { throw null; } } - public Azure.ResourceManager.Cdn.Models.WafMetricsResponseSeriesItemUnit? Unit { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit? Unit { get { throw null; } } + } + public partial class WafMetricsResponseSeriesPropertiesItemsItem + { + internal WafMetricsResponseSeriesPropertiesItemsItem() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct WafMetricsResponseSeriesItemUnit : System.IEquatable + public readonly partial struct WafMetricsSeriesUnit : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public WafMetricsResponseSeriesItemUnit(string value) { throw null; } - public static Azure.ResourceManager.Cdn.Models.WafMetricsResponseSeriesItemUnit Count { get { throw null; } } - public bool Equals(Azure.ResourceManager.Cdn.Models.WafMetricsResponseSeriesItemUnit other) { throw null; } + public WafMetricsSeriesUnit(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit Count { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit 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.WafMetricsResponseSeriesItemUnit left, Azure.ResourceManager.Cdn.Models.WafMetricsResponseSeriesItemUnit right) { throw null; } - public static implicit operator Azure.ResourceManager.Cdn.Models.WafMetricsResponseSeriesItemUnit (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Cdn.Models.WafMetricsResponseSeriesItemUnit left, Azure.ResourceManager.Cdn.Models.WafMetricsResponseSeriesItemUnit right) { throw null; } + public static bool operator ==(Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit left, Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit left, Azure.ResourceManager.Cdn.Models.WafMetricsSeriesUnit right) { throw null; } public override string ToString() { throw null; } } - public partial class WafMetricsResponseSeriesPropertiesItemsItem - { - internal WafMetricsResponseSeriesPropertiesItemsItem() { } - public string Name { get { throw null; } } - public string Value { get { throw null; } } - } public partial class WafPolicyManagedRuleSet { public WafPolicyManagedRuleSet(string ruleSetType, string ruleSetVersion) { } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs index d1f86767d1576..0807623080914 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs @@ -27,7 +27,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. @@ -57,7 +57,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; @@ -140,7 +140,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 186a9a2db82ac..ec0d4d1d2fddb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs @@ -31,6 +31,7 @@ public CdnWebApplicationFirewallPolicyData(AzureLocation location, CdnSku sku) : Sku = sku; EndpointLinks = new ChangeTrackingList(); + ExtendedProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of CdnWebApplicationFirewallPolicyData. @@ -47,9 +48,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; @@ -58,6 +60,7 @@ internal CdnWebApplicationFirewallPolicyData(ResourceIdentifier id, string name, CustomSettings = customSettings; ManagedRules = managedRules; EndpointLinks = endpointLinks; + ExtendedProperties = extendedProperties; ProvisioningState = provisioningState; ResourceState = resourceState; } @@ -121,6 +124,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 33559f67d6c8f..fd387cad65732 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs @@ -511,6 +511,106 @@ public static Response CheckEndpointNameAvailabi return GetResourceGroupResourceExtensionClient(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. + /// 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 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, WaitUntil waitUntil, CanMigrateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return await GetResourceGroupResourceExtensionClient(resourceGroupResource).CanMigrateProfileAsync(waitUntil, 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. + /// 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 check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + /// is null. + public static ArmOperation CanMigrateProfile(this ResourceGroupResource resourceGroupResource, WaitUntil waitUntil, CanMigrateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + return GetResourceGroupResourceExtensionClient(resourceGroupResource).CanMigrateProfile(waitUntil, 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 GetResourceGroupResourceExtensionClient(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 GetResourceGroupResourceExtensionClient(resourceGroupResource).MigrateProfile(waitUntil, content, cancellationToken); + } + /// /// Check the availability of a resource name. This is needed for resources where name is globally unique, such as a CDN endpoint. /// 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 96fe20d50a773..2708de3c4624d 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) { @@ -118,5 +122,145 @@ 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 + /// + /// + /// + /// 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 check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + public virtual async Task> CanMigrateProfileAsync(WaitUntil waitUntil, 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); + var operation = new CdnArmOperation(new CanMigrateResultOperationSource(), ProfileClientDiagnostics, Pipeline, ProfileRestClient.CreateCanMigrateRequest(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; + } + } + + /// + /// 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 + /// + /// + /// + /// 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 check if cdn profile or classic frontdoor can be migrated. + /// The cancellation token to use. + public virtual ArmOperation CanMigrateProfile(WaitUntil waitUntil, 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); + var operation = new CdnArmOperation(new CanMigrateResultOperationSource(), ProfileClientDiagnostics, Pipeline, ProfileRestClient.CreateCanMigrateRequest(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; + } + } + + /// + /// 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 e63b60e5ed464..4f54c156f785d 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; @@ -21,6 +22,7 @@ public partial class FrontDoorCustomDomainData : ResourceData /// Initializes a new instance of FrontDoorCustomDomainData. public FrontDoorCustomDomainData() { + ExtendedProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of FrontDoorCustomDomainData. @@ -36,8 +38,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; @@ -47,6 +50,7 @@ internal FrontDoorCustomDomainData(ResourceIdentifier id, string name, ResourceT DeploymentStatus = deploymentStatus; DomainValidationState = domainValidationState; HostName = hostName; + ExtendedProperties = extendedProperties; ValidationProperties = validationProperties; } @@ -90,6 +94,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/FrontDoorEndpointData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointData.cs index aea8e86392849..e163aa9c3aecd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.Cdn { /// /// A class representing the FrontDoorEndpoint data model. - /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format <endpointname>.azureedge.net. + /// Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format <endpointname>.azureedge.net. /// public partial class FrontDoorEndpointData : TrackedResourceData { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs index d13a5d6f18f56..bbd2574831271 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs @@ -426,7 +426,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 Azure Front Door profile. /// /// /// Request Path @@ -448,7 +448,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(Cancellation } /// - /// 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 Azure Front Door profile. /// /// /// Request Path @@ -470,7 +470,7 @@ public virtual Pageable GetResourceUsages(CancellationToken canc } /// - /// 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 Azure Front Door endpoint in DNS. /// /// /// Request Path @@ -504,7 +504,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 Azure Front Door endpoint in DNS. /// /// /// Request Path diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs index 689e8c2de1be1..9cea0294083d4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.Cdn { /// /// A class representing the FrontDoorOrigin data model. - /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// Azure Front Door origin is the source of the content being delivered via Azure Front Door. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. /// public partial class FrontDoorOriginData : ResourceData { @@ -33,7 +33,7 @@ public FrontDoorOriginData() /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. /// The value of the HTTP port. Must be between 1 and 65535. /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. /// The properties of the private link resource for private origin. @@ -80,7 +80,7 @@ public ResourceIdentifier OriginId public int? HttpPort { get; set; } /// The value of the HTTPS port. Must be between 1 and 65535. public int? HttpsPort { get; set; } - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. public string OriginHostHeader { get; set; } /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. public int? Priority { get; set; } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs index 64b4b8a03224a..f094624533292 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.Cdn { /// /// A class representing the FrontDoorOriginGroup data model. - /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure Front Door. /// public partial class FrontDoorOriginGroupData : ResourceData { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs index 9936df2f2e05f..0f16a30a605be 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs @@ -349,7 +349,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 Azure Front Door profile.. /// /// /// Request Path @@ -371,7 +371,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(Cancellation } /// - /// 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 Azure Front Door profile.. /// /// /// Request Path diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs index 22f3aac4d8c3a..a0fbd09115dda 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs @@ -341,7 +341,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 Azure Front Door profile.. /// /// /// Request Path @@ -363,7 +363,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(Cancellation } /// - /// 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 Azure Front Door profile.. /// /// /// Request Path diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/CanMigrateResultOperationSource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/CanMigrateResultOperationSource.cs new file mode 100644 index 0000000000000..de24706aa04c9 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/CanMigrateResultOperationSource.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 CanMigrateResultOperationSource : IOperationSource + { + CanMigrateResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return CanMigrateResult.DeserializeCanMigrateResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return CanMigrateResult.DeserializeCanMigrateResult(document.RootElement); + } + } +} 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 0000000000000..a9d8c41266750 --- /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/AzureFirstPartyManagedCertificateProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.Serialization.cs index 308f5be7c9f7a..d49707a78085c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.Serialization.cs @@ -5,8 +5,10 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Cdn.Models { @@ -15,6 +17,16 @@ public partial class AzureFirstPartyManagedCertificateProperties : IUtf8JsonSeri void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsCollectionDefined(SubjectAlternativeNames)) + { + writer.WritePropertyName("subjectAlternativeNames"u8); + writer.WriteStartArray(); + foreach (var item in SubjectAlternativeNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } writer.WritePropertyName("type"u8); writer.WriteStringValue(SecretType.ToString()); writer.WriteEndObject(); @@ -26,16 +38,65 @@ internal static AzureFirstPartyManagedCertificateProperties DeserializeAzureFirs { return null; } + Optional secretSource = default; + Optional subject = default; + Optional expirationDate = default; + Optional certificateAuthority = default; + Optional> subjectAlternativeNames = default; + Optional thumbprint = default; SecretType type = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("secretSource"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + secretSource = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("subject"u8)) + { + subject = property.Value.GetString(); + continue; + } + if (property.NameEquals("expirationDate"u8)) + { + expirationDate = property.Value.GetString(); + continue; + } + if (property.NameEquals("certificateAuthority"u8)) + { + certificateAuthority = property.Value.GetString(); + continue; + } + if (property.NameEquals("subjectAlternativeNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + subjectAlternativeNames = array; + continue; + } + if (property.NameEquals("thumbprint"u8)) + { + thumbprint = property.Value.GetString(); + continue; + } if (property.NameEquals("type"u8)) { type = new SecretType(property.Value.GetString()); continue; } } - return new AzureFirstPartyManagedCertificateProperties(type); + return new AzureFirstPartyManagedCertificateProperties(type, secretSource, subject.Value, expirationDate.Value, certificateAuthority.Value, Optional.ToList(subjectAlternativeNames), thumbprint.Value); } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs index e3b39d2efd6f1..2e20029f0fdf3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs @@ -5,6 +5,10 @@ #nullable disable +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + namespace Azure.ResourceManager.Cdn.Models { /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. @@ -13,14 +17,46 @@ public partial class AzureFirstPartyManagedCertificateProperties : FrontDoorSecr /// Initializes a new instance of AzureFirstPartyManagedCertificateProperties. public AzureFirstPartyManagedCertificateProperties() { + SubjectAlternativeNames = new ChangeTrackingList(); SecretType = SecretType.AzureFirstPartyManagedCertificate; } /// Initializes a new instance of AzureFirstPartyManagedCertificateProperties. /// The type of the secret resource. - internal AzureFirstPartyManagedCertificateProperties(SecretType secretType) : base(secretType) + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// Subject name in the certificate. + /// Certificate expiration date. + /// Certificate issuing authority. + /// The list of SANs. + /// Certificate thumbprint. + internal AzureFirstPartyManagedCertificateProperties(SecretType secretType, WritableSubResource secretSource, string subject, string expirationDate, string certificateAuthority, IList subjectAlternativeNames, string thumbprint) : base(secretType) { + SecretSource = secretSource; + Subject = subject; + ExpirationDate = expirationDate; + CertificateAuthority = certificateAuthority; + SubjectAlternativeNames = subjectAlternativeNames; + Thumbprint = thumbprint; SecretType = secretType; } + + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + internal WritableSubResource SecretSource { get; } + /// Gets or sets Id. + public ResourceIdentifier SecretSourceId + { + get => SecretSource?.Id; + } + + /// Subject name in the certificate. + public string Subject { get; } + /// Certificate expiration date. + public string ExpirationDate { get; } + /// Certificate issuing authority. + public string CertificateAuthority { get; } + /// The list of SANs. + public IList SubjectAlternativeNames { get; } + /// Certificate thumbprint. + public string Thumbprint { get; } } } 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 0000000000000..4efce05474889 --- /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"u8); + 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 0000000000000..2796df2e8d454 --- /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 0000000000000..84c5756df397c --- /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 0000000000000..d556a0a2341b2 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs @@ -0,0 +1,63 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional canMigrate = default; + Optional defaultSku = default; + Optional> errors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("canMigrate"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + canMigrate = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultSku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultSku = new CanMigrateDefaultSku(property.Value.GetString()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + 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 0000000000000..a34a0e568ce36 --- /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 6be1c9c9916fd..464dd058eeadc 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 @@ -206,7 +206,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()) @@ -436,10 +436,10 @@ internal static CdnEndpointData DeserializeCdnEndpointData(JsonElement element) { 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 6d556634349e6..e45690d410853 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"u8); writer.WriteObjectValue(ManagedRules); } + if (Optional.IsCollectionDefined(ExtendedProperties)) + { + writer.WritePropertyName("extendedProperties"u8); + writer.WriteStartObject(); + foreach (var item in ExtendedProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -85,6 +96,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()) @@ -205,6 +217,20 @@ internal static CdnWebApplicationFirewallPolicyData DeserializeCdnWebApplication endpointLinks = array; continue; } + if (property0.NameEquals("extendedProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + 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"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -227,7 +253,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 0000000000000..1c5cbef0b5324 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.Serialization.cs @@ -0,0 +1,57 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + Optional hostName = default; + Optional validationData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("hostName"u8)) + { + hostName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("validationData"u8)) + { + 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 0000000000000..79da00630d2bc --- /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 a019eb80f6bd6..1726f99a568e4 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"u8); writer.WriteStringValue(HostName); } + if (Optional.IsCollectionDefined(ExtendedProperties)) + { + writer.WritePropertyName("extendedProperties"u8); + writer.WriteStartObject(); + foreach (var item in ExtendedProperties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); writer.WriteEndObject(); } @@ -69,6 +81,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()) { @@ -170,6 +183,20 @@ internal static FrontDoorCustomDomainData DeserializeFrontDoorCustomDomainData(J hostName = property0.Value.GetString(); continue; } + if (property0.NameEquals("extendedProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + 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"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -183,7 +210,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/FrontDoorOriginGroupListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupListResult.cs index 643be8153d57c..5a3581aec5c88 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupListResult.cs @@ -21,7 +21,7 @@ internal FrontDoorOriginGroupListResult() } /// Initializes a new instance of FrontDoorOriginGroupListResult. - /// List of CDN origin groups within an endpoint. + /// List of Azure Front Door origin groups within an Azure Front Door endpoint. /// URL to get the next set of origin objects if there are any. internal FrontDoorOriginGroupListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal FrontDoorOriginGroupListResult(IReadOnlyList NextLink = nextLink; } - /// List of CDN origin groups within an endpoint. + /// List of Azure Front Door origin groups within an Azure Front Door endpoint. public IReadOnlyList Value { get; } /// URL to get the next set of origin objects if there are any. public string NextLink { get; } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs index 414688ad19d20..43c4420bbee44 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs @@ -21,7 +21,7 @@ internal FrontDoorOriginListResult() } /// Initializes a new instance of FrontDoorOriginListResult. - /// List of CDN origins within an endpoint. + /// List of Azure Front Door origins within an Azure Front Door endpoint. /// URL to get the next set of origin objects if there are any. internal FrontDoorOriginListResult(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal FrontDoorOriginListResult(IReadOnlyList value, str NextLink = nextLink; } - /// List of CDN origins within an endpoint. + /// List of Azure Front Door origins within an Azure Front Door endpoint. public IReadOnlyList Value { get; } /// URL to get the next set of origin objects if there are any. public string NextLink { get; } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs index 84f241cc4e9f0..a21fde1814d40 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs @@ -40,7 +40,7 @@ public ResourceIdentifier OriginId public int? HttpPort { get; set; } /// The value of the HTTPS port. Must be between 1 and 65535. public int? HttpsPort { get; set; } - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. public string OriginHostHeader { get; set; } /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. public int? Priority { get; set; } 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 854340c2a4707..fbb188d92340b 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/MetricsGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsGranularity.cs new file mode 100644 index 0000000000000..a48494231eeb7 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsGranularity.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// The MetricsGranularity. + public readonly partial struct MetricsGranularity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MetricsGranularity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PT5MValue = "PT5M"; + private const string PT1HValue = "PT1H"; + private const string P1DValue = "P1D"; + + /// PT5M. + public static MetricsGranularity PT5M { get; } = new MetricsGranularity(PT5MValue); + /// PT1H. + public static MetricsGranularity PT1H { get; } = new MetricsGranularity(PT1HValue); + /// P1D. + public static MetricsGranularity P1D { get; } = new MetricsGranularity(P1DValue); + /// Determines if two values are the same. + public static bool operator ==(MetricsGranularity left, MetricsGranularity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MetricsGranularity left, MetricsGranularity right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MetricsGranularity(string value) => new MetricsGranularity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MetricsGranularity other && Equals(other); + /// + public bool Equals(MetricsGranularity 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/MetricsResponse.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.Serialization.cs index 945bb81629035..acbecece30025 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.Serialization.cs @@ -22,7 +22,7 @@ internal static MetricsResponse DeserializeMetricsResponse(JsonElement element) } Optional dateTimeBegin = default; Optional dateTimeEnd = default; - Optional granularity = default; + Optional granularity = default; Optional> series = default; foreach (var property in element.EnumerateObject()) { @@ -50,7 +50,7 @@ internal static MetricsResponse DeserializeMetricsResponse(JsonElement element) { continue; } - granularity = new MetricsResponseGranularity(property.Value.GetString()); + granularity = new MetricsGranularity(property.Value.GetString()); continue; } if (property.NameEquals("series"u8)) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs index d358264676c71..f9481d603725a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs @@ -25,7 +25,7 @@ internal MetricsResponse() /// /// /// - internal MetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, MetricsResponseGranularity? granularity, IReadOnlyList series) + internal MetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, MetricsGranularity? granularity, IReadOnlyList series) { DateTimeBegin = dateTimeBegin; DateTimeEnd = dateTimeEnd; @@ -38,7 +38,7 @@ internal MetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTime /// Gets the date time end. public DateTimeOffset? DateTimeEnd { get; } /// Gets the granularity. - public MetricsResponseGranularity? Granularity { get; } + public MetricsGranularity? Granularity { get; } /// Gets the series. public IReadOnlyList Series { get; } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs deleted file mode 100644 index c7c75de5e4a4c..0000000000000 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Cdn.Models -{ - /// The MetricsResponseGranularity. - public readonly partial struct MetricsResponseGranularity : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MetricsResponseGranularity(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PT5MValue = "PT5M"; - private const string PT1HValue = "PT1H"; - private const string P1DValue = "P1D"; - - /// PT5M. - public static MetricsResponseGranularity PT5M { get; } = new MetricsResponseGranularity(PT5MValue); - /// PT1H. - public static MetricsResponseGranularity PT1H { get; } = new MetricsResponseGranularity(PT1HValue); - /// P1D. - public static MetricsResponseGranularity P1D { get; } = new MetricsResponseGranularity(P1DValue); - /// Determines if two values are the same. - public static bool operator ==(MetricsResponseGranularity left, MetricsResponseGranularity right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MetricsResponseGranularity left, MetricsResponseGranularity right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MetricsResponseGranularity(string value) => new MetricsResponseGranularity(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MetricsResponseGranularity other && Equals(other); - /// - public bool Equals(MetricsResponseGranularity 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/MetricsResponseSeriesItem.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.Serialization.cs index 67012f776d2e9..07f0e90579e27 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.Serialization.cs @@ -20,7 +20,7 @@ internal static MetricsResponseSeriesItem DeserializeMetricsResponseSeriesItem(J return null; } Optional metric = default; - Optional unit = default; + Optional unit = default; Optional> groups = default; Optional> data = default; foreach (var property in element.EnumerateObject()) @@ -36,7 +36,7 @@ internal static MetricsResponseSeriesItem DeserializeMetricsResponseSeriesItem(J { continue; } - unit = new MetricsResponseSeriesItemUnit(property.Value.GetString()); + unit = new MetricsSeriesUnit(property.Value.GetString()); continue; } if (property.NameEquals("groups"u8)) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs index c3b2d726ddfdc..874bba61e1288 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs @@ -25,7 +25,7 @@ internal MetricsResponseSeriesItem() /// /// /// - internal MetricsResponseSeriesItem(string metric, MetricsResponseSeriesItemUnit? unit, IReadOnlyList groups, IReadOnlyList data) + internal MetricsResponseSeriesItem(string metric, MetricsSeriesUnit? unit, IReadOnlyList groups, IReadOnlyList data) { Metric = metric; Unit = unit; @@ -36,7 +36,7 @@ internal MetricsResponseSeriesItem(string metric, MetricsResponseSeriesItemUnit? /// Gets the metric. public string Metric { get; } /// Gets the unit. - public MetricsResponseSeriesItemUnit? Unit { get; } + public MetricsSeriesUnit? Unit { get; } /// Gets the groups. public IReadOnlyList Groups { get; } /// Gets the data. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs deleted file mode 100644 index 9da6c1bb349ac..0000000000000 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Cdn.Models -{ - /// The MetricsResponseSeriesItemUnit. - public readonly partial struct MetricsResponseSeriesItemUnit : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MetricsResponseSeriesItemUnit(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CountValue = "count"; - private const string BytesValue = "bytes"; - private const string BitsPerSecondValue = "bitsPerSecond"; - private const string MilliSecondsValue = "milliSeconds"; - - /// count. - public static MetricsResponseSeriesItemUnit Count { get; } = new MetricsResponseSeriesItemUnit(CountValue); - /// bytes. - public static MetricsResponseSeriesItemUnit Bytes { get; } = new MetricsResponseSeriesItemUnit(BytesValue); - /// bitsPerSecond. - public static MetricsResponseSeriesItemUnit BitsPerSecond { get; } = new MetricsResponseSeriesItemUnit(BitsPerSecondValue); - /// milliSeconds. - public static MetricsResponseSeriesItemUnit MilliSeconds { get; } = new MetricsResponseSeriesItemUnit(MilliSecondsValue); - /// Determines if two values are the same. - public static bool operator ==(MetricsResponseSeriesItemUnit left, MetricsResponseSeriesItemUnit right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MetricsResponseSeriesItemUnit left, MetricsResponseSeriesItemUnit right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MetricsResponseSeriesItemUnit(string value) => new MetricsResponseSeriesItemUnit(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MetricsResponseSeriesItemUnit other && Equals(other); - /// - public bool Equals(MetricsResponseSeriesItemUnit 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/MetricsSeriesUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsSeriesUnit.cs new file mode 100644 index 0000000000000..e55ea05315b71 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsSeriesUnit.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// The MetricsSeriesUnit. + public readonly partial struct MetricsSeriesUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MetricsSeriesUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CountValue = "count"; + private const string BytesValue = "bytes"; + private const string BitsPerSecondValue = "bitsPerSecond"; + private const string MilliSecondsValue = "milliSeconds"; + + /// count. + public static MetricsSeriesUnit Count { get; } = new MetricsSeriesUnit(CountValue); + /// bytes. + public static MetricsSeriesUnit Bytes { get; } = new MetricsSeriesUnit(BytesValue); + /// bitsPerSecond. + public static MetricsSeriesUnit BitsPerSecond { get; } = new MetricsSeriesUnit(BitsPerSecondValue); + /// milliSeconds. + public static MetricsSeriesUnit MilliSeconds { get; } = new MetricsSeriesUnit(MilliSecondsValue); + /// Determines if two values are the same. + public static bool operator ==(MetricsSeriesUnit left, MetricsSeriesUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MetricsSeriesUnit left, MetricsSeriesUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MetricsSeriesUnit(string value) => new MetricsSeriesUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MetricsSeriesUnit other && Equals(other); + /// + public bool Equals(MetricsSeriesUnit 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/MigrateResult.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs new file mode 100644 index 0000000000000..9460f2d757ff4 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs @@ -0,0 +1,54 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional migratedProfileResourceId = default; + Optional> errors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("migratedProfileResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migratedProfileResourceId = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("errors"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + 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 0000000000000..acfb022765e30 --- /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 0000000000000..7fa9c77c7ce91 --- /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"u8); + writer.WriteObjectValue(Sku); + writer.WritePropertyName("classicResourceReference"u8); + JsonSerializer.Serialize(writer, ClassicResourceReference); writer.WritePropertyName("profileName"u8); + writer.WriteStringValue(ProfileName); + if (Optional.IsCollectionDefined(MigrationWebApplicationFirewallMappings)) + { + writer.WritePropertyName("migrationWebApplicationFirewallMappings"u8); + 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 0000000000000..f8bd3ca169e52 --- /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 0000000000000..e4d93b7273578 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.Serialization.cs @@ -0,0 +1,51 @@ +// 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) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional code = default; + Optional resourceName = default; + Optional errorMessage = default; + Optional nextSteps = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorMessage"u8)) + { + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextSteps"u8)) + { + 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 0000000000000..5cfde5ef67ba2 --- /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 0000000000000..8687a8d072531 --- /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"u8); + JsonSerializer.Serialize(writer, MigratedFrom); + } + if (Optional.IsDefined(MigratedTo)) + { + writer.WritePropertyName("migratedTo"u8); + 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 0000000000000..731965a2a4c51 --- /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/ProfileChangeSkuWafMapping.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.Serialization.cs new file mode 100644 index 0000000000000..a3c0c1f55febb --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.Serialization.cs @@ -0,0 +1,24 @@ +// 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 ProfileChangeSkuWafMapping : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("securityPolicyName"u8); + writer.WriteStringValue(SecurityPolicyName); + writer.WritePropertyName("changeToWafPolicy"u8); + JsonSerializer.Serialize(writer, ChangeToWafPolicy); writer.WriteEndObject(); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs new file mode 100644 index 0000000000000..7f89b4d99069a --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs @@ -0,0 +1,40 @@ +// 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 +{ + /// Parameters required for profile upgrade. + public partial class ProfileChangeSkuWafMapping + { + /// Initializes a new instance of ProfileChangeSkuWafMapping. + /// The security policy name. + /// The new waf resource for the security policy to use. + /// or is null. + public ProfileChangeSkuWafMapping(string securityPolicyName, WritableSubResource changeToWafPolicy) + { + Argument.AssertNotNull(securityPolicyName, nameof(securityPolicyName)); + Argument.AssertNotNull(changeToWafPolicy, nameof(changeToWafPolicy)); + + SecurityPolicyName = securityPolicyName; + ChangeToWafPolicy = changeToWafPolicy; + } + + /// The security policy name. + public string SecurityPolicyName { get; } + /// The new waf resource for the security policy to use. + internal WritableSubResource ChangeToWafPolicy { get; } + /// Gets or sets Id. + public ResourceIdentifier ChangeToWafPolicyId + { + get => ChangeToWafPolicy?.Id; + } + } +} 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 1667f81f2b482..0f4cb1afca78e 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 @@ -21,6 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("sku"u8); writer.WriteObjectValue(Sku); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -60,6 +65,7 @@ internal static ProfileData DeserializeProfileData(JsonElement element) } CdnSku sku = default; Optional kind = default; + Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -68,6 +74,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()) @@ -82,6 +89,15 @@ internal static ProfileData DeserializeProfileData(JsonElement element) kind = property.Value.GetString(); continue; } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -152,6 +168,20 @@ internal static ProfileData DeserializeProfileData(JsonElement element) provisioningState = new ProfileProvisioningState(property0.Value.GetString()); continue; } + if (property0.NameEquals("extendedProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + 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"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -175,7 +205,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, identity, 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/ProfilePatch.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.Serialization.cs index c70a312193547..c35f183f7bdb2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.Serialization.cs @@ -26,6 +26,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + JsonSerializer.Serialize(writer, Identity); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(OriginResponseTimeoutSeconds)) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs index 6a34f2a7440be..a6ef7541b80f8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs @@ -7,6 +7,7 @@ using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.Cdn.Models { @@ -21,6 +22,8 @@ public ProfilePatch() /// Profile tags. public IDictionary Tags { get; } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. public int? OriginResponseTimeoutSeconds { get; set; } } 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 141ea6dbeb57c..034bb143dc23e 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/Models/ProfileUpgradeContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.Serialization.cs new file mode 100644 index 0000000000000..c04801157d67a --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.Serialization.cs @@ -0,0 +1,28 @@ +// 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 ProfileUpgradeContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("wafMappingList"u8); + writer.WriteStartArray(); + foreach (var item in WafMappingList) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs new file mode 100644 index 0000000000000..ed23bbdc52992 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Parameters required for profile upgrade. + public partial class ProfileUpgradeContent + { + /// Initializes a new instance of ProfileUpgradeContent. + /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade. + /// is null. + public ProfileUpgradeContent(IEnumerable wafMappingList) + { + Argument.AssertNotNull(wafMappingList, nameof(wafMappingList)); + + WafMappingList = wafMappingList.ToList(); + } + + /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade. + public IList WafMappingList { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs index 9621e0a960eef..6780221495f92 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Cdn.Models { /// The type of the secret resource. - internal readonly partial struct SecretType : IEquatable + public readonly partial struct SecretType : IEquatable { private readonly string _value; diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.Serialization.cs new file mode 100644 index 0000000000000..6ce02cc7ef08e --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.Serialization.cs @@ -0,0 +1,29 @@ +// 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 ValidateSecretContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("secretType"u8); + writer.WriteStringValue(SecretType.ToString()); + writer.WritePropertyName("secretSource"u8); + JsonSerializer.Serialize(writer, SecretSource); if (Optional.IsDefined(SecretVersion)) + { + writer.WritePropertyName("secretVersion"u8); + writer.WriteStringValue(SecretVersion); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs new file mode 100644 index 0000000000000..6bd87e30b5d18 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs @@ -0,0 +1,42 @@ +// 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 +{ + /// Input of the secret to be validated. + public partial class ValidateSecretContent + { + /// Initializes a new instance of ValidateSecretContent. + /// The secret type. + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// is null. + public ValidateSecretContent(SecretType secretType, WritableSubResource secretSource) + { + Argument.AssertNotNull(secretSource, nameof(secretSource)); + + SecretType = secretType; + SecretSource = secretSource; + } + + /// The secret type. + public SecretType SecretType { get; } + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + internal WritableSubResource SecretSource { get; } + /// Gets or sets Id. + public ResourceIdentifier SecretSourceId + { + get => SecretSource?.Id; + } + + /// Secret version, if customer is using a specific version. + public string SecretVersion { get; set; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.Serialization.cs new file mode 100644 index 0000000000000..a42c30babfb68 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.Serialization.cs @@ -0,0 +1,43 @@ +// 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 ValidateSecretResult + { + internal static ValidateSecretResult DeserializeValidateSecretResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional status = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new ValidationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + } + return new ValidateSecretResult(Optional.ToNullable(status), message.Value); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs new file mode 100644 index 0000000000000..13651485375e1 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Output of the validated secret. + public partial class ValidateSecretResult + { + /// Initializes a new instance of ValidateSecretResult. + internal ValidateSecretResult() + { + } + + /// Initializes a new instance of ValidateSecretResult. + /// The validation status. + /// Detailed error message. + internal ValidateSecretResult(ValidationStatus? status, string message) + { + Status = status; + Message = message; + } + + /// The validation status. + public ValidationStatus? Status { get; } + /// Detailed error message. + public string Message { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs new file mode 100644 index 0000000000000..2024bd1bb960c --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// The validation status. + public readonly partial struct ValidationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ValidationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ValidValue = "Valid"; + private const string InvalidValue = "Invalid"; + private const string AccessDeniedValue = "AccessDenied"; + private const string CertificateExpiredValue = "CertificateExpired"; + + /// Valid. + public static ValidationStatus Valid { get; } = new ValidationStatus(ValidValue); + /// Invalid. + public static ValidationStatus Invalid { get; } = new ValidationStatus(InvalidValue); + /// AccessDenied. + public static ValidationStatus AccessDenied { get; } = new ValidationStatus(AccessDeniedValue); + /// CertificateExpired. + public static ValidationStatus CertificateExpired { get; } = new ValidationStatus(CertificateExpiredValue); + /// Determines if two values are the same. + public static bool operator ==(ValidationStatus left, ValidationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ValidationStatus left, ValidationStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ValidationStatus(string value) => new ValidationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ValidationStatus other && Equals(other); + /// + public bool Equals(ValidationStatus 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/WafMetricsGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsGranularity.cs new file mode 100644 index 0000000000000..dde13b4d2e44f --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsGranularity.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// The WafMetricsGranularity. + public readonly partial struct WafMetricsGranularity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WafMetricsGranularity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PT5MValue = "PT5M"; + private const string PT1HValue = "PT1H"; + private const string P1DValue = "P1D"; + + /// PT5M. + public static WafMetricsGranularity PT5M { get; } = new WafMetricsGranularity(PT5MValue); + /// PT1H. + public static WafMetricsGranularity PT1H { get; } = new WafMetricsGranularity(PT1HValue); + /// P1D. + public static WafMetricsGranularity P1D { get; } = new WafMetricsGranularity(P1DValue); + /// Determines if two values are the same. + public static bool operator ==(WafMetricsGranularity left, WafMetricsGranularity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WafMetricsGranularity left, WafMetricsGranularity right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WafMetricsGranularity(string value) => new WafMetricsGranularity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WafMetricsGranularity other && Equals(other); + /// + public bool Equals(WafMetricsGranularity 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/WafMetricsResponse.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.Serialization.cs index 4a2beec31de86..9b602e1a48c74 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.Serialization.cs @@ -22,7 +22,7 @@ internal static WafMetricsResponse DeserializeWafMetricsResponse(JsonElement ele } Optional dateTimeBegin = default; Optional dateTimeEnd = default; - Optional granularity = default; + Optional granularity = default; Optional> series = default; foreach (var property in element.EnumerateObject()) { @@ -50,7 +50,7 @@ internal static WafMetricsResponse DeserializeWafMetricsResponse(JsonElement ele { continue; } - granularity = new WafMetricsResponseGranularity(property.Value.GetString()); + granularity = new WafMetricsGranularity(property.Value.GetString()); continue; } if (property.NameEquals("series"u8)) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs index 24b12c301c63b..59542877809ec 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs @@ -25,7 +25,7 @@ internal WafMetricsResponse() /// /// /// - internal WafMetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, WafMetricsResponseGranularity? granularity, IReadOnlyList series) + internal WafMetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, WafMetricsGranularity? granularity, IReadOnlyList series) { DateTimeBegin = dateTimeBegin; DateTimeEnd = dateTimeEnd; @@ -38,7 +38,7 @@ internal WafMetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateT /// Gets the date time end. public DateTimeOffset? DateTimeEnd { get; } /// Gets the granularity. - public WafMetricsResponseGranularity? Granularity { get; } + public WafMetricsGranularity? Granularity { get; } /// Gets the series. public IReadOnlyList Series { get; } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs deleted file mode 100644 index c6550dd362b5f..0000000000000 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Cdn.Models -{ - /// The WafMetricsResponseGranularity. - public readonly partial struct WafMetricsResponseGranularity : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WafMetricsResponseGranularity(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PT5MValue = "PT5M"; - private const string PT1HValue = "PT1H"; - private const string P1DValue = "P1D"; - - /// PT5M. - public static WafMetricsResponseGranularity PT5M { get; } = new WafMetricsResponseGranularity(PT5MValue); - /// PT1H. - public static WafMetricsResponseGranularity PT1H { get; } = new WafMetricsResponseGranularity(PT1HValue); - /// P1D. - public static WafMetricsResponseGranularity P1D { get; } = new WafMetricsResponseGranularity(P1DValue); - /// Determines if two values are the same. - public static bool operator ==(WafMetricsResponseGranularity left, WafMetricsResponseGranularity right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WafMetricsResponseGranularity left, WafMetricsResponseGranularity right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WafMetricsResponseGranularity(string value) => new WafMetricsResponseGranularity(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WafMetricsResponseGranularity other && Equals(other); - /// - public bool Equals(WafMetricsResponseGranularity 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/WafMetricsResponseSeriesItem.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.Serialization.cs index 2e6e34ff42be4..9028c14c068eb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.Serialization.cs @@ -20,7 +20,7 @@ internal static WafMetricsResponseSeriesItem DeserializeWafMetricsResponseSeries return null; } Optional metric = default; - Optional unit = default; + Optional unit = default; Optional> groups = default; Optional> data = default; foreach (var property in element.EnumerateObject()) @@ -36,7 +36,7 @@ internal static WafMetricsResponseSeriesItem DeserializeWafMetricsResponseSeries { continue; } - unit = new WafMetricsResponseSeriesItemUnit(property.Value.GetString()); + unit = new WafMetricsSeriesUnit(property.Value.GetString()); continue; } if (property.NameEquals("groups"u8)) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs index 1432f3f7d94d7..9f4095d5cfb28 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs @@ -25,7 +25,7 @@ internal WafMetricsResponseSeriesItem() /// /// /// - internal WafMetricsResponseSeriesItem(string metric, WafMetricsResponseSeriesItemUnit? unit, IReadOnlyList groups, IReadOnlyList data) + internal WafMetricsResponseSeriesItem(string metric, WafMetricsSeriesUnit? unit, IReadOnlyList groups, IReadOnlyList data) { Metric = metric; Unit = unit; @@ -36,7 +36,7 @@ internal WafMetricsResponseSeriesItem(string metric, WafMetricsResponseSeriesIte /// Gets the metric. public string Metric { get; } /// Gets the unit. - public WafMetricsResponseSeriesItemUnit? Unit { get; } + public WafMetricsSeriesUnit? Unit { get; } /// Gets the groups. public IReadOnlyList Groups { get; } /// Gets the data. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs deleted file mode 100644 index 271c77666479d..0000000000000 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Cdn.Models -{ - /// The WafMetricsResponseSeriesItemUnit. - public readonly partial struct WafMetricsResponseSeriesItemUnit : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WafMetricsResponseSeriesItemUnit(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CountValue = "count"; - - /// count. - public static WafMetricsResponseSeriesItemUnit Count { get; } = new WafMetricsResponseSeriesItemUnit(CountValue); - /// Determines if two values are the same. - public static bool operator ==(WafMetricsResponseSeriesItemUnit left, WafMetricsResponseSeriesItemUnit right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WafMetricsResponseSeriesItemUnit left, WafMetricsResponseSeriesItemUnit right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WafMetricsResponseSeriesItemUnit(string value) => new WafMetricsResponseSeriesItemUnit(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WafMetricsResponseSeriesItemUnit other && Equals(other); - /// - public bool Equals(WafMetricsResponseSeriesItemUnit 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/WafMetricsSeriesUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsSeriesUnit.cs new file mode 100644 index 0000000000000..0eb9abb1fa770 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsSeriesUnit.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// The WafMetricsSeriesUnit. + public readonly partial struct WafMetricsSeriesUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public WafMetricsSeriesUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CountValue = "count"; + + /// count. + public static WafMetricsSeriesUnit Count { get; } = new WafMetricsSeriesUnit(CountValue); + /// Determines if two values are the same. + public static bool operator ==(WafMetricsSeriesUnit left, WafMetricsSeriesUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(WafMetricsSeriesUnit left, WafMetricsSeriesUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator WafMetricsSeriesUnit(string value) => new WafMetricsSeriesUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is WafMetricsSeriesUnit other && Equals(other); + /// + public bool Equals(WafMetricsSeriesUnit 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/ProfileData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs index 8d56d470de877..8100921efedac 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs @@ -28,6 +28,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. @@ -39,16 +40,20 @@ public ProfileData(AzureLocation location, CdnSku sku) : base(location) /// The location. /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// Managed service identity (system assigned and/or user assigned identities). /// 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, ManagedServiceIdentity identity, ProfileResourceState? resourceState, ProfileProvisioningState? provisioningState, IReadOnlyDictionary extendedProperties, Guid? frontDoorId, int? originResponseTimeoutSeconds) : base(id, name, resourceType, systemData, tags, location) { Sku = sku; Kind = kind; + Identity = identity; ResourceState = resourceState; ProvisioningState = provisioningState; + ExtendedProperties = extendedProperties; FrontDoorId = frontDoorId; OriginResponseTimeoutSeconds = originResponseTimeoutSeconds; } @@ -69,10 +74,14 @@ public CdnSkuName? SkuName /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. public string Kind { get; } + /// Managed service identity (system assigned and/or user assigned identities). + public ManagedServiceIdentity Identity { get; set; } /// Resource status of the profile. public ProfileResourceState? ResourceState { get; } /// Provisioning status of the profile. public ProfileProvisioningState? ProvisioningState { get; } + /// Key-Value pair representing additional properties for profiles. + public IReadOnlyDictionary 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 f96d61417f658..4d4d5556a7f4c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs @@ -677,7 +677,75 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Profile } /// - /// Checks the quota and actual usage of AzureFrontDoor endpoints under the given CDN profile. + /// Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability + /// + /// + /// Operation Id + /// FrontDoorProfiles_CheckEndpointNameAvailability + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual async Task> CheckEndpointNameAvailabilityFrontDoorProfileAsync(EndpointNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _frontDoorProfilesClientDiagnostics.CreateScope("ProfileResource.CheckEndpointNameAvailabilityFrontDoorProfile"); + scope.Start(); + try + { + var response = await _frontDoorProfilesRestClient.CheckEndpointNameAvailabilityAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability + /// + /// + /// Operation Id + /// FrontDoorProfiles_CheckEndpointNameAvailability + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual Response CheckEndpointNameAvailabilityFrontDoorProfile(EndpointNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _frontDoorProfilesClientDiagnostics.CreateScope("ProfileResource.CheckEndpointNameAvailabilityFrontDoorProfile"); + scope.Start(); + try + { + var response = _frontDoorProfilesRestClient.CheckEndpointNameAvailability(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile. /// /// /// Request Path @@ -699,7 +767,7 @@ public virtual AsyncPageable GetFrontDoorProfileResourceUsagesAs } /// - /// 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 Azure Front Door profile. /// /// /// Request Path @@ -721,7 +789,7 @@ public virtual Pageable GetFrontDoorProfileResourceUsages(Cancel } /// - /// Check the name availability of a host name. + /// Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. /// /// /// Request Path @@ -755,7 +823,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 Azure Front Door endpoint in DNS. /// /// /// Request Path @@ -788,6 +856,150 @@ public virtual Response CheckFrontDoorProfileHostName } } + /// + /// Validate a Secret in the profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret + /// + /// + /// Operation Id + /// FrontDoorProfiles_ValidateSecret + /// + /// + /// + /// The Secret source. + /// The cancellation token to use. + /// is null. + public virtual async Task> ValidateSecretFrontDoorProfileAsync(ValidateSecretContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _frontDoorProfilesClientDiagnostics.CreateScope("ProfileResource.ValidateSecretFrontDoorProfile"); + scope.Start(); + try + { + var response = await _frontDoorProfilesRestClient.ValidateSecretAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validate a Secret in the profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/validateSecret + /// + /// + /// Operation Id + /// FrontDoorProfiles_ValidateSecret + /// + /// + /// + /// The Secret source. + /// The cancellation token to use. + /// is null. + public virtual Response ValidateSecretFrontDoorProfile(ValidateSecretContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _frontDoorProfilesClientDiagnostics.CreateScope("ProfileResource.ValidateSecretFrontDoorProfile"); + scope.Start(); + try + { + var response = _frontDoorProfilesRestClient.ValidateSecret(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade + /// + /// + /// Operation Id + /// FrontDoorProfiles_Upgrade + /// + /// + /// + /// 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. + /// Profile upgrade input parameter. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpgradeFrontDoorProfileAsync(WaitUntil waitUntil, ProfileUpgradeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _frontDoorProfilesClientDiagnostics.CreateScope("ProfileResource.UpgradeFrontDoorProfile"); + scope.Start(); + try + { + var response = await _frontDoorProfilesRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new CdnArmOperation(new ProfileOperationSource(Client), _frontDoorProfilesClientDiagnostics, Pipeline, _frontDoorProfilesRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/upgrade + /// + /// + /// Operation Id + /// FrontDoorProfiles_Upgrade + /// + /// + /// + /// 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. + /// Profile upgrade input parameter. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation UpgradeFrontDoorProfile(WaitUntil waitUntil, ProfileUpgradeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _frontDoorProfilesClientDiagnostics.CreateScope("ProfileResource.UpgradeFrontDoorProfile"); + scope.Start(); + try + { + var response = _frontDoorProfilesRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new CdnArmOperation(new ProfileOperationSource(Client), _frontDoorProfilesClientDiagnostics, Pipeline, _frontDoorProfilesRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Get log report for AFD profile /// @@ -1180,6 +1392,74 @@ public virtual Response GetWafLogAnalyticsRankings(ProfileR } } + /// + /// 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. /// 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 ba164bc3a5f20..aa46196651295 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 ?? "2023-05-01"; _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 02fe71027d7b9..7d45614b014d3 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 ?? "2023-05-01"; _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 dc5f239a4d529..1a532f18e1448 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 ?? "2023-05-01"; _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 d4b57e83284bc..73bf8d12993ac 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 ?? "2023-05-01"; _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 f403e355d862b..04541d85caa0f 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 ?? "2023-05-01"; _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 6609c9fbf1df0..7fd5008319156 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 ?? "2023-05-01"; _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 878bcc8969069..730f62b681a8e 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 ?? "2023-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,7 +61,7 @@ internal HttpMessage CreateListByProfileRequest(string subscriptionId, string re /// Lists existing AzureFrontDoor domains. /// 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 or CDN profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. @@ -90,7 +90,7 @@ public async Task> ListByProfileAsync( /// Lists existing AzureFrontDoor domains. /// 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 or CDN profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. @@ -547,7 +547,7 @@ internal HttpMessage CreateListByProfileNextPageRequest(string nextLink, string /// The URL to the next page of results. /// 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 or CDN profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. @@ -578,7 +578,7 @@ public async Task> ListByProfileNextPa /// The URL to the next page of results. /// 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 or CDN profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. 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 884d8f31de528..1f4e4d4281368 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 ?? "2023-05-01"; _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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 d1ba5c828d115..6441c167c9678 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 ?? "2023-05-01"; _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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 5163902d5d34b..5377992c5200d 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 ?? "2023-05-01"; _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 ed9b79a310429..0b4a32fd5377b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs @@ -33,10 +33,97 @@ 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 ?? "2023-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal HttpMessage CreateCheckEndpointNameAvailabilityRequest(string subscriptionId, string resourceGroupName, string profileName, EndpointNameAvailabilityContent 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/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/checkEndpointNameAvailability", 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; + } + + /// Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// Input to check. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CheckEndpointNameAvailabilityAsync(string subscriptionId, string resourceGroupName, string profileName, EndpointNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckEndpointNameAvailabilityRequest(subscriptionId, resourceGroupName, profileName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + EndpointNameAvailabilityResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = EndpointNameAvailabilityResult.DeserializeEndpointNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Check the availability of an afdx endpoint name, and return the globally unique endpoint host name. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// Input to check. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CheckEndpointNameAvailability(string subscriptionId, string resourceGroupName, string profileName, EndpointNameAvailabilityContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCheckEndpointNameAvailabilityRequest(subscriptionId, resourceGroupName, profileName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + EndpointNameAvailabilityResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = EndpointNameAvailabilityResult.DeserializeEndpointNameAvailabilityResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, string resourceGroupName, string profileName) { var message = _pipeline.CreateMessage(); @@ -58,10 +145,10 @@ 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 Azure Front Door 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. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. @@ -87,10 +174,10 @@ 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 Azure Front Door 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. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. @@ -141,10 +228,10 @@ 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 Azure Front Door 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. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. /// Custom domain to be validated. /// The cancellation token to use. /// , , or is null. @@ -172,10 +259,10 @@ public async Task> CheckHostNameAvailability } } - /// Check the name availability of a host name. + /// Validates the custom domain mapping to ensure it maps to the correct Azure Front Door 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. + /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. /// Custom domain to be validated. /// The cancellation token to use. /// , , or is null. @@ -203,6 +290,172 @@ public Response CheckHostNameAvailability(string subs } } + internal HttpMessage CreateValidateSecretRequest(string subscriptionId, string resourceGroupName, string profileName, ValidateSecretContent 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/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/validateSecret", 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; + } + + /// Validate a Secret in the 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 which is unique within the resource group. + /// The Secret source. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ValidateSecretAsync(string subscriptionId, string resourceGroupName, string profileName, ValidateSecretContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateValidateSecretRequest(subscriptionId, resourceGroupName, profileName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ValidateSecretResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ValidateSecretResult.DeserializeValidateSecretResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validate a Secret in the 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 which is unique within the resource group. + /// The Secret source. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ValidateSecret(string subscriptionId, string resourceGroupName, string profileName, ValidateSecretContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateValidateSecretRequest(subscriptionId, resourceGroupName, profileName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ValidateSecretResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ValidateSecretResult.DeserializeValidateSecretResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpgradeRequest(string subscriptionId, string resourceGroupName, string profileName, ProfileUpgradeContent 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/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/upgrade", 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; + } + + /// Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// Profile upgrade input parameter. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpgradeAsync(string subscriptionId, string resourceGroupName, string profileName, ProfileUpgradeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, profileName, 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); + } + } + + /// Upgrade a profile from Standard_AzureFrontDoor to Premium_AzureFrontDoor. + /// Azure Subscription ID. + /// Name of the Resource group within the Azure subscription. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// Profile upgrade input parameter. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Upgrade(string subscriptionId, string resourceGroupName, string profileName, ProfileUpgradeContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateUpgradeRequest(subscriptionId, resourceGroupName, profileName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string profileName) { var message = _pipeline.CreateMessage(); @@ -217,11 +470,11 @@ 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 Azure Front Door profile. /// The URL to the next page of results. /// 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. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. @@ -248,11 +501,11 @@ 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 Azure Front Door profile. /// The URL to the next page of results. /// 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. + /// Name of the Azure Front Door Standard or Azure Front Door Premium 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. 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 e58a00fc1cf0b..5e79101f8a7f0 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 ?? "2023-05-01"; _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 83d13aaf48455..53f2e7f915f0f 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 ?? "2023-05-01"; _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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 Azure Front Door 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 737871f392dfb..74432d18d8229 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 ?? "2023-05-01"; _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 df30aa50f99e6..5c5f5cfd92cff 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 ?? "2023-05-01"; _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 e2f817782ea51..8823bc403de5e 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 ?? "2023-05-01"; _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 b2a620cc50ed8..82978750f8068 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 ?? "2023-05-01"; _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 d9da272d5bc38..2934bb4d6ca36 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 ?? "2023-05-01"; _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 18e1a4702e7eb..ff298c37ebd56 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 ?? "2023-05-01"; _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 9fa159c3bef45..58227cbe30757 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 ?? "2023-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -489,6 +489,223 @@ 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: + case 202: + return 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: + case 202: + return 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 091cd1ccb0fc9..51ab368327fe1 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 ?? "2023-05-01"; _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 4bac0544f6a38..44329e8c3ff12 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md @@ -8,7 +8,7 @@ generate-model-factory: false 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