diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs
index 5fb26127641ba..107c34272bc36 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_AppCertificateCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListCertificatesByResourceGroup()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListCertificatesByResourceGroup.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListCertificatesByResourceGroup.json
// this example is just showing the usage of "Certificates_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
@@ -56,7 +56,7 @@ public async Task GetAll_ListCertificatesByResourceGroup()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetCertificate()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetCertificate.json
// this example is just showing the usage of "Certificates_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
@@ -90,7 +90,7 @@ public async Task Get_GetCertificate()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetCertificate()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetCertificate.json
// this example is just showing the usage of "Certificates_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
@@ -120,7 +120,7 @@ public async Task Exists_GetCertificate()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetCertificate()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetCertificate.json
// this example is just showing the usage of "Certificates_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
@@ -162,7 +162,7 @@ public async Task GetIfExists_GetCertificate()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_CreateOrUpdateCertificate()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateCertificate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateCertificate.json
// this example is just showing the usage of "Certificates_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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs
index b5785192ff003..4ac4434bdfb7a 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppCertificateResource.cs
@@ -21,7 +21,7 @@ public partial class Sample_AppCertificateResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAppCertificates_ListCertificatesForSubscription()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListCertificates.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListCertificates.json
// this example is just showing the usage of "Certificates_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
@@ -53,7 +53,7 @@ public async Task GetAppCertificates_ListCertificatesForSubscription()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetCertificate()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetCertificate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetCertificate.json
// this example is just showing the usage of "Certificates_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
@@ -84,7 +84,7 @@ public async Task Get_GetCertificate()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteCertificate()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteCertificate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteCertificate.json
// this example is just showing the usage of "Certificates_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
@@ -111,7 +111,7 @@ public async Task Delete_DeleteCertificate()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_PatchCertificate()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchCertificate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/PatchCertificate.json
// this example is just showing the usage of "Certificates_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
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs
new file mode 100644
index 0000000000000..836df50f52f20
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AppServiceCertificateCollection
+ {
+ // List certificates by App Service Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListCertificatesByAppServiceCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ListCertificatesByAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_ListCertificates" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // get the collection of this AppServiceCertificateResource
+ AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates();
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceCertificateResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ AppServiceCertificateData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get App Service Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAppServiceCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificate.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // get the collection of this AppServiceCertificateResource
+ AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates();
+
+ // invoke the operation
+ string name = "SampleCertName1";
+ AppServiceCertificateResource result = await collection.GetAsync(name);
+
+ // 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
+ AppServiceCertificateData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get App Service Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetAppServiceCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificate.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // get the collection of this AppServiceCertificateResource
+ AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates();
+
+ // invoke the operation
+ string name = "SampleCertName1";
+ bool result = await collection.ExistsAsync(name);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get App Service Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetAppServiceCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificate.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // get the collection of this AppServiceCertificateResource
+ AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates();
+
+ // invoke the operation
+ string name = "SampleCertName1";
+ NullableResponse response = await collection.GetIfExistsAsync(name);
+ AppServiceCertificateResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ AppServiceCertificateData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/CreateAppServiceCertificate.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_CreateOrUpdateCertificate" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // get the collection of this AppServiceCertificateResource
+ AppServiceCertificateCollection collection = appServiceCertificateOrder.GetAppServiceCertificates();
+
+ // invoke the operation
+ string name = "SampleCertName1";
+ AppServiceCertificateData data = new AppServiceCertificateData(new AzureLocation("Global"))
+ {
+ KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+ KeyVaultSecretName = "SampleSecretName1",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ AppServiceCertificateResource 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
+ AppServiceCertificateData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs
new file mode 100644
index 0000000000000..99be143bbe033
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs
@@ -0,0 +1,217 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AppServiceCertificateOrderCollection
+ {
+ // List App Service Certificate orders by resource group
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListAppServiceCertificateOrdersByResourceGroup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ListAppServiceCertificateOrdersByResourceGroup.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceCertificateOrderResource
+ AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders();
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceCertificateOrderResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ AppServiceCertificateOrderData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get App Service Certificate Order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAppServiceCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceCertificateOrderResource
+ AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders();
+
+ // invoke the operation
+ string certificateOrderName = "SampleCertificateOrderName";
+ AppServiceCertificateOrderResource result = await collection.GetAsync(certificateOrderName);
+
+ // 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
+ AppServiceCertificateOrderData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get App Service Certificate Order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetAppServiceCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceCertificateOrderResource
+ AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders();
+
+ // invoke the operation
+ string certificateOrderName = "SampleCertificateOrderName";
+ bool result = await collection.ExistsAsync(certificateOrderName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get App Service Certificate Order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetAppServiceCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceCertificateOrderResource
+ AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders();
+
+ // invoke the operation
+ string certificateOrderName = "SampleCertificateOrderName";
+ NullableResponse response = await collection.GetIfExistsAsync(certificateOrderName);
+ AppServiceCertificateOrderResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ AppServiceCertificateOrderData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create Certificate order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/CreateAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceCertificateOrderResource
+ AppServiceCertificateOrderCollection collection = resourceGroupResource.GetAppServiceCertificateOrders();
+
+ // invoke the operation
+ string certificateOrderName = "SampleCertificateOrderName";
+ AppServiceCertificateOrderData data = new AppServiceCertificateOrderData(new AzureLocation("Global"))
+ {
+ Certificates =
+{
+["SampleCertName1"] = new AppServiceCertificateProperties()
+{
+KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+KeyVaultSecretName = "SampleSecretName1",
+},
+["SampleCertName2"] = new AppServiceCertificateProperties()
+{
+KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+KeyVaultSecretName = "SampleSecretName2",
+},
+},
+ DistinguishedName = "CN=SampleCustomDomain.com",
+ ValidityInYears = 2,
+ KeySize = 2048,
+ ProductType = CertificateProductType.StandardDomainValidatedSsl,
+ IsAutoRenew = true,
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, certificateOrderName, data);
+ AppServiceCertificateOrderResource 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
+ AppServiceCertificateOrderData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs
new file mode 100644
index 0000000000000..b5872e7be7176
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs
@@ -0,0 +1,405 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AppServiceCertificateOrderResource
+ {
+ // List App Service Certificate orders by subscription
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAppServiceCertificateOrders_ListAppServiceCertificateOrdersBySubscription()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ListAppServiceCertificateOrdersBySubscription.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceCertificateOrderResource item in subscriptionResource.GetAppServiceCertificateOrdersAsync())
+ {
+ // the variable item 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
+ AppServiceCertificateOrderData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get App Service Certificate Order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAppServiceCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ AppServiceCertificateOrderResource result = await appServiceCertificateOrder.GetAsync();
+
+ // 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
+ AppServiceCertificateOrderData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete App Service Certificate Order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteAppServiceCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/DeleteAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ await appServiceCertificateOrder.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Update Certificate order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdateCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/UpdateAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ AppServiceCertificateOrderPatch patch = new AppServiceCertificateOrderPatch()
+ {
+ Certificates =
+{
+["SampleCertName1"] = new AppServiceCertificateProperties()
+{
+KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+KeyVaultSecretName = "SampleSecretName1",
+},
+["SampleCertName2"] = new AppServiceCertificateProperties()
+{
+KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+KeyVaultSecretName = "SampleSecretName2",
+},
+},
+ DistinguishedName = "CN=SampleCustomDomain.com",
+ ValidityInYears = 2,
+ KeySize = 2048,
+ ProductType = CertificateProductType.StandardDomainValidatedSsl,
+ IsAutoRenew = true,
+ };
+ AppServiceCertificateOrderResource result = await appServiceCertificateOrder.UpdateAsync(patch);
+
+ // 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
+ AppServiceCertificateOrderData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Reissue App Service Certificate Order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Reissue_ReissueAppServiceCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ReissueAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_Reissue" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ ReissueCertificateOrderContent content = new ReissueCertificateOrderContent()
+ {
+ KeySize = 2048,
+ DelayExistingRevokeInHours = 2,
+ Csr = "CSR1223238Value",
+ IsPrivateKeyExternal = false,
+ };
+ await appServiceCertificateOrder.ReissueAsync(content);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Renew App Service Certificate Order
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Renew_RenewAppServiceCertificateOrder()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/RenewAppServiceCertificateOrder.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_Renew" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ RenewCertificateOrderContent content = new RenewCertificateOrderContent()
+ {
+ KeySize = 2048,
+ Csr = "CSR1223238Value",
+ IsPrivateKeyExternal = false,
+ };
+ await appServiceCertificateOrder.RenewAsync(content);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Resend App Service Certificate Order email
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ResendEmail_ResendAppServiceCertificateOrderEmail()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ResendAppServiceCertificateOrderEmail.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_ResendEmail" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ await appServiceCertificateOrder.ResendEmailAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Resend Domain Ownership verification email
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ResendRequestEmails_ResendDomainOwnershipVerificationEmail()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ResendDomainOwnershipVerificationEmail.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_ResendRequestEmails" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ AppServiceDomainNameIdentifier nameIdentifier = new AppServiceDomainNameIdentifier()
+ {
+ Name = "Domain name",
+ };
+ await appServiceCertificateOrder.ResendRequestEmailsAsync(nameIdentifier);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Retrieve Site Seal
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task RetrieveSiteSeal_RetrieveSiteSeal()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/RetrieveSiteSeal.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveSiteSeal" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertOrder";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ SiteSealContent content = new SiteSealContent()
+ {
+ IsLightTheme = true,
+ Locale = "en-us",
+ };
+ SiteSeal result = await appServiceCertificateOrder.RetrieveSiteSealAsync(content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Verify Domain Ownership
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task VerifyDomainOwnership_VerifyDomainOwnership()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/VerifyDomainOwnership.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_VerifyDomainOwnership" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation
+ await appServiceCertificateOrder.VerifyDomainOwnershipAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Retrieve Certificate Order Actions
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task RetrieveCertificateActions_RetrieveCertificateOrderActions()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/RetrieveCertificateOrderActions.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveCertificateActions" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "SampleCertOrder";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (CertificateOrderAction item in appServiceCertificateOrder.RetrieveCertificateActionsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Retrieve Certificate Email History
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task RetrieveCertificateEmailHistory_RetrieveCertificateEmailHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/RetrieveCertificateEmailHistory.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_RetrieveCertificateEmailHistory" 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 AppServiceCertificateOrderResource created on azure
+ // for more information of creating AppServiceCertificateOrderResource, please refer to the document of AppServiceCertificateOrderResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "SampleCertOrder";
+ ResourceIdentifier appServiceCertificateOrderResourceId = AppServiceCertificateOrderResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceCertificateOrderResource appServiceCertificateOrder = client.GetAppServiceCertificateOrderResource(appServiceCertificateOrderResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceCertificateEmail item in appServiceCertificateOrder.RetrieveCertificateEmailHistoryAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs
new file mode 100644
index 0000000000000..e7b199d779c0d
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs
@@ -0,0 +1,115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AppServiceCertificateResource
+ {
+ // Get App Service Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAppServiceCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/GetAppServiceCertificate.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_GetCertificate" 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 AppServiceCertificateResource created on azure
+ // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ string name = "SampleCertName1";
+ ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name);
+ AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId);
+
+ // invoke the operation
+ AppServiceCertificateResource result = await appServiceCertificate.GetAsync();
+
+ // 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
+ AppServiceCertificateData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete App Service Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteAppServiceCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/DeleteAppServiceCertificate.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_DeleteCertificate" 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 AppServiceCertificateResource created on azure
+ // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ string name = "SampleCertName1";
+ ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name);
+ AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId);
+
+ // invoke the operation
+ await appServiceCertificate.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Update Certificate
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdateCertificate()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/UpdateAppServiceCertificate.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_UpdateCertificate" 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 AppServiceCertificateResource created on azure
+ // for more information of creating AppServiceCertificateResource, please refer to the document of AppServiceCertificateResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string certificateOrderName = "SampleCertificateOrderName";
+ string name = "SampleCertName1";
+ ResourceIdentifier appServiceCertificateResourceId = AppServiceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, certificateOrderName, name);
+ AppServiceCertificateResource appServiceCertificate = client.GetAppServiceCertificateResource(appServiceCertificateResourceId);
+
+ // invoke the operation
+ AppServiceCertificatePatch patch = new AppServiceCertificatePatch()
+ {
+ KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+ KeyVaultSecretName = "SampleSecretName1",
+ };
+ AppServiceCertificateResource result = await appServiceCertificate.UpdateAsync(patch);
+
+ // 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
+ AppServiceCertificateData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs
new file mode 100644
index 0000000000000..c8792d903efb1
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs
@@ -0,0 +1,247 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AppServiceDomainCollection
+ {
+ // List domains by resource group
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListDomainsByResourceGroup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/ListDomainsByResourceGroup.json
+ // this example is just showing the usage of "Domains_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceDomainResource
+ AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains();
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceDomainResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ AppServiceDomainData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomain.json
+ // this example is just showing the usage of "Domains_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceDomainResource
+ AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains();
+
+ // invoke the operation
+ string domainName = "example.com";
+ AppServiceDomainResource result = await collection.GetAsync(domainName);
+
+ // 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
+ AppServiceDomainData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomain.json
+ // this example is just showing the usage of "Domains_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceDomainResource
+ AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains();
+
+ // invoke the operation
+ string domainName = "example.com";
+ bool result = await collection.ExistsAsync(domainName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomain.json
+ // this example is just showing the usage of "Domains_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceDomainResource
+ AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains();
+
+ // invoke the operation
+ string domainName = "example.com";
+ NullableResponse response = await collection.GetIfExistsAsync(domainName);
+ AppServiceDomainResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ AppServiceDomainData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create App Service Domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateAppServiceDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/CreateAppServiceDomain.json
+ // this example is just showing the usage of "Domains_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceDomainResource
+ AppServiceDomainCollection collection = resourceGroupResource.GetAppServiceDomains();
+
+ // invoke the operation
+ string domainName = "example.com";
+ AppServiceDomainData data = new AppServiceDomainData(new AzureLocation("global"))
+ {
+ ContactAdmin = new RegistrationContactInfo("admin@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Admin",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ ContactBilling = new RegistrationContactInfo("billing@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Billing",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ ContactRegistrant = new RegistrationContactInfo("registrant@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Registrant",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ ContactTech = new RegistrationContactInfo("tech@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Tech",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ IsDomainPrivacyEnabled = false,
+ IsAutoRenew = true,
+ Consent = new DomainPurchaseConsent()
+ {
+ AgreementKeys =
+{
+"agreementKey1"
+},
+ AgreedBy = "192.0.2.1",
+ AgreedOn = DateTimeOffset.Parse("2021-09-10T19:30:53Z"),
+ },
+ DnsType = AppServiceDnsType.DefaultDomainRegistrarDns,
+ AuthCode = "exampleAuthCode",
+ Tags =
+{
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, domainName, data);
+ AppServiceDomainResource 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
+ AppServiceDomainData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs
index 88c07cba0f152..f791b96295873 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainResource.cs
@@ -9,17 +9,189 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
namespace Azure.ResourceManager.AppService.Samples
{
public partial class Sample_AppServiceDomainResource
{
+ // List domains by subscription
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAppServiceDomains_ListDomainsBySubscription()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/ListDomainsBySubscription.json
+ // this example is just showing the usage of "Domains_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceDomainResource item in subscriptionResource.GetAppServiceDomainsAsync())
+ {
+ // the variable item 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
+ AppServiceDomainData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomain.json
+ // this example is just showing the usage of "Domains_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // invoke the operation
+ AppServiceDomainResource result = await appServiceDomain.GetAsync();
+
+ // 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
+ AppServiceDomainData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete App Service Domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteAppServiceDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/DeleteAppServiceDomain.json
+ // this example is just showing the usage of "Domains_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // invoke the operation
+ bool? forceHardDeleteDomain = true;
+ await appServiceDomain.DeleteAsync(WaitUntil.Completed, forceHardDeleteDomain: forceHardDeleteDomain);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Update App Service Domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdateAppServiceDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/UpdateAppServiceDomain.json
+ // this example is just showing the usage of "Domains_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // invoke the operation
+ AppServiceDomainPatch patch = new AppServiceDomainPatch()
+ {
+ ContactAdmin = new RegistrationContactInfo("admin@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Admin",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ ContactBilling = new RegistrationContactInfo("billing@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Billing",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ ContactRegistrant = new RegistrationContactInfo("registrant@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Registrant",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ ContactTech = new RegistrationContactInfo("tech@email.com", "John", "Doe", "1-245-534-2242")
+ {
+ AddressMailing = new RegistrationAddressInfo("3400 State St", "Chicago", "United States", "67098", "IL"),
+ Fax = "1-245-534-2242",
+ JobTitle = "Tech",
+ NameMiddle = "",
+ Organization = "Microsoft Inc.",
+ },
+ IsDomainPrivacyEnabled = false,
+ IsAutoRenew = true,
+ Consent = new DomainPurchaseConsent()
+ {
+ AgreementKeys =
+{
+"agreementKey1"
+},
+ AgreedBy = "192.0.2.1",
+ AgreedOn = DateTimeOffset.Parse("2021-09-10T19:30:53Z"),
+ },
+ DnsType = AppServiceDnsType.DefaultDomainRegistrarDns,
+ AuthCode = "exampleAuthCode",
+ };
+ AppServiceDomainResource result = await appServiceDomain.UpdateAsync(patch);
+
+ // 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
+ AppServiceDomainData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
// Renew an existing domain
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Renew_RenewAnExistingDomain()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/RenewDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/RenewDomain.json
// this example is just showing the usage of "Domains_Renew" 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
@@ -40,5 +212,36 @@ public async Task Renew_RenewAnExistingDomain()
Console.WriteLine($"Succeeded");
}
+
+ // Transfer out domain
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task TransferOut_TransferOutDomain()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/TransferOutDomain.json
+ // this example is just showing the usage of "Domains_TransferOut" 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 AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // invoke the operation
+ AppServiceDomainResource result = await appServiceDomain.TransferOutAsync();
+
+ // 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
+ AppServiceDomainData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
}
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs
new file mode 100644
index 0000000000000..9da13b76064d3
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.cs
@@ -0,0 +1,201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AppServiceEnvironmentCollection
+ {
+ // Get all App Service Environments in a resource group.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_GetAllAppServiceEnvironmentsInAResourceGroup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListByResourceGroup.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceEnvironmentResource
+ AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments();
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceEnvironmentResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ AppServiceEnvironmentData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get the properties of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetThePropertiesOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Get.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceEnvironmentResource
+ AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments();
+
+ // invoke the operation
+ string name = "test-ase";
+ AppServiceEnvironmentResource result = await collection.GetAsync(name);
+
+ // 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
+ AppServiceEnvironmentData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get the properties of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetThePropertiesOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Get.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceEnvironmentResource
+ AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments();
+
+ // invoke the operation
+ string name = "test-ase";
+ bool result = await collection.ExistsAsync(name);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get the properties of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetThePropertiesOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Get.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceEnvironmentResource
+ AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments();
+
+ // invoke the operation
+ string name = "test-ase";
+ NullableResponse response = await collection.GetIfExistsAsync(name);
+ AppServiceEnvironmentResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ AppServiceEnvironmentData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create or update an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_CreateOrUpdate.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this AppServiceEnvironmentResource
+ AppServiceEnvironmentCollection collection = resourceGroupResource.GetAppServiceEnvironments();
+
+ // invoke the operation
+ string name = "test-ase";
+ AppServiceEnvironmentData data = new AppServiceEnvironmentData(new AzureLocation("South Central US"))
+ {
+ VirtualNetwork = new AppServiceVirtualNetworkProfile(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/delegated")),
+ Kind = "Asev3",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ AppServiceEnvironmentResource 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
+ AppServiceEnvironmentData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs
index 1337819550f72..0067a9fe7bc39 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentResource.cs
@@ -10,17 +10,259 @@
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
namespace Azure.ResourceManager.AppService.Samples
{
public partial class Sample_AppServiceEnvironmentResource
{
- // Get Inbound Network Dependencies Endpoints
+ // Get all App Service Environments for a subscription.
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task GetInboundNetworkDependenciesEndpoints_GetInboundNetworkDependenciesEndpoints()
+ public async Task GetAppServiceEnvironments_GetAllAppServiceEnvironmentsForASubscription()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetInboundNetworkDependenciesEndpoints.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_List.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceEnvironmentResource item in subscriptionResource.GetAppServiceEnvironmentsAsync())
+ {
+ // the variable item 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
+ AppServiceEnvironmentData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get the properties of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetThePropertiesOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Get.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ AppServiceEnvironmentResource result = await appServiceEnvironment.GetAsync();
+
+ // 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
+ AppServiceEnvironmentData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Delete.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ await appServiceEnvironment.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Create or update an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_CreateOrUpdateAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Update.json
+ // this example is just showing the usage of "AppServiceEnvironments_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ AppServiceEnvironmentPatch patch = new AppServiceEnvironmentPatch()
+ {
+ VirtualNetwork = new AppServiceVirtualNetworkProfile(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/test-subnet/subnets/delegated")),
+ FrontEndScaleFactor = 20,
+ };
+ AppServiceEnvironmentResource result = await appServiceEnvironment.UpdateAsync(patch);
+
+ // 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
+ AppServiceEnvironmentData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get the used, available, and total worker capacity an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetCapacities_GetTheUsedAvailableAndTotalWorkerCapacityAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListCapacities.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListCapacities" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (StampCapacity item in appServiceEnvironment.GetCapacitiesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get IP addresses assigned to an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetVipInfo_GetIPAddressesAssignedToAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetVipInfo.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetVipInfo" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ AppServiceEnvironmentAddressResult result = await appServiceEnvironment.GetVipInfoAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get diagnostic information for an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetDiagnostics_GetDiagnosticInformationForAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListDiagnostics.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListDiagnostics" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (HostingEnvironmentDiagnostics item in appServiceEnvironment.GetDiagnosticsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a diagnostics item for an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetDiagnosticsItem_GetADiagnosticsItemForAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetDiagnosticsItem.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetDiagnosticsItem" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ string diagnosticsName = "test-diagnostic";
+ HostingEnvironmentDiagnostics result = await appServiceEnvironment.GetDiagnosticsItemAsync(diagnosticsName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get the network endpoints of all inbound dependencies of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetInboundNetworkDependenciesEndpoints_GetTheNetworkEndpointsOfAllInboundDependenciesOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetInboundNetworkDependenciesEndpoints.json
// this example is just showing the usage of "AppServiceEnvironments_GetInboundNetworkDependenciesEndpoints" 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
@@ -45,12 +287,96 @@ public async Task GetInboundNetworkDependenciesEndpoints_GetInboundNetworkDepend
Console.WriteLine($"Succeeded");
}
- // Get Outbound Network Dependencies Endpoints
+ // Send a test notification that an upgrade is available for this App Service Environment
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task TestUpgradeAvailableNotification_SendATestNotificationThatAnUpgradeIsAvailableForThisAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_TestUpgradeAvailableNotification.json
+ // this example is just showing the usage of "AppServiceEnvironments_TestUpgradeAvailableNotification" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "SampleHostingEnvironment";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ await appServiceEnvironment.TestUpgradeAvailableNotificationAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Initiate an upgrade on an App Service Environment
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Upgrade_InitiateAnUpgradeOnAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Upgrade.json
+ // this example is just showing the usage of "AppServiceEnvironments_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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "SampleHostingEnvironment";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ await appServiceEnvironment.UpgradeAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // List all currently running operations on the App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetOperations_ListAllCurrentlyRunningOperationsOnTheAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListOperations.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListOperations" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceOperation item in appServiceEnvironment.GetOperationsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get the network endpoints of all outbound dependencies of an App Service Environment.
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
- public async Task GetOutboundNetworkDependenciesEndpoints_GetOutboundNetworkDependenciesEndpoints()
+ public async Task GetOutboundNetworkDependenciesEndpoints_GetTheNetworkEndpointsOfAllOutboundDependenciesOfAnAppServiceEnvironment()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetOutboundNetworkDependenciesEndpoints.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetOutboundNetworkDependenciesEndpoints.json
// this example is just showing the usage of "AppServiceEnvironments_GetOutboundNetworkDependenciesEndpoints" 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
@@ -74,5 +400,157 @@ public async Task GetOutboundNetworkDependenciesEndpoints_GetOutboundNetworkDepe
Console.WriteLine($"Succeeded");
}
+
+ // Gets the private link resources.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetPrivateLinkResources_GetsThePrivateLinkResources()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetPrivateLinkResources.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetPrivateLinkResources" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServicePrivateLinkResourceData item in appServiceEnvironment.GetPrivateLinkResourcesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Reboot all machines in an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Reboot_RebootAllMachinesInAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_Reboot.json
+ // this example is just showing the usage of "AppServiceEnvironments_Reboot" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation
+ await appServiceEnvironment.RebootAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get all App Service plans in an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAppServicePlans_GetAllAppServicePlansInAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListAppServicePlans.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListAppServicePlans" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServicePlanResource item in appServiceEnvironment.GetAppServicePlansAsync())
+ {
+ // the variable item 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
+ AppServicePlanData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get all apps in an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAllWebAppData_GetAllAppsInAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListWebApps.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListWebApps" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WebSiteData item in appServiceEnvironment.GetAllWebAppDataAsync())
+ {
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {item.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get global usage metrics of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetUsages_GetGlobalUsageMetricsOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListUsages.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListUsages" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (CsmUsageQuota item in appServiceEnvironment.GetUsagesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
}
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs
index 0812f60ab4f53..3b0ed51316feb 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanCollection.cs
@@ -21,7 +21,7 @@ public partial class Sample_AppServicePlanCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppServicePlansByResourceGroup()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListAppServicePlansByResourceGroup.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListAppServicePlansByResourceGroup.json
// this example is just showing the usage of "AppServicePlans_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
@@ -57,7 +57,7 @@ public async Task GetAll_ListAppServicePlansByResourceGroup()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppServicePlan()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetAppServicePlan.json
// this example is just showing the usage of "AppServicePlans_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
@@ -91,7 +91,7 @@ public async Task Get_GetAppServicePlan()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppServicePlan()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetAppServicePlan.json
// this example is just showing the usage of "AppServicePlans_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
@@ -121,7 +121,7 @@ public async Task Exists_GetAppServicePlan()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppServicePlan()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetAppServicePlan.json
// this example is just showing the usage of "AppServicePlans_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
@@ -163,7 +163,7 @@ public async Task GetIfExists_GetAppServicePlan()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_CreateOrUpdateAppServicePlan()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateAppServicePlan.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateAppServicePlan.json
// this example is just showing the usage of "AppServicePlans_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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs
index dfeee5c4c25e7..b066edde7b4af 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServicePlanResource.cs
@@ -21,7 +21,7 @@ public partial class Sample_AppServicePlanResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAppServicePlans_ListAppServicePlans()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListAppServicePlans.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListAppServicePlans.json
// this example is just showing the usage of "AppServicePlans_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
@@ -53,7 +53,7 @@ public async Task GetAppServicePlans_ListAppServicePlans()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppServicePlan()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAppServicePlan.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetAppServicePlan.json
// this example is just showing the usage of "AppServicePlans_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
@@ -84,7 +84,7 @@ public async Task Get_GetAppServicePlan()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteAppServicePlan()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteAppServicePlan.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteAppServicePlan.json
// this example is just showing the usage of "AppServicePlans_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
@@ -111,7 +111,7 @@ public async Task Delete_DeleteAppServicePlan()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_PatchServicePlan()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchAppServicePlan.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/PatchAppServicePlan.json
// this example is just showing the usage of "AppServicePlans_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
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs
new file mode 100644
index 0000000000000..39b429d4497ac
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AseV3NetworkingConfigurationResource
+ {
+ // Get networking configuration of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetNetworkingConfigurationOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetAseV3NetworkingConfiguration.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetAseV3NetworkingConfiguration" 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 AseV3NetworkingConfigurationResource created on azure
+ // for more information of creating AseV3NetworkingConfigurationResource, please refer to the document of AseV3NetworkingConfigurationResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier aseV3NetworkingConfigurationResourceId = AseV3NetworkingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AseV3NetworkingConfigurationResource aseV3NetworkingConfiguration = client.GetAseV3NetworkingConfigurationResource(aseV3NetworkingConfigurationResourceId);
+
+ // invoke the operation
+ AseV3NetworkingConfigurationResource result = await aseV3NetworkingConfiguration.GetAsync();
+
+ // 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
+ AseV3NetworkingConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Update networking configuration of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_UpdateNetworkingConfigurationOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_UpdateAseNetworkingConfiguration.json
+ // this example is just showing the usage of "AppServiceEnvironments_UpdateAseNetworkingConfiguration" 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 AseV3NetworkingConfigurationResource created on azure
+ // for more information of creating AseV3NetworkingConfigurationResource, please refer to the document of AseV3NetworkingConfigurationResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier aseV3NetworkingConfigurationResourceId = AseV3NetworkingConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AseV3NetworkingConfigurationResource aseV3NetworkingConfiguration = client.GetAseV3NetworkingConfigurationResource(aseV3NetworkingConfigurationResourceId);
+
+ // invoke the operation
+ AseV3NetworkingConfigurationData data = new AseV3NetworkingConfigurationData()
+ {
+ FtpEnabled = true,
+ RemoteDebugEnabled = true,
+ };
+ ArmOperation lro = await aseV3NetworkingConfiguration.CreateOrUpdateAsync(WaitUntil.Completed, data);
+ AseV3NetworkingConfigurationResource 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
+ AseV3NetworkingConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AuthsettingsV2SiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AuthsettingsV2SiteConfigResource.cs
new file mode 100644
index 0000000000000..2fbb48327b5d0
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AuthsettingsV2SiteConfigResource.cs
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_AuthsettingsV2SiteConfigResource
+ {
+ // List Auth Settings without Secrets
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_ListAuthSettingsWithoutSecrets()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetAuthSettingsV2WithoutSecrets.json
+ // this example is just showing the usage of "WebApps_GetAuthSettingsV2WithoutSecrets" 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 AuthsettingsV2SiteConfigResource created on azure
+ // for more information of creating AuthsettingsV2SiteConfigResource, please refer to the document of AuthsettingsV2SiteConfigResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier authsettingsV2SiteConfigResourceId = AuthsettingsV2SiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AuthsettingsV2SiteConfigResource authsettingsV2SiteConfig = client.GetAuthsettingsV2SiteConfigResource(authsettingsV2SiteConfigResourceId);
+
+ // invoke the operation
+ AuthsettingsV2SiteConfigResource result = await authsettingsV2SiteConfig.GetAsync();
+
+ // 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
+ SiteAuthSettingsV2Data resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Update Auth Settings V2
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_UpdateAuthSettingsV2()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateAuthSettingsV2.json
+ // this example is just showing the usage of "WebApps_UpdateAuthSettingsV2" 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 AuthsettingsV2SiteConfigResource created on azure
+ // for more information of creating AuthsettingsV2SiteConfigResource, please refer to the document of AuthsettingsV2SiteConfigResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier authsettingsV2SiteConfigResourceId = AuthsettingsV2SiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AuthsettingsV2SiteConfigResource authsettingsV2SiteConfig = client.GetAuthsettingsV2SiteConfigResource(authsettingsV2SiteConfigResourceId);
+
+ // invoke the operation
+ SiteAuthSettingsV2Data data = new SiteAuthSettingsV2Data()
+ {
+ Platform = new AuthPlatform()
+ {
+ IsEnabled = true,
+ RuntimeVersion = "~1",
+ ConfigFilePath = "/auth/config.json",
+ },
+ GlobalValidation = new GlobalValidation()
+ {
+ IsAuthenticationRequired = true,
+ UnauthenticatedClientAction = UnauthenticatedClientActionV2.Return403,
+ ExcludedPaths =
+{
+"/nosecrets/Path"
+},
+ },
+ IdentityProviders = new AppServiceIdentityProviders()
+ {
+ Google = new AppServiceGoogleProvider()
+ {
+ IsEnabled = true,
+ Registration = new ClientRegistration()
+ {
+ ClientId = "42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com",
+ ClientSecretSettingName = "ClientSecret",
+ },
+ LoginScopes =
+{
+"admin"
+},
+ ValidationAllowedAudiences =
+{
+"https://example.com"
+},
+ },
+ },
+ Login = new WebAppLoginInfo()
+ {
+ RoutesLogoutEndpoint = "https://app.com/logout",
+ TokenStore = new AppServiceTokenStore()
+ {
+ IsEnabled = true,
+ TokenRefreshExtensionHours = 96,
+ FileSystemDirectory = "/wwwroot/sites/example",
+ },
+ PreserveUrlFragmentsForLogins = true,
+ AllowedExternalRedirectUrls =
+{
+"https://someurl.com"
+},
+ CookieExpiration = new WebAppCookieExpiration()
+ {
+ Convention = CookieExpirationConvention.IdentityProviderDerived,
+ TimeToExpiration = "2022:09-01T00:00Z",
+ },
+ Nonce = new LoginFlowNonceSettings()
+ {
+ ValidateNonce = true,
+ },
+ },
+ HttpSettings = new AppServiceHttpSettings()
+ {
+ IsHttpsRequired = true,
+ RoutesApiPrefix = "/authv2/",
+ ForwardProxy = new AppServiceForwardProxy()
+ {
+ Convention = ForwardProxyConvention.Standard,
+ CustomHostHeaderName = "authHeader",
+ CustomProtoHeaderName = "customProtoHeader",
+ },
+ },
+ };
+ ArmOperation lro = await authsettingsV2SiteConfig.CreateOrUpdateAsync(WaitUntil.Completed, data);
+ AuthsettingsV2SiteConfigResource 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
+ SiteAuthSettingsV2Data resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // List Auth Settings V2
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAuthSettingsV2_ListAuthSettingsV2()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListAuthSettingsV2.json
+ // this example is just showing the usage of "WebApps_GetAuthSettingsV2" 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 AuthsettingsV2SiteConfigResource created on azure
+ // for more information of creating AuthsettingsV2SiteConfigResource, please refer to the document of AuthsettingsV2SiteConfigResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier authsettingsV2SiteConfigResourceId = AuthsettingsV2SiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AuthsettingsV2SiteConfigResource authsettingsV2SiteConfig = client.GetAuthsettingsV2SiteConfigResource(authsettingsV2SiteConfigResourceId);
+
+ // invoke the operation
+ AuthsettingsV2SiteConfigResource result = await authsettingsV2SiteConfig.GetAuthSettingsV2Async();
+
+ // 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
+ SiteAuthSettingsV2Data resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs
index d7f26c3dd08bd..906ab908d59c5 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_CertificateOrderDetectorCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppServiceCertificateDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json
// this example is just showing the usage of "CertificateOrdersDiagnostics_ListAppServiceCertificateOrderDetectorResponse" 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 GetAll_ListAppServiceCertificateDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppServiceCertificateOrderDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
// this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" 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
@@ -91,7 +91,7 @@ public async Task Get_GetAppServiceCertificateOrderDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppServiceCertificateOrderDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
// this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" 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
@@ -122,7 +122,7 @@ public async Task Exists_GetAppServiceCertificateOrderDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppServiceCertificateOrderDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
// this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs
index e2d77a52fe9eb..f0a0af0231ed5 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CertificateOrderDetectorResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_CertificateOrderDetectorResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppServiceCertificateOrderDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json
// this example is just showing the usage of "CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppCollection.cs
new file mode 100644
index 0000000000000..2b531c97d7b42
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppCollection.cs
@@ -0,0 +1,245 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_ContainerAppCollection
+ {
+ // List Container Apps by resource group
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListContainerAppsByResourceGroup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListContainerAppsByResourceGroup.json
+ // this example is just showing the usage of "ContainerApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this ContainerAppResource
+ ContainerAppCollection collection = resourceGroupResource.GetContainerApps();
+
+ // invoke the operation and iterate over the result
+ await foreach (ContainerAppResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ ContainerAppData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Container App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetContainerApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetContainerApp.json
+ // this example is just showing the usage of "ContainerApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this ContainerAppResource
+ ContainerAppCollection collection = resourceGroupResource.GetContainerApps();
+
+ // invoke the operation
+ string name = "testcontainerApp0";
+ ContainerAppResource result = await collection.GetAsync(name);
+
+ // 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
+ ContainerAppData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Container App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetContainerApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetContainerApp.json
+ // this example is just showing the usage of "ContainerApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this ContainerAppResource
+ ContainerAppCollection collection = resourceGroupResource.GetContainerApps();
+
+ // invoke the operation
+ string name = "testcontainerApp0";
+ bool result = await collection.ExistsAsync(name);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Container App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetContainerApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetContainerApp.json
+ // this example is just showing the usage of "ContainerApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this ContainerAppResource
+ ContainerAppCollection collection = resourceGroupResource.GetContainerApps();
+
+ // invoke the operation
+ string name = "testcontainerApp0";
+ NullableResponse response = await collection.GetIfExistsAsync(name);
+ ContainerAppResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ ContainerAppData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create or Update Container App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateContainerApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateContainerApp.json
+ // this example is just showing the usage of "ContainerApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this ContainerAppResource
+ ContainerAppCollection collection = resourceGroupResource.GetContainerApps();
+
+ // invoke the operation
+ string name = "testcontainerApp0";
+ ContainerAppData data = new ContainerAppData(new AzureLocation("East US"))
+ {
+ KubeEnvironmentId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube",
+ Configuration = new Configuration()
+ {
+ Ingress = new Ingress()
+ {
+ External = true,
+ TargetPort = 3000,
+ },
+ },
+ Template = new Template()
+ {
+ Containers =
+{
+new Container()
+{
+Image = "repo/testcontainerApp0:v1",
+Name = "testcontainerApp0",
+}
+},
+ Scale = new Scale()
+ {
+ MinReplicas = 1,
+ MaxReplicas = 5,
+ Rules =
+{
+new ScaleRule()
+{
+Name = "httpscalingrule",
+Custom = new CustomScaleRule()
+{
+CustomScaleRuleType = "http",
+Metadata =
+{
+["concurrentRequests"] = "50",
+},
+},
+}
+},
+ },
+ Dapr = new Dapr()
+ {
+ Enabled = true,
+ AppPort = 3000,
+ },
+ },
+ Kind = "containerApp",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ ContainerAppResource 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
+ ContainerAppData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppResource.cs
new file mode 100644
index 0000000000000..720fc7df841ed
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppResource.cs
@@ -0,0 +1,219 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_ContainerAppResource
+ {
+ // List Container Apps by resource group
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetContainerApps_ListContainerAppsByResourceGroup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListContainerAppsBySubscription.json
+ // this example is just showing the usage of "ContainerApps_ListBySubscription" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ContainerAppResource item in subscriptionResource.GetContainerAppsAsync())
+ {
+ // the variable item 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
+ ContainerAppData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Container App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetContainerApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetContainerApp.json
+ // this example is just showing the usage of "ContainerApps_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ContainerAppResource created on azure
+ // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testcontainerApp0";
+ ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId);
+
+ // invoke the operation
+ ContainerAppResource result = await containerApp.GetAsync();
+
+ // 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
+ ContainerAppData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create or Update Container App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_CreateOrUpdateContainerApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateContainerApp.json
+ // this example is just showing the usage of "ContainerApps_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ContainerAppResource created on azure
+ // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testcontainerApp0";
+ ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId);
+
+ // invoke the operation
+ ContainerAppData data = new ContainerAppData(new AzureLocation("East US"))
+ {
+ KubeEnvironmentId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube",
+ Configuration = new Configuration()
+ {
+ Ingress = new Ingress()
+ {
+ External = true,
+ TargetPort = 3000,
+ },
+ },
+ Template = new Template()
+ {
+ Containers =
+{
+new Container()
+{
+Image = "repo/testcontainerApp0:v1",
+Name = "testcontainerApp0",
+}
+},
+ Scale = new Scale()
+ {
+ MinReplicas = 1,
+ MaxReplicas = 5,
+ Rules =
+{
+new ScaleRule()
+{
+Name = "httpscalingrule",
+Custom = new CustomScaleRule()
+{
+CustomScaleRuleType = "http",
+Metadata =
+{
+["concurrentRequests"] = "50",
+},
+},
+}
+},
+ },
+ Dapr = new Dapr()
+ {
+ Enabled = true,
+ AppPort = 3000,
+ },
+ },
+ Kind = "containerApp",
+ };
+ ArmOperation lro = await containerApp.UpdateAsync(WaitUntil.Completed, data);
+ ContainerAppResource 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
+ ContainerAppData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete Container App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteContainerApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteContainerApp.json
+ // this example is just showing the usage of "ContainerApps_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ContainerAppResource created on azure
+ // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testWorkerApp0";
+ ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId);
+
+ // invoke the operation
+ await containerApp.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // List Container Apps Secrets
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetSecretsContainerApps_ListContainerAppsSecrets()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListContainerAppSecrets.json
+ // this example is just showing the usage of "ContainerApps_ListSecrets" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ string name = "testcontainerApp0";
+ await foreach (ContainerAppSecret item in subscriptionResource.GetSecretsContainerAppsAsync(name))
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs
new file mode 100644
index 0000000000000..fdc4cba5bea22
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_CustomDnsSuffixConfigurationResource
+ {
+ // Get ASE custom DNS suffix configuration
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetASECustomDNSSuffixConfiguration()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetAseCustomDnsSuffixConfiguration.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetAseCustomDnsSuffixConfiguration" 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 CustomDnsSuffixConfigurationResource created on azure
+ // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId);
+
+ // invoke the operation
+ CustomDnsSuffixConfigurationResource result = await customDnsSuffixConfiguration.GetAsync();
+
+ // 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
+ CustomDnsSuffixConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Update ASE custom DNS suffix configuration
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_UpdateASECustomDNSSuffixConfiguration()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateAseCustomDnsSuffixConfiguration.json
+ // this example is just showing the usage of "AppServiceEnvironments_UpdateAseCustomDnsSuffixConfiguration" 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 CustomDnsSuffixConfigurationResource created on azure
+ // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId);
+
+ // invoke the operation
+ CustomDnsSuffixConfigurationData data = new CustomDnsSuffixConfigurationData()
+ {
+ DnsSuffix = "contoso.com",
+ CertificateUri = new Uri("https://test-kv.vault.azure.net/secrets/contosocert"),
+ KeyVaultReferenceIdentity = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi",
+ };
+ ArmOperation lro = await customDnsSuffixConfiguration.CreateOrUpdateAsync(WaitUntil.Completed, data);
+ CustomDnsSuffixConfigurationResource 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
+ CustomDnsSuffixConfigurationData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete ASE custom DNS suffix configuration
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteASECustomDNSSuffixConfiguration()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteAseCustomDnsSuffixConfiguration.json
+ // this example is just showing the usage of "AppServiceEnvironments_DeleteAseCustomDnsSuffixConfiguration" 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 CustomDnsSuffixConfigurationResource created on azure
+ // for more information of creating CustomDnsSuffixConfigurationResource, please refer to the document of CustomDnsSuffixConfigurationResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier customDnsSuffixConfigurationResourceId = CustomDnsSuffixConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ CustomDnsSuffixConfigurationResource customDnsSuffixConfiguration = client.GetCustomDnsSuffixConfigurationResource(customDnsSuffixConfigurationResourceId);
+
+ // invoke the operation
+ ArmOperation lro = await customDnsSuffixConfiguration.DeleteAsync(WaitUntil.Completed);
+ BinaryData result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs
index 506a73ce23861..8f81f929c6719 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_DeletedSiteCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDeletedWebApp()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetDeletedWebApp.json
// this example is just showing the usage of "Global_GetDeletedWebApp" 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
@@ -53,7 +53,7 @@ public async Task Get_GetDeletedWebApp()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetDeletedWebApp()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetDeletedWebApp.json
// this example is just showing the usage of "Global_GetDeletedWebApp" 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
@@ -82,7 +82,7 @@ public async Task Exists_GetDeletedWebApp()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetDeletedWebApp()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetDeletedWebApp.json
// this example is just showing the usage of "Global_GetDeletedWebApp" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs
index 5eabeaedeaa88..4ab8194142807 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DeletedSiteResource.cs
@@ -21,7 +21,7 @@ public partial class Sample_DeletedSiteResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetDeletedSitesByLocation_ListDeletedWebAppByLocation()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListDeletedWebAppsByLocation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListDeletedWebAppsByLocation.json
// this example is just showing the usage of "DeletedWebApps_ListByLocation" 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 GetDeletedSitesByLocation_ListDeletedWebAppByLocation()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetDeletedWebAppByLocationDeletedWebApp_GetDeletedWebAppByLocation()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebAppByLocation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetDeletedWebAppByLocation.json
// this example is just showing the usage of "DeletedWebApps_GetDeletedWebAppByLocation" 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
@@ -85,7 +85,7 @@ public async Task GetDeletedWebAppByLocationDeletedWebApp_GetDeletedWebAppByLoca
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDeletedWebApp()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebApp.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetDeletedWebApp.json
// this example is just showing the usage of "Global_GetDeletedWebApp" 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 Get_GetDeletedWebApp()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetDeletedWebAppSnapshots_GetDeletedWebAppSnapshots()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetDeletedWebAppSnapshots.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetDeletedWebAppSnapshots.json
// this example is just showing the usage of "Global_GetDeletedWebAppSnapshots" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs
new file mode 100644
index 0000000000000..2f42ca9178595
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.cs
@@ -0,0 +1,203 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_DomainOwnershipIdentifierCollection
+ {
+ // List Domain Ownership Identifiers
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListDomainOwnershipIdentifiers()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/ListDomainOwnershipIdentifiers.json
+ // this example is just showing the usage of "Domains_ListOwnershipIdentifiers" 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 AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // get the collection of this DomainOwnershipIdentifierResource
+ DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers();
+
+ // invoke the operation and iterate over the result
+ await foreach (DomainOwnershipIdentifierResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ DomainOwnershipIdentifierData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Domain Ownership Identifier
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDomainOwnershipIdentifier()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomainOwnershipIdentifier.json
+ // this example is just showing the usage of "Domains_GetOwnershipIdentifier" 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 AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // get the collection of this DomainOwnershipIdentifierResource
+ DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers();
+
+ // invoke the operation
+ string name = "SampleOwnershipId";
+ DomainOwnershipIdentifierResource result = await collection.GetAsync(name);
+
+ // 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
+ DomainOwnershipIdentifierData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Domain Ownership Identifier
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetDomainOwnershipIdentifier()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomainOwnershipIdentifier.json
+ // this example is just showing the usage of "Domains_GetOwnershipIdentifier" 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 AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // get the collection of this DomainOwnershipIdentifierResource
+ DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers();
+
+ // invoke the operation
+ string name = "SampleOwnershipId";
+ bool result = await collection.ExistsAsync(name);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Domain Ownership Identifier
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetDomainOwnershipIdentifier()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomainOwnershipIdentifier.json
+ // this example is just showing the usage of "Domains_GetOwnershipIdentifier" 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 AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // get the collection of this DomainOwnershipIdentifierResource
+ DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers();
+
+ // invoke the operation
+ string name = "SampleOwnershipId";
+ NullableResponse response = await collection.GetIfExistsAsync(name);
+ DomainOwnershipIdentifierResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ DomainOwnershipIdentifierData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create App Service Domain OwnershipIdentifier
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateAppServiceDomainOwnershipIdentifier()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/CreateAppServiceDomainOwnershipIdentifier.json
+ // this example is just showing the usage of "Domains_CreateOrUpdateOwnershipIdentifier" 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 AppServiceDomainResource created on azure
+ // for more information of creating AppServiceDomainResource, please refer to the document of AppServiceDomainResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ ResourceIdentifier appServiceDomainResourceId = AppServiceDomainResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName);
+ AppServiceDomainResource appServiceDomain = client.GetAppServiceDomainResource(appServiceDomainResourceId);
+
+ // get the collection of this DomainOwnershipIdentifierResource
+ DomainOwnershipIdentifierCollection collection = appServiceDomain.GetDomainOwnershipIdentifiers();
+
+ // invoke the operation
+ string name = "SampleOwnershipId";
+ DomainOwnershipIdentifierData data = new DomainOwnershipIdentifierData()
+ {
+ OwnershipId = "SampleOwnershipId",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ DomainOwnershipIdentifierResource 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
+ DomainOwnershipIdentifierData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs
new file mode 100644
index 0000000000000..81cfd171fee7d
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_DomainOwnershipIdentifierResource
+ {
+ // Get Domain Ownership Identifier
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDomainOwnershipIdentifier()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomainOwnershipIdentifier.json
+ // this example is just showing the usage of "Domains_GetOwnershipIdentifier" 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 DomainOwnershipIdentifierResource created on azure
+ // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ string name = "SampleOwnershipId";
+ ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name);
+ DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId);
+
+ // invoke the operation
+ DomainOwnershipIdentifierResource result = await domainOwnershipIdentifier.GetAsync();
+
+ // 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
+ DomainOwnershipIdentifierData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete App Service Domain Ownership Identifier
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteAppServiceDomainOwnershipIdentifier()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/DeleteAppServiceDomainOwnershipIdentifier.json
+ // this example is just showing the usage of "Domains_DeleteOwnershipIdentifier" 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 DomainOwnershipIdentifierResource created on azure
+ // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ string name = "ownershipIdentifier";
+ ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name);
+ DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId);
+
+ // invoke the operation
+ await domainOwnershipIdentifier.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Update App Service Domain OwnershipIdentifier
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdateAppServiceDomainOwnershipIdentifier()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/UpdateAppServiceDomainOwnershipIdentifier.json
+ // this example is just showing the usage of "Domains_UpdateOwnershipIdentifier" 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 DomainOwnershipIdentifierResource created on azure
+ // for more information of creating DomainOwnershipIdentifierResource, please refer to the document of DomainOwnershipIdentifierResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string domainName = "example.com";
+ string name = "SampleOwnershipId";
+ ResourceIdentifier domainOwnershipIdentifierResourceId = DomainOwnershipIdentifierResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, domainName, name);
+ DomainOwnershipIdentifierResource domainOwnershipIdentifier = client.GetDomainOwnershipIdentifierResource(domainOwnershipIdentifierResourceId);
+
+ // invoke the operation
+ DomainOwnershipIdentifierData data = new DomainOwnershipIdentifierData()
+ {
+ OwnershipId = "SampleOwnershipId",
+ };
+ DomainOwnershipIdentifierResource result = await domainOwnershipIdentifier.UpdateAsync(data);
+
+ // 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
+ DomainOwnershipIdentifierData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs
index e156e212919ec..02880699c875a 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_HostingEnvironmentDetectorCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAppServiceEnvironmentDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json
// this example is just showing the usage of "Diagnostics_ListHostingEnvironmentDetectorResponses" 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 GetAll_GetAppServiceEnvironmentDetectorResponses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppServiceEnvironmentDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" 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
@@ -91,7 +91,7 @@ public async Task Get_GetAppServiceEnvironmentDetectorResponses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppServiceEnvironmentDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" 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
@@ -122,7 +122,7 @@ public async Task Exists_GetAppServiceEnvironmentDetectorResponses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppServiceEnvironmentDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs
index 8c08a61b5a1d9..61da7ac65c8b5 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentDetectorResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_HostingEnvironmentDetectorResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppServiceEnvironmentDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetHostingEnvironmentDetectorResponse" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs
new file mode 100644
index 0000000000000..6446458eed127
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs
@@ -0,0 +1,243 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_HostingEnvironmentMultiRolePoolResource
+ {
+ // Get properties of a multi-role pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetPropertiesOfAMultiRolePool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetMultiRolePool.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetMultiRolePool" 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 HostingEnvironmentMultiRolePoolResource created on azure
+ // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId);
+
+ // invoke the operation
+ HostingEnvironmentMultiRolePoolResource result = await hostingEnvironmentMultiRolePool.GetAsync();
+
+ // 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create or update a multi-role pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateAMultiRolePool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json
+ // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdateMultiRolePool" 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 HostingEnvironmentMultiRolePoolResource created on azure
+ // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId);
+
+ // invoke the operation
+ AppServiceWorkerPoolData data = new AppServiceWorkerPoolData()
+ {
+ WorkerSize = "Medium",
+ WorkerCount = 3,
+ };
+ ArmOperation lro = await hostingEnvironmentMultiRolePool.CreateOrUpdateAsync(WaitUntil.Completed, data);
+ HostingEnvironmentMultiRolePoolResource 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create or update a multi-role pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_CreateOrUpdateAMultiRolePool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_CreateOrUpdateMultiRolePool.json
+ // this example is just showing the usage of "AppServiceEnvironments_UpdateMultiRolePool" 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 HostingEnvironmentMultiRolePoolResource created on azure
+ // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId);
+
+ // invoke the operation
+ AppServiceWorkerPoolData data = new AppServiceWorkerPoolData()
+ {
+ WorkerSize = "Medium",
+ WorkerCount = 3,
+ };
+ HostingEnvironmentMultiRolePoolResource result = await hostingEnvironmentMultiRolePool.UpdateAsync(data);
+
+ // 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get metric definitions for a specific instance of a multi-role pool of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetMultiRolePoolInstanceMetricDefinitions_GetMetricDefinitionsForASpecificInstanceOfAMultiRolePoolOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListMultiRolePoolInstanceMetricDefinitions" 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 HostingEnvironmentMultiRolePoolResource created on azure
+ // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId);
+
+ // invoke the operation and iterate over the result
+ string instance = "10.7.1.8";
+ await foreach (ResourceMetricDefinition item in hostingEnvironmentMultiRolePool.GetMultiRolePoolInstanceMetricDefinitionsAsync(instance))
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get metric definitions for a multi-role pool of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetMultiRoleMetricDefinitions_GetMetricDefinitionsForAMultiRolePoolOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListMultiRoleMetricDefinitions.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListMultiRoleMetricDefinitions" 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 HostingEnvironmentMultiRolePoolResource created on azure
+ // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ResourceMetricDefinition item in hostingEnvironmentMultiRolePool.GetMultiRoleMetricDefinitionsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get available SKUs for scaling a multi-role pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetMultiRolePoolSkus_GetAvailableSKUsForScalingAMultiRolePool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListMultiRolePoolSkus.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListMultiRolePoolSkus" 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 HostingEnvironmentMultiRolePoolResource created on azure
+ // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServicePoolSkuInfo item in hostingEnvironmentMultiRolePool.GetMultiRolePoolSkusAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get usage metrics for a multi-role pool of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetMultiRoleUsages_GetUsageMetricsForAMultiRolePoolOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListMultiRoleUsages.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListMultiRoleUsages" 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 HostingEnvironmentMultiRolePoolResource created on azure
+ // for more information of creating HostingEnvironmentMultiRolePoolResource, please refer to the document of HostingEnvironmentMultiRolePoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier hostingEnvironmentMultiRolePoolResourceId = HostingEnvironmentMultiRolePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ HostingEnvironmentMultiRolePoolResource hostingEnvironmentMultiRolePool = client.GetHostingEnvironmentMultiRolePoolResource(hostingEnvironmentMultiRolePoolResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceUsage item in hostingEnvironmentMultiRolePool.GetMultiRoleUsagesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs
new file mode 100644
index 0000000000000..14ed37b763bdc
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.cs
@@ -0,0 +1,208 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_HostingEnvironmentPrivateEndpointConnectionCollection
+ {
+ // Gets the list of private endpoints associated with a hosting environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_GetsTheListOfPrivateEndpointsAssociatedWithAHostingEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetPrivateEndpointConnectionList.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnectionList" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource
+ HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections();
+
+ // invoke the operation and iterate over the result
+ await foreach (HostingEnvironmentPrivateEndpointConnectionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ RemotePrivateEndpointConnectionARMResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Gets a private endpoint connection.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAPrivateEndpointConnection()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource
+ HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections();
+
+ // invoke the operation
+ string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98";
+ HostingEnvironmentPrivateEndpointConnectionResource result = await collection.GetAsync(privateEndpointConnectionName);
+
+ // 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
+ RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Gets a private endpoint connection.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetsAPrivateEndpointConnection()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource
+ HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections();
+
+ // invoke the operation
+ string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98";
+ bool result = await collection.ExistsAsync(privateEndpointConnectionName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Gets a private endpoint connection.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetsAPrivateEndpointConnection()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource
+ HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections();
+
+ // invoke the operation
+ string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98";
+ NullableResponse response = await collection.GetIfExistsAsync(privateEndpointConnectionName);
+ HostingEnvironmentPrivateEndpointConnectionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Approves or rejects a private endpoint connection.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnection()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json
+ // this example is just showing the usage of "AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentPrivateEndpointConnectionResource
+ HostingEnvironmentPrivateEndpointConnectionCollection collection = appServiceEnvironment.GetHostingEnvironmentPrivateEndpointConnections();
+
+ // invoke the operation
+ string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98";
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
+ {
+ PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
+ {
+ Status = "Approved",
+ Description = "Approved by johndoe@company.com",
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data);
+ HostingEnvironmentPrivateEndpointConnectionResource 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
+ RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs
new file mode 100644
index 0000000000000..de861b9153d68
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_HostingEnvironmentPrivateEndpointConnectionResource
+ {
+ // Gets a private endpoint connection.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsAPrivateEndpointConnection()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetPrivateEndpointConnection.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetPrivateEndpointConnection" 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 HostingEnvironmentPrivateEndpointConnectionResource created on azure
+ // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98";
+ ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName);
+ HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId);
+
+ // invoke the operation
+ HostingEnvironmentPrivateEndpointConnectionResource result = await hostingEnvironmentPrivateEndpointConnection.GetAsync();
+
+ // 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
+ RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Approves or rejects a private endpoint connection.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnection()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection.json
+ // this example is just showing the usage of "AppServiceEnvironments_ApproveOrRejectPrivateEndpointConnection" 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 HostingEnvironmentPrivateEndpointConnectionResource created on azure
+ // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98";
+ ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName);
+ HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId);
+
+ // invoke the operation
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
+ {
+ PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
+ {
+ Status = "Approved",
+ Description = "Approved by johndoe@company.com",
+ },
+ };
+ ArmOperation lro = await hostingEnvironmentPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data);
+ HostingEnvironmentPrivateEndpointConnectionResource 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
+ RemotePrivateEndpointConnectionARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Deletes a private endpoint connection.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeletesAPrivateEndpointConnection()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_DeletePrivateEndpointConnection.json
+ // this example is just showing the usage of "AppServiceEnvironments_DeletePrivateEndpointConnection" 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 HostingEnvironmentPrivateEndpointConnectionResource created on azure
+ // for more information of creating HostingEnvironmentPrivateEndpointConnectionResource, please refer to the document of HostingEnvironmentPrivateEndpointConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string privateEndpointConnectionName = "fa38656c-034e-43d8-adce-fe06ce039c98";
+ ResourceIdentifier hostingEnvironmentPrivateEndpointConnectionResourceId = HostingEnvironmentPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, privateEndpointConnectionName);
+ HostingEnvironmentPrivateEndpointConnectionResource hostingEnvironmentPrivateEndpointConnection = client.GetHostingEnvironmentPrivateEndpointConnectionResource(hostingEnvironmentPrivateEndpointConnectionResourceId);
+
+ // invoke the operation
+ ArmOperation lro = await hostingEnvironmentPrivateEndpointConnection.DeleteAsync(WaitUntil.Completed);
+ BinaryData result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs
new file mode 100644
index 0000000000000..649d4231ff30a
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_HostingEnvironmentWorkerPoolCollection
+ {
+ // Get all worker pools of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_GetAllWorkerPoolsOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListWorkerPools.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPools" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentWorkerPoolResource
+ HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools();
+
+ // invoke the operation and iterate over the result
+ await foreach (HostingEnvironmentWorkerPoolResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ AppServiceWorkerPoolData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get properties of a worker pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetPropertiesOfAWorkerPool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetWorkerPool.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentWorkerPoolResource
+ HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools();
+
+ // invoke the operation
+ string workerPoolName = "workerPool1";
+ HostingEnvironmentWorkerPoolResource result = await collection.GetAsync(workerPoolName);
+
+ // 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get properties of a worker pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetPropertiesOfAWorkerPool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetWorkerPool.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentWorkerPoolResource
+ HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools();
+
+ // invoke the operation
+ string workerPoolName = "workerPool1";
+ bool result = await collection.ExistsAsync(workerPoolName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get properties of a worker pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetPropertiesOfAWorkerPool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetWorkerPool.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentWorkerPoolResource
+ HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools();
+
+ // invoke the operation
+ string workerPoolName = "workerPool1";
+ NullableResponse response = await collection.GetIfExistsAsync(workerPoolName);
+ HostingEnvironmentWorkerPoolResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Get properties of a worker pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_GetPropertiesOfAWorkerPool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json
+ // this example is just showing the usage of "AppServiceEnvironments_CreateOrUpdateWorkerPool" 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 AppServiceEnvironmentResource created on azure
+ // for more information of creating AppServiceEnvironmentResource, please refer to the document of AppServiceEnvironmentResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ ResourceIdentifier appServiceEnvironmentResourceId = AppServiceEnvironmentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ AppServiceEnvironmentResource appServiceEnvironment = client.GetAppServiceEnvironmentResource(appServiceEnvironmentResourceId);
+
+ // get the collection of this HostingEnvironmentWorkerPoolResource
+ HostingEnvironmentWorkerPoolCollection collection = appServiceEnvironment.GetHostingEnvironmentWorkerPools();
+
+ // invoke the operation
+ string workerPoolName = "0";
+ AppServiceWorkerPoolData data = new AppServiceWorkerPoolData()
+ {
+ WorkerSize = "Small",
+ WorkerCount = 3,
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, workerPoolName, data);
+ HostingEnvironmentWorkerPoolResource 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs
new file mode 100644
index 0000000000000..1ae7930051e2d
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_HostingEnvironmentWorkerPoolResource
+ {
+ // Get properties of a worker pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetPropertiesOfAWorkerPool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_GetWorkerPool.json
+ // this example is just showing the usage of "AppServiceEnvironments_GetWorkerPool" 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 HostingEnvironmentWorkerPoolResource created on azure
+ // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string workerPoolName = "workerPool1";
+ ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName);
+ HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId);
+
+ // invoke the operation
+ HostingEnvironmentWorkerPoolResource result = await hostingEnvironmentWorkerPool.GetAsync();
+
+ // 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get properties of a worker pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_GetPropertiesOfAWorkerPool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_CreateOrUpdateWorkerPool.json
+ // this example is just showing the usage of "AppServiceEnvironments_UpdateWorkerPool" 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 HostingEnvironmentWorkerPoolResource created on azure
+ // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string workerPoolName = "0";
+ ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName);
+ HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId);
+
+ // invoke the operation
+ AppServiceWorkerPoolData data = new AppServiceWorkerPoolData()
+ {
+ WorkerSize = "Small",
+ WorkerCount = 3,
+ };
+ HostingEnvironmentWorkerPoolResource result = await hostingEnvironmentWorkerPool.UpdateAsync(data);
+
+ // 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
+ AppServiceWorkerPoolData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get metric definitions for a specific instance of a worker pool of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetWorkerPoolInstanceMetricDefinitions_GetMetricDefinitionsForASpecificInstanceOfAWorkerPoolOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPoolInstanceMetricDefinitions" 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 HostingEnvironmentWorkerPoolResource created on azure
+ // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string workerPoolName = "0";
+ ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName);
+ HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId);
+
+ // invoke the operation and iterate over the result
+ string instance = "10.8.0.7";
+ await foreach (ResourceMetricDefinition item in hostingEnvironmentWorkerPool.GetWorkerPoolInstanceMetricDefinitionsAsync(instance))
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get metric definitions for a worker pool of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetWebWorkerMetricDefinitions_GetMetricDefinitionsForAWorkerPoolOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListWebWorkerMetricDefinitions.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListWebWorkerMetricDefinitions" 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 HostingEnvironmentWorkerPoolResource created on azure
+ // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string workerPoolName = "0";
+ ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName);
+ HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ResourceMetricDefinition item in hostingEnvironmentWorkerPool.GetWebWorkerMetricDefinitionsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get available SKUs for scaling a worker pool.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetWorkerPoolSkus_GetAvailableSKUsForScalingAWorkerPool()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListWorkerPoolSkus.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListWorkerPoolSkus" 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 HostingEnvironmentWorkerPoolResource created on azure
+ // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string workerPoolName = "workerPool1";
+ ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName);
+ HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServicePoolSkuInfo item in hostingEnvironmentWorkerPool.GetWorkerPoolSkusAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get usage metrics for a worker pool of an App Service Environment.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetWebWorkerUsages_GetUsageMetricsForAWorkerPoolOfAnAppServiceEnvironment()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AppServiceEnvironments_ListWebWorkerUsages.json
+ // this example is just showing the usage of "AppServiceEnvironments_ListWebWorkerUsages" 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 HostingEnvironmentWorkerPoolResource created on azure
+ // for more information of creating HostingEnvironmentWorkerPoolResource, please refer to the document of HostingEnvironmentWorkerPoolResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-rg";
+ string name = "test-ase";
+ string workerPoolName = "0";
+ ResourceIdentifier hostingEnvironmentWorkerPoolResourceId = HostingEnvironmentWorkerPoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workerPoolName);
+ HostingEnvironmentWorkerPoolResource hostingEnvironmentWorkerPool = client.GetHostingEnvironmentWorkerPoolResource(hostingEnvironmentWorkerPoolResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AppServiceUsage item in hostingEnvironmentWorkerPool.GetWebWorkerUsagesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs
index 88c6659686180..aa83b257cd0ec 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_KubeEnvironmentCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListKubeEnvironmentsByResourceGroup()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_ListByResourceGroup.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_ListByResourceGroup.json
// this example is just showing the usage of "KubeEnvironments_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
@@ -56,7 +56,7 @@ public async Task GetAll_ListKubeEnvironmentsByResourceGroup()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetKubeEnvironmentsByName()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_Get.json
// this example is just showing the usage of "KubeEnvironments_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
@@ -90,7 +90,7 @@ public async Task Get_GetKubeEnvironmentsByName()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetKubeEnvironmentsByName()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_Get.json
// this example is just showing the usage of "KubeEnvironments_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
@@ -120,7 +120,7 @@ public async Task Exists_GetKubeEnvironmentsByName()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetKubeEnvironmentsByName()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_Get.json
// this example is just showing the usage of "KubeEnvironments_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
@@ -162,7 +162,7 @@ public async Task GetIfExists_GetKubeEnvironmentsByName()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_CreateKubeEnvironments()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_CreateOrUpdate.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_CreateOrUpdate.json
// this example is just showing the usage of "KubeEnvironments_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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs
index 6df8e08220bff..c4ce7f5bf44ac 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_KubeEnvironmentResource.cs
@@ -21,7 +21,7 @@ public partial class Sample_KubeEnvironmentResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetKubeEnvironments_ListKubeEnvironmentsBySubscription()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_ListBySubscription.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_ListBySubscription.json
// this example is just showing the usage of "KubeEnvironments_ListBySubscription" 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
@@ -53,7 +53,7 @@ public async Task GetKubeEnvironments_ListKubeEnvironmentsBySubscription()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetKubeEnvironmentsByName()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Get.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_Get.json
// this example is just showing the usage of "KubeEnvironments_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
@@ -84,7 +84,7 @@ public async Task Get_GetKubeEnvironmentsByName()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteKubeEnvironmentByName()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Delete.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_Delete.json
// this example is just showing the usage of "KubeEnvironments_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
@@ -111,7 +111,7 @@ public async Task Delete_DeleteKubeEnvironmentByName()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_UpdateKubeEnvironments()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/KubeEnvironments_Update.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/KubeEnvironments_Update.json
// this example is just showing the usage of "KubeEnvironments_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
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryCollection.cs
new file mode 100644
index 0000000000000..248209771ddbd
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryCollection.cs
@@ -0,0 +1,179 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_RequestHistoryCollection
+ {
+ // List repetition request history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListRepetitionRequestHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitionsRequestHistories_List.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource created on azure
+ // for more information of creating SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource, please refer to the document of SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "HTTP_Webhook";
+ string repetitionName = "000001";
+ ResourceIdentifier siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId = SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource siteHostruntimeWebhookApiWorkflowRunActionRepetition = client.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource(siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId);
+
+ // get the collection of this RequestHistoryResource
+ RequestHistoryCollection collection = siteHostruntimeWebhookApiWorkflowRunActionRepetition.GetRequestHistories();
+
+ // invoke the operation and iterate over the result
+ await foreach (RequestHistoryResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ RequestHistoryData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a repetition request history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetARepetitionRequestHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource created on azure
+ // for more information of creating SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource, please refer to the document of SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "HTTP_Webhook";
+ string repetitionName = "000001";
+ ResourceIdentifier siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId = SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource siteHostruntimeWebhookApiWorkflowRunActionRepetition = client.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource(siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId);
+
+ // get the collection of this RequestHistoryResource
+ RequestHistoryCollection collection = siteHostruntimeWebhookApiWorkflowRunActionRepetition.GetRequestHistories();
+
+ // invoke the operation
+ string requestHistoryName = "08586611142732800686";
+ RequestHistoryResource result = await collection.GetAsync(requestHistoryName);
+
+ // 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
+ RequestHistoryData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a repetition request history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetARepetitionRequestHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource created on azure
+ // for more information of creating SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource, please refer to the document of SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "HTTP_Webhook";
+ string repetitionName = "000001";
+ ResourceIdentifier siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId = SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource siteHostruntimeWebhookApiWorkflowRunActionRepetition = client.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource(siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId);
+
+ // get the collection of this RequestHistoryResource
+ RequestHistoryCollection collection = siteHostruntimeWebhookApiWorkflowRunActionRepetition.GetRequestHistories();
+
+ // invoke the operation
+ string requestHistoryName = "08586611142732800686";
+ bool result = await collection.ExistsAsync(requestHistoryName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a repetition request history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetARepetitionRequestHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource created on azure
+ // for more information of creating SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource, please refer to the document of SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "HTTP_Webhook";
+ string repetitionName = "000001";
+ ResourceIdentifier siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId = SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource siteHostruntimeWebhookApiWorkflowRunActionRepetition = client.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource(siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId);
+
+ // get the collection of this RequestHistoryResource
+ RequestHistoryCollection collection = siteHostruntimeWebhookApiWorkflowRunActionRepetition.GetRequestHistories();
+
+ // invoke the operation
+ string requestHistoryName = "08586611142732800686";
+ NullableResponse response = await collection.GetIfExistsAsync(requestHistoryName);
+ RequestHistoryResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ RequestHistoryData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryResource.cs
new file mode 100644
index 0000000000000..f683e83c92304
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryResource.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_RequestHistoryResource
+ {
+ // Get a repetition request history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetARepetitionRequestHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitionsRequestHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this RequestHistoryResource created on azure
+ // for more information of creating RequestHistoryResource, please refer to the document of RequestHistoryResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "HTTP_Webhook";
+ string repetitionName = "000001";
+ string requestHistoryName = "08586611142732800686";
+ ResourceIdentifier requestHistoryResourceId = RequestHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName, requestHistoryName);
+ RequestHistoryResource requestHistory = client.GetRequestHistoryResource(requestHistoryResourceId);
+
+ // invoke the operation
+ RequestHistoryResource result = await requestHistory.GetAsync();
+
+ // 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
+ RequestHistoryData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs
index 965ea13989e8f..5124212922608 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs
@@ -20,7 +20,7 @@ public partial class Sample_ResourceGroupResourceExtensions
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAllResourceHealthMetadataData_ListResourceHealthMetadataForAResourceGroup()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListResourceHealthMetadataByResourceGroup.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListResourceHealthMetadataByResourceGroup.json
// this example is just showing the usage of "ResourceHealthMetadata_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
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionCollection.cs
new file mode 100644
index 0000000000000..0bf5807ab9c2b
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionCollection.cs
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_RevisionCollection
+ {
+ // List Container App's revisions
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListContainerAppSRevisions()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListRevisions.json
+ // this example is just showing the usage of "ContainerAppsRevisions_ListRevisions" 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 ContainerAppResource created on azure
+ // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testcontainerApp0";
+ ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName);
+ ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId);
+
+ // get the collection of this RevisionResource
+ RevisionCollection collection = containerApp.GetRevisions();
+
+ // invoke the operation and iterate over the result
+ await foreach (RevisionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ RevisionData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Container App's revision
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetContainerAppSRevision()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetRevision.json
+ // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" 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 ContainerAppResource created on azure
+ // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testcontainerApp0";
+ ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName);
+ ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId);
+
+ // get the collection of this RevisionResource
+ RevisionCollection collection = containerApp.GetRevisions();
+
+ // invoke the operation
+ string name = "testcontainerApp0-pjxhsye";
+ RevisionResource result = await collection.GetAsync(name);
+
+ // 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
+ RevisionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Container App's revision
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetContainerAppSRevision()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetRevision.json
+ // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" 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 ContainerAppResource created on azure
+ // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testcontainerApp0";
+ ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName);
+ ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId);
+
+ // get the collection of this RevisionResource
+ RevisionCollection collection = containerApp.GetRevisions();
+
+ // invoke the operation
+ string name = "testcontainerApp0-pjxhsye";
+ bool result = await collection.ExistsAsync(name);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Container App's revision
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetContainerAppSRevision()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetRevision.json
+ // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" 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 ContainerAppResource created on azure
+ // for more information of creating ContainerAppResource, please refer to the document of ContainerAppResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testcontainerApp0";
+ ResourceIdentifier containerAppResourceId = ContainerAppResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName);
+ ContainerAppResource containerApp = client.GetContainerAppResource(containerAppResourceId);
+
+ // get the collection of this RevisionResource
+ RevisionCollection collection = containerApp.GetRevisions();
+
+ // invoke the operation
+ string name = "testcontainerApp0-pjxhsye";
+ NullableResponse response = await collection.GetIfExistsAsync(name);
+ RevisionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ RevisionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionResource.cs
new file mode 100644
index 0000000000000..c70ec7a3eb588
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionResource.cs
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_RevisionResource
+ {
+ // Get Container App's revision
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetContainerAppSRevision()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetRevision.json
+ // this example is just showing the usage of "ContainerAppsRevisions_GetRevision" 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 RevisionResource created on azure
+ // for more information of creating RevisionResource, please refer to the document of RevisionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testcontainerApp0";
+ string name = "testcontainerApp0-pjxhsye";
+ ResourceIdentifier revisionResourceId = RevisionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, name);
+ RevisionResource revision = client.GetRevisionResource(revisionResourceId);
+
+ // invoke the operation
+ RevisionResource result = await revision.GetAsync();
+
+ // 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
+ RevisionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Activate Container App's revision
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ActivateRevision_ActivateContainerAppSRevision()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ActivateRevision.json
+ // this example is just showing the usage of "ContainerAppsRevisions_ActivateRevision" 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 RevisionResource created on azure
+ // for more information of creating RevisionResource, please refer to the document of RevisionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testcontainerApp0";
+ string name = "testcontainerApp0-pjxhsye";
+ ResourceIdentifier revisionResourceId = RevisionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, name);
+ RevisionResource revision = client.GetRevisionResource(revisionResourceId);
+
+ // invoke the operation
+ await revision.ActivateRevisionAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Deactivate Container App's revision
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task DeactivateRevision_DeactivateContainerAppSRevision()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeactivateRevision.json
+ // this example is just showing the usage of "ContainerAppsRevisions_DeactivateRevision" 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 RevisionResource created on azure
+ // for more information of creating RevisionResource, please refer to the document of RevisionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testcontainerApp0";
+ string name = "testcontainerApp0-pjxhsye";
+ ResourceIdentifier revisionResourceId = RevisionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, name);
+ RevisionResource revision = client.GetRevisionResource(revisionResourceId);
+
+ // invoke the operation
+ await revision.DeactivateRevisionAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Restart Container App's revision
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task RestartRevision_RestartContainerAppSRevision()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/RestartRevision.json
+ // this example is just showing the usage of "ContainerAppsRevisions_RestartRevision" 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 RevisionResource created on azure
+ // for more information of creating RevisionResource, please refer to the document of RevisionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string containerAppName = "testStaticSite0";
+ string name = "testcontainerApp0-pjxhsye";
+ ResourceIdentifier revisionResourceId = RevisionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, containerAppName, name);
+ RevisionResource revision = client.GetRevisionResource(revisionResourceId);
+
+ // invoke the operation
+ await revision.RestartRevisionAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs
index f14a6d120ba6f..02bd0bc524fce 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteBasicPublishingCredentialsPolicyResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_ScmSiteBasicPublishingCredentialsPolicyResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetSCMAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicy.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetPublishingCredentialsPolicy.json
// this example is just showing the usage of "WebApps_GetScmAllowed" 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
@@ -50,7 +50,7 @@ public async Task Get_GetSCMAllowed()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_UpdateSCMAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicy.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdatePublishingCredentialsPolicy.json
// this example is just showing the usage of "WebApps_UpdateScmAllowed" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs
index 6aae22f83557f..833d148674b52 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_ScmSiteSlotBasicPublishingCredentialsPolicyResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetSCMAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetPublishingCredentialsPolicySlot.json
// this example is just showing the usage of "WebApps_GetScmAllowedSlot" 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
@@ -51,7 +51,7 @@ public async Task Get_GetSCMAllowed()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_UpdateSCMAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdatePublishingCredentialsPolicySlot.json
// this example is just showing the usage of "WebApps_UpdateScmAllowedSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs
new file mode 100644
index 0000000000000..baca08ead37ab
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteBackupCollection
+ {
+ // List web app backups
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListWebAppBackups()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWebAppBackups.json
+ // this example is just showing the usage of "WebApps_ListBackups" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteBackupResource
+ SiteBackupCollection collection = webSite.GetSiteBackups();
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteBackupResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WebAppBackupData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get web app backup
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetWebAppBackup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppBackup.json
+ // this example is just showing the usage of "WebApps_GetBackupStatus" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteBackupResource
+ SiteBackupCollection collection = webSite.GetSiteBackups();
+
+ // invoke the operation
+ string backupId = "12345";
+ SiteBackupResource result = await collection.GetAsync(backupId);
+
+ // 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
+ WebAppBackupData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get web app backup
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetWebAppBackup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppBackup.json
+ // this example is just showing the usage of "WebApps_GetBackupStatus" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteBackupResource
+ SiteBackupCollection collection = webSite.GetSiteBackups();
+
+ // invoke the operation
+ string backupId = "12345";
+ bool result = await collection.ExistsAsync(backupId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get web app backup
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetWebAppBackup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppBackup.json
+ // this example is just showing the usage of "WebApps_GetBackupStatus" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteBackupResource
+ SiteBackupCollection collection = webSite.GetSiteBackups();
+
+ // invoke the operation
+ string backupId = "12345";
+ NullableResponse response = await collection.GetIfExistsAsync(backupId);
+ SiteBackupResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WebAppBackupData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs
new file mode 100644
index 0000000000000..7cc01393df3bb
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.cs
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteBackupResource
+ {
+ // Get web app backup
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetWebAppBackup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppBackup.json
+ // this example is just showing the usage of "WebApps_GetBackupStatus" 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 SiteBackupResource created on azure
+ // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string backupId = "12345";
+ ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId);
+ SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId);
+
+ // invoke the operation
+ SiteBackupResource result = await siteBackup.GetAsync();
+
+ // 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
+ WebAppBackupData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete web app backup
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteWebAppBackup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteWebAppBackup.json
+ // this example is just showing the usage of "WebApps_DeleteBackup" 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 SiteBackupResource created on azure
+ // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string backupId = "12345";
+ ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId);
+ SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId);
+
+ // invoke the operation
+ await siteBackup.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get web app backup with secrets
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetBackupStatusSecrets_GetWebAppBackupWithSecrets()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppBackupWithSecrets.json
+ // this example is just showing the usage of "WebApps_ListBackupStatusSecrets" 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 SiteBackupResource created on azure
+ // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string backupId = "12345";
+ ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId);
+ SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId);
+
+ // invoke the operation
+ WebAppBackupInfo info = new WebAppBackupInfo()
+ {
+ BackupName = "abcdwe",
+ IsEnabled = true,
+ StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="),
+ BackupSchedule = new WebAppBackupSchedule(7, BackupFrequencyUnit.Day, true, 30)
+ {
+ StartOn = DateTimeOffset.Parse("2022-09-02T17:33:11.641Z"),
+ },
+ Databases =
+{
+new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure)
+{
+Name = "backenddb",
+ConnectionStringName = "backend",
+ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]",
+},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure)
+{
+Name = "statsdb",
+ConnectionStringName = "stats",
+ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]",
+}
+},
+ };
+ SiteBackupResource result = await siteBackup.GetBackupStatusSecretsAsync(info);
+
+ // 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
+ WebAppBackupData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Restore web app from backup
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Restore_RestoreWebAppFromBackup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/RestoreWebAppBackup.json
+ // this example is just showing the usage of "WebApps_Restore" 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 SiteBackupResource created on azure
+ // for more information of creating SiteBackupResource, please refer to the document of SiteBackupResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string backupId = "123244";
+ ResourceIdentifier siteBackupResourceId = SiteBackupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, backupId);
+ SiteBackupResource siteBackup = client.GetSiteBackupResource(siteBackupResourceId);
+
+ // invoke the operation
+ RestoreRequestInfo info = new RestoreRequestInfo()
+ {
+ StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="),
+ CanOverwrite = true,
+ SiteName = "sitef6141",
+ Databases =
+{
+new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure)
+{
+Name = "backenddb",
+ConnectionStringName = "backend",
+ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]",
+},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure)
+{
+Name = "statsdb",
+ConnectionStringName = "stats",
+ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]",
+}
+},
+ };
+ await siteBackup.RestoreAsync(WaitUntil.Completed, info);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs
index 2f6e420c28161..831ab8ba7e004 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteConfigAppsettingCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAzureKeyVaultReferencesForAppSettings()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSettings.json
// this example is just showing the usage of "WebApps_GetAppSettingsKeyVaultReferences" 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 GetAll_GetAzureKeyVaultReferencesForAppSettings()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAzureKeyVaultAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSetting.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" 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
@@ -91,7 +91,7 @@ public async Task Get_GetAzureKeyVaultAppSettingReference()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAzureKeyVaultAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSetting.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" 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
@@ -122,7 +122,7 @@ public async Task Exists_GetAzureKeyVaultAppSettingReference()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAzureKeyVaultAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSetting.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs
index b2cbbf3fc4258..2813603013bce 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteConfigAppsettingResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteConfigAppsettingResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAzureKeyVaultAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSetting.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSetting.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReference" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuCollection.cs
new file mode 100644
index 0000000000000..1a14c5f779ab3
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuCollection.cs
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteDeploymentStatuCollection
+ {
+ // List Deployment Status
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListDeploymentStatus()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListSiteDeploymentStatus.json
+ // this example is just showing the usage of "WebApps_ListProductionSiteDeploymentStatuses" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteDeploymentStatuResource
+ SiteDeploymentStatuCollection collection = webSite.GetSiteDeploymentStatus();
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteDeploymentStatuResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ CsmDeploymentStatusData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Deployment Status
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDeploymentStatus()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatus.json
+ // this example is just showing the usage of "WebApps_GetProductionSiteDeploymentStatus" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteDeploymentStatuResource
+ SiteDeploymentStatuCollection collection = webSite.GetSiteDeploymentStatus();
+
+ // invoke the operation
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ArmOperation lro = await collection.GetAsync(WaitUntil.Completed, deploymentStatusId);
+ SiteDeploymentStatuResource 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
+ CsmDeploymentStatusData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Deployment Status
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetDeploymentStatus()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatus.json
+ // this example is just showing the usage of "WebApps_GetProductionSiteDeploymentStatus" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteDeploymentStatuResource
+ SiteDeploymentStatuCollection collection = webSite.GetSiteDeploymentStatus();
+
+ // invoke the operation
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ArmOperation lro = await collection.ExistsAsync(WaitUntil.Completed, deploymentStatusId);
+ bool result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Deployment Status
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetDeploymentStatus()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatus.json
+ // this example is just showing the usage of "WebApps_GetProductionSiteDeploymentStatus" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteDeploymentStatuResource
+ SiteDeploymentStatuCollection collection = webSite.GetSiteDeploymentStatus();
+
+ // invoke the operation
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ArmOperation lro = await collection.GetIfExistsAsync(WaitUntil.Completed, deploymentStatusId);
+ SiteDeploymentStatuResource 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
+ CsmDeploymentStatusData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuResource.cs
new file mode 100644
index 0000000000000..4acd581e0d908
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuResource.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteDeploymentStatuResource
+ {
+ // Get Deployment Status
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDeploymentStatus()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatus.json
+ // this example is just showing the usage of "WebApps_GetProductionSiteDeploymentStatus" 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 SiteDeploymentStatuResource created on azure
+ // for more information of creating SiteDeploymentStatuResource, please refer to the document of SiteDeploymentStatuResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ResourceIdentifier siteDeploymentStatuResourceId = SiteDeploymentStatuResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, deploymentStatusId);
+ SiteDeploymentStatuResource siteDeploymentStatu = client.GetSiteDeploymentStatuResource(siteDeploymentStatuResourceId);
+
+ // invoke the operation
+ ArmOperation lro = await siteDeploymentStatu.GetAsync(WaitUntil.Completed);
+ SiteDeploymentStatuResource 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
+ CsmDeploymentStatusData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs
index aaad52320efa7..c9198fe01704b 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteDetectorCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAppDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponses.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectorResponses.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectorResponses" 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 GetAll_GetAppDetectorResponses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAppSlotDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectorResponses" 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 GetAll_GetAppSlotDetectorResponses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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 Get_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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
@@ -159,7 +159,7 @@ public async Task Exists_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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
@@ -202,7 +202,7 @@ public async Task GetIfExists_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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
@@ -237,7 +237,7 @@ public async Task Get_GetAppSlotDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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
@@ -268,7 +268,7 @@ public async Task Exists_GetAppSlotDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs
index 8d90406e90778..f0b5f2852175c 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDetectorResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteDetectorResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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
@@ -51,7 +51,7 @@ public async Task Get_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponse" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs
index 8567e699bd1a2..779edb9e99284 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticAnalysisCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppAnalyses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalyses.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteAnalyses.json
// this example is just showing the usage of "Diagnostics_ListSiteAnalyses" 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 GetAll_ListAppAnalyses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppSlotAnalyses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalysesSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteAnalysesSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteAnalyses" 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 GetAll_ListAppSlotAnalyses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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
@@ -131,7 +131,7 @@ public async Task Get_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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
@@ -163,7 +163,7 @@ public async Task Exists_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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
@@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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
@@ -243,7 +243,7 @@ public async Task Get_GetAppSlotAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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
@@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs
index 8af543b2081a6..8ee3750f49720 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticAnalysisResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_SiteDiagnosticAnalysisResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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
@@ -53,7 +53,7 @@ public async Task Get_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysis" 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
@@ -86,7 +86,7 @@ public async Task Get_GetAppSlotAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Execute_ExecuteSiteAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysis" 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 Execute_ExecuteSiteAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Execute_ExecuteSiteSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysis" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs
index 98faeaf8c19b4..7990ab33d2956 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppDiagnosticCategories()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategories.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDiagnosticCategories.json
// this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategories" 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 GetAll_ListAppDiagnosticCategories()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppSlotDiagnosticCategories()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategories" 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 GetAll_ListAppSlotDiagnosticCategories()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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 Get_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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
@@ -159,7 +159,7 @@ public async Task Exists_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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
@@ -202,7 +202,7 @@ public async Task GetIfExists_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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
@@ -237,7 +237,7 @@ public async Task Get_GetAppSlotDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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
@@ -268,7 +268,7 @@ public async Task Exists_GetAppSlotDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs
index f62441e07e023..8a53b64e1534c 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticDetectorCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppDetectors()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectors.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectors.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectors" 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 GetAll_ListAppDetectors()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppSlotDetectors()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorsSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectorsSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectors" 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 GetAll_ListAppSlotDetectors()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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
@@ -131,7 +131,7 @@ public async Task Get_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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
@@ -163,7 +163,7 @@ public async Task Exists_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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
@@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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
@@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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
@@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs
index 15a7ac2bbed5d..3205994a73012 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticDetectorResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_SiteDiagnosticDetectorResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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
@@ -53,7 +53,7 @@ public async Task Get_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetector" 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
@@ -86,7 +86,7 @@ public async Task Get_GetAppSlotDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Execute_ExecuteSiteDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteDetector.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteDetector" 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 Execute_ExecuteSiteDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Execute_ExecuteSiteSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteDetector" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs
index d73535cea1ced..f1a0560daebe5 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDiagnosticResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteDiagnosticResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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
@@ -51,7 +51,7 @@ public async Task Get_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategory" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection.cs
new file mode 100644
index 0000000000000..c7989de0a3eb9
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection.cs
@@ -0,0 +1,175 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection
+ {
+ // List repetitions
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListRepetitions()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitions_List.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "testAction";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitions();
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetARepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "testAction";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitions();
+
+ // invoke the operation
+ string repetitionName = "000001";
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource result = await collection.GetAsync(repetitionName);
+
+ // 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetARepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "testAction";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitions();
+
+ // invoke the operation
+ string repetitionName = "000001";
+ bool result = await collection.ExistsAsync(repetitionName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetARepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "testAction";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitions();
+
+ // invoke the operation
+ string repetitionName = "000001";
+ NullableResponse response = await collection.GetIfExistsAsync(repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.cs
new file mode 100644
index 0000000000000..3b0d0ae1cd356
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.cs
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ {
+ // Get a repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetARepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource created on azure
+ // for more information of creating SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource, please refer to the document of SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "testAction";
+ string repetitionName = "000001";
+ ResourceIdentifier siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId = SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource siteHostruntimeWebhookApiWorkflowRunActionRepetition = client.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource(siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId);
+
+ // invoke the operation
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource result = await siteHostruntimeWebhookApiWorkflowRunActionRepetition.GetAsync();
+
+ // 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // List expression traces for a repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetExpressionTraces_ListExpressionTracesForARepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionRepetitions_ListExpressionTraces.json
+ // this example is just showing the usage of "WorkflowRunActionRepetitions_ListExpressionTraces" 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 SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource created on azure
+ // for more information of creating SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource, please refer to the document of SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "testAction";
+ string repetitionName = "000001";
+ ResourceIdentifier siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId = SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource siteHostruntimeWebhookApiWorkflowRunActionRepetition = client.GetSiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource(siteHostruntimeWebhookApiWorkflowRunActionRepetitionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ExpressionRoot item in siteHostruntimeWebhookApiWorkflowRunActionRepetition.GetExpressionTracesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection.cs
new file mode 100644
index 0000000000000..b435b5d4187e4
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection.cs
@@ -0,0 +1,175 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection
+ {
+ // List the scoped repetitions
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListTheScopedRepetitions()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionScopeRepetitions_List.json
+ // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "for_each";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitions();
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a scoped repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAScopedRepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionScopeRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "for_each";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitions();
+
+ // invoke the operation
+ string repetitionName = "000000";
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource result = await collection.GetAsync(repetitionName);
+
+ // 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a scoped repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetAScopedRepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionScopeRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "for_each";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitions();
+
+ // invoke the operation
+ string repetitionName = "000000";
+ bool result = await collection.ExistsAsync(repetitionName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a scoped repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetAScopedRepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionScopeRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "for_each";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // get the collection of this SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection collection = workflowRunAction.GetSiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitions();
+
+ // invoke the operation
+ string repetitionName = "000000";
+ NullableResponse response = await collection.GetIfExistsAsync(repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource.cs
new file mode 100644
index 0000000000000..1dc0bd83daf4f
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource
+ {
+ // Get a scoped repetition
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAScopedRepetition()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActionScopeRepetitions_Get.json
+ // this example is just showing the usage of "WorkflowRunActionScopeRepetitions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource created on azure
+ // for more information of creating SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource, please refer to the document of SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "for_each";
+ string repetitionName = "000000";
+ ResourceIdentifier siteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResourceId = SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName, repetitionName);
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource siteHostruntimeWebhookApiWorkflowRunActionScopeRepetition = client.GetSiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource(siteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResourceId);
+
+ // invoke the operation
+ SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource result = await siteHostruntimeWebhookApiWorkflowRunActionScopeRepetition.GetAsync();
+
+ // 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
+ WorkflowRunActionRepetitionDefinitionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs
index 71b19f9b11594..1a94882f5240f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteInstanceCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfo" 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_GetSiteInstanceInfo()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfo" 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
@@ -85,7 +85,7 @@ public async Task Exists_GetSiteInstanceInfo()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfo" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs
index 599ebeecf82ab..2652d5c1c1356 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteInstanceResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteInstanceResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfo" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs
index a3afab1e02aab..67708763ddae9 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_SitePrivateEndpointConnectionCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" 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_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" 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
@@ -86,7 +86,7 @@ public async Task Exists_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" 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 GetIfExists_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ApproveRejectSitePrivateEndpointConnection.json
// this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnection" 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
@@ -150,7 +150,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA
// invoke the operation
string privateEndpointConnectionName = "connection";
- PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
{
PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
{
@@ -159,7 +159,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA
ActionsRequired = "",
},
};
- ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data);
SitePrivateEndpointConnectionResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs
index 1c6c5111fa774..c4eb72e1345c9 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SitePrivateEndpointConnectionResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_SitePrivateEndpointConnectionResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnection" 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
@@ -52,7 +52,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ApproveRejectSitePrivateEndpointConnection.json
// this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnection" 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
@@ -70,7 +70,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
SitePrivateEndpointConnectionResource sitePrivateEndpointConnection = client.GetSitePrivateEndpointConnectionResource(sitePrivateEndpointConnectionResourceId);
// invoke the operation
- PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
{
PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
{
@@ -79,7 +79,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
ActionsRequired = "",
},
};
- ArmOperation lro = await sitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info);
+ ArmOperation lro = await sitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data);
SitePrivateEndpointConnectionResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
@@ -94,7 +94,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteSitePrivateEndpointConnection.json
// this example is just showing the usage of "WebApps_DeletePrivateEndpointConnection" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuCollection.cs
new file mode 100644
index 0000000000000..98246fd8269d9
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuCollection.cs
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteSlotDeploymentStatuCollection
+ {
+ // List Deployment Status Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListDeploymentStatusSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListSiteDeploymentStatusSlot.json
+ // this example is just showing the usage of "WebApps_ListSlotSiteDeploymentStatusesSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ string slot = "stage";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotDeploymentStatuResource
+ SiteSlotDeploymentStatuCollection collection = webSiteSlot.GetSiteSlotDeploymentStatus();
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteSlotDeploymentStatuResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ CsmDeploymentStatusData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Deployment Status Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDeploymentStatusSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatusSlot.json
+ // this example is just showing the usage of "WebApps_GetSlotSiteDeploymentStatusSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ string slot = "stage";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotDeploymentStatuResource
+ SiteSlotDeploymentStatuCollection collection = webSiteSlot.GetSiteSlotDeploymentStatus();
+
+ // invoke the operation
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ArmOperation lro = await collection.GetAsync(WaitUntil.Completed, deploymentStatusId);
+ SiteSlotDeploymentStatuResource 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
+ CsmDeploymentStatusData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Deployment Status Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetDeploymentStatusSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatusSlot.json
+ // this example is just showing the usage of "WebApps_GetSlotSiteDeploymentStatusSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ string slot = "stage";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotDeploymentStatuResource
+ SiteSlotDeploymentStatuCollection collection = webSiteSlot.GetSiteSlotDeploymentStatus();
+
+ // invoke the operation
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ArmOperation lro = await collection.ExistsAsync(WaitUntil.Completed, deploymentStatusId);
+ bool result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Deployment Status Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetDeploymentStatusSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatusSlot.json
+ // this example is just showing the usage of "WebApps_GetSlotSiteDeploymentStatusSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ string slot = "stage";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotDeploymentStatuResource
+ SiteSlotDeploymentStatuCollection collection = webSiteSlot.GetSiteSlotDeploymentStatus();
+
+ // invoke the operation
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ArmOperation lro = await collection.GetIfExistsAsync(WaitUntil.Completed, deploymentStatusId);
+ SiteSlotDeploymentStatuResource 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
+ CsmDeploymentStatusData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuResource.cs
new file mode 100644
index 0000000000000..dd4f855dd75f6
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuResource.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteSlotDeploymentStatuResource
+ {
+ // Get Deployment Status Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDeploymentStatusSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteDeploymentStatusSlot.json
+ // this example is just showing the usage of "WebApps_GetSlotSiteDeploymentStatusSlot" 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 SiteSlotDeploymentStatuResource created on azure
+ // for more information of creating SiteSlotDeploymentStatuResource, please refer to the document of SiteSlotDeploymentStatuResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testSite";
+ string slot = "stage";
+ string deploymentStatusId = "eacfd68b-3bbd-4ad9-99c5-98614d89c8e5";
+ ResourceIdentifier siteSlotDeploymentStatuResourceId = SiteSlotDeploymentStatuResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot, deploymentStatusId);
+ SiteSlotDeploymentStatuResource siteSlotDeploymentStatu = client.GetSiteSlotDeploymentStatuResource(siteSlotDeploymentStatuResourceId);
+
+ // invoke the operation
+ ArmOperation lro = await siteSlotDeploymentStatu.GetAsync(WaitUntil.Completed);
+ SiteSlotDeploymentStatuResource 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
+ CsmDeploymentStatusData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs
index dcb4785d9221e..3c08f7eebdf43 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDetectorCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAppDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponses.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectorResponses.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectorResponsesSlot" 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 GetAll_GetAppDetectorResponses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAppSlotDetectorResponses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectorResponsesSlot" 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 GetAll_GetAppSlotDetectorResponses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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
@@ -131,7 +131,7 @@ public async Task Get_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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
@@ -163,7 +163,7 @@ public async Task Exists_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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
@@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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
@@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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
@@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs
index 7aa4f183d79d1..dba633fc74d7f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDetectorResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDetectorResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponse.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponse.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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
@@ -52,7 +52,7 @@ public async Task Get_GetAppDetectorResponse()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetectorResponse()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorResponseSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs
index 84f3ce19b9101..be64a55602030 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticAnalysisCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppAnalyses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalyses.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteAnalyses.json
// this example is just showing the usage of "Diagnostics_ListSiteAnalysesSlot" 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
@@ -58,7 +58,7 @@ public async Task GetAll_ListAppAnalyses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppSlotAnalyses()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteAnalysesSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteAnalysesSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteAnalysesSlot" 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 GetAll_ListAppSlotAnalyses()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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 Get_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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
@@ -167,7 +167,7 @@ public async Task Exists_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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
@@ -212,7 +212,7 @@ public async Task GetIfExists_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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
@@ -249,7 +249,7 @@ public async Task Get_GetAppSlotAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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 Exists_GetAppSlotAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs
index e84b9bda4be38..b5d76f7277d2a 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticAnalysisResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_SiteSlotDiagnosticAnalysisResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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_GetAppAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteAnalysisSlot" 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 Get_GetAppSlotAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task ExecuteSiteAnalysisSlot_ExecuteSiteAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysis.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteAnalysis.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysisSlot" 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
@@ -118,7 +118,7 @@ public async Task ExecuteSiteAnalysisSlot_ExecuteSiteAnalysis()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task ExecuteSiteAnalysisSlot_ExecuteSiteSlotAnalysis()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteAnalysisSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs
index 8a5868d16506f..8cfd7a1be9205 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppDiagnosticCategories()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategories.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDiagnosticCategories.json
// this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategoriesSlot" 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 GetAll_ListAppDiagnosticCategories()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppSlotDiagnosticCategories()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteDiagnosticCategoriesSlot" 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 GetAll_ListAppSlotDiagnosticCategories()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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
@@ -131,7 +131,7 @@ public async Task Get_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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
@@ -163,7 +163,7 @@ public async Task Exists_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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
@@ -207,7 +207,7 @@ public async Task GetIfExists_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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
@@ -243,7 +243,7 @@ public async Task Get_GetAppSlotDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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
@@ -275,7 +275,7 @@ public async Task Exists_GetAppSlotDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs
index 616decce60186..ed6c16b15d6e5 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticDetectorCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppDetectors()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectors.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectors.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectorsSlot" 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
@@ -58,7 +58,7 @@ public async Task GetAll_ListAppDetectors()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListAppSlotDetectors()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ListSiteDetectorsSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ListSiteDetectorsSlot.json
// this example is just showing the usage of "Diagnostics_ListSiteDetectorsSlot" 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 GetAll_ListAppSlotDetectors()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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 Get_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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
@@ -167,7 +167,7 @@ public async Task Exists_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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
@@ -212,7 +212,7 @@ public async Task GetIfExists_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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
@@ -249,7 +249,7 @@ public async Task Get_GetAppSlotDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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 Exists_GetAppSlotDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs
index 722cb050b612b..db6067d71e610 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticDetectorResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_SiteSlotDiagnosticDetectorResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetector.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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_GetAppDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDetectorSlot" 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 Get_GetAppSlotDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task ExecuteSiteDetectorSlot_ExecuteSiteDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetector.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteDetector.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteDetectorSlot" 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
@@ -118,7 +118,7 @@ public async Task ExecuteSiteDetectorSlot_ExecuteSiteDetector()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task ExecuteSiteDetectorSlot_ExecuteSiteSlotDetector()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json
// this example is just showing the usage of "Diagnostics_ExecuteSiteDetectorSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs
index d0445feab79f4..577d69fea7cca 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDiagnosticResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotDiagnosticResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategory.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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
@@ -52,7 +52,7 @@ public async Task Get_GetAppDiagnosticCategory()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAppSlotDiagnosticCategory()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json
// this example is just showing the usage of "Diagnostics_GetSiteDiagnosticCategorySlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs
index adcd27e8e73b9..ae646e83d3fcc 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotInstanceCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfoSlot" 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_GetSiteInstanceInfo()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfoSlot" 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
@@ -87,7 +87,7 @@ public async Task Exists_GetSiteInstanceInfo()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfoSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs
index 9f124dafd646d..7dbfddca364e9 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotInstanceResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_SiteSlotInstanceResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetSiteInstanceInfo()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSiteInstanceInfo.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteInstanceInfo.json
// this example is just showing the usage of "WebApps_GetInstanceInfoSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs
index c57165f009298..881156b74bc7f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_SiteSlotPrivateEndpointConnectionCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnectionSlot.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" 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_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnectionSlot.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" 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 Exists_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnectionSlot.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" 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
@@ -132,7 +132,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json
// this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnectionSlot" 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
@@ -154,7 +154,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA
// invoke the operation
string privateEndpointConnectionName = "connection";
- PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
{
PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
{
@@ -163,7 +163,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA
ActionsRequired = "",
},
};
- ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data);
SiteSlotPrivateEndpointConnectionResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs
index 6bc0ff9966ddf..ce31179a0bce9 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotPrivateEndpointConnectionResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_SiteSlotPrivateEndpointConnectionResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnectionSlot.json
// this example is just showing the usage of "WebApps_GetPrivateEndpointConnectionSlot" 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
@@ -53,7 +53,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json
// this example is just showing the usage of "WebApps_ApproveOrRejectPrivateEndpointConnectionSlot" 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
@@ -72,7 +72,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
SiteSlotPrivateEndpointConnectionResource siteSlotPrivateEndpointConnection = client.GetSiteSlotPrivateEndpointConnectionResource(siteSlotPrivateEndpointConnectionResourceId);
// invoke the operation
- PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
{
PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
{
@@ -81,7 +81,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
ActionsRequired = "",
},
};
- ArmOperation lro = await siteSlotPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info);
+ ArmOperation lro = await siteSlotPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data);
SiteSlotPrivateEndpointConnectionResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
@@ -96,7 +96,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnectionSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteSitePrivateEndpointConnectionSlot.json
// this example is just showing the usage of "WebApps_DeletePrivateEndpointConnectionSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs
new file mode 100644
index 0000000000000..7811d2a008bcd
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteSlotWorkflowCollection
+ {
+ // List the workflows Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListTheWorkflowsSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWorkflows.json
+ // this example is just showing the usage of "WebApps_ListInstanceWorkflowsSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotWorkflowResource
+ SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows();
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteSlotWorkflowResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowEnvelopeData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // GET a workflow Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GETAWorkflowSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotWorkflowResource
+ SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows();
+
+ // invoke the operation
+ string workflowName = "stateful1";
+ SiteSlotWorkflowResource result = await collection.GetAsync(workflowName);
+
+ // 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
+ WorkflowEnvelopeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // GET a workflow Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GETAWorkflowSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotWorkflowResource
+ SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows();
+
+ // invoke the operation
+ string workflowName = "stateful1";
+ bool result = await collection.ExistsAsync(workflowName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // GET a workflow Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GETAWorkflowSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // get the collection of this SiteSlotWorkflowResource
+ SiteSlotWorkflowCollection collection = webSiteSlot.GetSiteSlotWorkflows();
+
+ // invoke the operation
+ string workflowName = "stateful1";
+ NullableResponse response = await collection.GetIfExistsAsync(workflowName);
+ SiteSlotWorkflowResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowEnvelopeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs
new file mode 100644
index 0000000000000..7aab1fc653774
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteSlotWorkflowResource
+ {
+ // GET a workflow Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GETAWorkflowSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetInstanceWorkflowSlot" 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 SiteSlotWorkflowResource created on azure
+ // for more information of creating SiteSlotWorkflowResource, please refer to the document of SiteSlotWorkflowResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string slot = "staging";
+ string workflowName = "stateful1";
+ ResourceIdentifier siteSlotWorkflowResourceId = SiteSlotWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot, workflowName);
+ SiteSlotWorkflowResource siteSlotWorkflow = client.GetSiteSlotWorkflowResource(siteSlotWorkflowResourceId);
+
+ // invoke the operation
+ SiteSlotWorkflowResource result = await siteSlotWorkflow.GetAsync();
+
+ // 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
+ WorkflowEnvelopeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs
new file mode 100644
index 0000000000000..38135f6bec1c2
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs
@@ -0,0 +1,163 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteWorkflowCollection
+ {
+ // List the workflows
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListTheWorkflows()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWorkflows.json
+ // this example is just showing the usage of "WebApps_ListWorkflows" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteWorkflowResource
+ SiteWorkflowCollection collection = webSite.GetSiteWorkflows();
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteWorkflowResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowEnvelopeData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // GET a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GETAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetWorkflow" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteWorkflowResource
+ SiteWorkflowCollection collection = webSite.GetSiteWorkflows();
+
+ // invoke the operation
+ string workflowName = "stateful1";
+ SiteWorkflowResource result = await collection.GetAsync(workflowName);
+
+ // 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
+ WorkflowEnvelopeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // GET a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GETAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetWorkflow" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteWorkflowResource
+ SiteWorkflowCollection collection = webSite.GetSiteWorkflows();
+
+ // invoke the operation
+ string workflowName = "stateful1";
+ bool result = await collection.ExistsAsync(workflowName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // GET a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GETAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetWorkflow" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this SiteWorkflowResource
+ SiteWorkflowCollection collection = webSite.GetSiteWorkflows();
+
+ // invoke the operation
+ string workflowName = "stateful1";
+ NullableResponse response = await collection.GetIfExistsAsync(workflowName);
+ SiteWorkflowResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowEnvelopeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs
new file mode 100644
index 0000000000000..b685b363d036b
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.cs
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_SiteWorkflowResource
+ {
+ // GET a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GETAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWorkflow.json
+ // this example is just showing the usage of "WebApps_GetWorkflow" 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 SiteWorkflowResource created on azure
+ // for more information of creating SiteWorkflowResource, please refer to the document of SiteWorkflowResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string workflowName = "stateful1";
+ ResourceIdentifier siteWorkflowResourceId = SiteWorkflowResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName);
+ SiteWorkflowResource siteWorkflow = client.GetSiteWorkflowResource(siteWorkflowResourceId);
+
+ // invoke the operation
+ SiteWorkflowResource result = await siteWorkflow.GetAsync();
+
+ // 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
+ WorkflowEnvelopeData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResource.cs
new file mode 100644
index 0000000000000..cb3d67dc95643
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResource.cs
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteBasicAuthPropertiesARMResource
+ {
+ // Gets the basic auth properties for a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsTheBasicAuthPropertiesForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBasicAuth.json
+ // this example is just showing the usage of "StaticSites_GetBasicAuth" 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 StaticSiteBasicAuthPropertiesARMResource created on azure
+ // for more information of creating StaticSiteBasicAuthPropertiesARMResource, please refer to the document of StaticSiteBasicAuthPropertiesARMResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ BasicAuthName basicAuthName = BasicAuthName.Default;
+ ResourceIdentifier staticSiteBasicAuthPropertiesARMResourceId = StaticSiteBasicAuthPropertiesARMResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, basicAuthName);
+ StaticSiteBasicAuthPropertiesARMResource staticSiteBasicAuthPropertiesARMResource = client.GetStaticSiteBasicAuthPropertiesARMResource(staticSiteBasicAuthPropertiesARMResourceId);
+
+ // invoke the operation
+ StaticSiteBasicAuthPropertiesARMResource result = await staticSiteBasicAuthPropertiesARMResource.GetAsync();
+
+ // 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
+ StaticSiteBasicAuthPropertiesARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Creates or updates basic auth properties for a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_CreatesOrUpdatesBasicAuthPropertiesForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteBasicAuth.json
+ // this example is just showing the usage of "StaticSites_CreateOrUpdateBasicAuth" 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 StaticSiteBasicAuthPropertiesARMResource created on azure
+ // for more information of creating StaticSiteBasicAuthPropertiesARMResource, please refer to the document of StaticSiteBasicAuthPropertiesARMResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ BasicAuthName basicAuthName = BasicAuthName.Default;
+ ResourceIdentifier staticSiteBasicAuthPropertiesARMResourceId = StaticSiteBasicAuthPropertiesARMResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, basicAuthName);
+ StaticSiteBasicAuthPropertiesARMResource staticSiteBasicAuthPropertiesARMResource = client.GetStaticSiteBasicAuthPropertiesARMResource(staticSiteBasicAuthPropertiesARMResourceId);
+
+ // invoke the operation
+ StaticSiteBasicAuthPropertiesARMResourceData data = new StaticSiteBasicAuthPropertiesARMResourceData()
+ {
+ Password = "**********************",
+ SecretUri = null,
+ ApplicableEnvironmentsMode = "AllEnvironments",
+ Environments =
+{
+},
+ };
+ ArmOperation lro = await staticSiteBasicAuthPropertiesARMResource.UpdateAsync(WaitUntil.Completed, data);
+ StaticSiteBasicAuthPropertiesARMResource 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
+ StaticSiteBasicAuthPropertiesARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResourceCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResourceCollection.cs
new file mode 100644
index 0000000000000..3d022e080f73d
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResourceCollection.cs
@@ -0,0 +1,209 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteBasicAuthPropertiesARMResourceCollection
+ {
+ // Lists the basic auth properties for a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListsTheBasicAuthPropertiesForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteBasicAuth.json
+ // this example is just showing the usage of "StaticSites_ListBasicAuth" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteBasicAuthPropertiesARMResource
+ StaticSiteBasicAuthPropertiesARMResourceCollection collection = staticSite.GetStaticSiteBasicAuthPropertiesARMResources();
+
+ // invoke the operation and iterate over the result
+ await foreach (StaticSiteBasicAuthPropertiesARMResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ StaticSiteBasicAuthPropertiesARMResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Gets the basic auth properties for a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetsTheBasicAuthPropertiesForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBasicAuth.json
+ // this example is just showing the usage of "StaticSites_GetBasicAuth" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteBasicAuthPropertiesARMResource
+ StaticSiteBasicAuthPropertiesARMResourceCollection collection = staticSite.GetStaticSiteBasicAuthPropertiesARMResources();
+
+ // invoke the operation
+ BasicAuthName basicAuthName = BasicAuthName.Default;
+ StaticSiteBasicAuthPropertiesARMResource result = await collection.GetAsync(basicAuthName);
+
+ // 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
+ StaticSiteBasicAuthPropertiesARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Gets the basic auth properties for a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetsTheBasicAuthPropertiesForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBasicAuth.json
+ // this example is just showing the usage of "StaticSites_GetBasicAuth" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteBasicAuthPropertiesARMResource
+ StaticSiteBasicAuthPropertiesARMResourceCollection collection = staticSite.GetStaticSiteBasicAuthPropertiesARMResources();
+
+ // invoke the operation
+ BasicAuthName basicAuthName = BasicAuthName.Default;
+ bool result = await collection.ExistsAsync(basicAuthName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Gets the basic auth properties for a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetsTheBasicAuthPropertiesForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBasicAuth.json
+ // this example is just showing the usage of "StaticSites_GetBasicAuth" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteBasicAuthPropertiesARMResource
+ StaticSiteBasicAuthPropertiesARMResourceCollection collection = staticSite.GetStaticSiteBasicAuthPropertiesARMResources();
+
+ // invoke the operation
+ BasicAuthName basicAuthName = BasicAuthName.Default;
+ NullableResponse response = await collection.GetIfExistsAsync(basicAuthName);
+ StaticSiteBasicAuthPropertiesARMResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ StaticSiteBasicAuthPropertiesARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Creates or updates basic auth properties for a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreatesOrUpdatesBasicAuthPropertiesForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteBasicAuth.json
+ // this example is just showing the usage of "StaticSites_CreateOrUpdateBasicAuth" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteBasicAuthPropertiesARMResource
+ StaticSiteBasicAuthPropertiesARMResourceCollection collection = staticSite.GetStaticSiteBasicAuthPropertiesARMResources();
+
+ // invoke the operation
+ BasicAuthName basicAuthName = BasicAuthName.Default;
+ StaticSiteBasicAuthPropertiesARMResourceData data = new StaticSiteBasicAuthPropertiesARMResourceData()
+ {
+ Password = "**********************",
+ SecretUri = null,
+ ApplicableEnvironmentsMode = "AllEnvironments",
+ Environments =
+{
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, basicAuthName, data);
+ StaticSiteBasicAuthPropertiesARMResource 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
+ StaticSiteBasicAuthPropertiesARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs
index 598ab030f6a11..ba778118a6d49 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAllBuildsForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuilds.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuilds.json
// this example is just showing the usage of "StaticSites_GetStaticSiteBuilds" 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 GetAll_GetAllBuildsForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetStaticSiteBuild" 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
@@ -91,7 +91,7 @@ public async Task Get_GetAStaticSiteBuild()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetStaticSiteBuild" 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
@@ -122,7 +122,7 @@ public async Task Exists_GetAStaticSiteBuild()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetStaticSiteBuild" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs
new file mode 100644
index 0000000000000..969ec9490df3a
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs
@@ -0,0 +1,211 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteBuildDatabaseConnectionCollection
+ {
+ // List overviews of database connections for the static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListOverviewsOfDatabaseConnectionsForTheStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuildDatabaseConnections.json
+ // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnections" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildDatabaseConnectionResource
+ StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections();
+
+ // invoke the operation and iterate over the result
+ await foreach (StaticSiteBuildDatabaseConnectionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ DatabaseConnectionData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get overview of database connections for the static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuildDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildDatabaseConnectionResource
+ StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ StaticSiteBuildDatabaseConnectionResource result = await collection.GetAsync(databaseConnectionName);
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get overview of database connections for the static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuildDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildDatabaseConnectionResource
+ StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ bool result = await collection.ExistsAsync(databaseConnectionName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get overview of database connections for the static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuildDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildDatabaseConnectionResource
+ StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ NullableResponse response = await collection.GetIfExistsAsync(databaseConnectionName);
+ StaticSiteBuildDatabaseConnectionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create or update a database connection for a static site build
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateADatabaseConnectionForAStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteBuildDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_CreateOrUpdateBuildDatabaseConnection" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildDatabaseConnectionResource
+ StaticSiteBuildDatabaseConnectionCollection collection = staticSiteBuild.GetStaticSiteBuildDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ DatabaseConnectionData data = new DatabaseConnectionData()
+ {
+ ResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName",
+ ConnectionIdentity = "SystemAssigned",
+ ConnectionString = "AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;",
+ Region = "West US 2",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseConnectionName, data);
+ StaticSiteBuildDatabaseConnectionResource 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs
new file mode 100644
index 0000000000000..aacf3ea124d92
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteBuildDatabaseConnectionResource
+ {
+ // Get overview of database connections for the static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuildDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnection" 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 StaticSiteBuildDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName);
+ StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId);
+
+ // invoke the operation
+ StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.GetAsync();
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete a database connection from a static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteADatabaseConnectionFromAStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteStaticSiteBuildDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_DeleteBuildDatabaseConnection" 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 StaticSiteBuildDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName);
+ StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId);
+
+ // invoke the operation
+ await staticSiteBuildDatabaseConnection.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Patch a database connection for a static site build
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_PatchADatabaseConnectionForAStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/PatchStaticSiteBuildDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_UpdateBuildDatabaseConnection" 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 StaticSiteBuildDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName);
+ StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId);
+
+ // invoke the operation
+ DatabaseConnectionPatchRequest databaseConnectionRequestEnvelope = new DatabaseConnectionPatchRequest();
+ StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.UpdateAsync(databaseConnectionRequestEnvelope);
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get details of database connections for the static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetBuildDatabaseConnectionWithDetails_GetDetailsOfDatabaseConnectionsForTheStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuildDatabaseConnectionWithDetails.json
+ // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnectionWithDetails" 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 StaticSiteBuildDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteBuildDatabaseConnectionResource, please refer to the document of StaticSiteBuildDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteBuildDatabaseConnectionResourceId = StaticSiteBuildDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, databaseConnectionName);
+ StaticSiteBuildDatabaseConnectionResource staticSiteBuildDatabaseConnection = client.GetStaticSiteBuildDatabaseConnectionResource(staticSiteBuildDatabaseConnectionResourceId);
+
+ // invoke the operation
+ StaticSiteBuildDatabaseConnectionResource result = await staticSiteBuildDatabaseConnection.GetBuildDatabaseConnectionWithDetailsAsync();
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs
new file mode 100644
index 0000000000000..ded6a02e531d7
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.cs
@@ -0,0 +1,209 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteBuildLinkedBackendCollection
+ {
+ // Get details of the linked backends registered with a static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_GetDetailsOfTheLinkedBackendsRegisteredWithAStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendsForStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackendsForBuild" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildLinkedBackendResource
+ StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends();
+
+ // invoke the operation and iterate over the result
+ await foreach (StaticSiteBuildLinkedBackendResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ StaticSiteLinkedBackendARMResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get details of the linked backend registered with a static site build by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildLinkedBackendResource
+ StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ StaticSiteBuildLinkedBackendResource result = await collection.GetAsync(linkedBackendName);
+
+ // 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get details of the linked backend registered with a static site build by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildLinkedBackendResource
+ StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ bool result = await collection.ExistsAsync(linkedBackendName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get details of the linked backend registered with a static site build by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildLinkedBackendResource
+ StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ NullableResponse response = await collection.GetIfExistsAsync(linkedBackendName);
+ StaticSiteBuildLinkedBackendResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Link a backend to a static site build
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_LinkABackendToAStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/LinkBackendToStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_LinkBackendToBuild" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // get the collection of this StaticSiteBuildLinkedBackendResource
+ StaticSiteBuildLinkedBackendCollection collection = staticSiteBuild.GetStaticSiteBuildLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ StaticSiteLinkedBackendARMResourceData data = new StaticSiteLinkedBackendARMResourceData()
+ {
+ BackendResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend",
+ Region = "West US 2",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkedBackendName, data);
+ StaticSiteBuildLinkedBackendResource 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs
new file mode 100644
index 0000000000000..a028085d367cb
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteBuildLinkedBackendResource
+ {
+ // Validate if backend can be linked to static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ValidateBackendForBuild_ValidateIfBackendCanBeLinkedToStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ValidateLinkedBackendForStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_ValidateBackendForBuild" 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 StaticSiteBuildLinkedBackendResource created on azure
+ // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName);
+ StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId);
+
+ // invoke the operation
+ StaticSiteLinkedBackendARMResourceData data = new StaticSiteLinkedBackendARMResourceData()
+ {
+ BackendResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend",
+ Region = "West US 2",
+ };
+ await staticSiteBuildLinkedBackend.ValidateBackendForBuildAsync(WaitUntil.Completed, data);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get details of the linked backend registered with a static site build by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteBuildByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackendForBuild" 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 StaticSiteBuildLinkedBackendResource created on azure
+ // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName);
+ StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId);
+
+ // invoke the operation
+ StaticSiteBuildLinkedBackendResource result = await staticSiteBuildLinkedBackend.GetAsync();
+
+ // 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Link a backend to a static site build
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_LinkABackendToAStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/LinkBackendToStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_LinkBackendToBuild" 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 StaticSiteBuildLinkedBackendResource created on azure
+ // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName);
+ StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId);
+
+ // invoke the operation
+ StaticSiteLinkedBackendARMResourceData data = new StaticSiteLinkedBackendARMResourceData()
+ {
+ BackendResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend",
+ Region = "West US 2",
+ };
+ ArmOperation lro = await staticSiteBuildLinkedBackend.UpdateAsync(WaitUntil.Completed, data);
+ StaticSiteBuildLinkedBackendResource 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Unlink a backend from a static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_UnlinkABackendFromAStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UnlinkBackendFromStaticSiteBuild.json
+ // this example is just showing the usage of "StaticSites_UnlinkBackendFromBuild" 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 StaticSiteBuildLinkedBackendResource created on azure
+ // for more information of creating StaticSiteBuildLinkedBackendResource, please refer to the document of StaticSiteBuildLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "12";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteBuildLinkedBackendResourceId = StaticSiteBuildLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName, linkedBackendName);
+ StaticSiteBuildLinkedBackendResource staticSiteBuildLinkedBackend = client.GetStaticSiteBuildLinkedBackendResource(staticSiteBuildLinkedBackendResourceId);
+
+ // invoke the operation
+ await staticSiteBuildLinkedBackend.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs
index 5eeee0dff457a..0f2a059279352 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_StaticSiteBuildResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetStaticSiteBuild" 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
@@ -52,7 +52,7 @@ public async Task Get_GetAStaticSiteBuild()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_DeleteStaticSiteBuild" 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
@@ -80,7 +80,7 @@ public async Task Delete_DeleteAStaticSiteBuild()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json
// this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteBuildAppSettings" 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 CreateOrUpdateAppSettings_CreatesOrUpdatesTheFunctionAppSettin
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json
// this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteBuildFunctionAppSettings" 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
@@ -152,7 +152,7 @@ public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionA
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetFunctions_GetsTheFunctionsOfAParticularStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildFunctions.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteBuildFunctions.json
// this example is just showing the usage of "StaticSites_ListStaticSiteBuildFunctions" 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
@@ -183,7 +183,7 @@ public async Task GetFunctions_GetsTheFunctionsOfAParticularStaticSiteBuild()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetStaticSiteBuildAppSettings_GetAppSettingsOfAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteBuildAppSettings.json
// this example is just showing the usage of "StaticSites_ListStaticSiteBuildAppSettings" 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
@@ -211,7 +211,7 @@ public async Task GetStaticSiteBuildAppSettings_GetAppSettingsOfAStaticSiteBuild
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteBuildFunctionAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteBuildFunctionAppSettings.json
// this example is just showing the usage of "StaticSites_ListStaticSiteBuildFunctionAppSettings" 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
@@ -234,12 +234,44 @@ public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSiteBuil
Console.WriteLine($"Succeeded: {result}");
}
+ // List full details of database connections for the static site build.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetBuildDatabaseConnectionsWithDetails_ListFullDetailsOfDatabaseConnectionsForTheStaticSiteBuild()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteBuildDatabaseConnectionsWithDetails.json
+ // this example is just showing the usage of "StaticSites_GetBuildDatabaseConnectionsWithDetails" 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 StaticSiteBuildResource created on azure
+ // for more information of creating StaticSiteBuildResource, please refer to the document of StaticSiteBuildResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string environmentName = "default";
+ ResourceIdentifier staticSiteBuildResourceId = StaticSiteBuildResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, environmentName);
+ StaticSiteBuildResource staticSiteBuild = client.GetStaticSiteBuildResource(staticSiteBuildResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (DatabaseConnectionData item in staticSiteBuild.GetBuildDatabaseConnectionsWithDetailsAsync())
+ {
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {item.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
// Deploy a site from a zipped package to a particular static site build
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateZipDeployment_DeployASiteFromAZippedPackageToAParticularStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StaticSiteBuildZipDeploy.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StaticSiteBuildZipDeploy.json
// this example is just showing the usage of "StaticSites_CreateZipDeploymentForStaticSiteBuild" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs
index 03d017d58af08..a1f12471d0d9e 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildUserProvidedFunctionAppCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppsForStaticSiteBuild" 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 GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAS
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" 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 Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" 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_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithASt
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" 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
@@ -169,7 +169,7 @@ public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWi
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs
index 3eefdd64d9529..2aa4315f152b2 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildUserProvidedFunctionAppResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_StaticSiteBuildUserProvidedFunctionAppResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild" 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
@@ -52,7 +52,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild" 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
@@ -92,7 +92,7 @@ public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSiteBuild()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DetachTheUserProvidedFunctionAppFromTheStaticSiteBuild()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json
// this example is just showing the usage of "StaticSites_DetachUserProvidedFunctionAppFromStaticSiteBuild" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs
index f1ba0dbd95e62..12f2e83e8d22f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCollection.cs
@@ -21,7 +21,7 @@ public partial class Sample_StaticSiteCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetStaticSitesForAResourceGroup()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSites.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSites.json
// this example is just showing the usage of "StaticSites_GetStaticSitesByResourceGroup" 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 GetAll_GetStaticSitesForAResourceGroup()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDetailsForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSite.json
// this example is just showing the usage of "StaticSites_GetStaticSite" 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
@@ -91,7 +91,7 @@ public async Task Get_GetDetailsForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetDetailsForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSite.json
// this example is just showing the usage of "StaticSites_GetStaticSite" 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
@@ -121,7 +121,7 @@ public async Task Exists_GetDetailsForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetDetailsForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSite.json
// this example is just showing the usage of "StaticSites_GetStaticSite" 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
@@ -163,7 +163,7 @@ public async Task GetIfExists_GetDetailsForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_CreateOrUpdateAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSite.json
// this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSite" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs
index 42c8e97a48766..9f718ef92d5cf 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_StaticSiteCustomDomainOverviewCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListCustomDomainsForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomains.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteCustomDomains.json
// this example is just showing the usage of "StaticSites_ListStaticSiteCustomDomains" 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 GetAll_ListCustomDomainsForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetCustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" 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
@@ -92,7 +92,7 @@ public async Task Get_GetCustomDomainForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetCustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" 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 Exists_GetCustomDomainForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetCustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" 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
@@ -166,7 +166,7 @@ public async Task GetIfExists_GetCustomDomainForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_CreateOrUpdateACustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteCustomDomain" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs
index 11365c3fd8427..d798b6af3710e 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteCustomDomainOverviewResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_StaticSiteCustomDomainOverviewResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetCustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_GetStaticSiteCustomDomain" 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
@@ -52,7 +52,7 @@ public async Task Get_GetCustomDomainForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_CreateOrUpdateACustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteCustomDomain" 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
@@ -86,7 +86,7 @@ public async Task Update_CreateOrUpdateACustomDomainForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteACustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_DeleteStaticSiteCustomDomain" 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
@@ -114,7 +114,7 @@ public async Task Delete_DeleteACustomDomainForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task ValidateCustomDomainCanBeAddedToStaticSite_ValidateACustomDomainForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ValidateStaticSiteCustomDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ValidateStaticSiteCustomDomain.json
// this example is just showing the usage of "StaticSites_ValidateCustomDomainCanBeAddedToStaticSite" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs
new file mode 100644
index 0000000000000..f0acc5e19baf7
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.cs
@@ -0,0 +1,206 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteDatabaseConnectionCollection
+ {
+ // List overviews of database connections for the static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListOverviewsOfDatabaseConnectionsForTheStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteDatabaseConnections.json
+ // this example is just showing the usage of "StaticSites_GetDatabaseConnections" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteDatabaseConnectionResource
+ StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections();
+
+ // invoke the operation and iterate over the result
+ await foreach (StaticSiteDatabaseConnectionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ DatabaseConnectionData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get overview of database connections for the static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetDatabaseConnection" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteDatabaseConnectionResource
+ StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ StaticSiteDatabaseConnectionResource result = await collection.GetAsync(databaseConnectionName);
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get overview of database connections for the static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetOverviewOfDatabaseConnectionsForTheStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetDatabaseConnection" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteDatabaseConnectionResource
+ StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ bool result = await collection.ExistsAsync(databaseConnectionName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get overview of database connections for the static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetOverviewOfDatabaseConnectionsForTheStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetDatabaseConnection" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteDatabaseConnectionResource
+ StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ NullableResponse response = await collection.GetIfExistsAsync(databaseConnectionName);
+ StaticSiteDatabaseConnectionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Create or update a database connection for a static site
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateADatabaseConnectionForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_CreateOrUpdateDatabaseConnection" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteDatabaseConnectionResource
+ StaticSiteDatabaseConnectionCollection collection = staticSite.GetStaticSiteDatabaseConnections();
+
+ // invoke the operation
+ string databaseConnectionName = "default";
+ DatabaseConnectionData data = new DatabaseConnectionData()
+ {
+ ResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/databaseRG/providers/Microsoft.DocumentDB/databaseAccounts/exampleDatabaseName",
+ ConnectionIdentity = "SystemAssigned",
+ ConnectionString = "AccountEndpoint=https://exampleDatabaseName.documents.azure.com:443/;Database=mydb;",
+ Region = "West US 2",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseConnectionName, data);
+ StaticSiteDatabaseConnectionResource 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs
new file mode 100644
index 0000000000000..8b1abbf16a429
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs
@@ -0,0 +1,143 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteDatabaseConnectionResource
+ {
+ // Get overview of database connections for the static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetOverviewOfDatabaseConnectionsForTheStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_GetDatabaseConnection" 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 StaticSiteDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName);
+ StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId);
+
+ // invoke the operation
+ StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.GetAsync();
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete a database connection from a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteADatabaseConnectionFromAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteStaticSiteDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_DeleteDatabaseConnection" 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 StaticSiteDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName);
+ StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId);
+
+ // invoke the operation
+ await staticSiteDatabaseConnection.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Patch a database connection for a static site
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_PatchADatabaseConnectionForAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/PatchStaticSiteDatabaseConnection.json
+ // this example is just showing the usage of "StaticSites_UpdateDatabaseConnection" 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 StaticSiteDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName);
+ StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId);
+
+ // invoke the operation
+ DatabaseConnectionPatchRequest databaseConnectionRequestEnvelope = new DatabaseConnectionPatchRequest();
+ StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.UpdateAsync(databaseConnectionRequestEnvelope);
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get details of database connections for the static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetDatabaseConnectionWithDetails_GetDetailsOfDatabaseConnectionsForTheStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteDatabaseConnectionWithDetails.json
+ // this example is just showing the usage of "StaticSites_GetDatabaseConnectionWithDetails" 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 StaticSiteDatabaseConnectionResource created on azure
+ // for more information of creating StaticSiteDatabaseConnectionResource, please refer to the document of StaticSiteDatabaseConnectionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string databaseConnectionName = "default";
+ ResourceIdentifier staticSiteDatabaseConnectionResourceId = StaticSiteDatabaseConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, databaseConnectionName);
+ StaticSiteDatabaseConnectionResource staticSiteDatabaseConnection = client.GetStaticSiteDatabaseConnectionResource(staticSiteDatabaseConnectionResourceId);
+
+ // invoke the operation
+ StaticSiteDatabaseConnectionResource result = await staticSiteDatabaseConnection.GetDatabaseConnectionWithDetailsAsync();
+
+ // 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
+ DatabaseConnectionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs
new file mode 100644
index 0000000000000..5f082dbb19518
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs
@@ -0,0 +1,204 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteLinkedBackendCollection
+ {
+ // Get details of the linked backends registered with a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_GetDetailsOfTheLinkedBackendsRegisteredWithAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendsForStaticSite.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackends" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteLinkedBackendResource
+ StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends();
+
+ // invoke the operation and iterate over the result
+ await foreach (StaticSiteLinkedBackendResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ StaticSiteLinkedBackendARMResourceData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get details of the linked backend registered with a static site by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSite.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackend" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteLinkedBackendResource
+ StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ StaticSiteLinkedBackendResource result = await collection.GetAsync(linkedBackendName);
+
+ // 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get details of the linked backend registered with a static site by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSite.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackend" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteLinkedBackendResource
+ StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ bool result = await collection.ExistsAsync(linkedBackendName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get details of the linked backend registered with a static site by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSite.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackend" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteLinkedBackendResource
+ StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ NullableResponse response = await collection.GetIfExistsAsync(linkedBackendName);
+ StaticSiteLinkedBackendResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Link a backend to a static site
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_LinkABackendToAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/LinkBackendToStaticSite.json
+ // this example is just showing the usage of "StaticSites_LinkBackend" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // get the collection of this StaticSiteLinkedBackendResource
+ StaticSiteLinkedBackendCollection collection = staticSite.GetStaticSiteLinkedBackends();
+
+ // invoke the operation
+ string linkedBackendName = "testBackend";
+ StaticSiteLinkedBackendARMResourceData data = new StaticSiteLinkedBackendARMResourceData()
+ {
+ BackendResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend",
+ Region = "West US 2",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, linkedBackendName, data);
+ StaticSiteLinkedBackendResource 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs
new file mode 100644
index 0000000000000..446aba1b18475
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_StaticSiteLinkedBackendResource
+ {
+ // Validate if backend can be linked to static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ValidateBackend_ValidateIfBackendCanBeLinkedToStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ValidateLinkedBackendForStaticSite.json
+ // this example is just showing the usage of "StaticSites_ValidateBackend" 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 StaticSiteLinkedBackendResource created on azure
+ // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName);
+ StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId);
+
+ // invoke the operation
+ StaticSiteLinkedBackendARMResourceData data = new StaticSiteLinkedBackendARMResourceData()
+ {
+ BackendResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend",
+ Region = "West US 2",
+ };
+ await staticSiteLinkedBackend.ValidateBackendAsync(WaitUntil.Completed, data);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get details of the linked backend registered with a static site by name.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetDetailsOfTheLinkedBackendRegisteredWithAStaticSiteByName()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetLinkedBackendForStaticSite.json
+ // this example is just showing the usage of "StaticSites_GetLinkedBackend" 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 StaticSiteLinkedBackendResource created on azure
+ // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName);
+ StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId);
+
+ // invoke the operation
+ StaticSiteLinkedBackendResource result = await staticSiteLinkedBackend.GetAsync();
+
+ // 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Link a backend to a static site
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_LinkABackendToAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/LinkBackendToStaticSite.json
+ // this example is just showing the usage of "StaticSites_LinkBackend" 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 StaticSiteLinkedBackendResource created on azure
+ // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName);
+ StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId);
+
+ // invoke the operation
+ StaticSiteLinkedBackendARMResourceData data = new StaticSiteLinkedBackendARMResourceData()
+ {
+ BackendResourceId = "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/backendRg/providers/Microsoft.Web/sites/testBackend",
+ Region = "West US 2",
+ };
+ ArmOperation lro = await staticSiteLinkedBackend.UpdateAsync(WaitUntil.Completed, data);
+ StaticSiteLinkedBackendResource 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
+ StaticSiteLinkedBackendARMResourceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Unlink a backend from a static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_UnlinkABackendFromAStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UnlinkBackendFromStaticSite.json
+ // this example is just showing the usage of "StaticSites_UnlinkBackend" 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 StaticSiteLinkedBackendResource created on azure
+ // for more information of creating StaticSiteLinkedBackendResource, please refer to the document of StaticSiteLinkedBackendResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ string linkedBackendName = "testBackend";
+ ResourceIdentifier staticSiteLinkedBackendResourceId = StaticSiteLinkedBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, linkedBackendName);
+ StaticSiteLinkedBackendResource staticSiteLinkedBackend = client.GetStaticSiteLinkedBackendResource(staticSiteLinkedBackendResourceId);
+
+ // invoke the operation
+ await staticSiteLinkedBackend.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs
index 58528eaa74acd..e6ec1127e6ee4 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_StaticSitePrivateEndpointConnectionCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAListOfPrivateEndpointConnectionsAssociatedWithASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnectionList.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnectionList.json
// this example is just showing the usage of "StaticSites_GetPrivateEndpointConnectionList" 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 GetAll_GetAListOfPrivateEndpointConnectionsAssociatedWithASite
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" 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
@@ -92,7 +92,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" 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 Exists_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" 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
@@ -166,7 +166,7 @@ public async Task GetIfExists_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ApproveRejectSitePrivateEndpointConnection.json
// this example is just showing the usage of "StaticSites_ApproveOrRejectPrivateEndpointConnection" 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
@@ -187,7 +187,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA
// invoke the operation
string privateEndpointConnectionName = "connection";
- PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
{
PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
{
@@ -196,7 +196,7 @@ public async Task CreateOrUpdate_ApprovesOrRejectsAPrivateEndpointConnectionForA
ActionsRequired = "",
},
};
- ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, data);
StaticSitePrivateEndpointConnectionResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs
index 6fbce2bfea852..0047debefe4d4 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSitePrivateEndpointConnectionResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_StaticSitePrivateEndpointConnectionResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateEndpointConnection.json
// this example is just showing the usage of "StaticSites_GetPrivateEndpointConnection" 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
@@ -52,7 +52,7 @@ public async Task Get_GetAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ApproveRejectSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ApproveRejectSitePrivateEndpointConnection.json
// this example is just showing the usage of "StaticSites_ApproveOrRejectPrivateEndpointConnection" 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
@@ -70,7 +70,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
StaticSitePrivateEndpointConnectionResource staticSitePrivateEndpointConnection = client.GetStaticSitePrivateEndpointConnectionResource(staticSitePrivateEndpointConnectionResourceId);
// invoke the operation
- PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ RemotePrivateEndpointConnectionARMResourceData data = new RemotePrivateEndpointConnectionARMResourceData()
{
PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
{
@@ -79,7 +79,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
ActionsRequired = "",
},
};
- ArmOperation lro = await staticSitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info);
+ ArmOperation lro = await staticSitePrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, data);
StaticSitePrivateEndpointConnectionResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
@@ -94,7 +94,7 @@ public async Task Update_ApprovesOrRejectsAPrivateEndpointConnectionForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteAPrivateEndpointConnectionForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteSitePrivateEndpointConnection.json
// this example is just showing the usage of "StaticSites_DeletePrivateEndpointConnection" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs
index b19f6dfc5fc11..80386e14ec778 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteResource.cs
@@ -21,7 +21,7 @@ public partial class Sample_StaticSiteResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetStaticSites_GetAllStaticSitesInASubscription()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetAllStaticSites.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetAllStaticSites.json
// this example is just showing the usage of "StaticSites_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
@@ -53,7 +53,7 @@ public async Task GetStaticSites_GetAllStaticSitesInASubscription()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDetailsForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSite.json
// this example is just showing the usage of "StaticSites_GetStaticSite" 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
@@ -84,7 +84,7 @@ public async Task Get_GetDetailsForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DeleteAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteStaticSite.json
// this example is just showing the usage of "StaticSites_DeleteStaticSite" 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
@@ -111,7 +111,7 @@ public async Task Delete_DeleteAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_PatchAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/PatchStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/PatchStaticSite.json
// this example is just showing the usage of "StaticSites_UpdateStaticSite" 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
@@ -143,7 +143,7 @@ public async Task Update_PatchAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetUsers_ListUsersForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteUsers.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteUsers.json
// this example is just showing the usage of "StaticSites_ListStaticSiteUsers" 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
@@ -174,7 +174,7 @@ public async Task GetUsers_ListUsersForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task DeleteUser_DeleteAUserForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DeleteStaticSiteUser.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteStaticSiteUser.json
// this example is just showing the usage of "StaticSites_DeleteStaticSiteUser" 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
@@ -203,7 +203,7 @@ public async Task DeleteUser_DeleteAUserForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task UpdateUser_CreateOrUpdateAUserForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdateStaticSiteUser.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateStaticSiteUser.json
// this example is just showing the usage of "StaticSites_UpdateStaticSiteUser" 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
@@ -236,7 +236,7 @@ public async Task UpdateUser_CreateOrUpdateAUserForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheAppSettingsOfAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteAppSettings.json
// this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteAppSettings" 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
@@ -271,7 +271,7 @@ public async Task CreateOrUpdateAppSettings_CreatesOrUpdatesTheAppSettingsOfASta
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionAppSettingsOfAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json
// this example is just showing the usage of "StaticSites_CreateOrUpdateStaticSiteFunctionAppSettings" 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
@@ -306,7 +306,7 @@ public async Task CreateOrUpdateFunctionAppSettings_CreatesOrUpdatesTheFunctionA
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateUserRolesInvitationLink_CreateAnInvitationLinkForAUserForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/CreateUserRolesInvitationLink.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateUserRolesInvitationLink.json
// this example is just showing the usage of "StaticSites_CreateUserRolesInvitationLink" 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
@@ -341,7 +341,7 @@ public async Task CreateUserRolesInvitationLink_CreateAnInvitationLinkForAUserFo
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Detach_DetachAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DetachStaticSite.json
// this example is just showing the usage of "StaticSites_DetachStaticSite" 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
@@ -368,7 +368,7 @@ public async Task Detach_DetachAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetStaticSiteFunctions_GetsTheFunctionsOfAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteFunctions.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteFunctions.json
// this example is just showing the usage of "StaticSites_ListStaticSiteFunctions" 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
@@ -398,7 +398,7 @@ public async Task GetStaticSiteFunctions_GetsTheFunctionsOfAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAppSettings_GetAppSettingsOfAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteAppSettings.json
// this example is just showing the usage of "StaticSites_ListStaticSiteAppSettings" 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
@@ -425,7 +425,7 @@ public async Task GetAppSettings_GetAppSettingsOfAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetConfiguredRoles_ListsTheConfiguredRolesForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteConfiguredRoles.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteConfiguredRoles.json
// this example is just showing the usage of "StaticSites_ListStaticSiteConfiguredRoles" 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
@@ -452,7 +452,7 @@ public async Task GetConfiguredRoles_ListsTheConfiguredRolesForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteFunctionAppSettings.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteFunctionAppSettings.json
// this example is just showing the usage of "StaticSites_ListStaticSiteFunctionAppSettings" 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
@@ -479,7 +479,7 @@ public async Task GetFunctionAppSettings_GetFunctionAppSettingsOfAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetStaticSiteSecrets_ListSecretsForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListStaticSiteSecrets.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListStaticSiteSecrets.json
// this example is just showing the usage of "StaticSites_ListStaticSiteSecrets" 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
@@ -506,7 +506,7 @@ public async Task GetStaticSiteSecrets_ListSecretsForAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResources.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateLinkResources.json
// this example is just showing the usage of "StaticSites_GetPrivateLinkResources" 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
@@ -536,7 +536,7 @@ public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task ResetApiKey_ResetTheApiKeyForAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ResetStaticSiteApiKey.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ResetStaticSiteApiKey.json
// this example is just showing the usage of "StaticSites_ResetStaticSiteApiKey" 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
@@ -563,12 +563,43 @@ public async Task ResetApiKey_ResetTheApiKeyForAStaticSite()
Console.WriteLine($"Succeeded");
}
+ // List full details of database connections for the static site.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetDatabaseConnectionsWithDetails_ListFullDetailsOfDatabaseConnectionsForTheStaticSite()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetStaticSiteDatabaseConnectionsWithDetails.json
+ // this example is just showing the usage of "StaticSites_GetDatabaseConnectionsWithDetails" 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 StaticSiteResource created on azure
+ // for more information of creating StaticSiteResource, please refer to the document of StaticSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "rg";
+ string name = "testStaticSite0";
+ ResourceIdentifier staticSiteResourceId = StaticSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ StaticSiteResource staticSite = client.GetStaticSiteResource(staticSiteResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (DatabaseConnectionData item in staticSite.GetDatabaseConnectionsWithDetailsAsync())
+ {
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {item.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
// Deploy a site from a zipped package
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateZipDeploymentForStaticSite_DeployASiteFromAZippedPackage()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StaticSiteZipDeploy.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StaticSiteZipDeploy.json
// this example is just showing the usage of "StaticSites_CreateZipDeploymentForStaticSite" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs
index a4bc603512756..64d49ada87dba 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_StaticSiteUserProvidedFunctionAppCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppsForStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppsForStaticSite.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppsForStaticSite" 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 GetAll_GetDetailsOfTheUserProvidedFunctionAppsRegisteredWithAS
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSite.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" 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
@@ -91,7 +91,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSite.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" 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
@@ -122,7 +122,7 @@ public async Task Exists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithASt
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSite.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" 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
@@ -165,7 +165,7 @@ public async Task GetIfExists_GetDetailsOfTheUserProvidedFunctionAppRegisteredWi
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_RegisterAUserProvidedFunctionAppWithAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json
// this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSite" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs
index f8115fe5672b2..4c58bc2b006d1 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteUserProvidedFunctionAppResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_StaticSiteUserProvidedFunctionAppResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetUserProvidedFunctionAppForStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUserProvidedFunctionAppForStaticSite.json
// this example is just showing the usage of "StaticSites_GetUserProvidedFunctionAppForStaticSite" 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
@@ -51,7 +51,7 @@ public async Task Get_GetDetailsOfTheUserProvidedFunctionAppRegisteredWithAStati
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json
// this example is just showing the usage of "StaticSites_RegisterUserProvidedFunctionAppWithStaticSite" 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
@@ -90,7 +90,7 @@ public async Task Update_RegisterAUserProvidedFunctionAppWithAStaticSite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Delete_DetachTheUserProvidedFunctionAppFromTheStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json
// this example is just showing the usage of "StaticSites_DetachUserProvidedFunctionAppFromStaticSite" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
index 34d78cd14c49f..eb330985aca3b 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -16,12 +16,145 @@ namespace Azure.ResourceManager.AppService.Samples
{
public partial class Sample_SubscriptionResourceExtensions
{
+ // Validate App Service Certificate purchase information by subscription
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ValidateAppServiceCertificateOrderPurchaseInformation_ValidateAppServiceCertificatePurchaseInformationBySubscription()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ValidateAppServiceCertificatePurchaseInformationBySubscription.json
+ // this example is just showing the usage of "AppServiceCertificateOrders_ValidatePurchaseInformation" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AppServiceCertificateOrderData data = new AppServiceCertificateOrderData(new AzureLocation("Global"))
+ {
+ Certificates =
+{
+["SampleCertName1"] = new AppServiceCertificateProperties()
+{
+KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+KeyVaultSecretName = "SampleSecretName1",
+},
+["SampleCertName2"] = new AppServiceCertificateProperties()
+{
+KeyVaultId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/microsoft.keyvault/vaults/SamplevaultName"),
+KeyVaultSecretName = "SampleSecretName2",
+},
+},
+ DistinguishedName = "CN=SampleCustomDomain.com",
+ ValidityInYears = 2,
+ KeySize = 2048,
+ ProductType = CertificateProductType.StandardDomainValidatedSsl,
+ IsAutoRenew = true,
+ };
+ await subscriptionResource.ValidateAppServiceCertificateOrderPurchaseInformationAsync(data);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Check domain availability
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CheckAppServiceDomainRegistrationAvailability_CheckDomainAvailability()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/CheckDomainAvailability.json
+ // this example is just showing the usage of "Domains_CheckAvailability" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AppServiceDomainNameIdentifier identifier = new AppServiceDomainNameIdentifier()
+ {
+ Name = "abcd.com",
+ };
+ DomainAvailabilityCheckResult result = await subscriptionResource.CheckAppServiceDomainRegistrationAvailabilityAsync(identifier);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Domain Control Center Sso Request
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetControlCenterSsoRequestDomain_GetDomainControlCenterSsoRequest()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetDomainControlCenterSsoRequest.json
+ // this example is just showing the usage of "Domains_GetControlCenterSsoRequest" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ DomainControlCenterSsoRequestInfo result = await subscriptionResource.GetControlCenterSsoRequestDomainAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // List domain recommendations
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAppServiceDomainRecommendations_ListDomainRecommendations()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/ListDomainRecommendations.json
+ // this example is just showing the usage of "Domains_ListRecommendations" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ DomainRecommendationSearchContent content = new DomainRecommendationSearchContent()
+ {
+ Keywords = "example1",
+ MaxDomainRecommendations = 10,
+ };
+ await foreach (AppServiceDomainNameIdentifier item in subscriptionResource.GetAppServiceDomainRecommendationsAsync(content))
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
// List ResourceHealthMetadata for a subscription
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAllResourceHealthMetadata_ListResourceHealthMetadataForASubscription()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListResourceHealthMetadataBySubscription.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListResourceHealthMetadataBySubscription.json
// this example is just showing the usage of "ResourceHealthMetadata_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
@@ -45,12 +178,97 @@ public async Task GetAllResourceHealthMetadata_ListResourceHealthMetadataForASub
Console.WriteLine($"Succeeded");
}
+ // Get custom hostnames under subscription
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetCustomHostNameSites_GetCustomHostnamesUnderSubscription()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListCustomHostNameSites.json
+ // this example is just showing the usage of "ListCustomHostNameSites" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (CustomHostnameSites item in subscriptionResource.GetCustomHostNameSitesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get specific custom hostname under subscription
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetCustomHostNameSites_GetSpecificCustomHostnameUnderSubscription()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListCustomSpecificHostNameSites.json
+ // this example is just showing the usage of "ListCustomHostNameSites" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ string hostname = "www.example.com";
+ await foreach (CustomHostnameSites item in subscriptionResource.GetCustomHostNameSitesAsync(hostname: hostname))
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // List aseregions
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAseRegions_ListAseregions()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListAseRegions.json
+ // this example is just showing the usage of "ListAseRegions" 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 SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (AseRegion item in subscriptionResource.GetAseRegionsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
// VerifyHostingEnvironmentVnet
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task VerifyHostingEnvironmentVnet_VerifyHostingEnvironmentVnet()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/VerifyHostingEnvironmentVnet.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/VerifyHostingEnvironmentVnet.json
// this example is just showing the usage of "VerifyHostingEnvironmentVnet" 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
@@ -76,12 +294,41 @@ public async Task VerifyHostingEnvironmentVnet_VerifyHostingEnvironmentVnet()
Console.WriteLine($"Succeeded: {result}");
}
+ // Get usages in location for subscription
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetGetUsagesInLocations_GetUsagesInLocationForSubscription()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetUsagesInLocation.json
+ // this example is just showing the usage of "GetUsagesInLocation_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ AzureLocation location = new AzureLocation("West US");
+ await foreach (CsmUsageQuota item in subscriptionResource.GetGetUsagesInLocationsAsync(location))
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
// Generates a preview workflow file for the static site
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task PreviewStaticSiteWorkflow_GeneratesAPreviewWorkflowFileForTheStaticSite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GenerateStaticSiteWorkflowPreview.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GenerateStaticSiteWorkflowPreview.json
// this example is just showing the usage of "StaticSites_PreviewWorkflow" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs
index 06001376938d6..94af6b61c402f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TenantResourceExtensions.cs
@@ -20,7 +20,7 @@ public partial class Sample_TenantResourceExtensions
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetOperationsCertificateRegistrationProviders_ListOperations()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-02-01/examples/ListOperations.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2024-04-01/examples/ListOperations.json
// this example is just showing the usage of "CertificateRegistrationProvider_ListOperations" 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 GetOperationsCertificateRegistrationProviders_ListOperations()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetOperationsDomainRegistrationProviders_ListOperations()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListOperations.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/ListOperations.json
// this example is just showing the usage of "DomainRegistrationProvider_ListOperations" 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
@@ -72,7 +72,7 @@ public async Task GetOperationsDomainRegistrationProviders_ListOperations()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetFunctionAppStacksProviders_GetFunctionAppStacks()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetFunctionAppStacks.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetFunctionAppStacks.json
// this example is just showing the usage of "Provider_GetFunctionAppStacks" 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 GetFunctionAppStacksProviders_GetFunctionAppStacks()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetFunctionAppStacksForLocationProviders_GetLocationsFunctionAppStacks()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetFunctionAppStacksForLocation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetFunctionAppStacksForLocation.json
// this example is just showing the usage of "Provider_GetFunctionAppStacksForLocation" 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 GetFunctionAppStacksForLocationProviders_GetLocationsFunctionA
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetWebAppStacksByLocation_GetLocationsWebAppStacks()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebAppStacksForLocation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppStacksForLocation.json
// this example is just showing the usage of "Provider_GetWebAppStacksForLocation" 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
@@ -152,7 +152,7 @@ public async Task GetWebAppStacksByLocation_GetLocationsWebAppStacks()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetOperationsProviders_ListOperations()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListOperations.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListOperations.json
// this example is just showing the usage of "Provider_ListOperations" 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
@@ -178,7 +178,7 @@ public async Task GetOperationsProviders_ListOperations()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetWebAppStacksProviders_GetWebAppStacks()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebAppStacks.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppStacks.json
// this example is just showing the usage of "Provider_GetWebAppStacks" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs
index fc2117cac3baf..2c403299e1b8e 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainCollection.cs
@@ -20,7 +20,7 @@ public partial class Sample_TopLevelDomainCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_ListTopLevelDomains()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListTopLevelDomains.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/ListTopLevelDomains.json
// this example is just showing the usage of "TopLevelDomains_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
@@ -55,7 +55,7 @@ public async Task GetAll_ListTopLevelDomains()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetTopLevelDomain()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetTopLevelDomain.json
// this example is just showing the usage of "TopLevelDomains_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
@@ -88,7 +88,7 @@ public async Task Get_GetTopLevelDomain()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetTopLevelDomain()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetTopLevelDomain.json
// this example is just showing the usage of "TopLevelDomains_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
@@ -117,7 +117,7 @@ public async Task Exists_GetTopLevelDomain()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetTopLevelDomain()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetTopLevelDomain.json
// this example is just showing the usage of "TopLevelDomains_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
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs
index 4f317ce049b80..5a2eadfd595d8 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_TopLevelDomainResource.cs
@@ -20,7 +20,7 @@ public partial class Sample_TopLevelDomainResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetTopLevelDomain()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/GetTopLevelDomain.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/GetTopLevelDomain.json
// this example is just showing the usage of "TopLevelDomains_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
@@ -50,7 +50,7 @@ public async Task Get_GetTopLevelDomain()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAgreements_ListTopLevelDomainAgreements()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-02-01/examples/ListTopLevelDomainAgreements.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2024-04-01/examples/ListTopLevelDomainAgreements.json
// this example is just showing the usage of "TopLevelDomains_ListAgreements" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs
new file mode 100644
index 0000000000000..aad3f71bdd94c
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs
@@ -0,0 +1,417 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WebSiteCollection
+ {
+ // List Web Apps by Resource group
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListWebAppsByResourceGroup()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWebAppsByResourceGroup.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation and iterate over the result
+ await foreach (WebSiteResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WebSiteData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Web App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation
+ string name = "sitef6141";
+ WebSiteResource result = await collection.GetAsync(name);
+
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Web App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation
+ string name = "sitef6141";
+ bool result = await collection.ExistsAsync(name);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Web App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation
+ string name = "sitef6141";
+ NullableResponse response = await collection.GetIfExistsAsync(name);
+ WebSiteResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Clone web app
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CloneWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CloneWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation
+ string name = "sitef6141";
+ WebSiteData data = new WebSiteData(new AzureLocation("East US"))
+ {
+ CloningInfo = new CloningInfo(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478"))
+ {
+ CanOverwrite = false,
+ CloneCustomHostNames = true,
+ CloneSourceControl = true,
+ SourceWebAppLocation = new AzureLocation("West Europe"),
+ HostingEnvironment = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites",
+ AppSettingsOverrides =
+{
+["Setting1"] = "NewValue1",
+["Setting3"] = "NewValue5",
+},
+ ConfigureLoadBalancing = false,
+ },
+ Kind = "app",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ WebSiteResource 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create or Update Flex Consumption function app
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateFlexConsumptionFunctionApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateFunctionAppFlexConsumption.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation
+ string name = "sitef6141";
+ WebSiteData data = new WebSiteData(new AzureLocation("East US"))
+ {
+ SiteConfig = new SiteConfigProperties()
+ {
+ AppSettings =
+{
+new AppServiceNameValuePair()
+{
+Name = "AzureWebJobsStorage",
+Value = "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net",
+},new AppServiceNameValuePair()
+{
+Name = "APPLICATIONINSIGHTS_CONNECTION_STRING",
+Value = "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized",
+}
+},
+ },
+ FunctionAppConfig = new FunctionAppConfig()
+ {
+ DeploymentStorage = new FunctionsDeploymentStorage()
+ {
+ StorageType = FunctionsDeploymentStorageType.BlobContainer,
+ Value = new Uri("https://storageAccountName.blob.core.windows.net/containername"),
+ Authentication = new FunctionsDeploymentStorageAuthentication()
+ {
+ AuthenticationType = AuthenticationType.StorageAccountConnectionString,
+ StorageAccountConnectionStringName = "TheAppSettingName",
+ },
+ },
+ Runtime = new FunctionsRuntime()
+ {
+ Name = RuntimeName.Python,
+ Version = "3.11",
+ },
+ ScaleAndConcurrency = new FunctionsScaleAndConcurrency()
+ {
+ MaximumInstanceCount = 100,
+ InstanceMemoryMB = 2048,
+ },
+ },
+ Kind = "functionapp,linux",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ WebSiteResource 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create or Update Flex Consumption function app with details
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateFlexConsumptionFunctionAppWithDetails()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateFunctionAppFlexConsumptionWithDetails.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation
+ string name = "sitef6141";
+ WebSiteData data = new WebSiteData(new AzureLocation("East US"))
+ {
+ SiteConfig = new SiteConfigProperties()
+ {
+ AppSettings =
+{
+new AppServiceNameValuePair()
+{
+Name = "AzureWebJobsStorage",
+Value = "DefaultEndpointsProtocol=https;AccountName=StorageAccountName;AccountKey=Sanitized;EndpointSuffix=core.windows.net",
+},new AppServiceNameValuePair()
+{
+Name = "APPLICATIONINSIGHTS_CONNECTION_STRING",
+Value = "InstrumentationKey=Sanitized;IngestionEndpoint=Sanitized;LiveEndpoint=Sanitized",
+}
+},
+ },
+ FunctionAppConfig = new FunctionAppConfig()
+ {
+ DeploymentStorage = new FunctionsDeploymentStorage()
+ {
+ StorageType = FunctionsDeploymentStorageType.BlobContainer,
+ Value = new Uri("https://storageAccountName.blob.core.windows.net/containername"),
+ Authentication = new FunctionsDeploymentStorageAuthentication()
+ {
+ AuthenticationType = AuthenticationType.StorageAccountConnectionString,
+ StorageAccountConnectionStringName = "TheAppSettingName",
+ },
+ },
+ Runtime = new FunctionsRuntime()
+ {
+ Name = RuntimeName.Python,
+ Version = "3.11",
+ },
+ ScaleAndConcurrency = new FunctionsScaleAndConcurrency()
+ {
+ AlwaysReady =
+{
+new FunctionsAlwaysReadyConfig()
+{
+Name = "http",
+InstanceCount = 2,
+}
+},
+ MaximumInstanceCount = 100,
+ InstanceMemoryMB = 2048,
+ HttpPerInstanceConcurrency = 16,
+ },
+ },
+ Kind = "functionapp,linux",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ WebSiteResource 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create or Update web app
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ 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 = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this WebSiteResource
+ WebSiteCollection collection = resourceGroupResource.GetWebSites();
+
+ // invoke the operation
+ string name = "sitef6141";
+ WebSiteData data = new WebSiteData(new AzureLocation("East US"))
+ {
+ AppServicePlanId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"),
+ Kind = "app",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data);
+ WebSiteResource 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs
new file mode 100644
index 0000000000000..8a8ea71ed9f10
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.cs
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WebSiteConfigResource
+ {
+ // Get Site Config
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetSiteConfig()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSiteConfig.json
+ // this example is just showing the usage of "WebApps_GetConfiguration" 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 WebSiteConfigResource created on azure
+ // for more information of creating WebSiteConfigResource, please refer to the document of WebSiteConfigResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteConfigResourceId = WebSiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteConfigResource webSiteConfig = client.GetWebSiteConfigResource(webSiteConfigResourceId);
+
+ // invoke the operation
+ WebSiteConfigResource result = await webSiteConfig.GetAsync();
+
+ // 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
+ SiteConfigData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Update Site Config
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_UpdateSiteConfig()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateSiteConfig.json
+ // this example is just showing the usage of "WebApps_CreateOrUpdateConfiguration" 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 WebSiteConfigResource created on azure
+ // for more information of creating WebSiteConfigResource, please refer to the document of WebSiteConfigResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteConfigResourceId = WebSiteConfigResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteConfigResource webSiteConfig = client.GetWebSiteConfigResource(webSiteConfigResourceId);
+
+ // invoke the operation
+ SiteConfigData data = new SiteConfigData()
+ {
+ NumberOfWorkers = 1,
+ DefaultDocuments =
+{
+"Default.htm","Default.html","Default.asp","index.htm","index.html","iisstart.htm","default.aspx","index.php","hostingstart.html"
+},
+ NetFrameworkVersion = "v4.0",
+ PhpVersion = "5.6",
+ PythonVersion = "",
+ NodeVersion = "",
+ PowerShellVersion = "",
+ LinuxFxVersion = "",
+ IsRequestTracingEnabled = false,
+ IsRemoteDebuggingEnabled = false,
+ IsHttpLoggingEnabled = false,
+ UseManagedIdentityCreds = false,
+ LogsDirectorySizeLimit = 35,
+ IsDetailedErrorLoggingEnabled = false,
+ Use32BitWorkerProcess = true,
+ IsWebSocketsEnabled = false,
+ IsAlwaysOn = false,
+ AppCommandLine = "",
+ ManagedPipelineMode = ManagedPipelineMode.Integrated,
+ VirtualApplications =
+{
+new VirtualApplication()
+{
+VirtualPath = "/",
+PhysicalPath = "site\\wwwroot",
+IsPreloadEnabled = false,
+}
+},
+ LoadBalancing = SiteLoadBalancing.LeastRequests,
+ IsAutoHealEnabled = false,
+ VnetName = "",
+ IsVnetRouteAllEnabled = false,
+ VnetPrivatePortsCount = 0,
+ IsHttp20Enabled = false,
+ MinTlsVersion = AppServiceSupportedTlsVersion.Tls1_2,
+ ScmMinTlsVersion = AppServiceSupportedTlsVersion.Tls1_2,
+ FtpsState = AppServiceFtpsState.AllAllowed,
+ FunctionAppScaleLimit = 0,
+ IsFunctionsRuntimeScaleMonitoringEnabled = false,
+ MinimumElasticInstanceCount = 0,
+ AzureStorageAccounts =
+{
+},
+ };
+ ArmOperation lro = await webSiteConfig.CreateOrUpdateAsync(WaitUntil.Completed, data);
+ WebSiteConfigResource 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
+ SiteConfigData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs
index 9fd1d87a63fc1..0e589d098a2d4 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteFtpPublishingCredentialsPolicyResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_WebSiteFtpPublishingCredentialsPolicyResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetFTPAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicy.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetPublishingCredentialsPolicy.json
// this example is just showing the usage of "WebApps_GetFtpAllowed" 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
@@ -50,7 +50,7 @@ public async Task Get_GetFTPAllowed()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_UpdateFTPAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicy.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdatePublishingCredentialsPolicy.json
// this example is just showing the usage of "WebApps_UpdateFtpAllowed" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs
index b77cb3b47ffb1..49213521dc2be 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResource.cs
@@ -11,17 +11,452 @@
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.AppService.Models;
+using Azure.ResourceManager.Resources;
namespace Azure.ResourceManager.AppService.Samples
{
public partial class Sample_WebSiteResource
{
+ // List Web apps for subscription
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetWebSites_ListWebAppsForSubscription()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWebApps.json
+ // this example is just showing the usage of "WebApps_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WebSiteResource item in subscriptionResource.GetWebSitesAsync())
+ {
+ // the variable item 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
+ WebSiteData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Web App
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ WebSiteResource result = await webSite.GetAsync();
+
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete Web app
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ await webSite.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Update web app
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdateWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateWebApp.json
+ // this example is just showing the usage of "WebApps_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ SitePatchInfo info = new SitePatchInfo()
+ {
+ ServerFarmId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"),
+ };
+ WebSiteResource result = await webSite.UpdateAsync(info);
+
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Analyze custom hostname for webapp.
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task AnalyzeCustomHostname_AnalyzeCustomHostnameForWebapp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AnalyzeCustomHostName.json
+ // this example is just showing the usage of "WebApps_AnalyzeCustomHostname" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ CustomHostnameAnalysisResult result = await webSite.AnalyzeCustomHostnameAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Apply web app slot config
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ApplySlotConfigToProduction_ApplyWebAppSlotConfig()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ApplySlotConfig.json
+ // this example is just showing the usage of "WebApps_ApplySlotConfigToProduction" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ CsmSlotEntity slotSwapEntity = new CsmSlotEntity("staging", true);
+ await webSite.ApplySlotConfigToProductionAsync(slotSwapEntity);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Backup web app
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Backup_BackupWebApp()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/BackupWebApp.json
+ // this example is just showing the usage of "WebApps_Backup" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ WebAppBackupInfo info = new WebAppBackupInfo()
+ {
+ BackupName = "abcdwe",
+ IsEnabled = true,
+ StorageAccountUri = new Uri("DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey="),
+ BackupSchedule = new WebAppBackupSchedule(7, BackupFrequencyUnit.Day, true, 30)
+ {
+ StartOn = DateTimeOffset.Parse("2022-09-02T17:33:11.641Z"),
+ },
+ Databases =
+{
+new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure)
+{
+Name = "backenddb",
+ConnectionStringName = "backend",
+ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]",
+},new AppServiceDatabaseBackupSetting(AppServiceDatabaseType.SqlAzure)
+{
+Name = "statsdb",
+ConnectionStringName = "stats",
+ConnectionString = "DSN=data-source-name[;SERVER=value] [;PWD=value] [;UID=value] [;=]",
+}
+},
+ };
+ WebAppBackupData result = await webSite.BackupAsync(info);
+
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {result.Id}");
+ }
+
+ // List web app configurations
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAllConfigurationData_ListWebAppConfigurations()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWebAppConfigurations.json
+ // this example is just showing the usage of "WebApps_ListConfigurations" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (SiteConfigData item in webSite.GetAllConfigurationDataAsync())
+ {
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {item.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Update App Settings
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task UpdateApplicationSettings_UpdateAppSettings()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateAppSettings.json
+ // this example is just showing the usage of "WebApps_UpdateApplicationSettings" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ AppServiceConfigurationDictionary appSettings = new AppServiceConfigurationDictionary()
+ {
+ Properties =
+{
+["Setting1"] = "Value1",
+["Setting2"] = "Value2",
+},
+ };
+ AppServiceConfigurationDictionary result = await webSite.UpdateApplicationSettingsAsync(appSettings);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // List App Settings
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetApplicationSettings_ListAppSettings()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListAppSettings.json
+ // this example is just showing the usage of "WebApps_ListApplicationSettings" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ AppServiceConfigurationDictionary result = await webSite.GetApplicationSettingsAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Update Auth Settings
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task UpdateAuthSettings_UpdateAuthSettings()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateAuthSettings.json
+ // this example is just showing the usage of "WebApps_UpdateAuthSettings" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ SiteAuthSettings siteAuthSettings = new SiteAuthSettings()
+ {
+ IsEnabled = true,
+ RuntimeVersion = "~1",
+ UnauthenticatedClientAction = UnauthenticatedClientAction.RedirectToLoginPage,
+ IsTokenStoreEnabled = true,
+ AllowedExternalRedirectUrls =
+{
+"sitef6141.customdomain.net","sitef6141.customdomain.info"
+},
+ DefaultProvider = BuiltInAuthenticationProvider.Google,
+ TokenRefreshExtensionHours = 120,
+ ClientId = "42d795a9-8abb-4d06-8534-39528af40f8e.apps.googleusercontent.com",
+ };
+ SiteAuthSettings result = await webSite.UpdateAuthSettingsAsync(siteAuthSettings);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // List Auth Settings
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAuthSettings_ListAuthSettings()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListAuthSettings.json
+ // this example is just showing the usage of "WebApps_GetAuthSettings" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ SiteAuthSettings result = await webSite.GetAuthSettingsAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Update Azure Storage Accounts
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task UpdateAzureStorageAccounts_UpdateAzureStorageAccounts()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateAzureStorageAccounts.json
+ // this example is just showing the usage of "WebApps_UpdateAzureStorageAccounts" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ AzureStoragePropertyDictionary azureStorageAccounts = new AzureStoragePropertyDictionary()
+ {
+ Properties =
+{
+["account1"] = new AppServiceStorageAccessInfo()
+{
+StorageType = AppServiceStorageType.AzureFiles,
+AccountName = "testsa",
+ShareName = "web",
+AccessKey = "26515^%@#*",
+MountPath = "/mounts/a/files",
+},
+},
+ };
+ AzureStoragePropertyDictionary result = await webSite.UpdateAzureStorageAccountsAsync(azureStorageAccounts);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
// List backups
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAllSiteBackupData_ListBackups()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListSlotBackups.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListSlotBackups.json
// this example is just showing the usage of "WebApps_ListSiteBackups" 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
@@ -52,7 +487,7 @@ public async Task GetAllSiteBackupData_ListBackups()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTraceOperation_GetTheCurrentStatusOfANetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_GetNetworkTraceOperation" 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
@@ -83,7 +518,7 @@ public async Task GetNetworkTraceOperation_GetTheCurrentStatusOfANetworkTraceOpe
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StartWebSiteNetworkTraceOperation_StartANewNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StartWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_StartWebSiteNetworkTraceOperation" 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
@@ -112,7 +547,7 @@ public async Task StartWebSiteNetworkTraceOperation_StartANewNetworkTraceOperati
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StopWebSiteNetworkTrace_StopACurrentlyRunningNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StopWebSiteNetworkTrace.json
// this example is just showing the usage of "WebApps_StopWebSiteNetworkTrace" 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
@@ -139,7 +574,7 @@ public async Task StopWebSiteNetworkTrace_StopACurrentlyRunningNetworkTraceOpera
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTraces_GetNetworkTracesForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraces.json
// this example is just showing the usage of "WebApps_GetNetworkTraces" 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
@@ -170,7 +605,7 @@ public async Task GetNetworkTraces_GetNetworkTracesForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTraceOperationV2_GetTheCurrentStatusOfANetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_GetNetworkTraceOperationV2" 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
@@ -201,7 +636,7 @@ public async Task GetNetworkTraceOperationV2_GetTheCurrentStatusOfANetworkTraceO
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTracesV2_GetNetworkTracesForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraces.json
// this example is just showing the usage of "WebApps_GetNetworkTracesV2" 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
@@ -232,7 +667,7 @@ public async Task GetNetworkTracesV2_GetNetworkTracesForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResources.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateLinkResources.json
// this example is just showing the usage of "WebApps_GetPrivateLinkResources" 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
@@ -262,7 +697,7 @@ public async Task GetPrivateLinkResources_GetPrivateLinkResourcesOfASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StartNetworkTrace_StartANewNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StartWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_StartNetworkTrace" 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
@@ -291,7 +726,7 @@ public async Task StartNetworkTrace_StartANewNetworkTraceOperationForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StopNetworkTrace_StopACurrentlyRunningNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StopWebSiteNetworkTrace.json
// this example is just showing the usage of "WebApps_StopNetworkTrace" 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
@@ -312,5 +747,230 @@ public async Task StopNetworkTrace_StopACurrentlyRunningNetworkTraceOperationFor
Console.WriteLine($"Succeeded");
}
+
+ // Delete workflow artifacts
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task DeployWorkflowArtifacts_DeleteWorkflowArtifacts()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteDeployWorkflowArtifacts.json
+ // this example is just showing the usage of "WebApps_DeployWorkflowArtifacts" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts()
+ {
+ FilesToDelete =
+{
+"test/workflow.json","test/"
+},
+ };
+ await webSite.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Deploys workflow artifacts
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task DeployWorkflowArtifacts_DeploysWorkflowArtifacts()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/PostDeployWorkflowArtifacts.json
+ // this example is just showing the usage of "WebApps_DeployWorkflowArtifacts" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts()
+ {
+ AppSettings = BinaryData.FromObjectAsJson(new Dictionary()
+ {
+ ["eventHub_connectionString"] = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE="
+ }),
+ Files =
+{
+["connections.json"] = BinaryData.FromObjectAsJson(new Dictionary()
+{
+["managedApiConnections"] = new Dictionary()
+{
+},
+["serviceProviderConnections"] = new Dictionary()
+{
+["eventHub"] = new Dictionary()
+{
+["displayName"] = "example1",
+["parameterValues"] = new Dictionary()
+{
+["connectionString"] = "@appsetting('eventHub_connectionString')"},
+["serviceProvider"] = new Dictionary()
+{
+["id"] = "/serviceProviders/eventHub"}}}}),
+["test1/workflow.json"] = BinaryData.FromObjectAsJson(new Dictionary()
+{
+["definition"] = new Dictionary()
+{
+["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
+["actions"] = new Dictionary()
+{
+},
+["contentVersion"] = "1.0.0.0",
+["outputs"] = new Dictionary()
+{
+},
+["triggers"] = new Dictionary()
+{
+["When_events_are_available_in_Event_hub"] = new Dictionary()
+{
+["type"] = "ServiceProvider",
+["inputs"] = new Dictionary()
+{
+["parameters"] = new Dictionary()
+{
+["eventHubName"] = "test123"},
+["serviceProviderConfiguration"] = new Dictionary()
+{
+["operationId"] = "receiveEvents",
+["connectionName"] = "eventHub",
+["serviceProviderId"] = "/serviceProviders/eventHub"}},
+["splitOn"] = "@triggerOutputs()?['body']"}}},
+["kind"] = "Stateful"}),
+},
+ };
+ await webSite.DeployWorkflowArtifactsAsync(workflowArtifacts: workflowArtifacts);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // List the Instance Workflows Configuration Connections
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetWorkflowsConnections_ListTheInstanceWorkflowsConfigurationConnections()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWorkflowsConfigurationConnections.json
+ // this example is just showing the usage of "WebApps_ListWorkflowsConnections" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ WorkflowEnvelopeData result = await webSite.GetWorkflowsConnectionsAsync();
+
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {result.Id}");
+ }
+
+ // Regenerate the callback URL access key for request triggers
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task RegenerateAccessKeyWorkflow_RegenerateTheCallbackURLAccessKeyForRequestTriggers()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Workflows_RegenerateAccessKey.json
+ // this example is just showing the usage of "Workflows_RegenerateAccessKey" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ string workflowName = "testWorkflowName";
+ RegenerateActionParameter keyType = new RegenerateActionParameter()
+ {
+ KeyType = KeyType.Primary,
+ };
+ await webSite.RegenerateAccessKeyWorkflowAsync(workflowName, keyType);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Validate a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task ValidateWorkflow_ValidateAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/Workflows_Validate.json
+ // this example is just showing the usage of "Workflows_Validate" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // invoke the operation
+ string workflowName = "test-workflow";
+ Workflow validate = new Workflow(new AzureLocation("placeholder"))
+ {
+ Definition = BinaryData.FromObjectAsJson(new Dictionary()
+ {
+ ["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
+ ["actions"] = new Dictionary()
+ {
+ },
+ ["contentVersion"] = "1.0.0.0",
+ ["outputs"] = new Dictionary()
+ {
+ },
+ ["parameters"] = new Dictionary()
+ {
+ },
+ ["triggers"] = new Dictionary()
+ {
+ }
+ }),
+ Kind = AppServiceKind.Stateful,
+ };
+ await webSite.ValidateWorkflowAsync(workflowName, validate);
+
+ Console.WriteLine($"Succeeded");
+ }
}
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs
index 1eaef0c4cd4f8..3c8fb9e9d49a8 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteResourceHealthMetadataResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_WebSiteResourceHealthMetadataResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetResourceHealthMetadata()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetResourceHealthMetadataBySite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetResourceHealthMetadataBySite.json
// this example is just showing the usage of "ResourceHealthMetadata_GetBySite" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs
new file mode 100644
index 0000000000000..2cea4a4044b02
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs
@@ -0,0 +1,259 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WebSiteSlotCollection
+ {
+ // List Web App Slots
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListWebAppSlots()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWebAppSlots.json
+ // this example is just showing the usage of "WebApps_ListSlots" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WebSiteSlotResource
+ WebSiteSlotCollection collection = webSite.GetWebSiteSlots();
+
+ // invoke the operation and iterate over the result
+ await foreach (WebSiteSlotResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WebSiteData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get Web App Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppSlot.json
+ // this example is just showing the usage of "WebApps_GetSlot" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WebSiteSlotResource
+ WebSiteSlotCollection collection = webSite.GetWebSiteSlots();
+
+ // invoke the operation
+ string slot = "staging";
+ WebSiteSlotResource result = await collection.GetAsync(slot);
+
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get Web App Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppSlot.json
+ // this example is just showing the usage of "WebApps_GetSlot" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WebSiteSlotResource
+ WebSiteSlotCollection collection = webSite.GetWebSiteSlots();
+
+ // invoke the operation
+ string slot = "staging";
+ bool result = await collection.ExistsAsync(slot);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get Web App Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppSlot.json
+ // this example is just showing the usage of "WebApps_GetSlot" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WebSiteSlotResource
+ WebSiteSlotCollection collection = webSite.GetWebSiteSlots();
+
+ // invoke the operation
+ string slot = "staging";
+ NullableResponse response = await collection.GetIfExistsAsync(slot);
+ WebSiteSlotResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ // Clone web app slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CloneWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CloneWebAppSlot.json
+ // this example is just showing the usage of "WebApps_CreateOrUpdateSlot" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WebSiteSlotResource
+ WebSiteSlotCollection collection = webSite.GetWebSiteSlots();
+
+ // invoke the operation
+ string slot = "staging";
+ WebSiteData data = new WebSiteData(new AzureLocation("East US"))
+ {
+ CloningInfo = new CloningInfo(new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/sites/srcsiteg478/slot/qa"))
+ {
+ CanOverwrite = false,
+ CloneCustomHostNames = true,
+ CloneSourceControl = true,
+ SourceWebAppLocation = new AzureLocation("West Europe"),
+ HostingEnvironment = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg456/providers/Microsoft.Web/hostingenvironments/aseforsites",
+ AppSettingsOverrides =
+{
+["Setting1"] = "NewValue1",
+["Setting3"] = "NewValue5",
+},
+ ConfigureLoadBalancing = false,
+ },
+ Kind = "app",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, slot, data);
+ WebSiteSlotResource 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Create or Update Web App Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task CreateOrUpdate_CreateOrUpdateWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/CreateOrUpdateWebAppSlot.json
+ // this example is just showing the usage of "WebApps_CreateOrUpdateSlot" 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 WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WebSiteSlotResource
+ WebSiteSlotCollection collection = webSite.GetWebSiteSlots();
+
+ // invoke the operation
+ string slot = "staging";
+ WebSiteData data = new WebSiteData(new AzureLocation("East US"))
+ {
+ AppServicePlanId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"),
+ Kind = "app",
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, slot, data);
+ WebSiteSlotResource 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs
index 21cb49889d92c..ab3c28f7a6b0c 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingCollection.cs
@@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotConfigAppSettingCollection
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAll_GetAzureKeyVaultReferencesForAppSettingsForSlot()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json
// this example is just showing the usage of "WebApps_GetAppSettingsKeyVaultReferencesSlot" 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 GetAll_GetAzureKeyVaultReferencesForAppSettingsForSlot()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAzureKeyVaultSlotAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" 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 Get_GetAzureKeyVaultSlotAppSettingReference()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Exists_GetAzureKeyVaultSlotAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" 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_GetAzureKeyVaultSlotAppSettingReference()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetIfExists_GetAzureKeyVaultSlotAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs
index 4e8b4fb08795a..3023856487fb3 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotConfigAppSettingResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotConfigAppSettingResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetAzureKeyVaultSlotAppSettingReference()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetKeyVaultReferencesForAppSettingSlot.json
// this example is just showing the usage of "WebApps_GetAppSettingKeyVaultReferenceSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs
index 4cd228adb61dc..d92803e4cd739 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotFtpPublishingCredentialsPolicyResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetFTPAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetPublishingCredentialsPolicySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetPublishingCredentialsPolicySlot.json
// this example is just showing the usage of "WebApps_GetFtpAllowedSlot" 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
@@ -51,7 +51,7 @@ public async Task Get_GetFTPAllowed()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task CreateOrUpdate_UpdateFTPAllowed()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/UpdatePublishingCredentialsPolicySlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdatePublishingCredentialsPolicySlot.json
// this example is just showing the usage of "WebApps_UpdateFtpAllowedSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs
index 08590fc21e670..360511c6f3055 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResource.cs
@@ -16,12 +16,136 @@ namespace Azure.ResourceManager.AppService.Samples
{
public partial class Sample_WebSiteSlotResource
{
+ // Get Web App Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebAppSlot.json
+ // this example is just showing the usage of "WebApps_GetSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // invoke the operation
+ WebSiteSlotResource result = await webSiteSlot.GetAsync();
+
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Delete Web App Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Delete_DeleteWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/DeleteWebAppSlot.json
+ // this example is just showing the usage of "WebApps_DeleteSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // invoke the operation
+ await webSiteSlot.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Update Web App Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Update_UpdateWebAppSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/UpdateWebAppSlot.json
+ // this example is just showing the usage of "WebApps_UpdateSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // invoke the operation
+ SitePatchInfo info = new SitePatchInfo()
+ {
+ ServerFarmId = new ResourceIdentifier("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/serverfarms/DefaultAsp"),
+ };
+ WebSiteSlotResource result = await webSiteSlot.UpdateAsync(info);
+
+ // 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
+ WebSiteData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Analyze custom hostname for slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task AnalyzeCustomHostnameSlot_AnalyzeCustomHostnameForSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/AnalyzeCustomHostNameSlot.json
+ // this example is just showing the usage of "WebApps_AnalyzeCustomHostnameSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "sitef6141";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // invoke the operation
+ CustomHostnameAnalysisResult result = await webSiteSlot.AnalyzeCustomHostnameSlotAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
// List backups
[NUnit.Framework.Test]
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetAllSiteBackupSlotData_ListBackups()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/ListSlotBackups.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListSlotBackups.json
// this example is just showing the usage of "WebApps_ListSiteBackupsSlot" 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
@@ -53,7 +177,7 @@ public async Task GetAllSiteBackupSlotData_ListBackups()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTraceOperationSlot_GetTheCurrentStatusOfANetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_GetNetworkTraceOperationSlot" 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
@@ -85,7 +209,7 @@ public async Task GetNetworkTraceOperationSlot_GetTheCurrentStatusOfANetworkTrac
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StartWebSiteNetworkTraceOperationSlot_StartANewNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StartWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_StartWebSiteNetworkTraceOperationSlot" 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 +239,7 @@ public async Task StartWebSiteNetworkTraceOperationSlot_StartANewNetworkTraceOpe
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StopWebSiteNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StopWebSiteNetworkTrace.json
// this example is just showing the usage of "WebApps_StopWebSiteNetworkTraceSlot" 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
@@ -143,7 +267,7 @@ public async Task StopWebSiteNetworkTraceSlot_StopACurrentlyRunningNetworkTraceO
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTracesSlot_GetNetworkTracesForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraces.json
// this example is just showing the usage of "WebApps_GetNetworkTracesSlot" 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
@@ -175,7 +299,7 @@ public async Task GetNetworkTracesSlot_GetNetworkTracesForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTraceOperationSlotV2_GetTheCurrentStatusOfANetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_GetNetworkTraceOperationSlotV2" 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
@@ -207,7 +331,7 @@ public async Task GetNetworkTraceOperationSlotV2_GetTheCurrentStatusOfANetworkTr
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetNetworkTracesSlotV2_GetNetworkTracesForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetWebSiteNetworkTraces.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetWebSiteNetworkTraces.json
// this example is just showing the usage of "WebApps_GetNetworkTracesSlotV2" 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
@@ -239,7 +363,7 @@ public async Task GetNetworkTracesSlotV2_GetNetworkTracesForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task GetPrivateLinkResourcesSlot_GetPrivateLinkResourcesOfASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetSitePrivateLinkResourcesSlot.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetSitePrivateLinkResourcesSlot.json
// this example is just showing the usage of "WebApps_GetPrivateLinkResourcesSlot" 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
@@ -270,7 +394,7 @@ public async Task GetPrivateLinkResourcesSlot_GetPrivateLinkResourcesOfASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StartNetworkTraceSlot_StartANewNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StartWebSiteNetworkTraceOperation.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StartWebSiteNetworkTraceOperation.json
// this example is just showing the usage of "WebApps_StartNetworkTraceSlot" 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
@@ -300,7 +424,7 @@ public async Task StartNetworkTraceSlot_StartANewNetworkTraceOperationForASite()
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task StopNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperationForASite()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/StopWebSiteNetworkTrace.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/StopWebSiteNetworkTrace.json
// this example is just showing the usage of "WebApps_StopNetworkTraceSlot" 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
@@ -322,5 +446,117 @@ public async Task StopNetworkTraceSlot_StopACurrentlyRunningNetworkTraceOperatio
Console.WriteLine($"Succeeded");
}
+
+ // Deploys workflow artifacts slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task DeployWorkflowArtifactsSlot_DeploysWorkflowArtifactsSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/PostDeployWorkflowArtifactsSlot.json
+ // this example is just showing the usage of "WebApps_DeployWorkflowArtifactsSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string slot = "testsSlot";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // invoke the operation
+ WorkflowArtifacts workflowArtifacts = new WorkflowArtifacts()
+ {
+ AppSettings = BinaryData.FromObjectAsJson(new Dictionary()
+ {
+ ["eventHub_connectionString"] = "Endpoint=sb://example.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=EXAMPLE1a2b3c4d5e6fEXAMPLE="
+ }),
+ Files =
+{
+["connections.json"] = BinaryData.FromObjectAsJson(new Dictionary()
+{
+["managedApiConnections"] = new Dictionary()
+{
+},
+["serviceProviderConnections"] = new Dictionary()
+{
+["eventHub"] = new Dictionary()
+{
+["displayName"] = "example1",
+["parameterValues"] = new Dictionary()
+{
+["connectionString"] = "@appsetting('eventHub_connectionString')"},
+["serviceProvider"] = new Dictionary()
+{
+["id"] = "/serviceProviders/eventHub"}}}}),
+["test1/workflow.json"] = BinaryData.FromObjectAsJson(new Dictionary()
+{
+["definition"] = new Dictionary()
+{
+["$schema"] = "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
+["actions"] = new Dictionary()
+{
+},
+["contentVersion"] = "1.0.0.0",
+["outputs"] = new Dictionary()
+{
+},
+["triggers"] = new Dictionary()
+{
+["When_events_are_available_in_Event_hub"] = new Dictionary()
+{
+["type"] = "ServiceProvider",
+["inputs"] = new Dictionary()
+{
+["parameters"] = new Dictionary()
+{
+["eventHubName"] = "test123"},
+["serviceProviderConfiguration"] = new Dictionary()
+{
+["operationId"] = "receiveEvents",
+["connectionName"] = "eventHub",
+["serviceProviderId"] = "/serviceProviders/eventHub"}},
+["splitOn"] = "@triggerOutputs()?['body']"}}},
+["kind"] = "Stateful"}),
+},
+ };
+ await webSiteSlot.DeployWorkflowArtifactsSlotAsync(workflowArtifacts: workflowArtifacts);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // List the Instance Workflows Configuration Connections Slot
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetWorkflowsConnectionsSlot_ListTheInstanceWorkflowsConfigurationConnectionsSlot()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/ListWorkflowsConfigurationConnections.json
+ // this example is just showing the usage of "WebApps_ListWorkflowsConnectionsSlot" 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 WebSiteSlotResource created on azure
+ // for more information of creating WebSiteSlotResource, please refer to the document of WebSiteSlotResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testrg123";
+ string name = "testsite2";
+ string slot = "staging";
+ ResourceIdentifier webSiteSlotResourceId = WebSiteSlotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, slot);
+ WebSiteSlotResource webSiteSlot = client.GetWebSiteSlotResource(webSiteSlotResourceId);
+
+ // invoke the operation
+ WorkflowEnvelopeData result = await webSiteSlot.GetWorkflowsConnectionsSlotAsync();
+
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {result.Id}");
+ }
}
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs
index c1b15fe7741ea..6ccda91ab3216 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotResourceHealthMetadataResource.cs
@@ -19,7 +19,7 @@ public partial class Sample_WebSiteSlotResourceHealthMetadataResource
[NUnit.Framework.Ignore("Only verifying that the sample builds")]
public async Task Get_GetResourceHealthMetadata()
{
- // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2021-02-01/examples/GetResourceHealthMetadataBySite.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/GetResourceHealthMetadataBySite.json
// this example is just showing the usage of "ResourceHealthMetadata_GetBySiteSlot" 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/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs
new file mode 100644
index 0000000000000..9fbfe0a5bce10
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowRunActionCollection
+ {
+ // List a workflow run actions
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListAWorkflowRunActions()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActions_List.json
+ // this example is just showing the usage of "WorkflowRunActions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunResource created on azure
+ // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586676746934337772206998657CU22";
+ ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName);
+ WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId);
+
+ // get the collection of this WorkflowRunActionResource
+ WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions();
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkflowRunActionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowRunActionData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a workflow run action
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowRunAction()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActions_Get.json
+ // this example is just showing the usage of "WorkflowRunActions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunResource created on azure
+ // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586676746934337772206998657CU22";
+ ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName);
+ WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId);
+
+ // get the collection of this WorkflowRunActionResource
+ WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions();
+
+ // invoke the operation
+ string actionName = "HTTP";
+ WorkflowRunActionResource result = await collection.GetAsync(actionName);
+
+ // 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
+ WorkflowRunActionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a workflow run action
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetAWorkflowRunAction()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActions_Get.json
+ // this example is just showing the usage of "WorkflowRunActions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunResource created on azure
+ // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586676746934337772206998657CU22";
+ ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName);
+ WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId);
+
+ // get the collection of this WorkflowRunActionResource
+ WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions();
+
+ // invoke the operation
+ string actionName = "HTTP";
+ bool result = await collection.ExistsAsync(actionName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a workflow run action
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetAWorkflowRunAction()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActions_Get.json
+ // this example is just showing the usage of "WorkflowRunActions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunResource created on azure
+ // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586676746934337772206998657CU22";
+ ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName);
+ WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId);
+
+ // get the collection of this WorkflowRunActionResource
+ WorkflowRunActionCollection collection = workflowRun.GetWorkflowRunActions();
+
+ // invoke the operation
+ string actionName = "HTTP";
+ NullableResponse response = await collection.GetIfExistsAsync(actionName);
+ WorkflowRunActionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowRunActionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs
new file mode 100644
index 0000000000000..3a44f50443d0a
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.cs
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowRunActionResource
+ {
+ // Get a workflow run action
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowRunAction()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActions_Get.json
+ // this example is just showing the usage of "WorkflowRunActions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586676746934337772206998657CU22";
+ string actionName = "HTTP";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // invoke the operation
+ WorkflowRunActionResource result = await workflowRunAction.GetAsync();
+
+ // 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
+ WorkflowRunActionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // List expression traces
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetExpressionTraces_ListExpressionTraces()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRunActions_ListExpressionTraces.json
+ // this example is just showing the usage of "WorkflowRunActions_ListExpressionTraces" 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 WorkflowRunActionResource created on azure
+ // for more information of creating WorkflowRunActionResource, please refer to the document of WorkflowRunActionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testFlow";
+ string runName = "08586776228332053161046300351";
+ string actionName = "testAction";
+ ResourceIdentifier workflowRunActionResourceId = WorkflowRunActionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName, actionName);
+ WorkflowRunActionResource workflowRunAction = client.GetWorkflowRunActionResource(workflowRunActionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (ExpressionRoot item in workflowRunAction.GetExpressionTracesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs
new file mode 100644
index 0000000000000..ef729a5b377f5
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowRunCollection
+ {
+ // List workflow runs
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListWorkflowRuns()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRuns_List.json
+ // this example is just showing the usage of "WorkflowRuns_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowRunResource
+ string workflowName = "test-workflow";
+ WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkflowRunResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowRunData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a run for a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetARunForAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRuns_Get.json
+ // this example is just showing the usage of "WorkflowRuns_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowRunResource
+ string workflowName = "test-workflow";
+ WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName);
+
+ // invoke the operation
+ string runName = "08586676746934337772206998657CU22";
+ WorkflowRunResource result = await collection.GetAsync(runName);
+
+ // 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
+ WorkflowRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a run for a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetARunForAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRuns_Get.json
+ // this example is just showing the usage of "WorkflowRuns_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowRunResource
+ string workflowName = "test-workflow";
+ WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName);
+
+ // invoke the operation
+ string runName = "08586676746934337772206998657CU22";
+ bool result = await collection.ExistsAsync(runName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a run for a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetARunForAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRuns_Get.json
+ // this example is just showing the usage of "WorkflowRuns_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowRunResource
+ string workflowName = "test-workflow";
+ WorkflowRunCollection collection = webSite.GetWorkflowRuns(workflowName);
+
+ // invoke the operation
+ string runName = "08586676746934337772206998657CU22";
+ NullableResponse response = await collection.GetIfExistsAsync(runName);
+ WorkflowRunResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs
new file mode 100644
index 0000000000000..44e7014e76c45
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.cs
@@ -0,0 +1,79 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowRunResource
+ {
+ // Get a run for a workflow
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetARunForAWorkflow()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRuns_Get.json
+ // this example is just showing the usage of "WorkflowRuns_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowRunResource created on azure
+ // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586676746934337772206998657CU22";
+ ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName);
+ WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId);
+
+ // invoke the operation
+ WorkflowRunResource result = await workflowRun.GetAsync();
+
+ // 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
+ WorkflowRunData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Cancel a workflow run
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Cancel_CancelAWorkflowRun()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowRuns_Cancel.json
+ // this example is just showing the usage of "WorkflowRuns_Cancel" 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 WorkflowRunResource created on azure
+ // for more information of creating WorkflowRunResource, please refer to the document of WorkflowRunResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string runName = "08586676746934337772206998657CU22";
+ ResourceIdentifier workflowRunResourceId = WorkflowRunResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, runName);
+ WorkflowRunResource workflowRun = client.GetWorkflowRunResource(workflowRunResourceId);
+
+ // invoke the operation
+ await workflowRun.CancelAsync();
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs
new file mode 100644
index 0000000000000..581d8812e1e45
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowTriggerCollection
+ {
+ // List workflow triggers
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListWorkflowTriggers()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_List.json
+ // this example is just showing the usage of "WorkflowTriggers_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowTriggerResource
+ string workflowName = "test-workflow";
+ WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkflowTriggerResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowTriggerData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a workflow trigger
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowTrigger()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_Get.json
+ // this example is just showing the usage of "WorkflowTriggers_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowTriggerResource
+ string workflowName = "test-workflow";
+ WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName);
+
+ // invoke the operation
+ string triggerName = "manual";
+ WorkflowTriggerResource result = await collection.GetAsync(triggerName);
+
+ // 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
+ WorkflowTriggerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a workflow trigger
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetAWorkflowTrigger()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_Get.json
+ // this example is just showing the usage of "WorkflowTriggers_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowTriggerResource
+ string workflowName = "test-workflow";
+ WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName);
+
+ // invoke the operation
+ string triggerName = "manual";
+ bool result = await collection.ExistsAsync(triggerName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a workflow trigger
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetAWorkflowTrigger()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_Get.json
+ // this example is just showing the usage of "WorkflowTriggers_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowTriggerResource
+ string workflowName = "test-workflow";
+ WorkflowTriggerCollection collection = webSite.GetWorkflowTriggers(workflowName);
+
+ // invoke the operation
+ string triggerName = "manual";
+ NullableResponse response = await collection.GetIfExistsAsync(triggerName);
+ WorkflowTriggerResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowTriggerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs
new file mode 100644
index 0000000000000..78b72ecf3b59b
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowTriggerHistoryCollection
+ {
+ // List a workflow trigger history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListAWorkflowTriggerHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggerHistories_List.json
+ // this example is just showing the usage of "WorkflowTriggerHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testWorkflowName";
+ string triggerName = "testTriggerName";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // get the collection of this WorkflowTriggerHistoryResource
+ WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories();
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkflowTriggerHistoryResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowTriggerHistoryData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a workflow trigger history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowTriggerHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggerHistories_Get.json
+ // this example is just showing the usage of "WorkflowTriggerHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testWorkflowName";
+ string triggerName = "testTriggerName";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // get the collection of this WorkflowTriggerHistoryResource
+ WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories();
+
+ // invoke the operation
+ string historyName = "08586676746934337772206998657CU22";
+ WorkflowTriggerHistoryResource result = await collection.GetAsync(historyName);
+
+ // 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
+ WorkflowTriggerHistoryData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a workflow trigger history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetAWorkflowTriggerHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggerHistories_Get.json
+ // this example is just showing the usage of "WorkflowTriggerHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testWorkflowName";
+ string triggerName = "testTriggerName";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // get the collection of this WorkflowTriggerHistoryResource
+ WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories();
+
+ // invoke the operation
+ string historyName = "08586676746934337772206998657CU22";
+ bool result = await collection.ExistsAsync(historyName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a workflow trigger history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetAWorkflowTriggerHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggerHistories_Get.json
+ // this example is just showing the usage of "WorkflowTriggerHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testWorkflowName";
+ string triggerName = "testTriggerName";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // get the collection of this WorkflowTriggerHistoryResource
+ WorkflowTriggerHistoryCollection collection = workflowTrigger.GetWorkflowTriggerHistories();
+
+ // invoke the operation
+ string historyName = "08586676746934337772206998657CU22";
+ NullableResponse response = await collection.GetIfExistsAsync(historyName);
+ WorkflowTriggerHistoryResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowTriggerHistoryData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs
new file mode 100644
index 0000000000000..f31fc816cb655
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowTriggerHistoryResource
+ {
+ // Get a workflow trigger history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowTriggerHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggerHistories_Get.json
+ // this example is just showing the usage of "WorkflowTriggerHistories_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowTriggerHistoryResource created on azure
+ // for more information of creating WorkflowTriggerHistoryResource, please refer to the document of WorkflowTriggerHistoryResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testWorkflowName";
+ string triggerName = "testTriggerName";
+ string historyName = "08586676746934337772206998657CU22";
+ ResourceIdentifier workflowTriggerHistoryResourceId = WorkflowTriggerHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName);
+ WorkflowTriggerHistoryResource workflowTriggerHistory = client.GetWorkflowTriggerHistoryResource(workflowTriggerHistoryResourceId);
+
+ // invoke the operation
+ WorkflowTriggerHistoryResource result = await workflowTriggerHistory.GetAsync();
+
+ // 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
+ WorkflowTriggerHistoryData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Resubmit a workflow run based on the trigger history
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Resubmit_ResubmitAWorkflowRunBasedOnTheTriggerHistory()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggerHistories_Resubmit.json
+ // this example is just showing the usage of "WorkflowTriggerHistories_Resubmit" 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 WorkflowTriggerHistoryResource created on azure
+ // for more information of creating WorkflowTriggerHistoryResource, please refer to the document of WorkflowTriggerHistoryResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testWorkflowName";
+ string triggerName = "testTriggerName";
+ string historyName = "testHistoryName";
+ ResourceIdentifier workflowTriggerHistoryResourceId = WorkflowTriggerHistoryResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName, historyName);
+ WorkflowTriggerHistoryResource workflowTriggerHistory = client.GetWorkflowTriggerHistoryResource(workflowTriggerHistoryResourceId);
+
+ // invoke the operation
+ await workflowTriggerHistory.ResubmitAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs
new file mode 100644
index 0000000000000..7c7ef9fa0b854
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.AppService.Models;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowTriggerResource
+ {
+ // Get a workflow trigger
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowTrigger()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_Get.json
+ // this example is just showing the usage of "WorkflowTriggers_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string triggerName = "manual";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // invoke the operation
+ WorkflowTriggerResource result = await workflowTrigger.GetAsync();
+
+ // 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
+ WorkflowTriggerData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get the callback URL for a trigger
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetCallbackUrl_GetTheCallbackURLForATrigger()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_ListCallbackUrl.json
+ // this example is just showing the usage of "WorkflowTriggers_ListCallbackUrl" 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 WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string triggerName = "manual";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // invoke the operation
+ WorkflowTriggerCallbackUri result = await workflowTrigger.GetCallbackUrlAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Run a workflow trigger
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Run_RunAWorkflowTrigger()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_Run.json
+ // this example is just showing the usage of "WorkflowTriggers_Run" 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 WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string triggerName = "recurrence";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // invoke the operation
+ await workflowTrigger.RunAsync(WaitUntil.Completed);
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get trigger schema
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetSchemaJson_GetTriggerSchema()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowTriggers_GetSchemaJson.json
+ // this example is just showing the usage of "WorkflowTriggers_GetSchemaJson" 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 WorkflowTriggerResource created on azure
+ // for more information of creating WorkflowTriggerResource, please refer to the document of WorkflowTriggerResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "testResourceGroup";
+ string name = "test-name";
+ string workflowName = "testWorkflow";
+ string triggerName = "testTrigger";
+ ResourceIdentifier workflowTriggerResourceId = WorkflowTriggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, triggerName);
+ WorkflowTriggerResource workflowTrigger = client.GetWorkflowTriggerResource(workflowTriggerResourceId);
+
+ // invoke the operation
+ JsonSchema result = await workflowTrigger.GetSchemaJsonAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs
new file mode 100644
index 0000000000000..dbc5713adb99e
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowVersionCollection
+ {
+ // List a workflows versions
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetAll_ListAWorkflowsVersions()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowVersions_List.json
+ // this example is just showing the usage of "WorkflowVersions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowVersionResource
+ string workflowName = "test-workflow";
+ WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkflowVersionResource item in collection.GetAllAsync())
+ {
+ // the variable item 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
+ WorkflowVersionData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine($"Succeeded");
+ }
+
+ // Get a workflow version
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowVersion()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowVersions_Get.json
+ // this example is just showing the usage of "WorkflowVersions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowVersionResource
+ string workflowName = "test-workflow";
+ WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName);
+
+ // invoke the operation
+ string versionId = "08586676824806722526";
+ WorkflowVersionResource result = await collection.GetAsync(versionId);
+
+ // 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
+ WorkflowVersionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ // Get a workflow version
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Exists_GetAWorkflowVersion()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowVersions_Get.json
+ // this example is just showing the usage of "WorkflowVersions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowVersionResource
+ string workflowName = "test-workflow";
+ WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName);
+
+ // invoke the operation
+ string versionId = "08586676824806722526";
+ bool result = await collection.ExistsAsync(versionId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ // Get a workflow version
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task GetIfExists_GetAWorkflowVersion()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowVersions_Get.json
+ // this example is just showing the usage of "WorkflowVersions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WebSiteResource created on azure
+ // for more information of creating WebSiteResource, please refer to the document of WebSiteResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ ResourceIdentifier webSiteResourceId = WebSiteResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name);
+ WebSiteResource webSite = client.GetWebSiteResource(webSiteResourceId);
+
+ // get the collection of this WorkflowVersionResource
+ string workflowName = "test-workflow";
+ WorkflowVersionCollection collection = webSite.GetWorkflowVersions(workflowName);
+
+ // invoke the operation
+ string versionId = "08586676824806722526";
+ NullableResponse response = await collection.GetIfExistsAsync(versionId);
+ WorkflowVersionResource result = response.HasValue ? response.Value : null;
+
+ if (result == null)
+ {
+ Console.WriteLine($"Succeeded with null as result");
+ }
+ else
+ {
+ // 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
+ WorkflowVersionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs
new file mode 100644
index 0000000000000..b87a268674046
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+
+namespace Azure.ResourceManager.AppService.Samples
+{
+ public partial class Sample_WorkflowVersionResource
+ {
+ // Get a workflow version
+ [NUnit.Framework.Test]
+ [NUnit.Framework.Ignore("Only verifying that the sample builds")]
+ public async Task Get_GetAWorkflowVersion()
+ {
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2024-04-01/examples/WorkflowVersions_Get.json
+ // this example is just showing the usage of "WorkflowVersions_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
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkflowVersionResource created on azure
+ // for more information of creating WorkflowVersionResource, please refer to the document of WorkflowVersionResource
+ string subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
+ string resourceGroupName = "test-resource-group";
+ string name = "test-name";
+ string workflowName = "test-workflow";
+ string versionId = "08586676824806722526";
+ ResourceIdentifier workflowVersionResourceId = WorkflowVersionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name, workflowName, versionId);
+ WorkflowVersionResource workflowVersion = client.GetWorkflowVersionResource(workflowVersionResourceId);
+
+ // invoke the operation
+ WorkflowVersionResource result = await workflowVersion.GetAsync();
+
+ // 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
+ WorkflowVersionData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs
index ca8f8d5ea11c7..c8fba557f9a71 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAs
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string name
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -257,7 +257,7 @@ public virtual Response Get(string name, CancellationTok
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -403,7 +403,7 @@ public virtual Response Exists(string name, CancellationToken cancellation
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsA
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateData.cs
index 2d2f8175d1c1c..8acd7bac3fa08 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateData.cs
@@ -86,7 +86,7 @@ public AppCertificateData(AzureLocation location) : base(location)
/// Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".
/// CNAME of the certificate to be issued via free certificate.
/// Method of domain validation for free cert.
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// Keeps track of any properties unknown to the library.
internal AppCertificateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string password, string friendlyName, string subjectName, IList hostNames, byte[] pfxBlob, string siteName, string selfLink, string issuer, DateTimeOffset? issueOn, DateTimeOffset? expireOn, string thumbprintString, bool? isValid, byte[] cerBlob, string publicKeyHash, HostingEnvironmentProfile hostingEnvironmentProfile, ResourceIdentifier keyVaultId, string keyVaultSecretName, KeyVaultSecretStatus? keyVaultSecretStatus, ResourceIdentifier serverFarmId, string canonicalName, string domainValidationMethod, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
@@ -183,7 +183,7 @@ internal AppCertificateData()
/// Method of domain validation for free cert.
[WirePath("properties.domainValidationMethod")]
public string DomainValidationMethod { get; set; }
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
[WirePath("kind")]
public string Kind { get; set; }
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs
index ebea65ab843e0..6ab2153151c6d 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.cs
@@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(AppCerti
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs
index 908ecb0891251..8cbf23b75964d 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -113,7 +113,7 @@ public virtual async Task> CreateOrU
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -252,7 +252,7 @@ public virtual Response Get(string name, Cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -398,7 +398,7 @@ public virtual Response Exists(string name, CancellationToken cancellation
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -443,7 +443,7 @@ public virtual async Task> GetIf
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateData.cs
index 0704420ae6272..a4e6d5e31379a 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateData.cs
@@ -67,7 +67,7 @@ public AppServiceCertificateData(AzureLocation location) : base(location)
/// Key Vault resource Id.
/// Key Vault secret name.
/// Status of the Key Vault secret.
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// Keeps track of any properties unknown to the library.
internal AppServiceCertificateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier keyVaultId, string keyVaultSecretName, KeyVaultSecretStatus? provisioningState, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
@@ -92,7 +92,7 @@ internal AppServiceCertificateData()
/// Status of the Key Vault secret.
[WirePath("properties.provisioningState")]
public KeyVaultSecretStatus? ProvisioningState { get; }
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
[WirePath("kind")]
public string Kind { get; set; }
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs
index ef6623da02946..e4e6eab277679 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -114,7 +114,7 @@ public virtual async Task> Crea
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -208,7 +208,7 @@ public virtual async Task> GetAsync
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -253,7 +253,7 @@ public virtual Response Get(string certifica
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string certificateOrderNam
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -399,7 +399,7 @@ public virtual Response Exists(string certificateOrderName, CancellationTo
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -444,7 +444,7 @@ public virtual async Task>
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderData.cs
index 88028086dccf5..f6bbd2d52fcdd 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderData.cs
@@ -86,7 +86,7 @@ public AppServiceCertificateOrderData(AzureLocation location) : base(location)
/// Reasons why App Service Certificate is not renewable at the current moment.
/// Time stamp when the certificate would be auto renewed next.
/// Contact info.
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// Keeps track of any properties unknown to the library.
internal AppServiceCertificateOrderData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, IDictionary certificates, string distinguishedName, string domainVerificationToken, int? validityInYears, int? keySize, CertificateProductType? productType, bool? isAutoRenew, ProvisioningState? provisioningState, CertificateOrderStatus? status, AppServiceCertificateDetails signedCertificate, string csr, AppServiceCertificateDetails intermediate, AppServiceCertificateDetails root, string serialNumber, DateTimeOffset? lastCertificateIssuedOn, DateTimeOffset? expireOn, bool? isPrivateKeyExternal, IReadOnlyList appServiceCertificateNotRenewableReasons, DateTimeOffset? nextAutoRenewTimeStamp, CertificateOrderContact contact, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
@@ -179,7 +179,7 @@ internal AppServiceCertificateOrderData()
/// Contact info.
[WirePath("properties.contact")]
public CertificateOrderContact Contact { get; }
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
[WirePath("kind")]
public string Kind { get; set; }
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs
index 4ef0df0656c6c..667aeb2808a90 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.cs
@@ -110,7 +110,7 @@ public virtual AppServiceCertificateCollection GetAppServiceCertificates()
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task> GetAppService
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -179,7 +179,7 @@ public virtual CertificateOrderDetectorCollection GetCertificateOrderDetectors()
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -213,7 +213,7 @@ public virtual async Task> GetCertifi
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -247,7 +247,7 @@ public virtual Response GetCertificateOrderDet
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -287,7 +287,7 @@ public virtual async Task> GetAsync
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -327,7 +327,7 @@ public virtual Response Get(CancellationToke
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -371,7 +371,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -415,7 +415,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -457,7 +457,7 @@ public virtual async Task> UpdateAs
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -499,7 +499,7 @@ public virtual Response Update(AppServiceCer
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -541,7 +541,7 @@ public virtual async Task ReissueAsync(ReissueCertificateOrderContent
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -583,7 +583,7 @@ public virtual Response Reissue(ReissueCertificateOrderContent content, Cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -625,7 +625,7 @@ public virtual async Task RenewAsync(RenewCertificateOrderContent cont
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -667,7 +667,7 @@ public virtual Response Renew(RenewCertificateOrderContent content, Cancellation
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -705,7 +705,7 @@ public virtual async Task ResendEmailAsync(CancellationToken cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -743,7 +743,7 @@ public virtual Response ResendEmail(CancellationToken cancellationToken = defaul
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -785,7 +785,7 @@ public virtual async Task ResendRequestEmailsAsync(AppServiceDomainNam
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -827,7 +827,7 @@ public virtual Response ResendRequestEmails(AppServiceDomainNameIdentifier nameI
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -869,7 +869,7 @@ public virtual async Task> RetrieveSiteSealAsync(SiteSealCont
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -911,7 +911,7 @@ public virtual Response RetrieveSiteSeal(SiteSealContent content, Canc
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -949,7 +949,7 @@ public virtual async Task VerifyDomainOwnershipAsync(CancellationToken
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -987,7 +987,7 @@ public virtual Response VerifyDomainOwnership(CancellationToken cancellationToke
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1016,7 +1016,7 @@ public virtual AsyncPageable RetrieveCertificateActionsA
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1045,7 +1045,7 @@ public virtual Pageable RetrieveCertificateActions(Cance
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1074,7 +1074,7 @@ public virtual AsyncPageable RetrieveCertificateEmai
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs
index a854272bb62e1..617d32e408578 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.cs
@@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(A
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs
index cbb85219f2ac9..cca7a23809b56 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdate
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string do
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -253,7 +253,7 @@ public virtual Response Get(string domainName, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cance
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string domainName, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -399,7 +399,7 @@ public virtual Response Exists(string domainName, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -444,7 +444,7 @@ public virtual async Task> GetIfExist
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainData.cs
index 6013366065bf0..51be30c5bc055 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainData.cs
@@ -90,7 +90,7 @@ public AppServiceDomainData(AzureLocation location) : base(location)
/// Azure DNS Zone to use.
/// Target DNS type (would be used for migration).
///
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// Keeps track of any properties unknown to the library.
internal AppServiceDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, RegistrationContactInfo contactAdmin, RegistrationContactInfo contactBilling, RegistrationContactInfo contactRegistrant, RegistrationContactInfo contactTech, AppServiceDomainStatus? registrationStatus, ProvisioningState? provisioningState, IReadOnlyList nameServers, bool? isDomainPrivacyEnabled, DateTimeOffset? createdOn, DateTimeOffset? expireOn, DateTimeOffset? lastRenewedOn, bool? isAutoRenew, bool? isDnsRecordManagementReady, IReadOnlyList managedHostNames, DomainPurchaseConsent consent, IReadOnlyList domainNotRenewableReasons, AppServiceDnsType? dnsType, string dnsZoneId, AppServiceDnsType? targetDnsType, string authCode, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
@@ -186,7 +186,7 @@ internal AppServiceDomainData()
/// Gets or sets the auth code.
[WirePath("properties.authCode")]
public string AuthCode { get; set; }
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
[WirePath("kind")]
public string Kind { get; set; }
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs
index 2bee5a5425df4..c0f01a5807407 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs
@@ -109,7 +109,7 @@ public virtual DomainOwnershipIdentifierCollection GetDomainOwnershipIdentifiers
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -140,7 +140,7 @@ public virtual async Task> GetDomain
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -171,7 +171,7 @@ public virtual Response GetDomainOwnershipIde
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceHardDeleteDom
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(AppSer
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -425,7 +425,7 @@ public virtual Response Update(AppServiceDomainPatch p
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -463,7 +463,7 @@ public virtual async Task RenewAsync(CancellationToken cancellationTok
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -487,5 +487,81 @@ public virtual Response Renew(CancellationToken cancellationToken = default)
throw;
}
}
+
+ ///
+ /// Transfer out domain to another registrar
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut
+ ///
+ /// -
+ /// Operation Id
+ /// Domains_TransferOut
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> TransferOutAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _appServiceDomainDomainsClientDiagnostics.CreateScope("AppServiceDomainResource.TransferOut");
+ scope.Start();
+ try
+ {
+ var response = await _appServiceDomainDomainsRestClient.TransferOutAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new AppServiceDomainResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Transfer out domain to another registrar
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/transferOut
+ ///
+ /// -
+ /// Operation Id
+ /// Domains_TransferOut
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response TransferOut(CancellationToken cancellationToken = default)
+ {
+ using var scope = _appServiceDomainDomainsClientDiagnostics.CreateScope("AppServiceDomainResource.TransferOut");
+ scope.Start();
+ try
+ {
+ var response = _appServiceDomainDomainsRestClient.TransferOut(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new AppServiceDomainResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
}
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs
index 22dc6fa11af7e..312b8c5ad4feb 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -114,7 +114,7 @@ public virtual async Task> CreateOrU
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -253,7 +253,7 @@ public virtual Response Get(string name, Cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -444,7 +444,7 @@ public virtual async Task> GetIf
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs
index 3f5f1824a7e07..a92005cc84f83 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.Serialization.cs
@@ -150,6 +150,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
writer.WritePropertyName("hasLinuxWorkers"u8);
writer.WriteBooleanValue(HasLinuxWorkers.Value);
}
+ if (Optional.IsDefined(UpgradePreference))
+ {
+ writer.WritePropertyName("upgradePreference"u8);
+ writer.WriteStringValue(UpgradePreference.Value.ToString());
+ }
if (Optional.IsDefined(DedicatedHostCount))
{
writer.WritePropertyName("dedicatedHostCount"u8);
@@ -160,6 +165,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea
writer.WritePropertyName("zoneRedundant"u8);
writer.WriteBooleanValue(IsZoneRedundant.Value);
}
+ if (Optional.IsDefined(CustomDnsSuffixConfiguration))
+ {
+ writer.WritePropertyName("customDnsSuffixConfiguration"u8);
+ writer.WriteObjectValue(CustomDnsSuffixConfiguration, options);
+ }
+ if (Optional.IsDefined(NetworkingConfiguration))
+ {
+ writer.WritePropertyName("networkingConfiguration"u8);
+ writer.WriteObjectValue(NetworkingConfiguration, options);
+ }
+ if (options.Format != "W" && Optional.IsDefined(UpgradeAvailability))
+ {
+ writer.WritePropertyName("upgradeAvailability"u8);
+ writer.WriteStringValue(UpgradeAvailability.Value.ToString());
+ }
writer.WriteEndObject();
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -220,8 +240,12 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J
IList clusterSettings = default;
IList userWhitelistedIPRanges = default;
bool? hasLinuxWorkers = default;
+ UpgradePreference? upgradePreference = default;
int? dedicatedHostCount = default;
bool? zoneRedundant = default;
+ CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = default;
+ AseV3NetworkingConfigurationData networkingConfiguration = default;
+ UpgradeAvailability? upgradeAvailability = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -411,6 +435,15 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J
hasLinuxWorkers = property0.Value.GetBoolean();
continue;
}
+ if (property0.NameEquals("upgradePreference"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ upgradePreference = new UpgradePreference(property0.Value.GetString());
+ continue;
+ }
if (property0.NameEquals("dedicatedHostCount"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -429,6 +462,33 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J
zoneRedundant = property0.Value.GetBoolean();
continue;
}
+ if (property0.NameEquals("customDnsSuffixConfiguration"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ customDnsSuffixConfiguration = CustomDnsSuffixConfigurationData.DeserializeCustomDnsSuffixConfigurationData(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("networkingConfiguration"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ networkingConfiguration = AseV3NetworkingConfigurationData.DeserializeAseV3NetworkingConfigurationData(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("upgradeAvailability"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ upgradeAvailability = new UpgradeAvailability(property0.Value.GetString());
+ continue;
+ }
}
continue;
}
@@ -459,8 +519,12 @@ internal static AppServiceEnvironmentData DeserializeAppServiceEnvironmentData(J
clusterSettings ?? new ChangeTrackingList(),
userWhitelistedIPRanges ?? new ChangeTrackingList(),
hasLinuxWorkers,
+ upgradePreference,
dedicatedHostCount,
zoneRedundant,
+ customDnsSuffixConfiguration,
+ networkingConfiguration,
+ upgradeAvailability,
kind,
serializedAdditionalRawData);
}
@@ -860,6 +924,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradePreference), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" upgradePreference: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(UpgradePreference))
+ {
+ builder.Append(" upgradePreference: ");
+ builder.AppendLine($"'{UpgradePreference.Value.ToString()}'");
+ }
+ }
+
hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DedicatedHostCount), out propertyOverride);
if (hasPropertyOverride)
{
@@ -891,6 +970,51 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CustomDnsSuffixConfiguration), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" customDnsSuffixConfiguration: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(CustomDnsSuffixConfiguration))
+ {
+ builder.Append(" customDnsSuffixConfiguration: ");
+ BicepSerializationHelpers.AppendChildObject(builder, CustomDnsSuffixConfiguration, options, 4, false, " customDnsSuffixConfiguration: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NetworkingConfiguration), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" networkingConfiguration: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(NetworkingConfiguration))
+ {
+ builder.Append(" networkingConfiguration: ");
+ BicepSerializationHelpers.AppendChildObject(builder, NetworkingConfiguration, options, 4, false, " networkingConfiguration: ");
+ }
+ }
+
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(UpgradeAvailability), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" upgradeAvailability: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(UpgradeAvailability))
+ {
+ builder.Append(" upgradeAvailability: ");
+ builder.AppendLine($"'{UpgradeAvailability.Value.ToString()}'");
+ }
+ }
+
builder.AppendLine(" }");
builder.AppendLine("}");
return BinaryData.FromString(builder.ToString());
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs
index 1ef631910c4a8..8f44c57767001 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs
@@ -83,11 +83,15 @@ public AppServiceEnvironmentData(AzureLocation location) : base(location)
/// Custom settings for changing the behavior of the App Service Environment.
/// User added ip ranges to whitelist on ASE db.
/// Flag that displays whether an ASE has linux workers or not.
+ /// Upgrade Preference.
/// Dedicated Host Count.
/// Whether or not this App Service Environment is zone-redundant.
- /// Kind of resource.
+ /// Full view of the custom domain suffix configuration for ASEv3.
+ /// Full view of networking configuration for an ASE.
+ /// Whether an upgrade is available for this App Service Environment.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// Keeps track of any properties unknown to the library.
- internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, int? dedicatedHostCount, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ProvisioningState? provisioningState, HostingEnvironmentStatus? status, AppServiceVirtualNetworkProfile virtualNetwork, LoadBalancingMode? internalLoadBalancingMode, string multiSize, int? multiRoleCount, int? ipSslAddressCount, string dnsSuffix, int? maximumNumberOfMachines, int? frontEndScaleFactor, bool? isSuspended, IList clusterSettings, IList userWhitelistedIPRanges, bool? hasLinuxWorkers, UpgradePreference? upgradePreference, int? dedicatedHostCount, bool? isZoneRedundant, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration, AseV3NetworkingConfigurationData networkingConfiguration, UpgradeAvailability? upgradeAvailability, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
ProvisioningState = provisioningState;
Status = status;
@@ -103,8 +107,12 @@ internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceT
ClusterSettings = clusterSettings;
UserWhitelistedIPRanges = userWhitelistedIPRanges;
HasLinuxWorkers = hasLinuxWorkers;
+ UpgradePreference = upgradePreference;
DedicatedHostCount = dedicatedHostCount;
IsZoneRedundant = isZoneRedundant;
+ CustomDnsSuffixConfiguration = customDnsSuffixConfiguration;
+ NetworkingConfiguration = networkingConfiguration;
+ UpgradeAvailability = upgradeAvailability;
Kind = kind;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -159,13 +167,25 @@ internal AppServiceEnvironmentData()
/// Flag that displays whether an ASE has linux workers or not.
[WirePath("properties.hasLinuxWorkers")]
public bool? HasLinuxWorkers { get; }
+ /// Upgrade Preference.
+ [WirePath("properties.upgradePreference")]
+ public UpgradePreference? UpgradePreference { get; set; }
/// Dedicated Host Count.
[WirePath("properties.dedicatedHostCount")]
public int? DedicatedHostCount { get; set; }
/// Whether or not this App Service Environment is zone-redundant.
[WirePath("properties.zoneRedundant")]
public bool? IsZoneRedundant { get; set; }
- /// Kind of resource.
+ /// Full view of the custom domain suffix configuration for ASEv3.
+ [WirePath("properties.customDnsSuffixConfiguration")]
+ public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; }
+ /// Full view of networking configuration for an ASE.
+ [WirePath("properties.networkingConfiguration")]
+ public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; }
+ /// Whether an upgrade is available for this App Service Environment.
+ [WirePath("properties.upgradeAvailability")]
+ public UpgradeAvailability? UpgradeAvailability { get; }
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
[WirePath("kind")]
public string Kind { get; set; }
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs
index 8fe4c55b7a80f..3484ea9af8d92 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs
@@ -119,7 +119,7 @@ public virtual HostingEnvironmentDetectorCollection GetHostingEnvironmentDetecto
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -153,7 +153,7 @@ public virtual async Task> GetHosti
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -174,6 +174,13 @@ public virtual Response GetHostingEnvironmen
return GetHostingEnvironmentDetectors().Get(detectorName, startTime, endTime, timeGrain, cancellationToken);
}
+ /// Gets an object representing a CustomDnsSuffixConfigurationResource along with the instance operations that can be performed on it in the AppServiceEnvironment.
+ /// Returns a object.
+ public virtual CustomDnsSuffixConfigurationResource GetCustomDnsSuffixConfiguration()
+ {
+ return new CustomDnsSuffixConfigurationResource(Client, Id.AppendChildResource("configurations", "customdnssuffix"));
+ }
+
/// Gets an object representing a AseV3NetworkingConfigurationResource along with the instance operations that can be performed on it in the AppServiceEnvironment.
/// Returns a object.
public virtual AseV3NetworkingConfigurationResource GetAseV3NetworkingConfiguration()
@@ -208,7 +215,7 @@ public virtual HostingEnvironmentWorkerPoolCollection GetHostingEnvironmentWorke
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -239,7 +246,7 @@ public virtual async Task> GetHos
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -277,7 +284,7 @@ public virtual HostingEnvironmentPrivateEndpointConnectionCollection GetHostingE
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -308,7 +315,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -346,7 +353,7 @@ public virtual HostingEnvironmentRecommendationCollection GetHostingEnvironmentR
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -379,7 +386,7 @@ public virtual async Task> Ge
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -412,7 +419,7 @@ public virtual Response GetHostingEnvi
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -452,7 +459,7 @@ public virtual async Task> GetAsync(Canc
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -492,7 +499,7 @@ public virtual Response Get(CancellationToken can
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -535,7 +542,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? f
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -578,7 +585,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? forceDelete = null
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -620,7 +627,7 @@ public virtual async Task> UpdateAsync(A
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -662,7 +669,7 @@ public virtual Response Update(AppServiceEnvironm
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -688,7 +695,7 @@ public virtual AsyncPageable GetCapacitiesAsync(CancellationToken
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -714,7 +721,7 @@ public virtual Pageable GetCapacities(CancellationToken cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -748,7 +755,7 @@ public virtual async Task> GetVipIn
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -782,7 +789,7 @@ public virtual Response GetVipInfo(Cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -811,7 +818,7 @@ public virtual AsyncPageable GetDiagnosticsAsync(
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -840,7 +847,7 @@ public virtual Pageable GetDiagnostics(Cancellati
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -879,7 +886,7 @@ public virtual async Task> GetDiagnostic
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -918,7 +925,7 @@ public virtual Response GetDiagnosticsItem(string
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -948,7 +955,7 @@ public virtual AsyncPageable GetInboundNetworkDepend
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -965,6 +972,166 @@ public virtual Pageable GetInboundNetworkDependencie
return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => InboundEnvironmentEndpoint.DeserializeInboundEnvironmentEndpoint(e), _appServiceEnvironmentClientDiagnostics, Pipeline, "AppServiceEnvironmentResource.GetInboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken);
}
+ ///
+ /// Send a test notification that an upgrade is available for this App Service Environment.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification
+ ///
+ /// -
+ /// Operation Id
+ /// AppServiceEnvironments_TestUpgradeAvailableNotification
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task TestUpgradeAvailableNotificationAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.TestUpgradeAvailableNotification");
+ scope.Start();
+ try
+ {
+ var response = await _appServiceEnvironmentRestClient.TestUpgradeAvailableNotificationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Send a test notification that an upgrade is available for this App Service Environment.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/testUpgradeAvailableNotification
+ ///
+ /// -
+ /// Operation Id
+ /// AppServiceEnvironments_TestUpgradeAvailableNotification
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response TestUpgradeAvailableNotification(CancellationToken cancellationToken = default)
+ {
+ using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.TestUpgradeAvailableNotification");
+ scope.Start();
+ try
+ {
+ var response = _appServiceEnvironmentRestClient.TestUpgradeAvailableNotification(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Description for Initiate an upgrade of an App Service Environment if one is available.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade
+ ///
+ /// -
+ /// Operation Id
+ /// AppServiceEnvironments_Upgrade
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// 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 UpgradeAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.Upgrade");
+ scope.Start();
+ try
+ {
+ var response = await _appServiceEnvironmentRestClient.UpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new AppServiceArmOperation(_appServiceEnvironmentClientDiagnostics, Pipeline, _appServiceEnvironmentRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Description for Initiate an upgrade of an App Service Environment if one is available.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/upgrade
+ ///
+ /// -
+ /// Operation Id
+ /// AppServiceEnvironments_Upgrade
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-01
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// 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 Upgrade(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _appServiceEnvironmentClientDiagnostics.CreateScope("AppServiceEnvironmentResource.Upgrade");
+ scope.Start();
+ try
+ {
+ var response = _appServiceEnvironmentRestClient.Upgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var operation = new AppServiceArmOperation(_appServiceEnvironmentClientDiagnostics, Pipeline, _appServiceEnvironmentRestClient.CreateUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
///
/// Description for List all currently running operations on the App Service Environment.
///
@@ -978,7 +1145,7 @@ public virtual Pageable GetInboundNetworkDependencie
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1007,7 +1174,7 @@ public virtual AsyncPageable GetOperationsAsync(Cancellatio
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1036,7 +1203,7 @@ public virtual Pageable GetOperations(CancellationToken can
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1066,7 +1233,7 @@ public virtual AsyncPageable GetOutboundNetworkDepe
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1096,7 +1263,7 @@ public virtual Pageable GetOutboundNetworkDependenc
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1125,7 +1292,7 @@ public virtual AsyncPageable GetPrivateLinkRe
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1154,7 +1321,7 @@ public virtual Pageable GetPrivateLinkResourc
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1192,7 +1359,7 @@ public virtual async Task RebootAsync(CancellationToken cancellationTo
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1230,7 +1397,7 @@ public virtual Response Reboot(CancellationToken cancellationToken = default)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1260,7 +1427,7 @@ public virtual AsyncPageable GetAppServicePlansAsync(Can
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1290,7 +1457,7 @@ public virtual Pageable GetAppServicePlans(CancellationT
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1321,7 +1488,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null,
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1352,7 +1519,7 @@ public virtual Pageable GetUsages(string filter = null, Cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -1380,7 +1547,7 @@ public virtual AsyncPageable GetHistoryForHostingEnvir
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -1408,7 +1575,7 @@ public virtual Pageable GetHistoryForHostingEnvironmen
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1440,7 +1607,7 @@ public virtual AsyncPageable GetRecommendedRulesForHos
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -1472,7 +1639,7 @@ public virtual Pageable GetRecommendedRulesForHostingE
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -1510,7 +1677,7 @@ public virtual async Task DisableAllForHostingEnvironmentRecommendatio
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -1548,7 +1715,7 @@ public virtual Response DisableAllForHostingEnvironmentRecommendation(string env
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -1586,7 +1753,7 @@ public virtual async Task ResetAllFiltersForHostingEnvironmentRecommen
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs
index cc94166be4a02..7a8f5eb346479 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string name
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -253,7 +253,7 @@ public virtual Response Get(string name, CancellationTok
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string name, CancellationT
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -399,7 +399,7 @@ public virtual Response Exists(string name, CancellationToken cancellation
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs
index 76806472f82df..abc9a3b34e4f8 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.Serialization.cs
@@ -113,6 +113,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("maximumNumberOfWorkers"u8);
writer.WriteNumberValue(MaximumNumberOfWorkers.Value);
}
+ if (options.Format != "W" && Optional.IsDefined(NumberOfWorkers))
+ {
+ writer.WritePropertyName("numberOfWorkers"u8);
+ writer.WriteNumberValue(NumberOfWorkers.Value);
+ }
if (options.Format != "W" && Optional.IsDefined(GeoRegion))
{
writer.WritePropertyName("geoRegion"u8);
@@ -272,6 +277,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele
string subscription = default;
HostingEnvironmentProfile hostingEnvironmentProfile = default;
int? maximumNumberOfWorkers = default;
+ int? numberOfWorkers = default;
string geoRegion = default;
bool? perSiteScaling = default;
bool? elasticScaleEnabled = default;
@@ -406,6 +412,15 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele
maximumNumberOfWorkers = property0.Value.GetInt32();
continue;
}
+ if (property0.NameEquals("numberOfWorkers"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ numberOfWorkers = property0.Value.GetInt32();
+ continue;
+ }
if (property0.NameEquals("geoRegion"u8))
{
geoRegion = property0.Value.GetString();
@@ -577,6 +592,7 @@ internal static AppServicePlanData DeserializeAppServicePlanData(JsonElement ele
subscription,
hostingEnvironmentProfile,
maximumNumberOfWorkers,
+ numberOfWorkers,
geoRegion,
perSiteScaling,
elasticScaleEnabled,
@@ -857,6 +873,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options)
}
}
+ hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NumberOfWorkers), out propertyOverride);
+ if (hasPropertyOverride)
+ {
+ builder.Append(" numberOfWorkers: ");
+ builder.AppendLine(propertyOverride);
+ }
+ else
+ {
+ if (Optional.IsDefined(NumberOfWorkers))
+ {
+ builder.Append(" numberOfWorkers: ");
+ builder.AppendLine($"{NumberOfWorkers.Value}");
+ }
+ }
+
hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(GeoRegion), out propertyOverride);
if (hasPropertyOverride)
{
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs
index 0df390b456421..c8d276f0e2017 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs
@@ -72,6 +72,7 @@ public AppServicePlanData(AzureLocation location) : base(location)
/// App Service plan subscription.
/// Specification for the App Service Environment to use for the App Service plan.
/// Maximum number of instances that can be assigned to this App Service plan.
+ /// The number of instances that are assigned to this App Service plan.
/// Geographical location for the App Service plan.
///
/// If <code>true</code>, apps assigned to this App Service plan can be scaled independently.
@@ -95,9 +96,9 @@ public AppServicePlanData(AzureLocation location) : base(location)
/// If <code>true</code>, this App Service Plan will perform availability zone balancing.
/// If <code>false</code>, this App Service Plan will not perform availability zone balancing.
///
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// Keeps track of any properties unknown to the library.
- internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AppServiceSkuDescription sku, ExtendedLocation extendedLocation, string workerTierName, AppServicePlanStatus? status, string subscription, HostingEnvironmentProfile hostingEnvironmentProfile, int? maximumNumberOfWorkers, int? numberOfWorkers, string geoRegion, bool? isPerSiteScaling, bool? isElasticScaleEnabled, int? maximumElasticWorkerCount, int? numberOfSites, bool? isSpot, DateTimeOffset? spotExpireOn, DateTimeOffset? freeOfferExpireOn, string resourceGroup, bool? isReserved, bool? isXenon, bool? isHyperV, int? targetWorkerCount, int? targetWorkerSizeId, ProvisioningState? provisioningState, KubeEnvironmentProfile kubeEnvironmentProfile, bool? isZoneRedundant, string kind, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
Sku = sku;
ExtendedLocation = extendedLocation;
@@ -106,6 +107,7 @@ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType res
Subscription = subscription;
HostingEnvironmentProfile = hostingEnvironmentProfile;
MaximumNumberOfWorkers = maximumNumberOfWorkers;
+ NumberOfWorkers = numberOfWorkers;
GeoRegion = geoRegion;
IsPerSiteScaling = isPerSiteScaling;
IsElasticScaleEnabled = isElasticScaleEnabled;
@@ -153,6 +155,9 @@ internal AppServicePlanData()
/// Maximum number of instances that can be assigned to this App Service plan.
[WirePath("properties.maximumNumberOfWorkers")]
public int? MaximumNumberOfWorkers { get; }
+ /// The number of instances that are assigned to this App Service plan.
+ [WirePath("properties.numberOfWorkers")]
+ public int? NumberOfWorkers { get; }
/// Geographical location for the App Service plan.
[WirePath("properties.geoRegion")]
public string GeoRegion { get; }
@@ -210,7 +215,7 @@ internal AppServicePlanData()
///
[WirePath("properties.zoneRedundant")]
public bool? IsZoneRedundant { get; set; }
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
[WirePath("kind")]
public string Kind { get; set; }
}
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs
index 830e99597febb..8601bd37e0b7c 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayCollection.cs
@@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -108,7 +108,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -155,7 +155,7 @@ public virtual Response Ge
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -200,7 +200,7 @@ public virtual async Task> ExistsAsync(string namespaceName, stri
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -245,7 +245,7 @@ public virtual Response Exists(string namespaceName, string relayName, Can
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -292,7 +292,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs
index d8d211613afbc..bd4d796e9843f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs
@@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -144,7 +144,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -184,7 +184,7 @@ public virtual Response Ge
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -310,7 +310,7 @@ public virtual async Task> GetHybridConnectionKeys
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -348,7 +348,7 @@ public virtual Response GetHybridConnectionKeys(Cancellatio
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -378,7 +378,7 @@ public virtual AsyncPageable GetWebAppsByHybridConnectionAsync(Cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs
index 30b75cb4ce6c1..0d9a120c40518 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.cs
@@ -110,7 +110,7 @@ public virtual AppServicePlanHybridConnectionNamespaceRelayCollection GetAppServ
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -142,7 +142,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -188,7 +188,7 @@ public virtual AppServicePlanVirtualNetworkConnectionCollection GetAppServicePla
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -219,7 +219,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -250,7 +250,7 @@ public virtual Response GetAppSe
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -290,7 +290,7 @@ public virtual async Task> GetAsync(Cancellatio
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -330,7 +330,7 @@ public virtual Response Get(CancellationToken cancellati
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -374,7 +374,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -418,7 +418,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -460,7 +460,7 @@ public virtual async Task> UpdateAsync(AppServi
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -502,7 +502,7 @@ public virtual Response Update(AppServicePlanPatch patch
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -531,7 +531,7 @@ public virtual AsyncPageable GetCapabilitiesAsync(Cance
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -560,7 +560,7 @@ public virtual Pageable GetCapabilities(CancellationTok
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -590,7 +590,7 @@ public virtual AsyncPageable GetHybridConnectionRelaysAsyn
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -620,7 +620,7 @@ public virtual Pageable GetHybridConnectionRelays(Cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -659,7 +659,7 @@ public virtual async Task RestartWebAppsAsync(bool? softRestart = null
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -698,7 +698,7 @@ public virtual Response RestartWebApps(bool? softRestart = null, CancellationTok
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -731,7 +731,7 @@ public virtual AsyncPageable GetWebAppsAsync(string skipToken = nul
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -764,7 +764,7 @@ public virtual Pageable GetWebApps(string skipToken = null, string
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -802,7 +802,7 @@ public virtual async Task> GetServerFarmSkusAsync(Cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -840,7 +840,7 @@ public virtual Response GetServerFarmSkus(CancellationToken cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -871,7 +871,7 @@ public virtual AsyncPageable GetUsagesAsync(string filter = null,
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -902,7 +902,7 @@ public virtual Pageable GetUsages(string filter = null, Cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -941,7 +941,7 @@ public virtual async Task RebootWorkerAsync(string workerName, Cancell
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs
index a7d865f88448a..c463b2b0fbd7b 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -109,7 +109,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -154,7 +154,7 @@ public virtual Response Get(stri
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -183,7 +183,7 @@ public virtual AsyncPageable Get
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -212,7 +212,7 @@ public virtual Pageable GetAll(C
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string vnetName, Cancellat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -298,7 +298,7 @@ public virtual Response Exists(string vnetName, CancellationToken cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -343,7 +343,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs
index fbe4f13d37bd0..e380dc999c24a 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayCollection.cs
@@ -61,7 +61,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -112,7 +112,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -163,7 +163,7 @@ public virtual ArmOperation
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -208,7 +208,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -253,7 +253,7 @@ public virtual Response G
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -296,7 +296,7 @@ public virtual async Task> ExistsAsync(string gatewayName, Cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -339,7 +339,7 @@ public virtual Response Exists(string gatewayName, CancellationToken cance
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -384,7 +384,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs
index c133f49d82759..f8478e19ff97a 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.cs
@@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -142,7 +142,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -182,7 +182,7 @@ public virtual Response G
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -230,7 +230,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs
index f9f6ab2791811..8f1452cf4cd17 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.cs
@@ -110,7 +110,7 @@ public virtual AppServicePlanVirtualNetworkConnectionGatewayCollection GetAppSer
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -172,7 +172,7 @@ public virtual Response G
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -212,7 +212,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -252,7 +252,7 @@ public virtual Response Get(Canc
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -281,7 +281,7 @@ public virtual AsyncPageable GetRoutesForVnetAsyn
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -310,7 +310,7 @@ public virtual Pageable GetRoutesForVnet(Cancella
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -351,7 +351,7 @@ public virtual async Task> CreateOrUpdat
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -392,7 +392,7 @@ public virtual Response CreateOrUpdateVnetRoute(s
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -431,7 +431,7 @@ public virtual async Task DeleteVnetRouteAsync(string routeName, Cance
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -470,7 +470,7 @@ public virtual Response DeleteVnetRoute(string routeName, CancellationToken canc
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
@@ -511,7 +511,7 @@ public virtual async Task> UpdateVnetRou
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
///
///
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs
index d28eb31fe3d54..6a7784a39b305 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -116,7 +116,7 @@ public virtual async Task> CreateO
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(Wait
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -212,7 +212,7 @@ public virtual async Task> GetAsync(st
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -257,7 +257,7 @@ public virtual Response Get(string sourceContro
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Cancel
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToke
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string sourceControlType,
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -403,7 +403,7 @@ public virtual Response Exists(string sourceControlType, CancellationToken
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -448,7 +448,7 @@ public virtual async Task> Get
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs
index fe8c2b25d8ea5..2c57a3cc4fc29 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.cs
@@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -139,7 +139,7 @@ public virtual async Task> GetAsync(Ca
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -179,7 +179,7 @@ public virtual Response Get(CancellationToken c
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
@@ -227,7 +227,7 @@ public virtual async Task> UpdateA
///
/// -
/// Default Api Version
- /// 2021-02-01
+ /// 2024-04-01
///
/// -
/// Resource
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs
index aac85ad334168..43fef6a1c50ad 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs
@@ -45,7 +45,7 @@ public static partial class ArmAppServiceModelFactory
/// Reasons why App Service Certificate is not renewable at the current moment.
/// Time stamp when the certificate would be auto renewed next.
/// Contact info.
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// A new instance for mocking.
public static AppServiceCertificateOrderData AppServiceCertificateOrderData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, IDictionary certificates = null, string distinguishedName = null, string domainVerificationToken = null, int? validityInYears = null, int? keySize = null, CertificateProductType? productType = null, bool? isAutoRenew = null, ProvisioningState? provisioningState = null, CertificateOrderStatus? status = null, AppServiceCertificateDetails signedCertificate = null, string csr = null, AppServiceCertificateDetails intermediate = null, AppServiceCertificateDetails root = null, string serialNumber = null, DateTimeOffset? lastCertificateIssuedOn = null, DateTimeOffset? expireOn = null, bool? isPrivateKeyExternal = null, IEnumerable appServiceCertificateNotRenewableReasons = null, DateTimeOffset? nextAutoRenewTimeStamp = null, CertificateOrderContact contact = null, string kind = null)
{
@@ -202,7 +202,7 @@ public static AppServiceCertificateOrderPatch AppServiceCertificateOrderPatch(Re
/// Key Vault resource Id.
/// Key Vault secret name.
/// Status of the Key Vault secret.
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// A new instance for mocking.
public static AppServiceCertificateData AppServiceCertificateData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier keyVaultId = null, string keyVaultSecretName = null, KeyVaultSecretStatus? provisioningState = null, string kind = null)
{
@@ -305,47 +305,21 @@ public static SiteSeal SiteSeal(string html = null)
}
/// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
/// Action type.
/// Time at which the certificate action was performed.
- /// Kind of resource.
/// A new instance for mocking.
- public static CertificateOrderAction CertificateOrderAction(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null, string kind = null)
+ public static CertificateOrderAction CertificateOrderAction(CertificateOrderActionType? actionType = null, DateTimeOffset? createdOn = null)
{
- return new CertificateOrderAction(
- id,
- name,
- resourceType,
- systemData,
- actionType,
- createdOn,
- kind,
- serializedAdditionalRawData: null);
+ return new CertificateOrderAction(actionType, createdOn, serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
/// Email id.
/// Time stamp.
- /// Kind of resource.
/// A new instance for mocking.
- public static AppServiceCertificateEmail AppServiceCertificateEmail(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string emailId = null, DateTimeOffset? timeStamp = null, string kind = null)
+ public static AppServiceCertificateEmail AppServiceCertificateEmail(string emailId = null, DateTimeOffset? timeStamp = null)
{
- return new AppServiceCertificateEmail(
- id,
- name,
- resourceType,
- systemData,
- emailId,
- timeStamp,
- kind,
- serializedAdditionalRawData: null);
+ return new AppServiceCertificateEmail(emailId, timeStamp, serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
@@ -596,7 +570,7 @@ public static DomainAvailabilityCheckResult DomainAvailabilityCheckResult(string
/// Azure DNS Zone to use.
/// Target DNS type (would be used for migration).
///
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// A new instance for mocking.
public static AppServiceDomainData AppServiceDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, RegistrationContactInfo contactAdmin = null, RegistrationContactInfo contactBilling = null, RegistrationContactInfo contactRegistrant = null, RegistrationContactInfo contactTech = null, AppServiceDomainStatus? registrationStatus = null, ProvisioningState? provisioningState = null, IEnumerable nameServers = null, bool? isDomainPrivacyEnabled = null, DateTimeOffset? createdOn = null, DateTimeOffset? expireOn = null, DateTimeOffset? lastRenewedOn = null, bool? isAutoRenew = null, bool? isDnsRecordManagementReady = null, IEnumerable managedHostNames = null, DomainPurchaseConsent consent = null, IEnumerable domainNotRenewableReasons = null, AppServiceDnsType? dnsType = null, string dnsZoneId = null, AppServiceDnsType? targetDnsType = null, string authCode = null, string kind = null)
{
@@ -808,11 +782,15 @@ public static TldLegalAgreement TldLegalAgreement(string agreementKey = null, st
/// Custom settings for changing the behavior of the App Service Environment.
/// User added ip ranges to whitelist on ASE db.
/// Flag that displays whether an ASE has linux workers or not.
+ /// Upgrade Preference.
/// Dedicated Host Count.
/// Whether or not this App Service Environment is zone-redundant.
- /// Kind of resource.
+ /// Full view of the custom domain suffix configuration for ASEv3.
+ /// Full view of networking configuration for an ASE.
+ /// Whether an upgrade is available for this App Service Environment.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// A new instance for mocking.
- public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null)
+ public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, UpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, UpgradeAvailability? upgradeAvailability = null, string kind = null)
{
tags ??= new Dictionary();
clusterSettings ??= new List();
@@ -839,8 +817,12 @@ public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdenti
clusterSettings?.ToList(),
userWhitelistedIPRanges?.ToList(),
hasLinuxWorkers,
+ upgradePreference,
dedicatedHostCount,
isZoneRedundant,
+ customDnsSuffixConfiguration,
+ networkingConfiguration,
+ upgradeAvailability,
kind,
serializedAdditionalRawData: null);
}
@@ -863,10 +845,14 @@ public static AppServiceEnvironmentData AppServiceEnvironmentData(ResourceIdenti
/// Custom settings for changing the behavior of the App Service Environment.
/// User added ip ranges to whitelist on ASE db.
/// Flag that displays whether an ASE has linux workers or not.
+ /// Upgrade Preference.
/// Dedicated Host Count.
/// Whether or not this App Service Environment is zone-redundant.
+ /// Full view of the custom domain suffix configuration for ASEv3.
+ /// Full view of networking configuration for an ASE.
+ /// Whether an upgrade is available for this App Service Environment.
/// A new instance for mocking.
- public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null)
+ public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, UpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, UpgradeAvailability? upgradeAvailability = null)
{
clusterSettings ??= new List();
userWhitelistedIPRanges ??= new List();
@@ -886,8 +872,12 @@ public static AppServiceEnvironmentProperties AppServiceEnvironmentProperties(Pr
clusterSettings?.ToList(),
userWhitelistedIPRanges?.ToList(),
hasLinuxWorkers,
+ upgradePreference,
dedicatedHostCount,
isZoneRedundant,
+ customDnsSuffixConfiguration,
+ networkingConfiguration,
+ upgradeAvailability,
serializedAdditionalRawData: null);
}
@@ -902,6 +892,73 @@ public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(Re
return new AppServiceVirtualNetworkProfile(id, name, resourceType, subnet, serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ ///
+ ///
+ /// The default custom domain suffix to use for all sites deployed on the ASE.
+ /// The URL referencing the Azure Key Vault certificate secret that should be used as the default SSL/TLS certificate for sites with the custom domain suffix.
+ /// The user-assigned identity to use for resolving the key vault certificate reference. If not specified, the system-assigned ASE identity will be used if available.
+ /// Kind of resource.
+ /// A new instance for mocking.
+ public static CustomDnsSuffixConfigurationData CustomDnsSuffixConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CustomDnsSuffixProvisioningState? provisioningState = null, string provisioningDetails = null, string dnsSuffix = null, Uri certificateUri = null, string keyVaultReferenceIdentity = null, string kind = null)
+ {
+ return new CustomDnsSuffixConfigurationData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ provisioningState,
+ provisioningDetails,
+ dnsSuffix,
+ certificateUri,
+ keyVaultReferenceIdentity,
+ kind,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ ///
+ ///
+ ///
+ ///
+ /// Property to enable and disable new private endpoint connection creation on ASE.
+ /// Property to enable and disable FTP on ASEV3.
+ /// Property to enable and disable Remote Debug on ASEV3.
+ /// Customer provided Inbound IP Address. Only able to be set on Ase create.
+ /// Kind of resource.
+ /// A new instance for mocking.
+ public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, bool? ftpEnabled = null, bool? remoteDebugEnabled = null, string inboundIPAddressOverride = null, string kind = null)
+ {
+ windowsOutboundIPAddresses ??= new List();
+ linuxOutboundIPAddresses ??= new List();
+ externalInboundIPAddresses ??= new List();
+ internalInboundIPAddresses ??= new List();
+
+ return new AseV3NetworkingConfigurationData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ windowsOutboundIPAddresses?.ToList(),
+ linuxOutboundIPAddresses?.ToList(),
+ externalInboundIPAddresses?.ToList(),
+ internalInboundIPAddresses?.ToList(),
+ allowNewPrivateEndpointConnections,
+ ftpEnabled,
+ remoteDebugEnabled,
+ inboundIPAddressOverride,
+ kind,
+ serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -924,11 +981,15 @@ public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(Re
/// Custom settings for changing the behavior of the App Service Environment.
/// User added ip ranges to whitelist on ASE db.
/// Flag that displays whether an ASE has linux workers or not.
+ /// Upgrade Preference.
/// Dedicated Host Count.
/// Whether or not this App Service Environment is zone-redundant.
+ /// Full view of the custom domain suffix configuration for ASEv3.
+ /// Full view of networking configuration for an ASE.
+ /// Whether an upgrade is available for this App Service Environment.
/// Kind of resource.
/// A new instance for mocking.
- public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, string kind = null)
+ public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisioningState? provisioningState = null, HostingEnvironmentStatus? status = null, AppServiceVirtualNetworkProfile virtualNetwork = null, LoadBalancingMode? internalLoadBalancingMode = null, string multiSize = null, int? multiRoleCount = null, int? ipSslAddressCount = null, string dnsSuffix = null, int? maximumNumberOfMachines = null, int? frontEndScaleFactor = null, bool? isSuspended = null, IEnumerable clusterSettings = null, IEnumerable userWhitelistedIPRanges = null, bool? hasLinuxWorkers = null, UpgradePreference? upgradePreference = null, int? dedicatedHostCount = null, bool? isZoneRedundant = null, CustomDnsSuffixConfigurationData customDnsSuffixConfiguration = null, AseV3NetworkingConfigurationData networkingConfiguration = null, UpgradeAvailability? upgradeAvailability = null, string kind = null)
{
clusterSettings ??= new List();
userWhitelistedIPRanges ??= new List();
@@ -952,8 +1013,12 @@ public static AppServiceEnvironmentPatch AppServiceEnvironmentPatch(ResourceIden
clusterSettings?.ToList(),
userWhitelistedIPRanges?.ToList(),
hasLinuxWorkers,
+ upgradePreference,
dedicatedHostCount,
isZoneRedundant,
+ customDnsSuffixConfiguration,
+ networkingConfiguration,
+ upgradeAvailability,
kind,
serializedAdditionalRawData: null);
}
@@ -1007,9 +1072,9 @@ public static StampCapacity StampCapacity(string name = null, long? availableCap
/// Additional virtual IPs.
/// Kind of resource.
/// A new instance for mocking.
- public static AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IPAddress serviceIPAddress = null, IPAddress internalIPAddress = null, IEnumerable outboundIPAddresses = null, IEnumerable virtualIPMappings = null, string kind = null)
+ public static AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressResult(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, System.Net.IPAddress serviceIPAddress = null, System.Net.IPAddress internalIPAddress = null, IEnumerable outboundIPAddresses = null, IEnumerable virtualIPMappings = null, string kind = null)
{
- outboundIPAddresses ??= new List();
+ outboundIPAddresses ??= new List();
virtualIPMappings ??= new List();
return new AppServiceEnvironmentAddressResult(
@@ -1025,39 +1090,6 @@ public static AppServiceEnvironmentAddressResult AppServiceEnvironmentAddressRes
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- ///
- ///
- ///
- ///
- /// Property to enable and disable new private endpoint connection creation on ASE.
- /// Kind of resource.
- /// A new instance for mocking.
- public static AseV3NetworkingConfigurationData AseV3NetworkingConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable windowsOutboundIPAddresses = null, IEnumerable linuxOutboundIPAddresses = null, IEnumerable externalInboundIPAddresses = null, IEnumerable internalInboundIPAddresses = null, bool? allowNewPrivateEndpointConnections = null, string kind = null)
- {
- windowsOutboundIPAddresses ??= new List();
- linuxOutboundIPAddresses ??= new List();
- externalInboundIPAddresses ??= new List();
- internalInboundIPAddresses ??= new List();
-
- return new AseV3NetworkingConfigurationData(
- id,
- name,
- resourceType,
- systemData,
- windowsOutboundIPAddresses?.ToList(),
- linuxOutboundIPAddresses?.ToList(),
- externalInboundIPAddresses?.ToList(),
- internalInboundIPAddresses?.ToList(),
- allowNewPrivateEndpointConnections,
- kind,
- serializedAdditionalRawData: null);
- }
-
/// Initializes a new instance of .
/// Name/identifier of the diagnostics.
/// Diagnostics output.
@@ -1206,9 +1238,9 @@ public static AppServiceUsage AppServiceUsage(ResourceIdentifier id = null, stri
/// Time when operation will expire.
/// Applicable only for stamp operation ids.
/// A new instance for mocking.
- public static AppServiceOperation AppServiceOperation(string id = null, string name = null, AppServiceOperationStatus? status = null, IEnumerable errors = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, DateTimeOffset? expireOn = null, Guid? geoMasterOperationId = null)
+ public static AppServiceOperation AppServiceOperation(string id = null, string name = null, AppServiceOperationStatus? status = null, IEnumerable errors = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, DateTimeOffset? expireOn = null, Guid? geoMasterOperationId = null)
{
- errors ??= new List();
+ errors ??= new List();
return new AppServiceOperation(
id,
@@ -1250,7 +1282,7 @@ public static AppServiceEndpointDependency AppServiceEndpointDependency(string d
/// The time in milliseconds it takes for a TCP connection to be created from the App Service Environment to this IpAddress at this Port.
/// Whether it is possible to create a TCP connection from the App Service Environment to this IpAddress at this Port.
/// A new instance for mocking.
- public static AppServiceEndpointDetail AppServiceEndpointDetail(IPAddress ipAddress = null, int? port = null, double? latency = null, bool? isAccessible = null)
+ public static AppServiceEndpointDetail AppServiceEndpointDetail(System.Net.IPAddress ipAddress = null, int? port = null, double? latency = null, bool? isAccessible = null)
{
return new AppServiceEndpointDetail(ipAddress, port, latency, isAccessible, serializedAdditionalRawData: null);
}
@@ -1266,9 +1298,9 @@ public static AppServiceEndpointDetail AppServiceEndpointDetail(IPAddress ipAddr
/// Private IPAddresses mapped to the remote private endpoint.
/// Kind of resource.
/// A new instance for mocking.
- public static RemotePrivateEndpointConnectionARMResourceData RemotePrivateEndpointConnectionARMResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, ResourceIdentifier privateEndpointId = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, IEnumerable ipAddresses = null, string kind = null)
+ public static RemotePrivateEndpointConnectionARMResourceData RemotePrivateEndpointConnectionARMResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, ResourceIdentifier privateEndpointId = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, IEnumerable ipAddresses = null, string kind = null)
{
- ipAddresses ??= new List();
+ ipAddresses ??= new List();
return new RemotePrivateEndpointConnectionARMResourceData(
id,
@@ -1283,26 +1315,6 @@ public static RemotePrivateEndpointConnectionARMResourceData RemotePrivateEndpoi
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The state of a private link connection.
- /// Kind of resource.
- /// A new instance for mocking.
- public static PrivateLinkConnectionApprovalRequestInfo PrivateLinkConnectionApprovalRequestInfo(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PrivateLinkConnectionState privateLinkServiceConnectionState = null, string kind = null)
- {
- return new PrivateLinkConnectionApprovalRequestInfo(
- id,
- name,
- resourceType,
- systemData,
- privateLinkServiceConnectionState,
- kind,
- serializedAdditionalRawData: null);
- }
-
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -1348,6 +1360,7 @@ public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResou
/// App Service plan subscription.
/// Specification for the App Service Environment to use for the App Service plan.
/// Maximum number of instances that can be assigned to this App Service plan.
+ /// The number of instances that are assigned to this App Service plan.
/// Geographical location for the App Service plan.
///
/// If <code>true</code>, apps assigned to this App Service plan can be scaled independently.
@@ -1371,9 +1384,9 @@ public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResou
/// If <code>true</code>, this App Service Plan will perform availability zone balancing.
/// If <code>false</code>, this App Service Plan will not perform availability zone balancing.
///
- /// Kind of resource.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// A new instance for mocking.
- public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null)
+ public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ExtendedLocation extendedLocation = null, string workerTierName = null, AppServicePlanStatus? status = null, string subscription = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, int? maximumNumberOfWorkers = null, int? numberOfWorkers = null, string geoRegion = null, bool? isPerSiteScaling = null, bool? isElasticScaleEnabled = null, int? maximumElasticWorkerCount = null, int? numberOfSites = null, bool? isSpot = null, DateTimeOffset? spotExpireOn = null, DateTimeOffset? freeOfferExpireOn = null, string resourceGroup = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, int? targetWorkerCount = null, int? targetWorkerSizeId = null, ProvisioningState? provisioningState = null, KubeEnvironmentProfile kubeEnvironmentProfile = null, bool? isZoneRedundant = null, string kind = null)
{
tags ??= new Dictionary();
@@ -1391,6 +1404,7 @@ public static AppServicePlanData AppServicePlanData(ResourceIdentifier id = null
subscription,
hostingEnvironmentProfile,
maximumNumberOfWorkers,
+ numberOfWorkers,
geoRegion,
isPerSiteScaling,
isElasticScaleEnabled,
@@ -1457,7 +1471,16 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i
/// Obsolete: Hyper-V sandbox.
/// Hyper-V sandbox.
/// Last time the app was modified, in UTC. Read-only.
+ /// Property to configure various DNS related settings for a site.
+ /// Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied.
+ /// To enable pulling image over Virtual Network.
+ /// To enable accessing content over virtual network.
+ /// To enable Backup and Restore operations over virtual network.
/// Configuration of the app.
+ /// Configuration specific of the Azure Function app.
+ /// Dapr configuration of the app.
+ /// Workload profile name for function app to execute on.
+ /// Function app resource requirements.
/// Azure Traffic Manager hostnames associated with the app. Read-only.
/// <code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>.
/// Specifies which deployment slot this app will swap into. Read-only.
@@ -1496,15 +1519,19 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i
///
/// Site redundancy mode.
/// Specifies an operation id if this site has a pending operation.
+ /// Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled' or an empty string.
/// Checks if Customer provided storage account is required.
/// Identity to use for Key Vault Reference authentication.
+ /// Specifies the DNL scope of the default hostname.
///
/// Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration.
/// This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}
///
- /// Kind of resource.
+ /// Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}.
+ /// Current SKU of application based on associated App Service Plan. Some valid SKU values are Free, Shared, Basic, Dynamic, FlexConsumption, Standard, Premium, PremiumV2, PremiumV3, Isolated, IsolatedV2.
+ /// Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind.
/// A new instance for mocking.
- public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteConfigProperties siteConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, ResourceIdentifier virtualNetworkSubnetId = null, string kind = null)
+ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ExtendedLocation extendedLocation = null, string state = null, IEnumerable hostNames = null, string repositorySiteName = null, AppServiceUsageState? usageState = null, bool? isEnabled = null, IEnumerable enabledHostNames = null, WebSiteAvailabilityState? availabilityState = null, IEnumerable hostNameSslStates = null, ResourceIdentifier appServicePlanId = null, bool? isReserved = null, bool? isXenon = null, bool? isHyperV = null, DateTimeOffset? lastModifiedTimeUtc = null, SiteDnsConfig dnsConfiguration = null, bool? vnetRouteAllEnabled = null, bool? vnetImagePullEnabled = null, bool? vnetContentShareEnabled = null, bool? vnetBackupRestoreEnabled = null, SiteConfigProperties siteConfig = null, FunctionAppConfig functionAppConfig = null, DaprConfig daprConfig = null, string workloadProfileName = null, ResourceConfig resourceConfig = null, IEnumerable trafficManagerHostNames = null, bool? isScmSiteAlsoStopped = null, string targetSwapSlot = null, HostingEnvironmentProfile hostingEnvironmentProfile = null, bool? isClientAffinityEnabled = null, bool? isClientCertEnabled = null, ClientCertMode? clientCertMode = null, string clientCertExclusionPaths = null, bool? isHostNameDisabled = null, string customDomainVerificationId = null, string outboundIPAddresses = null, string possibleOutboundIPAddresses = null, int? containerSize = null, int? dailyMemoryTimeQuota = null, DateTimeOffset? suspendOn = null, int? maxNumberOfWorkers = null, CloningInfo cloningInfo = null, string resourceGroup = null, bool? isDefaultContainer = null, string defaultHostName = null, SlotSwapStatus slotSwapStatus = null, bool? isHttpsOnly = null, RedundancyMode? redundancyMode = null, Guid? inProgressOperationId = null, string publicNetworkAccess = null, bool? isStorageAccountRequired = null, string keyVaultReferenceIdentity = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, ResourceIdentifier virtualNetworkSubnetId = null, string managedEnvironmentId = null, string sku = null, string kind = null)
{
tags ??= new Dictionary();
hostNames ??= new List();
@@ -1534,7 +1561,16 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name
isXenon,
isHyperV,
lastModifiedTimeUtc,
+ dnsConfiguration,
+ vnetRouteAllEnabled,
+ vnetImagePullEnabled,
+ vnetContentShareEnabled,
+ vnetBackupRestoreEnabled,
siteConfig,
+ functionAppConfig,
+ daprConfig,
+ workloadProfileName,
+ resourceConfig,
trafficManagerHostNames?.ToList(),
isScmSiteAlsoStopped,
targetSwapSlot,
@@ -1559,13 +1595,39 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name
isHttpsOnly,
redundancyMode,
inProgressOperationId,
+ publicNetworkAccess,
isStorageAccountRequired,
keyVaultReferenceIdentity,
+ autoGeneratedDomainNameLabelScope,
virtualNetworkSubnetId,
+ managedEnvironmentId,
+ sku,
kind,
serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// List of custom DNS servers to be used by an app for lookups. Maximum 5 dns servers can be set.
+ /// Alternate DNS server to be used by apps. This property replicates the WEBSITE_DNS_ALT_SERVER app setting.
+ /// Timeout for a single dns lookup in seconds. Allowed range: 1-30. Default is 3.
+ /// Total number of retries for dns lookup. Allowed range: 1-5. Default is 3.
+ /// Custom time for DNS to be cached in seconds. Allowed range: 0-60. Default is 30 seconds. 0 means caching disabled.
+ /// Indicates that sites using Virtual network custom DNS servers are still sorting the list of DNS servers. Read-Only.
+ /// A new instance for mocking.
+ public static SiteDnsConfig SiteDnsConfig(IEnumerable dnsServers = null, string dnsAltServer = null, int? dnsRetryAttemptTimeout = null, int? dnsRetryAttemptCount = null, int? dnsMaxCacheTimeout = null, bool? dnsLegacySortOrder = null)
+ {
+ dnsServers ??= new List();
+
+ return new SiteDnsConfig(
+ dnsServers?.ToList(),
+ dnsAltServer,
+ dnsRetryAttemptTimeout,
+ dnsRetryAttemptCount,
+ dnsMaxCacheTimeout,
+ dnsLegacySortOrder,
+ serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// Number of workers.
/// Default documents.
@@ -1587,6 +1649,7 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name
/// <code>true</code> if detailed error logging is enabled; otherwise, <code>false</code>.
/// Publishing user name.
/// Application settings.
+ /// Application metadata. This property cannot be retrieved, since it may contain secrets.
/// Connection strings.
/// Site MachineKey.
/// Handler mappings.
@@ -1620,10 +1683,13 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name
/// Explicit Managed Service Identity Id.
/// Identity to use for Key Vault Reference authentication.
/// IP security restrictions for main.
+ /// Default action for main access restriction if no rules are matched.
/// IP security restrictions for scm.
+ /// Default action for scm access restriction if no rules are matched.
/// IP security restrictions for scm to use main.
/// Http20Enabled: configures a web site to allow clients to connect over http2.0.
/// MinTlsVersion: configures the minimum version of TLS required for SSL requests.
+ /// The minimum strength TLS cipher suite allowed for an application.
/// ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site.
/// State of FTP / FTPS service.
///
@@ -1634,6 +1700,10 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name
/// Maximum number of workers that a site can scale out to.
/// This setting only applies to the Consumption and Elastic Premium Plans
///
+ ///
+ /// Maximum number of workers that a site can scale out to.
+ /// This setting only applies to apps in plans where ElasticScaleEnabled is <code>true</code>
+ ///
/// Health check path.
///
/// Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled,
@@ -1648,10 +1718,11 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name
/// List of Azure Storage Accounts.
/// Property to allow or block all public traffic.
/// A new instance for mocking.
- public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, IEnumerable scmIPSecurityRestrictions = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null)
+ public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = null, IEnumerable defaultDocuments = null, string netFrameworkVersion = null, string phpVersion = null, string pythonVersion = null, string nodeVersion = null, string powerShellVersion = null, string linuxFxVersion = null, string windowsFxVersion = null, bool? isRequestTracingEnabled = null, DateTimeOffset? requestTracingExpirationOn = null, bool? isRemoteDebuggingEnabled = null, string remoteDebuggingVersion = null, bool? isHttpLoggingEnabled = null, bool? useManagedIdentityCreds = null, string acrUserManagedIdentityId = null, int? logsDirectorySizeLimit = null, bool? isDetailedErrorLoggingEnabled = null, string publishingUsername = null, IEnumerable appSettings = null, IEnumerable metadata = null, IEnumerable connectionStrings = null, SiteMachineKey machineKey = null, IEnumerable handlerMappings = null, string documentRoot = null, ScmType? scmType = null, bool? use32BitWorkerProcess = null, bool? isWebSocketsEnabled = null, bool? isAlwaysOn = null, string javaVersion = null, string javaContainer = null, string javaContainerVersion = null, string appCommandLine = null, ManagedPipelineMode? managedPipelineMode = null, IEnumerable virtualApplications = null, SiteLoadBalancing? loadBalancing = null, IEnumerable experimentsRampUpRules = null, SiteLimits limits = null, bool? isAutoHealEnabled = null, AutoHealRules autoHealRules = null, string tracingOptions = null, string vnetName = null, bool? isVnetRouteAllEnabled = null, int? vnetPrivatePortsCount = null, AppServiceCorsSettings cors = null, WebAppPushSettings push = null, Uri apiDefinitionUri = null, string apiManagementConfigId = null, string autoSwapSlotName = null, bool? isLocalMySqlEnabled = null, int? managedServiceIdentityId = null, int? xManagedServiceIdentityId = null, string keyVaultReferenceIdentity = null, IEnumerable ipSecurityRestrictions = null, DefaultAction? ipSecurityRestrictionsDefaultAction = null, IEnumerable scmIPSecurityRestrictions = null, DefaultAction? scmIPSecurityRestrictionsDefaultAction = null, bool? allowIPSecurityRestrictionsForScmToUseMain = null, bool? isHttp20Enabled = null, AppServiceSupportedTlsVersion? minTlsVersion = null, TlsCipherSuite? minTlsCipherSuite = null, AppServiceSupportedTlsVersion? scmMinTlsVersion = null, AppServiceFtpsState? ftpsState = null, int? preWarmedInstanceCount = null, int? functionAppScaleLimit = null, int? elasticWebAppScaleLimit = null, string healthCheckPath = null, bool? isFunctionsRuntimeScaleMonitoringEnabled = null, string websiteTimeZone = null, int? minimumElasticInstanceCount = null, IDictionary azureStorageAccounts = null, string publicNetworkAccess = null)
{
defaultDocuments ??= new List();
appSettings ??= new List();
+ metadata ??= new List();
connectionStrings ??= new List();
handlerMappings ??= new List();
virtualApplications ??= new List