diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs index 1f022b68dfb4..07cc92d6614c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_CdnCustomDomainCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_CustomDomainsListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_ListByEndpoint.json // this example is just showing the usage of "CdnCustomDomains_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_CustomDomainsListByEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_CustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_Get.json // this example is just showing the usage of "CdnCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_CustomDomainsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_CustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_Get.json // this example is just showing the usage of "CdnCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_CustomDomainsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CustomDomainsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_Create.json // this example is just showing the usage of "CdnCustomDomains_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs index 409b912f8165..1da46ca1eb5b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs @@ -23,7 +23,7 @@ public partial class Sample_CdnCustomDomainResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_CustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_Get.json // this example is just showing the usage of "CdnCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_CustomDomainsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CustomDomainsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_Create.json // this example is just showing the usage of "CdnCustomDomains_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Update_CustomDomainsCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_CustomDomainsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_Delete.json // this example is just showing the usage of "CdnCustomDomains_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Delete_CustomDomainsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task DisableCustomHttps_CustomDomainsDisableCustomHttps() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_DisableCustomHttps.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_DisableCustomHttps.json // this example is just showing the usage of "CdnCustomDomains_DisableCustomHttps" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task DisableCustomHttps_CustomDomainsDisableCustomHttps() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task EnableCustomHttps_CustomDomainsEnableCustomHttpsUsingCDNManagedCertificate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json // this example is just showing the usage of "CdnCustomDomains_EnableCustomHttps" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task EnableCustomHttps_CustomDomainsEnableCustomHttpsUsingCDNManage [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task EnableCustomHttps_CustomDomainsEnableCustomHttpsUsingYourOwnCertificate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json // this example is just showing the usage of "CdnCustomDomains_EnableCustomHttps" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs index cde2344d92b7..8678cbe9f333 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_CdnEndpointCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_EndpointsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_ListByProfile.json // this example is just showing the usage of "CdnEndpoints_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_EndpointsListByProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_EndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Get.json // this example is just showing the usage of "CdnEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_EndpointsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_EndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Get.json // this example is just showing the usage of "CdnEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_EndpointsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_EndpointsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Create.json // this example is just showing the usage of "CdnEndpoints_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs index 4b4b73e5bc59..a5b60730d1e1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs @@ -23,7 +23,7 @@ public partial class Sample_CdnEndpointResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_EndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Get.json // this example is just showing the usage of "CdnEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_EndpointsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_EndpointsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Update.json // this example is just showing the usage of "CdnEndpoints_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Update_EndpointsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_EndpointsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Delete.json // this example is just showing the usage of "CdnEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Delete_EndpointsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Start_EndpointsStart() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Start.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Start.json // this example is just showing the usage of "CdnEndpoints_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -156,7 +156,7 @@ public async Task Start_EndpointsStart() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Stop_EndpointsStop() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_Stop.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_Stop.json // this example is just showing the usage of "CdnEndpoints_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -189,7 +189,7 @@ public async Task Stop_EndpointsStop() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PurgeContent_EndpointsPurgeContent() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_PurgeContent.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_PurgeContent.json // this example is just showing the usage of "CdnEndpoints_PurgeContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -221,7 +221,7 @@ public async Task PurgeContent_EndpointsPurgeContent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task LoadContent_EndpointsLoadContent() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_LoadContent.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_LoadContent.json // this example is just showing the usage of "CdnEndpoints_LoadContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -253,7 +253,7 @@ public async Task LoadContent_EndpointsLoadContent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateCustomDomain_EndpointsValidateCustomDomain() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_ValidateCustomDomain.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_ValidateCustomDomain.json // this example is just showing the usage of "CdnEndpoints_ValidateCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task ValidateCustomDomain_EndpointsValidateCustomDomain() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceUsages_EndpointsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Endpoints_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Endpoints_ListResourceUsage.json // this example is just showing the usage of "CdnEndpoints_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs index 3f50cd2b9bed..46e01f775e99 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_CdnOriginCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_OriginsListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Origins_ListByEndpoint.json // this example is just showing the usage of "CdnOrigins_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_OriginsListByEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Origins_Get.json // this example is just showing the usage of "CdnOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_OriginsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_OriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Origins_Get.json // this example is just showing the usage of "CdnOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -128,7 +128,7 @@ public async Task Exists_OriginsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_OriginsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Origins_Create.json // this example is just showing the usage of "CdnOrigins_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs index 943410b474a0..36f4664aede2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_CdnOriginGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_OriginsGroupsListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/OriginGroups_ListByEndpoint.json // this example is just showing the usage of "CdnOriginGroups_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task GetAll_OriginsGroupsListByEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/OriginGroups_Get.json // this example is just showing the usage of "CdnOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_OriginGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_OriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/OriginGroups_Get.json // this example is just showing the usage of "CdnOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task Exists_OriginGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_OriginGroupsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/OriginGroups_Create.json // this example is just showing the usage of "CdnOriginGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs index d1e4d5b3ef84..475edeb9b730 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs @@ -24,7 +24,7 @@ public partial class Sample_CdnOriginGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/OriginGroups_Get.json // this example is just showing the usage of "CdnOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_OriginGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_OriginGroupsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/OriginGroups_Update.json // this example is just showing the usage of "CdnOriginGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -108,7 +108,7 @@ public async Task Update_OriginGroupsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_OriginGroupsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/OriginGroups_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/OriginGroups_Delete.json // this example is just showing the usage of "CdnOriginGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs index 0d8ab5450704..d10d34c0094d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs @@ -23,7 +23,7 @@ public partial class Sample_CdnOriginResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_OriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Origins_Get.json // this example is just showing the usage of "CdnOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_OriginsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_OriginsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Origins_Update.json // this example is just showing the usage of "CdnOrigins_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Update_OriginsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_OriginsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Origins_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Origins_Delete.json // this example is just showing the usage of "CdnOrigins_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs index 3a485ab9ffac..5c1a8cd28d41 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_CdnWebApplicationFirewallPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPoliciesInAResourceGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafListPolicies.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafListPolicies.json // this example is just showing the usage of "Policies_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ListPoliciesInAResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafPolicyGet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_GetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafPolicyGet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Exists_GetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreatesSpecificPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafPolicyCreateOrUpdate.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafPolicyCreateOrUpdate.json // this example is just showing the usage of "Policies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs index 75efec735b1a..1a618d0a2cff 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs @@ -23,7 +23,7 @@ public partial class Sample_CdnWebApplicationFirewallPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafPolicyGet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task Get_GetPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreatesSpecificPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafPatchPolicy.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafPatchPolicy.json // this example is just showing the usage of "Policies_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_CreatesSpecificPolicy() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteProtectionPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafPolicyDelete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafPolicyDelete.json // this example is just showing the usage of "Policies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs index 4a4d29787a0e..a9162baf9685 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorCustomDomainCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_AFDCustomDomainsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_ListByProfile.json // this example is just showing the usage of "FrontDoorCustomDomains_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_AFDCustomDomainsListByProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDCustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_Get.json // this example is just showing the usage of "FrontDoorCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_AFDCustomDomainsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_AFDCustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_Get.json // this example is just showing the usage of "FrontDoorCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_AFDCustomDomainsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AFDCustomDomainsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_Create.json // this example is just showing the usage of "FrontDoorCustomDomains_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs index 8a1b4fff9d1e..9ad42f72a1ec 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorCustomDomainResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDCustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_Get.json // this example is just showing the usage of "FrontDoorCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_AFDCustomDomainsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AFDCustomDomainsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_Update.json // this example is just showing the usage of "FrontDoorCustomDomains_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Update_AFDCustomDomainsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_AFDCustomDomainsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_Delete.json // this example is just showing the usage of "FrontDoorCustomDomains_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Delete_AFDCustomDomainsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task RefreshValidationToken_AFDCustomDomainsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDCustomDomains_RefreshValidationToken.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDCustomDomains_RefreshValidationToken.json // this example is just showing the usage of "FrontDoorCustomDomains_RefreshValidationToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs index 2f02ddbaa92f..c94dfde84095 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_FrontDoorEndpointCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_AFDEndpointsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_ListByProfile.json // this example is just showing the usage of "FrontDoorEndpoints_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_AFDEndpointsListByProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDEndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_Get.json // this example is just showing the usage of "FrontDoorEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_AFDEndpointsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_AFDEndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_Get.json // this example is just showing the usage of "FrontDoorEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_AFDEndpointsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AFDEndpointsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_Create.json // this example is just showing the usage of "FrontDoorEndpoints_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs index c2598deecbd6..f1a3b9006ea6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorEndpointResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDEndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_Get.json // this example is just showing the usage of "FrontDoorEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_AFDEndpointsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AFDEndpointsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_Update.json // this example is just showing the usage of "FrontDoorEndpoints_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Update_AFDEndpointsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_AFDEndpointsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_Delete.json // this example is just showing the usage of "FrontDoorEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Delete_AFDEndpointsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task PurgeContent_AFDEndpointsPurgeContent() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_PurgeContent.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_PurgeContent.json // this example is just showing the usage of "FrontDoorEndpoints_PurgeContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -161,7 +161,7 @@ public async Task PurgeContent_AFDEndpointsPurgeContent() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceUsages_AFDEndpointsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_ListResourceUsage.json // this example is just showing the usage of "FrontDoorEndpoints_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -192,7 +192,7 @@ public async Task GetResourceUsages_AFDEndpointsListResourceUsage() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateCustomDomain_EndpointsValidateCustomDomain() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDEndpoints_ValidateCustomDomain.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDEndpoints_ValidateCustomDomain.json // this example is just showing the usage of "FrontDoorEndpoints_ValidateCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs index fd0ba8f0295d..0cf790620adc 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorOriginCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_AFDOriginsListByOriginGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_ListByOriginGroup.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOrigins_ListByOriginGroup.json // this example is just showing the usage of "FrontDoorOrigins_ListByOriginGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_AFDOriginsListByOriginGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDOriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOrigins_Get.json // this example is just showing the usage of "FrontDoorOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_AFDOriginsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_AFDOriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOrigins_Get.json // this example is just showing the usage of "FrontDoorOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_AFDOriginsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AFDOriginsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOrigins_Create.json // this example is just showing the usage of "FrontDoorOrigins_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs index 2444f1578090..332bcd92d233 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorOriginGroupCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_AFDOriginGroupsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_ListByProfile.json // this example is just showing the usage of "FrontDoorOriginGroups_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_AFDOriginGroupsListByProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDOriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_Get.json // this example is just showing the usage of "FrontDoorOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_AFDOriginGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_AFDOriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_Get.json // this example is just showing the usage of "FrontDoorOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_AFDOriginGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AFDOriginGroupsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_Create.json // this example is just showing the usage of "FrontDoorOriginGroups_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs index 9a1027fe78b4..b8b019fd2268 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorOriginGroupResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDOriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_Get.json // this example is just showing the usage of "FrontDoorOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_AFDOriginGroupsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AFDOriginGroupsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_Update.json // this example is just showing the usage of "FrontDoorOriginGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -105,7 +105,7 @@ public async Task Update_AFDOriginGroupsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_AFDOriginGroupsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_Delete.json // this example is just showing the usage of "FrontDoorOriginGroups_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task Delete_AFDOriginGroupsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceUsages_AFDOriginGroupsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOriginGroups_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOriginGroups_ListResourceUsage.json // this example is just showing the usage of "FrontDoorOriginGroups_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs index 0353337175d4..644fc1652ba3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorOriginResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_AFDOriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOrigins_Get.json // this example is just showing the usage of "FrontDoorOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_AFDOriginsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AFDOriginsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOrigins_Update.json // this example is just showing the usage of "FrontDoorOrigins_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Update_AFDOriginsUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_AFDOriginsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDOrigins_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDOrigins_Delete.json // this example is just showing the usage of "FrontDoorOrigins_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs index 176246fb0c69..7dd26f7e7d5e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_FrontDoorRouteCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RoutesListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Routes_ListByEndpoint.json // this example is just showing the usage of "FrontDoorRoutes_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -62,7 +62,7 @@ public async Task GetAll_RoutesListByEndpoint() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RoutesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Routes_Get.json // this example is just showing the usage of "FrontDoorRoutes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -98,7 +98,7 @@ public async Task Get_RoutesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RoutesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Routes_Get.json // this example is just showing the usage of "FrontDoorRoutes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task Exists_RoutesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RoutesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Routes_Create.json // this example is just showing the usage of "FrontDoorRoutes_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs index d14df18d567d..de5764d8dc98 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs @@ -24,7 +24,7 @@ public partial class Sample_FrontDoorRouteResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RoutesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Routes_Get.json // this example is just showing the usage of "FrontDoorRoutes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_RoutesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RoutesUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Routes_Update.json // this example is just showing the usage of "FrontDoorRoutes_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -134,7 +134,7 @@ public async Task Update_RoutesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RoutesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Routes_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Routes_Delete.json // this example is just showing the usage of "FrontDoorRoutes_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs index 4deb542f1d59..addfd89424b9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorRuleCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RulesListByRuleSet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_ListByRuleSet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Rules_ListByRuleSet.json // this example is just showing the usage of "FrontDoorRules_ListByRuleSet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_RulesListByRuleSet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RulesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Rules_Get.json // this example is just showing the usage of "FrontDoorRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -97,7 +97,7 @@ public async Task Get_RulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RulesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Rules_Get.json // this example is just showing the usage of "FrontDoorRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task Exists_RulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RulesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Rules_Create.json // this example is just showing the usage of "FrontDoorRules_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs index b536355acdff..942100809d33 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorRuleResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RulesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Rules_Get.json // this example is just showing the usage of "FrontDoorRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_RulesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RulesUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Rules_Update.json // this example is just showing the usage of "FrontDoorRules_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Update_RulesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RulesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Rules_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Rules_Delete.json // this example is just showing the usage of "FrontDoorRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs index 86baa495546a..fcbdc9ce0aa4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_FrontDoorRuleSetCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_RuleSetsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_ListByProfile.json // this example is just showing the usage of "FrontDoorRuleSets_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task GetAll_RuleSetsListByProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RuleSetsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_Get.json // this example is just showing the usage of "FrontDoorRuleSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_RuleSetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_RuleSetsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_Get.json // this example is just showing the usage of "FrontDoorRuleSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -125,7 +125,7 @@ public async Task Exists_RuleSetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_RuleSetsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_Create.json // this example is just showing the usage of "FrontDoorRuleSets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs index 3649cee343ee..371d29b64c5c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorRuleSetResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_RuleSetsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_Get.json // this example is just showing the usage of "FrontDoorRuleSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_RuleSetsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_RuleSetsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_Create.json // this example is just showing the usage of "FrontDoorRuleSets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task Update_RuleSetsCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_RuleSetsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_Delete.json // this example is just showing the usage of "FrontDoorRuleSets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Delete_RuleSetsDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceUsages_RuleSetsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/RuleSets_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/RuleSets_ListResourceUsage.json // this example is just showing the usage of "FrontDoorRuleSets_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs index 36452b7e457c..de3ae2c52c59 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_FrontDoorSecretCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_SecretsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Secrets_ListByProfile.json // this example is just showing the usage of "FrontDoorSecrets_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task GetAll_SecretsListByProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SecretsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Secrets_Get.json // this example is just showing the usage of "FrontDoorSecrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Get_SecretsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_SecretsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Secrets_Get.json // this example is just showing the usage of "FrontDoorSecrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -127,7 +127,7 @@ public async Task Exists_SecretsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_SecretsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Secrets_Create.json // this example is just showing the usage of "FrontDoorSecrets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs index 825495183024..e8d4045f9c0d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs @@ -24,7 +24,7 @@ public partial class Sample_FrontDoorSecretResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SecretsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Secrets_Get.json // this example is just showing the usage of "FrontDoorSecrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -56,7 +56,7 @@ public async Task Get_SecretsGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_SecretsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Secrets_Create.json // this example is just showing the usage of "FrontDoorSecrets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Update_SecretsCreate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_SecretsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Secrets_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Secrets_Delete.json // this example is just showing the usage of "FrontDoorSecrets_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs index 6de505f9cfe4..2bbad3d0dce6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorSecurityPolicyCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_SecurityPoliciesListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/SecurityPolicies_ListByProfile.json // this example is just showing the usage of "FrontDoorSecurityPolicies_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_SecurityPoliciesListByProfile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SecurityPoliciesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/SecurityPolicies_Get.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -95,7 +95,7 @@ public async Task Get_SecurityPoliciesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_SecurityPoliciesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/SecurityPolicies_Get.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task Exists_SecurityPoliciesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_SecurityPoliciesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/SecurityPolicies_Create.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs index 976283ccc1f2..90a49a444514 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs @@ -23,7 +23,7 @@ public partial class Sample_FrontDoorSecurityPolicyResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_SecurityPoliciesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/SecurityPolicies_Get.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -55,7 +55,7 @@ public async Task Get_SecurityPoliciesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_SecurityPoliciesPatch() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Patch.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/SecurityPolicies_Patch.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Patch" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Update_SecurityPoliciesPatch() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_SecurityPoliciesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/SecurityPolicies_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/SecurityPolicies_Delete.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs index 1ce50059df23..ac7c91032529 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs @@ -24,7 +24,7 @@ public partial class Sample_ProfileCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ProfilesListByResourceGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_ListByResourceGroup.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_ListByResourceGroup.json // this example is just showing the usage of "Profiles_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,7 +60,7 @@ public async Task GetAll_ProfilesListByResourceGroup() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ProfilesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_Get.json // this example is just showing the usage of "Profiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -94,7 +94,7 @@ public async Task Get_ProfilesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_ProfilesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_Get.json // this example is just showing the usage of "Profiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task Exists_ProfilesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_ProfilesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_Create.json // this example is just showing the usage of "Profiles_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs index d19c11246dc3..d26dbb858fb8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs @@ -14,17 +14,49 @@ using Azure.ResourceManager.Cdn; using Azure.ResourceManager.Cdn.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Cdn.Samples { public partial class Sample_ProfileResource { + // CheckEndpointNameAvailability + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CheckEndpointNameAvailabilityFrontDoorProfile_CheckEndpointNameAvailability() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDProfiles_CheckEndpointNameAvailability.json + // this example is just showing the usage of "FrontDoorProfiles_CheckEndpointNameAvailability" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProfileResource created on azure + // for more information of creating ProfileResource, please refer to the document of ProfileResource + string subscriptionId = "subid"; + string resourceGroupName = "myResourceGroup"; + string profileName = "profile1"; + ResourceIdentifier profileResourceId = ProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName); + ProfileResource profile = client.GetProfileResource(profileResourceId); + + // invoke the operation + EndpointNameAvailabilityContent content = new EndpointNameAvailabilityContent("sampleName", CdnResourceType.FrontDoorEndpoints) + { + AutoGeneratedDomainNameLabelScope = DomainNameLabelScope.TenantReuse, + }; + EndpointNameAvailabilityResult result = await profile.CheckEndpointNameAvailabilityFrontDoorProfileAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + // AFDProfiles_ListResourceUsage [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetFrontDoorProfileResourceUsages_AFDProfilesListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDProfiles_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDProfiles_ListResourceUsage.json // this example is just showing the usage of "FrontDoorProfiles_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +86,7 @@ public async Task GetFrontDoorProfileResourceUsages_AFDProfilesListResourceUsage [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckFrontDoorProfileHostNameAvailability_AFDProfilesCheckHostNameAvailability() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/AFDProfiles_CheckHostNameAvailability.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDProfiles_CheckHostNameAvailability.json // this example is just showing the usage of "FrontDoorProfiles_CheckHostNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,12 +109,82 @@ public async Task CheckFrontDoorProfileHostNameAvailability_AFDProfilesCheckHost Console.WriteLine($"Succeeded: {result}"); } + // Validate_Secret + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ValidateSecretFrontDoorProfile_ValidateSecret() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDProfiles_ValidateSecret.json + // this example is just showing the usage of "FrontDoorProfiles_ValidateSecret" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProfileResource created on azure + // for more information of creating ProfileResource, please refer to the document of ProfileResource + string subscriptionId = "subid"; + string resourceGroupName = "RG"; + string profileName = "profile1"; + ResourceIdentifier profileResourceId = ProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName); + ProfileResource profile = client.GetProfileResource(profileResourceId); + + // invoke the operation + ValidateSecretContent content = new ValidateSecretContent(SecretType.CustomerCertificate, new WritableSubResource() + { + Id = new ResourceIdentifier("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.KeyVault/vault/kvName/certificate/certName"), + }); + ValidateSecretResult result = await profile.ValidateSecretFrontDoorProfileAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + // AFDProfiles_Upgrade + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task UpgradeFrontDoorProfile_AFDProfilesUpgrade() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/AFDProfiles_Upgrade.json + // this example is just showing the usage of "FrontDoorProfiles_Upgrade" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProfileResource created on azure + // for more information of creating ProfileResource, please refer to the document of ProfileResource + string subscriptionId = "subid"; + string resourceGroupName = "RG"; + string profileName = "profile1"; + ResourceIdentifier profileResourceId = ProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName); + ProfileResource profile = client.GetProfileResource(profileResourceId); + + // invoke the operation + ProfileUpgradeContent content = new ProfileUpgradeContent(new ProfileChangeSkuWafMapping[] + { +new ProfileChangeSkuWafMapping("securityPolicy1",new WritableSubResource() +{ +Id = new ResourceIdentifier("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoorwebapplicationfirewallpolicies/waf2"), +}) + }); + ArmOperation lro = await profile.UpgradeFrontDoorProfileAsync(WaitUntil.Completed, content); + ProfileResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + ProfileData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + // LogAnalytics_GetLogAnalyticsRankings [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLogAnalyticsRankings_LogAnalyticsGetLogAnalyticsRankings() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetLogAnalyticsRankings.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/LogAnalytics_GetLogAnalyticsRankings.json // this example is just showing the usage of "LogAnalytics_GetLogAnalyticsRankings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +219,7 @@ public async Task GetLogAnalyticsRankings_LogAnalyticsGetLogAnalyticsRankings() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLogAnalyticsLocations_LogAnalyticsGetLogAnalyticsLocations() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetLogAnalyticsLocations.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/LogAnalytics_GetLogAnalyticsLocations.json // this example is just showing the usage of "LogAnalytics_GetLogAnalyticsLocations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +246,7 @@ public async Task GetLogAnalyticsLocations_LogAnalyticsGetLogAnalyticsLocations( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetLogAnalyticsResources_LogAnalyticsGetLogAnalyticsResources() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetLogAnalyticsResources.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/LogAnalytics_GetLogAnalyticsResources.json // this example is just showing the usage of "LogAnalytics_GetLogAnalyticsResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +273,7 @@ public async Task GetLogAnalyticsResources_LogAnalyticsGetLogAnalyticsResources( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWafLogAnalyticsRankings_LogAnalyticsGetWafLogAnalyticsRankings() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/LogAnalytics_GetWafLogAnalyticsRankings.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/LogAnalytics_GetWafLogAnalyticsRankings.json // this example is just showing the usage of "LogAnalytics_GetWafLogAnalyticsRankings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -206,7 +308,7 @@ public async Task GetWafLogAnalyticsRankings_LogAnalyticsGetWafLogAnalyticsRanki [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetProfiles_ProfilesList() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_List.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_List.json // this example is just showing the usage of "Profiles_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -238,7 +340,7 @@ public async Task GetProfiles_ProfilesList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_ProfilesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_Get.json // this example is just showing the usage of "Profiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -269,7 +371,7 @@ public async Task Get_ProfilesGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_ProfilesUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_Update.json // this example is just showing the usage of "Profiles_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -308,7 +410,7 @@ public async Task Update_ProfilesUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_ProfilesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_Delete.json // this example is just showing the usage of "Profiles_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -330,12 +432,104 @@ public async Task Delete_ProfilesDelete() Console.WriteLine($"Succeeded"); } + // Profiles_CanMigrate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task CanMigrateProfile_ProfilesCanMigrate() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_CanMigrate.json + // this example is just showing the usage of "Profiles_CanMigrate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "subid"; + string resourceGroupName = "RG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // invoke the operation + CanMigrateContent content = new CanMigrateContent(new WritableSubResource() + { + Id = new ResourceIdentifier("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoors/frontdoorname"), + }); + ArmOperation lro = await resourceGroupResource.CanMigrateProfileAsync(WaitUntil.Completed, content); + CanMigrateResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // Profiles_Migrate + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task MigrateProfile_ProfilesMigrate() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_Migrate.json + // this example is just showing the usage of "Profiles_Migrate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "subid"; + string resourceGroupName = "RG"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // invoke the operation + MigrationContent content = new MigrationContent(new CdnSku() + { + Name = CdnSkuName.StandardAzureFrontDoor, + }, new WritableSubResource() + { + Id = new ResourceIdentifier("/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Network/frontdoors/frontdoorname"), + }, "profile1"); + ArmOperation lro = await resourceGroupResource.MigrateProfileAsync(WaitUntil.Completed, content); + MigrateResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + // Profiles_MigrationCommit + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task MigrationCommit_ProfilesMigrationCommit() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_MigrationCommit.json + // this example is just showing the usage of "Profiles_MigrationCommit" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProfileResource created on azure + // for more information of creating ProfileResource, please refer to the document of ProfileResource + string subscriptionId = "subid"; + string resourceGroupName = "RG"; + string profileName = "profile1"; + ResourceIdentifier profileResourceId = ProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName); + ProfileResource profile = client.GetProfileResource(profileResourceId); + + // invoke the operation + await profile.MigrationCommitAsync(WaitUntil.Completed); + + Console.WriteLine($"Succeeded"); + } + // Profiles_GenerateSsoUri [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GenerateSsoUri_ProfilesGenerateSsoUri() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_GenerateSsoUri.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_GenerateSsoUri.json // this example is just showing the usage of "Profiles_GenerateSsoUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -362,7 +556,7 @@ public async Task GenerateSsoUri_ProfilesGenerateSsoUri() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetSupportedOptimizationTypes_ProfilesListSupportedOptimizationTypes() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_ListSupportedOptimizationTypes.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_ListSupportedOptimizationTypes.json // this example is just showing the usage of "Profiles_ListSupportedOptimizationTypes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -389,7 +583,7 @@ public async Task GetSupportedOptimizationTypes_ProfilesListSupportedOptimizatio [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceUsages_ProfilesListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/Profiles_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/Profiles_ListResourceUsage.json // this example is just showing the usage of "Profiles_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index c2961fcd1a99..3a70833e4cff 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -23,7 +23,7 @@ public partial class Sample_ResourceGroupResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckEndpointNameAvailability_CheckEndpointNameAvailability() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CheckEndpointNameAvailability.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CheckEndpointNameAvailability.json // this example is just showing the usage of "CheckEndpointNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 8a60dd8c2bf9..9c108b264913 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -23,7 +23,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckCdnNameAvailabilityWithSubscription_CheckNameAvailabilityWithSubscription() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CheckNameAvailabilityWithSubscription.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CheckNameAvailabilityWithSubscription.json // this example is just showing the usage of "CheckNameAvailabilityWithSubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task CheckCdnNameAvailabilityWithSubscription_CheckNameAvailability [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task ValidateProbe_ValidateProbe() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/ValidateProbe.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/ValidateProbe.json // this example is just showing the usage of "ValidateProbe" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -75,7 +75,7 @@ public async Task ValidateProbe_ValidateProbe() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetResourceUsages_ResourceUsageList() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/ResourceUsage_List.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/ResourceUsage_List.json // this example is just showing the usage of "ResourceUsage_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,7 +103,7 @@ public async Task GetResourceUsages_ResourceUsageList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetManagedRuleSets_ListPoliciesInAResourceGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/WafListManagedRuleSets.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/WafListManagedRuleSets.json // this example is just showing the usage of "ManagedRuleSets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs index da0544fbb888..743952e88b22 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -22,7 +22,7 @@ public partial class Sample_TenantResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckCdnNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/CheckNameAvailability.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/CheckNameAvailability.json // this example is just showing the usage of "CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,7 +46,7 @@ public async Task CheckCdnNameAvailability_CheckNameAvailability() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetEdgeNodes_EdgeNodesList() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/examples/EdgeNodes_List.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2023-05-01/examples/EdgeNodes_List.json // this example is just showing the usage of "EdgeNodes_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs index 192a50f2da93..8aa887598894 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs @@ -61,6 +61,39 @@ public static CdnNameAvailabilityResult CdnNameAvailabilityResult(bool? nameAvai return new CdnNameAvailabilityResult(nameAvailable, reason, message); } + /// Initializes a new instance of ValidateSecretResult. + /// The validation status. + /// Detailed error message. + /// A new instance for mocking. + public static ValidateSecretResult ValidateSecretResult(ValidationStatus? status = null, string message = null) + { + return new ValidateSecretResult(status, message); + } + + /// Initializes a new instance of ProfileData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// 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. + /// A new instance for mocking. + public static ProfileData ProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CdnSkuName? skuName = null, string kind = null, ManagedServiceIdentity identity = null, ProfileResourceState? resourceState = null, ProfileProvisioningState? provisioningState = null, IReadOnlyDictionary extendedProperties = null, Guid? frontDoorId = null, int? originResponseTimeoutSeconds = null) + { + tags ??= new Dictionary(); + extendedProperties ??= new Dictionary(); + + return new ProfileData(id, name, resourceType, systemData, tags, location, skuName != null ? new CdnSku(skuName) : null, kind, identity, resourceState, provisioningState, extendedProperties, frontDoorId, originResponseTimeoutSeconds); + } + /// Initializes a new instance of FrontDoorCustomDomainData. /// The id. /// The name. @@ -74,11 +107,14 @@ public static CdnNameAvailabilityResult CdnNameAvailabilityResult(bool? nameAvai /// /// 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. /// A new instance for mocking. - public static FrontDoorCustomDomainData FrontDoorCustomDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string profileName = null, FrontDoorCustomDomainHttpsContent tlsSettings = null, ResourceIdentifier dnsZoneId = null, ResourceIdentifier preValidatedCustomDomainResourceId = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null, DomainValidationState? domainValidationState = null, string hostName = null, DomainValidationProperties validationProperties = null) + public static FrontDoorCustomDomainData FrontDoorCustomDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string profileName = null, FrontDoorCustomDomainHttpsContent tlsSettings = null, ResourceIdentifier dnsZoneId = null, ResourceIdentifier preValidatedCustomDomainResourceId = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null, DomainValidationState? domainValidationState = null, string hostName = null, IDictionary extendedProperties = null, DomainValidationProperties validationProperties = null) { - return new FrontDoorCustomDomainData(id, name, resourceType, systemData, profileName, tlsSettings, dnsZoneId != null ? ResourceManagerModelFactory.WritableSubResource(dnsZoneId) : null, preValidatedCustomDomainResourceId != null ? new FrontDoorCustomDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId(preValidatedCustomDomainResourceId) : null, provisioningState, deploymentStatus, domainValidationState, hostName, validationProperties); + extendedProperties ??= new Dictionary(); + + return new FrontDoorCustomDomainData(id, name, resourceType, systemData, profileName, tlsSettings, dnsZoneId != null ? ResourceManagerModelFactory.WritableSubResource(dnsZoneId) : null, preValidatedCustomDomainResourceId != null ? new FrontDoorCustomDomainUpdatePropertiesParametersPreValidatedCustomDomainResourceId(preValidatedCustomDomainResourceId) : null, provisioningState, deploymentStatus, domainValidationState, hostName, extendedProperties, validationProperties); } /// Initializes a new instance of DomainValidationProperties. @@ -149,7 +185,7 @@ public static FrontDoorOriginGroupData FrontDoorOriginGroupData(ResourceIdentifi /// 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. @@ -275,7 +311,7 @@ public static FrontDoorSecurityPolicyData FrontDoorSecurityPolicyData(ResourceId /// /// object which contains secret parameters /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , and . + /// The available derived classes include , , and . /// /// A new instance for mocking. public static FrontDoorSecretData FrontDoorSecretData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null, string profileName = null, FrontDoorSecretProperties properties = null) @@ -289,7 +325,7 @@ public static FrontDoorSecretData FrontDoorSecretData(ResourceIdentifier id = nu /// /// /// A new instance for mocking. - public static MetricsResponse MetricsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, MetricsResponseGranularity? granularity = null, IEnumerable series = null) + public static MetricsResponse MetricsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, MetricsGranularity? granularity = null, IEnumerable series = null) { series ??= new List(); @@ -302,7 +338,7 @@ public static MetricsResponse MetricsResponse(DateTimeOffset? dateTimeBegin = nu /// /// /// A new instance for mocking. - public static MetricsResponseSeriesItem MetricsResponseSeriesItem(string metric = null, MetricsResponseSeriesItemUnit? unit = null, IEnumerable groups = null, IEnumerable data = null) + public static MetricsResponseSeriesItem MetricsResponseSeriesItem(string metric = null, MetricsSeriesUnit? unit = null, IEnumerable groups = null, IEnumerable data = null) { groups ??= new List(); data ??= new List(); @@ -454,7 +490,7 @@ public static ResourcesResponseCustomDomainsItem ResourcesResponseCustomDomainsI /// /// /// A new instance for mocking. - public static WafMetricsResponse WafMetricsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, WafMetricsResponseGranularity? granularity = null, IEnumerable series = null) + public static WafMetricsResponse WafMetricsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, WafMetricsGranularity? granularity = null, IEnumerable series = null) { series ??= new List(); @@ -467,7 +503,7 @@ public static WafMetricsResponse WafMetricsResponse(DateTimeOffset? dateTimeBegi /// /// /// A new instance for mocking. - public static WafMetricsResponseSeriesItem WafMetricsResponseSeriesItem(string metric = null, WafMetricsResponseSeriesItemUnit? unit = null, IEnumerable groups = null, IEnumerable data = null) + public static WafMetricsResponseSeriesItem WafMetricsResponseSeriesItem(string metric = null, WafMetricsSeriesUnit? unit = null, IEnumerable groups = null, IEnumerable data = null) { groups ??= new List(); data ??= new List(); @@ -529,25 +565,39 @@ public static ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPrope return new ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(metric, value, percentage); } - /// Initializes a new instance of ProfileData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// 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. - /// Resource status of the profile. - /// Provisioning status of the profile. - /// The Id of the frontdoor. - /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. - /// A new instance for mocking. - public static ProfileData ProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CdnSkuName? skuName = null, string kind = null, ProfileResourceState? resourceState = null, ProfileProvisioningState? provisioningState = null, Guid? frontDoorId = null, int? originResponseTimeoutSeconds = null) + /// Initializes a new instance of CanMigrateResult. + /// Resource ID. + /// Resource type. + /// Flag that says if the profile can be migrated. + /// Recommended sku for the migration. + /// + /// A new instance for mocking. + public static CanMigrateResult CanMigrateResult(string id = null, string canMigrateResultType = null, bool? canMigrate = null, CanMigrateDefaultSku? defaultSku = null, IEnumerable errors = null) { - tags ??= new Dictionary(); + errors ??= new List(); + + return new CanMigrateResult(id, canMigrateResultType, canMigrate, defaultSku, errors?.ToList()); + } - return new ProfileData(id, name, resourceType, systemData, tags, location, skuName != null ? new CdnSku(skuName) : null, kind, resourceState, provisioningState, frontDoorId, originResponseTimeoutSeconds); + /// 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. + /// A new instance for mocking. + public static MigrationErrorType MigrationErrorType(string code = null, string resourceName = null, string errorMessage = null, string nextSteps = null) + { + return new MigrationErrorType(code, resourceName, errorMessage, nextSteps); + } + + /// Initializes a new instance of MigrateResult. + /// Resource ID. + /// Resource type. + /// Arm resource id of the migrated profile. + /// A new instance for mocking. + public static MigrateResult MigrateResult(string id = null, string migrateResultType = null, ResourceIdentifier migratedProfileResourceIdId = null) + { + return new MigrateResult(id, migrateResultType, migratedProfileResourceIdId != null ? ResourceManagerModelFactory.WritableSubResource(migratedProfileResourceIdId) : null); } /// Initializes a new instance of SsoUri. @@ -607,7 +657,7 @@ public static CdnUsage CdnUsage(string resourceType = null, CdnUsageUnit? unit = /// Resource status of the endpoint. /// Provisioning status of the endpoint. /// A new instance for mocking. - public static CdnEndpointData CdnEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string originPath = null, IEnumerable contentTypesToCompress = null, string originHostHeader = null, bool? isCompressionEnabled = null, bool? isHttpAllowed = null, bool? isHttpsAllowed = null, QueryStringCachingBehavior? queryStringCachingBehavior = null, OptimizationType? optimizationType = null, string probePath = null, IEnumerable geoFilters = null, ResourceIdentifier defaultOriginGroupId = null, IEnumerable uriSigningKeys = null, EndpointDeliveryPolicy deliveryPolicy = null, ResourceIdentifier webApplicationFirewallPolicyLinkId = null, string hostName = null, IEnumerable origins = null, IEnumerable originGroups = null, IEnumerable customDomains = null, EndpointResourceState? resourceState = null, CdnEndpointProvisioningState? provisioningState = null) + public static CdnEndpointData CdnEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string originPath = null, IEnumerable contentTypesToCompress = null, string originHostHeader = null, bool? isCompressionEnabled = null, bool? isHttpAllowed = null, bool? isHttpsAllowed = null, QueryStringCachingBehavior? queryStringCachingBehavior = null, OptimizationType? optimizationType = null, string probePath = null, IEnumerable geoFilters = null, ResourceIdentifier defaultOriginGroupId = null, IEnumerable uriSigningKeys = null, EndpointDeliveryPolicy deliveryPolicy = null, ResourceIdentifier webApplicationFirewallPolicyLinkId = null, string hostName = null, IEnumerable origins = null, IEnumerable originGroups = null, IEnumerable customDomains = null, EndpointResourceState? resourceState = null, CdnEndpointProvisioningState? provisioningState = null) { tags ??= new Dictionary(); contentTypesToCompress ??= new List(); @@ -615,7 +665,7 @@ public static CdnEndpointData CdnEndpointData(ResourceIdentifier id = null, stri uriSigningKeys ??= new List(); origins ??= new List(); originGroups ??= new List(); - customDomains ??= new List(); + customDomains ??= new List(); return new CdnEndpointData(id, name, resourceType, systemData, tags, location, originPath, contentTypesToCompress?.ToList(), originHostHeader, isCompressionEnabled, isHttpAllowed, isHttpsAllowed, queryStringCachingBehavior, optimizationType, probePath, geoFilters?.ToList(), defaultOriginGroupId != null ? new EndpointPropertiesUpdateParametersDefaultOriginGroup(defaultOriginGroupId) : null, uriSigningKeys?.ToList(), deliveryPolicy, webApplicationFirewallPolicyLinkId != null ? new EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(webApplicationFirewallPolicyLinkId) : null, hostName, origins?.ToList(), originGroups?.ToList(), customDomains?.ToList(), resourceState, provisioningState); } @@ -640,26 +690,14 @@ public static DeepCreatedOrigin DeepCreatedOrigin(string name = null, string hos return new DeepCreatedOrigin(name, hostName, httpPort, httpsPort, originHostHeader, priority, weight, enabled, privateLinkAlias, privateLinkResourceId, privateLinkLocation, privateLinkApprovalMessage, privateEndpointStatus); } - /// Initializes a new instance of CdnCustomDomainData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. + /// Initializes a new instance of DeepCreatedCustomDomain. + /// Custom domain name. /// The host name of the custom domain. Must be a domain name. - /// Resource status of the custom domain. - /// Provisioning status of the custom domain. - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. - /// - /// Certificate parameters for securing custom HTTPS - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . - /// /// 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. - /// Provisioning status of Custom Https of the custom domain. - /// A new instance for mocking. - public static CdnCustomDomainData CdnCustomDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string hostName = null, CustomDomainResourceState? resourceState = null, CustomHttpsProvisioningState? customHttpsProvisioningState = null, CustomHttpsAvailabilityState? customHttpsAvailabilityState = null, CustomDomainHttpsContent customDomainHttpsContent = null, string validationData = null, CustomHttpsProvisioningState? provisioningState = null) + /// A new instance for mocking. + public static DeepCreatedCustomDomain DeepCreatedCustomDomain(string name = null, string hostName = null, string validationData = null) { - return new CdnCustomDomainData(id, name, resourceType, systemData, hostName, resourceState, customHttpsProvisioningState, customHttpsAvailabilityState, customDomainHttpsContent, validationData, provisioningState); + return new DeepCreatedCustomDomain(name, hostName, validationData); } /// Initializes a new instance of CdnOriginData. @@ -706,6 +744,28 @@ public static CdnOriginGroupData CdnOriginGroupData(ResourceIdentifier id = null return new CdnOriginGroupData(id, name, resourceType, systemData, healthProbeSettings, origins?.ToList(), trafficRestorationTimeToHealedOrNewEndpointsInMinutes, responseBasedOriginErrorDetectionSettings, resourceState, provisioningState); } + /// Initializes a new instance of CdnCustomDomainData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The host name of the custom domain. Must be a domain name. + /// Resource status of the custom domain. + /// Provisioning status of the custom domain. + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + /// Certificate parameters for securing custom HTTPS + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// 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. + /// Provisioning status of Custom Https of the custom domain. + /// A new instance for mocking. + public static CdnCustomDomainData CdnCustomDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string hostName = null, CustomDomainResourceState? resourceState = null, CustomHttpsProvisioningState? customHttpsProvisioningState = null, CustomHttpsAvailabilityState? customHttpsAvailabilityState = null, CustomDomainHttpsContent customDomainHttpsContent = null, string validationData = null, CustomHttpsProvisioningState? provisioningState = null) + { + return new CdnCustomDomainData(id, name, resourceType, systemData, hostName, resourceState, customHttpsProvisioningState, customHttpsAvailabilityState, customDomainHttpsContent, validationData, provisioningState); + } + /// Initializes a new instance of ValidateProbeResult. /// Indicates whether the probe URL is accepted or not. /// Specifies the error code when the probe url is not accepted. @@ -744,18 +804,20 @@ public static EdgeNode EdgeNode(ResourceIdentifier id = null, string name = null /// 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. /// A new instance for mocking. - public static CdnWebApplicationFirewallPolicyData CdnWebApplicationFirewallPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, CdnSkuName? skuName = null, WafPolicySettings policySettings = null, IEnumerable rateLimitRules = null, IEnumerable customRules = null, IEnumerable managedRuleSets = null, IEnumerable endpointLinks = null, WebApplicationFirewallPolicyProvisioningState? provisioningState = null, PolicyResourceState? resourceState = null) + public static CdnWebApplicationFirewallPolicyData CdnWebApplicationFirewallPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, CdnSkuName? skuName = null, WafPolicySettings policySettings = null, IEnumerable rateLimitRules = null, IEnumerable customRules = null, IEnumerable managedRuleSets = null, IEnumerable endpointLinks = null, IDictionary extendedProperties = null, WebApplicationFirewallPolicyProvisioningState? provisioningState = null, PolicyResourceState? resourceState = null) { tags ??= new Dictionary(); rateLimitRules ??= new List(); customRules ??= new List(); managedRuleSets ??= new List(); endpointLinks ??= new List(); + extendedProperties ??= new Dictionary(); - return new CdnWebApplicationFirewallPolicyData(id, name, resourceType, systemData, tags, location, etag, skuName != null ? new CdnSku(skuName) : null, policySettings, rateLimitRules != null ? new RateLimitRuleList(rateLimitRules?.ToList()) : null, customRules != null ? new CustomRuleList(customRules?.ToList()) : null, managedRuleSets != null ? new ManagedRuleSetList(managedRuleSets?.ToList()) : null, endpointLinks?.ToList(), provisioningState, resourceState); + return new CdnWebApplicationFirewallPolicyData(id, name, resourceType, systemData, tags, location, etag, skuName != null ? new CdnSku(skuName) : null, policySettings, rateLimitRules != null ? new RateLimitRuleList(rateLimitRules?.ToList()) : null, customRules != null ? new CustomRuleList(customRules?.ToList()) : null, managedRuleSets != null ? new ManagedRuleSetList(managedRuleSets?.ToList()) : null, endpointLinks?.ToList(), extendedProperties, provisioningState, resourceState); } /// Initializes a new instance of ManagedRuleSetDefinition. @@ -822,5 +884,20 @@ public static CustomerCertificateProperties CustomerCertificateProperties(Resour return new CustomerCertificateProperties(SecretType.CustomerCertificate, secretSourceId != null ? ResourceManagerModelFactory.WritableSubResource(secretSourceId) : null, secretVersion, useLatestVersion, subject, expiresOn, certificateAuthority, subjectAlternativeNames?.ToList(), thumbprint); } + + /// Initializes a new instance of AzureFirstPartyManagedCertificateProperties. + /// 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. + /// A new instance for mocking. + public static AzureFirstPartyManagedCertificateProperties AzureFirstPartyManagedCertificateProperties(ResourceIdentifier secretSourceId = null, string subject = null, string expirationDate = null, string certificateAuthority = null, IEnumerable subjectAlternativeNames = null, string thumbprint = null) + { + subjectAlternativeNames ??= new List(); + + return new AzureFirstPartyManagedCertificateProperties(SecretType.AzureFirstPartyManagedCertificate, secretSourceId != null ? ResourceManagerModelFactory.WritableSubResource(secretSourceId) : null, subject, expirationDate, certificateAuthority, subjectAlternativeNames?.ToList(), thumbprint); + } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs index 99483bef28e4..c4cf244831d7 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 186a9a2db82a..ec0d4d1d2fdd 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 33559f67d6c8..fd387cad6573 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 96fe20d50a77..6be7db0c3a2f 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.Location); + 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.Location); + 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.Location); + 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.Location); + 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 ea21d6f1106a..57d8208e19be 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 a842b3787c70..4b1d8ab4d569 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 0444fa36d6a3..c9446104f6a0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs @@ -427,7 +427,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 @@ -449,7 +449,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 @@ -471,7 +471,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 @@ -505,7 +505,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 689e8c2de1be..9cea0294083d 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 40e44aa04d42..0f51db80a1cd 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 7f21e219876a..6c92e9d2a87b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs @@ -350,7 +350,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 @@ -372,7 +372,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 28a5a3bd0609..dc6c43556ea2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs @@ -342,7 +342,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 @@ -364,7 +364,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 000000000000..de24706aa04c --- /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 000000000000..a9d8c4126675 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/LongRunningOperation/MigrateResultOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.Cdn.Models; + +namespace Azure.ResourceManager.Cdn +{ + internal class MigrateResultOperationSource : IOperationSource + { + MigrateResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return MigrateResult.DeserializeMigrateResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return MigrateResult.DeserializeMigrateResult(document.RootElement); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.Serialization.cs index 308f5be7c9f7..d49707a78085 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 e3b39d2efd6f..2e20029f0fdf 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 000000000000..4efce0547488 --- /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 000000000000..2796df2e8d45 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Request body for CanMigrate operation. + public partial class CanMigrateContent + { + /// Initializes a new instance of CanMigrateContent. + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// is null. + public CanMigrateContent(WritableSubResource classicResourceReference) + { + Argument.AssertNotNull(classicResourceReference, nameof(classicResourceReference)); + + ClassicResourceReference = classicResourceReference; + } + + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + internal WritableSubResource ClassicResourceReference { get; } + /// Gets or sets Id. + public ResourceIdentifier ClassicResourceReferenceId + { + get => ClassicResourceReference?.Id; + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs new file mode 100644 index 000000000000..84c5756df397 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Recommended sku for the migration. + public readonly partial struct CanMigrateDefaultSku : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CanMigrateDefaultSku(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardAzureFrontDoorValue = "Standard_AzureFrontDoor"; + private const string PremiumAzureFrontDoorValue = "Premium_AzureFrontDoor"; + + /// Standard_AzureFrontDoor. + public static CanMigrateDefaultSku StandardAzureFrontDoor { get; } = new CanMigrateDefaultSku(StandardAzureFrontDoorValue); + /// Premium_AzureFrontDoor. + public static CanMigrateDefaultSku PremiumAzureFrontDoor { get; } = new CanMigrateDefaultSku(PremiumAzureFrontDoorValue); + /// Determines if two values are the same. + public static bool operator ==(CanMigrateDefaultSku left, CanMigrateDefaultSku right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CanMigrateDefaultSku left, CanMigrateDefaultSku right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CanMigrateDefaultSku(string value) => new CanMigrateDefaultSku(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CanMigrateDefaultSku other && Equals(other); + /// + public bool Equals(CanMigrateDefaultSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs new file mode 100644 index 000000000000..8de4f20779a7 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs @@ -0,0 +1,87 @@ +// 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 id = default; + Optional type = default; + Optional canMigrate = default; + Optional defaultSku = default; + Optional> errors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = 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("canMigrate"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + canMigrate = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("defaultSku"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultSku = new CanMigrateDefaultSku(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("errors"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(MigrationErrorType.DeserializeMigrationErrorType(item)); + } + errors = array; + continue; + } + } + continue; + } + } + return new CanMigrateResult(id.Value, type.Value, Optional.ToNullable(canMigrate), Optional.ToNullable(defaultSku), Optional.ToList(errors)); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs new file mode 100644 index 000000000000..828bc8b42570 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs @@ -0,0 +1,48 @@ +// 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. + /// Resource ID. + /// Resource type. + /// Flag that says if the profile can be migrated. + /// Recommended sku for the migration. + /// + internal CanMigrateResult(string id, string canMigrateResultType, bool? canMigrate, CanMigrateDefaultSku? defaultSku, IReadOnlyList errors) + { + Id = id; + CanMigrateResultType = canMigrateResultType; + CanMigrate = canMigrate; + DefaultSku = defaultSku; + Errors = errors; + } + + /// Resource ID. + public string Id { get; } + /// Resource type. + public string CanMigrateResultType { get; } + /// 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 6be1c9c9916f..464dd058eead 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 6d556634349e..e45690d41085 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 000000000000..1c5cbef0b532 --- /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 000000000000..79da00630d2b --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Custom domains created on the CDN endpoint. + public partial class DeepCreatedCustomDomain + { + /// Initializes a new instance of DeepCreatedCustomDomain. + /// Custom domain name. + /// is null. + internal DeepCreatedCustomDomain(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of DeepCreatedCustomDomain. + /// Custom domain name. + /// The host name of the custom domain. Must be a domain name. + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + internal DeepCreatedCustomDomain(string name, string hostName, string validationData) + { + Name = name; + HostName = hostName; + ValidationData = validationData; + } + + /// Custom domain name. + public string Name { get; } + /// The host name of the custom domain. Must be a domain name. + public string HostName { get; } + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + public string ValidationData { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainData.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainData.Serialization.cs index a019eb80f6bd..1726f99a568e 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 643be8153d57..5a3581aec5c8 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 414688ad19d2..43c4420bbee4 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 84f241cc4e9f..a21fde1814d4 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 854340c2a470..fbb188d92340 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs @@ -27,7 +27,7 @@ public ManagedRuleGroupOverrideSetting(string ruleGroupName) /// Initializes a new instance of ManagedRuleGroupOverrideSetting. /// Describes the managed rule group within the rule set to override. - /// List of rules that will be disabled. If none specified, all rules in the group will be disabled. + /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. internal ManagedRuleGroupOverrideSetting(string ruleGroupName, IList rules) { RuleGroupName = ruleGroupName; @@ -36,7 +36,7 @@ internal ManagedRuleGroupOverrideSetting(string ruleGroupName, IList Describes the managed rule group within the rule set to override. public string RuleGroupName { get; set; } - /// List of rules that will be disabled. If none specified, all rules in the group will be disabled. + /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. public IList Rules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsGranularity.cs new file mode 100644 index 000000000000..a48494231eeb --- /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 945bb8162903..acbecece3002 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 d358264676c7..f9481d603725 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 c7c75de5e4a4..000000000000 --- 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 67012f776d2e..07f0e90579e2 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 c3b2d726ddfd..874bba61e128 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 9da6c1bb349a..000000000000 --- 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 000000000000..e55ea05315b7 --- /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 000000000000..59afe0d98b57 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +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 id = default; + Optional type = default; + Optional migratedProfileResourceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = 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("migratedProfileResourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + migratedProfileResourceId = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } + } + continue; + } + } + return new MigrateResult(id.Value, type.Value, migratedProfileResourceId); + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs new file mode 100644 index 000000000000..ffa23c245ca3 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs @@ -0,0 +1,44 @@ +// 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 +{ + /// Result for migrate operation. + public partial class MigrateResult + { + /// Initializes a new instance of MigrateResult. + internal MigrateResult() + { + } + + /// Initializes a new instance of MigrateResult. + /// Resource ID. + /// Resource type. + /// Arm resource id of the migrated profile. + internal MigrateResult(string id, string migrateResultType, WritableSubResource migratedProfileResourceId) + { + Id = id; + MigrateResultType = migrateResultType; + MigratedProfileResourceId = migratedProfileResourceId; + } + + /// Resource ID. + public string Id { get; } + /// Resource type. + public string MigrateResultType { get; } + /// Arm resource id of the migrated profile. + internal WritableSubResource MigratedProfileResourceId { get; } + /// Gets or sets Id. + public ResourceIdentifier MigratedProfileResourceIdId + { + get => MigratedProfileResourceId?.Id; + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.Serialization.cs new file mode 100644 index 000000000000..7fa9c77c7ce9 --- /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 000000000000..f8bd3ca169e5 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Request body for Migrate operation. + public partial class MigrationContent + { + /// Initializes a new instance of MigrationContent. + /// Sku for the migration. + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Name of the new profile that need to be created. + /// , or is null. + public MigrationContent(CdnSku sku, WritableSubResource classicResourceReference, string profileName) + { + Argument.AssertNotNull(sku, nameof(sku)); + Argument.AssertNotNull(classicResourceReference, nameof(classicResourceReference)); + Argument.AssertNotNull(profileName, nameof(profileName)); + + Sku = sku; + ClassicResourceReference = classicResourceReference; + ProfileName = profileName; + MigrationWebApplicationFirewallMappings = new ChangeTrackingList(); + } + + /// Sku for the migration. + internal CdnSku Sku { get; } + /// Name of the pricing tier. + public CdnSkuName? SkuName + { + get => Sku?.Name; + } + + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + internal WritableSubResource ClassicResourceReference { get; } + /// Gets or sets Id. + public ResourceIdentifier ClassicResourceReferenceId + { + get => ClassicResourceReference?.Id; + } + + /// Name of the new profile that need to be created. + public string ProfileName { get; } + /// Waf mapping for the migrated profile. + public IList MigrationWebApplicationFirewallMappings { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.Serialization.cs new file mode 100644 index 000000000000..e4d93b727357 --- /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 000000000000..5cfde5ef67ba --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. + public partial class MigrationErrorType + { + /// Initializes a new instance of MigrationErrorType. + internal MigrationErrorType() + { + } + + /// Initializes a new instance of MigrationErrorType. + /// Error code. + /// Resource which has the problem. + /// Error message indicating why the operation failed. + /// Describes what needs to be done to fix the problem. + internal MigrationErrorType(string code, string resourceName, string errorMessage, string nextSteps) + { + Code = code; + ResourceName = resourceName; + ErrorMessage = errorMessage; + NextSteps = nextSteps; + } + + /// Error code. + public string Code { get; } + /// Resource which has the problem. + public string ResourceName { get; } + /// Error message indicating why the operation failed. + public string ErrorMessage { get; } + /// Describes what needs to be done to fix the problem. + public string NextSteps { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.Serialization.cs new file mode 100644 index 000000000000..8687a8d07253 --- /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 000000000000..731965a2a4c5 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// Web Application Firewall Mapping. + public partial class MigrationWebApplicationFirewallMapping + { + /// Initializes a new instance of MigrationWebApplicationFirewallMapping. + public MigrationWebApplicationFirewallMapping() + { + } + + /// Migration From Waf policy. + internal WritableSubResource MigratedFrom { get; set; } + /// Gets or sets Id. + public ResourceIdentifier MigratedFromId + { + get => MigratedFrom is null ? default : MigratedFrom.Id; + set + { + if (MigratedFrom is null) + MigratedFrom = new WritableSubResource(); + MigratedFrom.Id = value; + } + } + + /// Migration to Waf policy. + internal WritableSubResource MigratedTo { get; set; } + /// Gets or sets Id. + public ResourceIdentifier MigratedToId + { + get => MigratedTo is null ? default : MigratedTo.Id; + set + { + if (MigratedTo is null) + MigratedTo = new WritableSubResource(); + MigratedTo.Id = value; + } + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.Serialization.cs new file mode 100644 index 000000000000..a3c0c1f55feb --- /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 000000000000..7f89b4d99069 --- /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 1667f81f2b48..0f4cb1afca78 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 c70a31219354..c35f183f7bdb 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 6a34f2a7440b..a6ef7541b80f 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 141ea6dbeb57..034bb143dc23 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs @@ -26,6 +26,11 @@ public ProfileResourceState(string value) private const string ActiveValue = "Active"; private const string DeletingValue = "Deleting"; private const string DisabledValue = "Disabled"; + private const string MigratingValue = "Migrating"; + private const string MigratedValue = "Migrated"; + private const string PendingMigrationCommitValue = "PendingMigrationCommit"; + private const string CommittingMigrationValue = "CommittingMigration"; + private const string AbortingMigrationValue = "AbortingMigration"; /// Creating. public static ProfileResourceState Creating { get; } = new ProfileResourceState(CreatingValue); @@ -35,6 +40,16 @@ public ProfileResourceState(string value) public static ProfileResourceState Deleting { get; } = new ProfileResourceState(DeletingValue); /// Disabled. public static ProfileResourceState Disabled { get; } = new ProfileResourceState(DisabledValue); + /// Migrating. + public static ProfileResourceState Migrating { get; } = new ProfileResourceState(MigratingValue); + /// Migrated. + public static ProfileResourceState Migrated { get; } = new ProfileResourceState(MigratedValue); + /// PendingMigrationCommit. + public static ProfileResourceState PendingMigrationCommit { get; } = new ProfileResourceState(PendingMigrationCommitValue); + /// CommittingMigration. + public static ProfileResourceState CommittingMigration { get; } = new ProfileResourceState(CommittingMigrationValue); + /// AbortingMigration. + public static ProfileResourceState AbortingMigration { get; } = new ProfileResourceState(AbortingMigrationValue); /// Determines if two values are the same. public static bool operator ==(ProfileResourceState left, ProfileResourceState right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.Serialization.cs new file mode 100644 index 000000000000..c04801157d67 --- /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 000000000000..ed23bbdc5299 --- /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 9621e0a960ee..6780221495f9 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 000000000000..6ce02cc7ef08 --- /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 000000000000..6bd87e30b5d1 --- /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 000000000000..a42c30babfb6 --- /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 000000000000..13651485375e --- /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 000000000000..2024bd1bb960 --- /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 000000000000..dde13b4d2e44 --- /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 4a2beec31de8..9b602e1a48c7 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 24b12c301c63..59542877809e 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 c6550dd362b5..000000000000 --- 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 2e6e34ff42be..9028c14c068e 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 1432f3f7d94d..9f4095d5cfb2 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 271c77666479..000000000000 --- 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 000000000000..0eb9abb1fa77 --- /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 8d56d470de87..8100921efeda 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 1895bb6d9b09..3b478912db6b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs @@ -678,7 +678,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 @@ -700,7 +768,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 @@ -722,7 +790,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 @@ -756,7 +824,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 @@ -789,6 +857,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 /// @@ -1181,6 +1393,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 52aec5133057..31cefcdc4306 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 a2e81e63eccf..0a2bce782688 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 dc5f239a4d52..1a532f18e144 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 d4b57e83284b..73bf8d12993a 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 f403e355d862..04541d85caa0 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 6609c9fbf1df..7fd500831915 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 878bcc896906..730f62b681a8 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 2383b034aa32..338657e9ffce 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 d1ba5c828d11..6441c167c967 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 5163902d5d34..5377992c5200 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 ed9b79a31042..0b4a32fd5377 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 e58a00fc1cf0..5e79101f8a7f 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 83d13aaf4845..53f2e7f915f0 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 737871f392df..74432d18d822 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 df30aa50f99e..5c5f5cfd92cf 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 e2f817782ea5..8823bc403de5 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 06fb2f7cc369..52063ffbce05 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 d9da272d5bc3..2934bb4d6ca3 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 18e1a4702e7e..ff298c37ebd5 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 9fa159c3bef4..58227cbe3075 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 091cd1ccb0fc..51ab368327fe 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 3b415f712749..ee8ba446593b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true library-name: Cdn namespace: Azure.ResourceManager.Cdn title: CdnManagementClient -require: https://github.com/Azure/azure-rest-api-specs/blob/236c7ce93e9bcb875e1fbe1db8602a3a159ee2ae/specification/cdn/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/cdn/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: