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 9d4cf1966344..a51240001846 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
@@ -23,7 +23,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -93,7 +93,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/2023-01-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
@@ -123,7 +123,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/2023-01-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
@@ -165,7 +165,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/2023-01-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 1a75d55fdb0c..ae1b05c9345d 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
@@ -24,7 +24,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -87,7 +87,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/2023-01-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
@@ -114,7 +114,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/2023-01-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 000000000000..460b1f0197cd
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateCollection.cs
@@ -0,0 +1,207 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..64e7f6adcb67
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderCollection.cs
@@ -0,0 +1,220 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..53216c24cc61
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateOrderResource.cs
@@ -0,0 +1,408 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..4e52151a39e0
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceCertificateResource.cs
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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 000000000000..4f0370a0eab2
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceDomainCollection.cs
@@ -0,0 +1,250 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 9fc1d9d2835f..6cd14fa18ec0 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
@@ -7,21 +7,194 @@
using System;
using System.Threading.Tasks;
+using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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
@@ -42,5 +215,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/2023-01-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 000000000000..b92125c9218b
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AppServiceEnvironmentCollection.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 fab5079f5d56..4e54820003df 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
@@ -7,22 +7,265 @@
using System;
using System.Threading.Tasks;
+using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.AppService;
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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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
@@ -47,12 +290,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/2023-01-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/2023-01-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/2023-01-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/2023-01-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
@@ -76,5 +403,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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 9df943fe42d1..6ea1039b198e 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
@@ -24,7 +24,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -94,7 +94,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/2023-01-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
@@ -124,7 +124,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/2023-01-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
@@ -166,7 +166,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/2023-01-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 3681934edbbc..10d0635fa354 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
@@ -24,7 +24,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -87,7 +87,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/2023-01-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
@@ -114,7 +114,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/2023-01-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 000000000000..46cb7fdf33ca
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AseV3NetworkingConfigurationResource.cs
@@ -0,0 +1,88 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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 000000000000..fb67bcdbf421
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_AuthsettingsV2SiteConfigResource.cs
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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 fec4ac416e76..1cddeb6a7c63 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
@@ -22,7 +22,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -94,7 +94,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/2023-01-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
@@ -125,7 +125,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/2023-01-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 a64dcf77407d..4d7a1b10994b 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
@@ -21,7 +21,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/2023-01-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 000000000000..f29b30627d93
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppCollection.cs
@@ -0,0 +1,248 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..9d9284f79f66
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_ContainerAppResource.cs
@@ -0,0 +1,222 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..b735d0f74d77
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_CustomDnsSuffixConfigurationResource.cs
@@ -0,0 +1,117 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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 923636ddb8ad..d7076dba4e98 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
@@ -23,7 +23,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -85,7 +85,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/2023-01-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 79074a36c439..1996303add7f 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
@@ -23,7 +23,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -87,7 +87,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/2023-01-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
@@ -117,7 +117,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/2023-01-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 000000000000..f8ebb70fba8e
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierCollection.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..e42b6d4c9dfb
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_DomainOwnershipIdentifierResource.cs
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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 4d67b0767463..a6c24671c4fc 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
@@ -22,7 +22,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -94,7 +94,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/2023-01-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
@@ -125,7 +125,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/2023-01-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 63f3bd937c8f..11a825d372ea 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
@@ -21,7 +21,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/2023-01-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 000000000000..30c683cdcd02
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentMultiRolePoolResource.cs
@@ -0,0 +1,246 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..14f047f345e1
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionCollection.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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";
+ PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ {
+ PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
+ {
+ Status = "Approved",
+ Description = "Approved by johndoe@company.com",
+ },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateEndpointConnectionName, info);
+ 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 000000000000..9be76426e7ca
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentPrivateEndpointConnectionResource.cs
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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
+ PrivateLinkConnectionApprovalRequestInfo info = new PrivateLinkConnectionApprovalRequestInfo()
+ {
+ PrivateLinkServiceConnectionState = new PrivateLinkConnectionState()
+ {
+ Status = "Approved",
+ Description = "Approved by johndoe@company.com",
+ },
+ };
+ ArmOperation lro = await hostingEnvironmentPrivateEndpointConnection.UpdateAsync(WaitUntil.Completed, info);
+ 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/2023-01-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 000000000000..321115408a02
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolCollection.cs
@@ -0,0 +1,207 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..d1e419d9e038
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_HostingEnvironmentWorkerPoolResource.cs
@@ -0,0 +1,214 @@
+// 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;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 8e0621041e15..7a7a3c28ddf9 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
@@ -23,7 +23,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -93,7 +93,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/2023-01-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
@@ -123,7 +123,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/2023-01-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
@@ -165,7 +165,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/2023-01-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 e7a6fc26495b..8b3a4596d00f 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
@@ -24,7 +24,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -87,7 +87,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/2023-01-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
@@ -114,7 +114,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/2023-01-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 000000000000..1d005ba867fb
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryCollection.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..fd95f3568dad
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RequestHistoryResource.cs
@@ -0,0 +1,55 @@
+// 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;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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 36d744e8b718..1e528eeb3820 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
@@ -22,7 +22,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/2023-01-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 000000000000..b32e730212f6
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionCollection.cs
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..dfdf29f96f22
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_RevisionResource.cs
@@ -0,0 +1,135 @@
+// 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;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 4f7cbbf61626..117d0a023e4e 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
@@ -22,7 +22,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/2023-01-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
@@ -53,7 +53,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/2023-01-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 c14ea03a7bdb..9aa466b7217b 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
@@ -22,7 +22,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/2023-01-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
@@ -54,7 +54,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/2023-01-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 000000000000..e1b8040f83b8
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupCollection.cs
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..278de260dfb0
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteBackupResource.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 cdda20d97747..7ce3d4e9fd6f 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
@@ -22,7 +22,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -94,7 +94,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/2023-01-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
@@ -125,7 +125,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/2023-01-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 e182637eb42d..d306972b6b84 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
@@ -21,7 +21,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/2023-01-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 000000000000..6c036335e67d
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuCollection.cs
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..a724b4524e44
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteDeploymentStatuResource.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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 62a3d83b0c23..5d50aa4c8a1a 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
@@ -22,7 +22,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -96,7 +96,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/2023-01-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
@@ -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/2023-01-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
@@ -162,7 +162,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/2023-01-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
@@ -205,7 +205,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/2023-01-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
@@ -240,7 +240,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/2023-01-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
@@ -271,7 +271,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/2023-01-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 48804fabfcf3..c05a5ee4e9cd 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
@@ -21,7 +21,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/2023-01-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
@@ -53,7 +53,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/2023-01-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 08efc623c3fa..68564f7178bc 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
@@ -22,7 +22,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -98,7 +98,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/2023-01-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
@@ -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/2023-01-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
@@ -166,7 +166,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/2023-01-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
@@ -210,7 +210,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/2023-01-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
@@ -246,7 +246,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/2023-01-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
@@ -278,7 +278,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/2023-01-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 f2ce05d62b46..1cb4e6ed5703 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
@@ -22,7 +22,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/2023-01-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
@@ -55,7 +55,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/2023-01-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
@@ -88,7 +88,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/2023-01-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
@@ -117,7 +117,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/2023-01-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 8db4fbc5ba34..67ec77b21a35 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
@@ -22,7 +22,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -96,7 +96,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/2023-01-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
@@ -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/2023-01-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
@@ -162,7 +162,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/2023-01-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
@@ -205,7 +205,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/2023-01-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
@@ -240,7 +240,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/2023-01-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
@@ -271,7 +271,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/2023-01-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 b52fb1ac4e3a..d2472aeeee86 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
@@ -22,7 +22,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -98,7 +98,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/2023-01-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
@@ -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/2023-01-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
@@ -166,7 +166,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/2023-01-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
@@ -210,7 +210,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/2023-01-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
@@ -246,7 +246,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/2023-01-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
@@ -278,7 +278,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/2023-01-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 dfedc5ea8449..c21a39db8606 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
@@ -22,7 +22,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/2023-01-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
@@ -55,7 +55,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/2023-01-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
@@ -88,7 +88,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/2023-01-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
@@ -117,7 +117,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/2023-01-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 db4cf51ed7d1..f963e8746767 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
@@ -21,7 +21,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/2023-01-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
@@ -53,7 +53,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/2023-01-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 000000000000..7dcc071dd9b5
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionCollection.cs
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..a50590d8e343
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionRepetitionResource.cs
@@ -0,0 +1,89 @@
+// 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;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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 000000000000..e4a16aa1c03b
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionCollection.cs
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..ef48236f7411
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteHostruntimeWebhookApiWorkflowRunActionScopeRepetitionResource.cs
@@ -0,0 +1,54 @@
+// 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;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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 b89496fe0d70..7dcf1285f523 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
@@ -22,7 +22,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/2023-01-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
@@ -57,7 +57,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/2023-01-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
@@ -88,7 +88,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/2023-01-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 fd27938d315d..0b3fc823210d 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
@@ -21,7 +21,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/2023-01-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 b6935d0d5568..8cc811f9698b 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
@@ -23,7 +23,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/2023-01-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
@@ -58,7 +58,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/2023-01-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
@@ -89,7 +89,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/2023-01-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
@@ -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/ApproveRejectSitePrivateEndpointConnection.json
+ // Generated from example definition: specification/web/resource-manager/Microsoft.Web/stable/2023-01-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
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 8b2a8087191e..ac640fdf1352 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
@@ -23,7 +23,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/2023-01-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 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/2023-01-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
@@ -97,7 +97,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/2023-01-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 000000000000..fa529e17f12b
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuCollection.cs
@@ -0,0 +1,165 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..a5789dfad9df
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotDeploymentStatuResource.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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 bdb57d52ee0a..64158693a6b5 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
@@ -22,7 +22,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -98,7 +98,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/2023-01-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
@@ -134,7 +134,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/2023-01-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
@@ -166,7 +166,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/2023-01-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
@@ -210,7 +210,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/2023-01-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
@@ -246,7 +246,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/2023-01-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
@@ -278,7 +278,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/2023-01-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 aa9d73a480af..053f5de385d1 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
@@ -21,7 +21,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/2023-01-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
@@ -54,7 +54,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/2023-01-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 225560e4dc3b..62391e819845 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
@@ -22,7 +22,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/2023-01-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
@@ -61,7 +61,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/2023-01-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
@@ -100,7 +100,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/2023-01-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
@@ -137,7 +137,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/2023-01-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
@@ -170,7 +170,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/2023-01-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
@@ -215,7 +215,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/2023-01-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
@@ -252,7 +252,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/2023-01-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
@@ -285,7 +285,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/2023-01-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 c2ae9abacf7d..0236232672ad 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
@@ -22,7 +22,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -90,7 +90,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/2023-01-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
@@ -120,7 +120,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/2023-01-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 1a8118e09141..833a0d7c1969 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
@@ -22,7 +22,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -98,7 +98,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/2023-01-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
@@ -134,7 +134,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/2023-01-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
@@ -166,7 +166,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/2023-01-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
@@ -210,7 +210,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/2023-01-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
@@ -246,7 +246,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/2023-01-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
@@ -278,7 +278,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/2023-01-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 19e030d45653..3da5bdfcbcb8 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
@@ -22,7 +22,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/2023-01-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
@@ -61,7 +61,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/2023-01-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
@@ -100,7 +100,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/2023-01-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
@@ -137,7 +137,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/2023-01-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
@@ -170,7 +170,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/2023-01-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
@@ -215,7 +215,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/2023-01-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
@@ -252,7 +252,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/2023-01-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
@@ -285,7 +285,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/2023-01-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 4b76b445f606..9d10d53a1f1f 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
@@ -22,7 +22,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -90,7 +90,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/2023-01-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
@@ -120,7 +120,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/2023-01-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 cadd09fca11a..5a9673339c68 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
@@ -21,7 +21,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/2023-01-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
@@ -54,7 +54,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/2023-01-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 f8c3906bcc32..cb097b5a6bae 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
@@ -22,7 +22,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/2023-01-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
@@ -58,7 +58,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/2023-01-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
@@ -90,7 +90,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/2023-01-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 d77c031a84ba..a1a711827ea2 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
@@ -21,7 +21,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/2023-01-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 8eeab7695a2e..4e68c5f564bf 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
@@ -23,7 +23,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -91,7 +91,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/2023-01-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
@@ -135,7 +135,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/2023-01-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
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 6bd14f4569f3..40e40c99dd3c 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
@@ -23,7 +23,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/2023-01-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 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/2023-01-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
@@ -99,7 +99,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/2023-01-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 000000000000..636d0e91bd30
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowCollection.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..20c26328e1b5
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteSlotWorkflowResource.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;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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 000000000000..748a2bf546b6
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowCollection.cs
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..c83e5b0e11b0
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_SiteWorkflowResource.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;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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 000000000000..cf0c3c25ae4a
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResource.cs
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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 000000000000..496f8ef5e1af
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBasicAuthPropertiesARMResourceCollection.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 dda864e9a26c..480cf241ec2f 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
@@ -22,7 +22,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -94,7 +94,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/2023-01-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
@@ -125,7 +125,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/2023-01-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 000000000000..c761588ee4da
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionCollection.cs
@@ -0,0 +1,214 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..3a53da042975
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildDatabaseConnectionResource.cs
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..62bb2656b5b7
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendCollection.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..44fa3f6a9bd1
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteBuildLinkedBackendResource.cs
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 58156eed4f3a..f4dd917f2745 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
@@ -23,7 +23,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/2023-01-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
@@ -55,7 +55,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/2023-01-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
@@ -83,7 +83,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/2023-01-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
@@ -119,7 +119,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/2023-01-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
@@ -155,7 +155,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/2023-01-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
@@ -186,7 +186,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/2023-01-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
@@ -214,7 +214,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/2023-01-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
@@ -237,12 +237,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/2023-01-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/2023-01-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 4a9698f5714c..bfede01f7db7 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
@@ -22,7 +22,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -96,7 +96,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/2023-01-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
@@ -128,7 +128,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/2023-01-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
@@ -172,7 +172,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/2023-01-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 b5e44228448a..c716884af2a2 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
@@ -22,7 +22,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/2023-01-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
@@ -55,7 +55,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/2023-01-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
@@ -95,7 +95,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/2023-01-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 241174364c35..9782f9062141 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
@@ -24,7 +24,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -94,7 +94,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/2023-01-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
@@ -124,7 +124,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/2023-01-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
@@ -166,7 +166,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/2023-01-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 8765c8c1afd9..17289ed869db 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
@@ -23,7 +23,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -95,7 +95,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/2023-01-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
@@ -126,7 +126,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/2023-01-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
@@ -169,7 +169,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/2023-01-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 f4dc344f9994..1f05c3ab59c2 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
@@ -23,7 +23,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/2023-01-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
@@ -55,7 +55,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/2023-01-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
@@ -89,7 +89,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/2023-01-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
@@ -117,7 +117,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/2023-01-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 000000000000..19afac8a99b2
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionCollection.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..a73fd479541f
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteDatabaseConnectionResource.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..d050ca66bef8
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendCollection.cs
@@ -0,0 +1,207 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..aa2e056372b8
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_StaticSiteLinkedBackendResource.cs
@@ -0,0 +1,151 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 d9e932f94c3c..79eec86d1bac 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
@@ -23,7 +23,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -95,7 +95,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/2023-01-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
@@ -126,7 +126,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/2023-01-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
@@ -169,7 +169,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/2023-01-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
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 4a961a66fda5..ad65b1f0ec3b 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
@@ -23,7 +23,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/2023-01-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
@@ -55,7 +55,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/2023-01-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
@@ -97,7 +97,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/2023-01-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 e568fa3f057e..d01f534bd7d6 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
@@ -24,7 +24,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/2023-01-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
@@ -56,7 +56,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/2023-01-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
@@ -87,7 +87,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/2023-01-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
@@ -114,7 +114,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/2023-01-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
@@ -146,7 +146,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/2023-01-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
@@ -177,7 +177,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/2023-01-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
@@ -206,7 +206,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/2023-01-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
@@ -239,7 +239,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/2023-01-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
@@ -274,7 +274,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/2023-01-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
@@ -309,7 +309,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/2023-01-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
@@ -344,7 +344,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/2023-01-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
@@ -371,7 +371,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/2023-01-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
@@ -401,7 +401,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/2023-01-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
@@ -428,7 +428,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/2023-01-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
@@ -455,7 +455,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/2023-01-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
@@ -482,7 +482,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/2023-01-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
@@ -509,7 +509,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/2023-01-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
@@ -539,7 +539,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/2023-01-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
@@ -566,12 +566,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/2023-01-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/2023-01-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 91f5f6d39865..bea4d398a979 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
@@ -22,7 +22,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/2023-01-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
@@ -59,7 +59,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/2023-01-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
@@ -94,7 +94,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/2023-01-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
@@ -125,7 +125,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/2023-01-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
@@ -168,7 +168,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/2023-01-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 9b0ac453d8d5..28548b59c6b6 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
@@ -22,7 +22,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/2023-01-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
@@ -54,7 +54,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/2023-01-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
@@ -93,7 +93,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/2023-01-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 580c237f0d56..dc38d4da6135 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
@@ -18,12 +18,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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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
@@ -47,12 +180,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/2023-01-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/2023-01-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/2023-01-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/2023-01-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
@@ -78,12 +296,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/2023-01-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/2023-01-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 4822f373e24e..ff9ba7459358 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
@@ -22,7 +22,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/2023-01-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
@@ -48,7 +48,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/2023-01-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
@@ -74,7 +74,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/2023-01-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
@@ -100,7 +100,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/2023-01-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
@@ -127,7 +127,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/2023-01-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
@@ -154,7 +154,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/2023-01-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
@@ -180,7 +180,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/2023-01-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 8fec7cab1b67..fa044d980677 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
@@ -23,7 +23,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/2023-01-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
@@ -58,7 +58,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/2023-01-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
@@ -91,7 +91,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/2023-01-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
@@ -120,7 +120,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/2023-01-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 20367fecd103..587383a2e527 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
@@ -22,7 +22,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/2023-01-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
@@ -52,7 +52,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/2023-01-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 000000000000..fe654cbde1dd
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteCollection.cs
@@ -0,0 +1,257 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 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/2023-01-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 000000000000..7062676fa2c8
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteConfigResource.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;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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 469cff493da6..d664c339942b 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
@@ -22,7 +22,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/2023-01-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
@@ -53,7 +53,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/2023-01-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 7b669648936e..3a569db06b80 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
@@ -14,17 +14,452 @@
using Azure.ResourceManager;
using Azure.ResourceManager.AppService;
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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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
@@ -55,7 +490,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/2023-01-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
@@ -86,7 +521,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/2023-01-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
@@ -115,7 +550,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/2023-01-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
@@ -142,7 +577,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/2023-01-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
@@ -173,7 +608,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/2023-01-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
@@ -204,7 +639,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/2023-01-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
@@ -235,7 +670,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/2023-01-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
@@ -265,7 +700,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/2023-01-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
@@ -294,7 +729,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/2023-01-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
@@ -315,5 +750,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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 f7153104c288..425381791df5 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
@@ -21,7 +21,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/2023-01-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 000000000000..cd13286852d9
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WebSiteSlotCollection.cs
@@ -0,0 +1,262 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 e79e68a8e333..a6a440e99a7e 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
@@ -22,7 +22,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/2023-01-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
@@ -60,7 +60,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/2023-01-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
@@ -96,7 +96,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/2023-01-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
@@ -128,7 +128,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/2023-01-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 c1ebca8ba72d..6529c387429c 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
@@ -21,7 +21,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/2023-01-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 3cbf8678764b..f1c9bdecc206 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
@@ -22,7 +22,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/2023-01-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
@@ -54,7 +54,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/2023-01-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 e4da874cdb68..2694342b57b6 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
@@ -19,12 +19,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/2023-01-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/2023-01-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/2023-01-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/2023-01-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/2023-01-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
@@ -56,7 +180,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/2023-01-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
@@ -88,7 +212,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/2023-01-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
@@ -118,7 +242,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/2023-01-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
@@ -146,7 +270,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/2023-01-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
@@ -178,7 +302,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/2023-01-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
@@ -210,7 +334,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/2023-01-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
@@ -242,7 +366,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/2023-01-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
@@ -273,7 +397,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/2023-01-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
@@ -303,7 +427,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/2023-01-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
@@ -325,5 +449,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/2023-01-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/2023-01-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 affc6c88048d..a366425793cc 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
@@ -21,7 +21,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/2023-01-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 000000000000..6642fff845b6
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionCollection.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..e801c7fcf703
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunActionResource.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;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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 000000000000..b34ed745ac7b
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunCollection.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..39bc462f7a09
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowRunResource.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;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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 000000000000..f37052040367
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerCollection.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..d5cfc612d8ab
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryCollection.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..35c16d7f75df
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerHistoryResource.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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 000000000000..7095d91a60fa
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowTriggerResource.cs
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..5a536e2c9856
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionCollection.cs
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/2023-01-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/2023-01-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/2023-01-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 000000000000..b167b0672b3e
--- /dev/null
+++ b/sdk/websites/Azure.ResourceManager.AppService/samples/Generated/Samples/Sample_WorkflowVersionResource.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;
+using Azure.ResourceManager;
+using Azure.ResourceManager.AppService;
+
+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/2023-01-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/AppServiceDomainResource.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs
index b91111998bdd..7817d9818f7f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.cs
@@ -405,5 +405,65 @@ 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
+ ///
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ ///
+ /// 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/AppServiceEnvironmentData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs
index 472aadf1b3a9..7a526bd1a68f 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentData.cs
@@ -50,10 +50,14 @@ 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.
+ /// 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.
- 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) : 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) : base(id, name, resourceType, systemData, tags, location)
{
ProvisioningState = provisioningState;
Status = status;
@@ -69,8 +73,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;
}
@@ -105,10 +113,18 @@ internal AppServiceEnvironmentData(ResourceIdentifier id, string name, ResourceT
public IList UserWhitelistedIPRanges { get; }
/// Flag that displays whether an ASE has linux workers or not.
public bool? HasLinuxWorkers { get; }
+ /// Upgrade Preference.
+ public UpgradePreference? UpgradePreference { get; set; }
/// Dedicated Host Count.
public int? DedicatedHostCount { get; set; }
/// Whether or not this App Service Environment is zone-redundant.
public bool? IsZoneRedundant { get; set; }
+ /// Full view of the custom domain suffix configuration for ASEv3.
+ public CustomDnsSuffixConfigurationData CustomDnsSuffixConfiguration { get; set; }
+ /// Full view of networking configuration for an ASE.
+ public AseV3NetworkingConfigurationData NetworkingConfiguration { get; set; }
+ /// Whether an upgrade is available for this App Service Environment.
+ public UpgradeAvailability? UpgradeAvailability { get; }
/// Kind of resource.
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 fafc5bb27471..21c329874967 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.cs
@@ -160,6 +160,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()
@@ -799,6 +806,134 @@ public virtual Pageable GetInboundNetworkDependencie
return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, InboundEnvironmentEndpoint.DeserializeInboundEnvironmentEndpoint, _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
+ ///
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ ///
+ /// 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
+ ///
+ ///
+ ///
+ /// 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.
///
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs
index c4e3c2d39558..57477eac865b 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanData.cs
@@ -40,6 +40,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.
@@ -64,7 +65,7 @@ public AppServicePlanData(AzureLocation location) : base(location)
/// If <code>false</code>, this App Service Plan will not perform availability zone balancing.
///
/// Kind of resource.
- 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) : 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) : base(id, name, resourceType, systemData, tags, location)
{
Sku = sku;
ExtendedLocation = extendedLocation;
@@ -73,6 +74,7 @@ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType res
Subscription = subscription;
HostingEnvironmentProfile = hostingEnvironmentProfile;
MaximumNumberOfWorkers = maximumNumberOfWorkers;
+ NumberOfWorkers = numberOfWorkers;
GeoRegion = geoRegion;
IsPerSiteScaling = isPerSiteScaling;
IsElasticScaleEnabled = isElasticScaleEnabled;
@@ -107,6 +109,8 @@ internal AppServicePlanData(ResourceIdentifier id, string name, ResourceType res
public HostingEnvironmentProfile HostingEnvironmentProfile { get; set; }
/// Maximum number of instances that can be assigned to this App Service plan.
public int? MaximumNumberOfWorkers { get; }
+ /// The number of instances that are assigned to this App Service plan.
+ public int? NumberOfWorkers { get; }
/// Geographical location for the App Service plan.
public string GeoRegion { get; }
///
diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs
index 87c034749a91..3748aa781876 100644
--- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs
+++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ArmAppServiceModelFactory.cs
@@ -9,7 +9,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Net;
-using Azure;
using Azure.Core;
using Azure.ResourceManager.AppService;
using Azure.ResourceManager.Models;
@@ -210,31 +209,21 @@ public static SiteSeal SiteSeal(string html = null)
}
/// Initializes a new instance of CertificateOrderAction.
- /// 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);
+ return new CertificateOrderAction(actionType, createdOn);
}
/// Initializes a new instance of AppServiceCertificateEmail.
- /// 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);
+ return new AppServiceCertificateEmail(emailId, timeStamp);
}
/// Initializes a new instance of AppServiceDetectorData.
@@ -577,17 +566,21 @@ 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.
+ /// 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 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();
userWhitelistedIPRanges ??= new List();
- return new AppServiceEnvironmentData(id, name, resourceType, systemData, tags, location, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant, kind);
+ return new AppServiceEnvironmentData(id, name, resourceType, systemData, tags, location, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, upgradePreference, dedicatedHostCount, isZoneRedundant, customDnsSuffixConfiguration, networkingConfiguration, upgradeAvailability, kind);
}
/// Initializes a new instance of AppServiceEnvironmentProperties.
@@ -608,15 +601,19 @@ 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();
- return new AppServiceEnvironmentProperties(provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant);
+ return new AppServiceEnvironmentProperties(provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, upgradePreference, dedicatedHostCount, isZoneRedundant, customDnsSuffixConfiguration, networkingConfiguration, upgradeAvailability);
}
/// Initializes a new instance of AppServiceVirtualNetworkProfile.
@@ -630,6 +627,48 @@ public static AppServiceVirtualNetworkProfile AppServiceVirtualNetworkProfile(Re
return new AppServiceVirtualNetworkProfile(id, name, resourceType, subnet);
}
+ /// Initializes a new instance of CustomDnsSuffixConfigurationData.
+ /// 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);
+ }
+
+ /// Initializes a new instance of AseV3NetworkingConfigurationData.
+ /// 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);
+ }
+
/// Initializes a new instance of AppServiceEnvironmentPatch.
/// The id.
/// The name.
@@ -652,16 +691,20 @@ 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();
- return new AppServiceEnvironmentPatch(id, name, resourceType, systemData, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, dedicatedHostCount, isZoneRedundant, kind);
+ return new AppServiceEnvironmentPatch(id, name, resourceType, systemData, provisioningState, status, virtualNetwork, internalLoadBalancingMode, multiSize, multiRoleCount, ipSslAddressCount, dnsSuffix, maximumNumberOfMachines, frontEndScaleFactor, isSuspended, clusterSettings?.ToList(), userWhitelistedIPRanges?.ToList(), hasLinuxWorkers, upgradePreference, dedicatedHostCount, isZoneRedundant, customDnsSuffixConfiguration, networkingConfiguration, upgradeAvailability, kind);
}
/// Initializes a new instance of StampCapacity.
@@ -701,36 +744,14 @@ 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(id, name, resourceType, systemData, serviceIPAddress, internalIPAddress, outboundIPAddresses?.ToList(), virtualIPMappings?.ToList(), kind);
}
- /// Initializes a new instance of AseV3NetworkingConfigurationData.
- /// 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);
- }
-
/// Initializes a new instance of HostingEnvironmentDiagnostics.
/// Name/identifier of the diagnostics.
/// Diagnostics output.
@@ -842,9 +863,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, name, status, errors?.ToList(), createdOn, modifiedOn, expireOn, geoMasterOperationId);
}
@@ -877,7 +898,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);
}
@@ -893,9 +914,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, name, resourceType, systemData, provisioningState, privateEndpointId != null ? ResourceManagerModelFactory.SubResource(privateEndpointId) : null, privateLinkServiceConnectionState, ipAddresses?.ToList(), kind);
}
@@ -952,6 +973,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.
@@ -977,11 +999,11 @@ public static AppServicePrivateLinkResourceProperties AppServicePrivateLinkResou
///
/// Kind of resource.
/// 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();
- return new AppServicePlanData(id, name, resourceType, systemData, tags, location, sku, extendedLocation, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpireOn, freeOfferExpireOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind);
+ return new AppServicePlanData(id, name, resourceType, systemData, tags, location, sku, extendedLocation, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, numberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpireOn, freeOfferExpireOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind);
}
/// Initializes a new instance of HostingEnvironmentProfile.
@@ -1029,7 +1051,13 @@ public static KubeEnvironmentProfile KubeEnvironmentProfile(ResourceIdentifier i
/// Obsolete: Hyper-V sandbox.
/// Hyper-V sandbox.
/// Last time the app was modified, in UTC. Read-only.
+ /// 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.
/// Configuration of the 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.
@@ -1068,15 +1096,17 @@ 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.
///
/// 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}
///
+ /// 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}.
/// Kind of resource.
/// 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, bool? vnetRouteAllEnabled = null, bool? vnetImagePullEnabled = null, bool? vnetContentShareEnabled = null, SiteConfigProperties siteConfig = 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, ResourceIdentifier virtualNetworkSubnetId = null, string managedEnvironmentId = null, string kind = null)
{
tags ??= new Dictionary();
hostNames ??= new List();
@@ -1084,7 +1114,7 @@ public static WebSiteData WebSiteData(ResourceIdentifier id = null, string name
hostNameSslStates ??= new List();
trafficManagerHostNames ??= new List();
- return new WebSiteData(id, name, resourceType, systemData, tags, location, identity, extendedLocation, state, hostNames?.ToList(), repositorySiteName, usageState, isEnabled, enabledHostNames?.ToList(), availabilityState, hostNameSslStates?.ToList(), appServicePlanId, isReserved, isXenon, isHyperV, lastModifiedTimeUtc, siteConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, hostingEnvironmentProfile, isClientAffinityEnabled, isClientCertEnabled, clientCertMode, clientCertExclusionPaths, isHostNameDisabled, customDomainVerificationId, outboundIPAddresses, possibleOutboundIPAddresses, containerSize, dailyMemoryTimeQuota, suspendOn, maxNumberOfWorkers, cloningInfo, resourceGroup, isDefaultContainer, defaultHostName, slotSwapStatus, isHttpsOnly, redundancyMode, inProgressOperationId, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, kind);
+ return new WebSiteData(id, name, resourceType, systemData, tags, location, identity, extendedLocation, state, hostNames?.ToList(), repositorySiteName, usageState, isEnabled, enabledHostNames?.ToList(), availabilityState, hostNameSslStates?.ToList(), appServicePlanId, isReserved, isXenon, isHyperV, lastModifiedTimeUtc, vnetRouteAllEnabled, vnetImagePullEnabled, vnetContentShareEnabled, siteConfig, daprConfig, workloadProfileName, resourceConfig, trafficManagerHostNames?.ToList(), isScmSiteAlsoStopped, targetSwapSlot, hostingEnvironmentProfile, isClientAffinityEnabled, isClientCertEnabled, clientCertMode, clientCertExclusionPaths, isHostNameDisabled, customDomainVerificationId, outboundIPAddresses, possibleOutboundIPAddresses, containerSize, dailyMemoryTimeQuota, suspendOn, maxNumberOfWorkers, cloningInfo, resourceGroup, isDefaultContainer, defaultHostName, slotSwapStatus, isHttpsOnly, redundancyMode, inProgressOperationId, publicNetworkAccess, isStorageAccountRequired, keyVaultReferenceIdentity, virtualNetworkSubnetId, managedEnvironmentId, kind);
}
/// Initializes a new instance of SiteConfigProperties.
@@ -1108,6 +1138,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.
@@ -1141,10 +1172,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.
///
@@ -1155,6 +1189,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,
@@ -1169,10 +1207,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();
@@ -1181,7 +1220,7 @@ public static SiteConfigProperties SiteConfigProperties(int? numberOfWorkers = n
scmIPSecurityRestrictions ??= new List();
azureStorageAccounts ??= new Dictionary();
- return new SiteConfigProperties(numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), scmIPSecurityRestrictions?.ToList(), allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess);
+ return new SiteConfigProperties(numberOfWorkers, defaultDocuments?.ToList(), netFrameworkVersion, phpVersion, pythonVersion, nodeVersion, powerShellVersion, linuxFxVersion, windowsFxVersion, isRequestTracingEnabled, requestTracingExpirationOn, isRemoteDebuggingEnabled, remoteDebuggingVersion, isHttpLoggingEnabled, useManagedIdentityCreds, acrUserManagedIdentityId, logsDirectorySizeLimit, isDetailedErrorLoggingEnabled, publishingUsername, appSettings?.ToList(), metadata?.ToList(), connectionStrings?.ToList(), machineKey, handlerMappings?.ToList(), documentRoot, scmType, use32BitWorkerProcess, isWebSocketsEnabled, isAlwaysOn, javaVersion, javaContainer, javaContainerVersion, appCommandLine, managedPipelineMode, virtualApplications?.ToList(), loadBalancing, experimentsRampUpRules != null ? new RoutingRuleExperiments(experimentsRampUpRules?.ToList()) : null, limits, isAutoHealEnabled, autoHealRules, tracingOptions, vnetName, isVnetRouteAllEnabled, vnetPrivatePortsCount, cors, push, apiDefinitionUri != null ? new AppServiceApiDefinitionInfo(apiDefinitionUri) : null, apiManagementConfigId != null ? new ApiManagementConfig(apiManagementConfigId) : null, autoSwapSlotName, isLocalMySqlEnabled, managedServiceIdentityId, xManagedServiceIdentityId, keyVaultReferenceIdentity, ipSecurityRestrictions?.ToList(), ipSecurityRestrictionsDefaultAction, scmIPSecurityRestrictions?.ToList(), scmIPSecurityRestrictionsDefaultAction, allowIPSecurityRestrictionsForScmToUseMain, isHttp20Enabled, minTlsVersion, minTlsCipherSuite, scmMinTlsVersion, ftpsState, preWarmedInstanceCount, functionAppScaleLimit, elasticWebAppScaleLimit, healthCheckPath, isFunctionsRuntimeScaleMonitoringEnabled, websiteTimeZone, minimumElasticInstanceCount, azureStorageAccounts, publicNetworkAccess);
}
/// Initializes a new instance of SiteMachineKey.
@@ -1270,6 +1309,7 @@ public static LocalizableString LocalizableString(string value = null, string lo
/// 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.
@@ -1295,9 +1335,9 @@ public static LocalizableString LocalizableString(string value = null, string lo
///
/// Kind of resource.
/// A new instance for mocking.
- public static AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = 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? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = 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 AppServicePlanPatch AppServicePlanPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = 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? spotExpirationOn = null, DateTimeOffset? freeOfferExpirationOn = 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)
{
- return new AppServicePlanPatch(id, name, resourceType, systemData, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpirationOn, freeOfferExpirationOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind);
+ return new AppServicePlanPatch(id, name, resourceType, systemData, workerTierName, status, subscription, hostingEnvironmentProfile, maximumNumberOfWorkers, numberOfWorkers, geoRegion, isPerSiteScaling, isElasticScaleEnabled, maximumElasticWorkerCount, numberOfSites, isSpot, spotExpirationOn, freeOfferExpirationOn, resourceGroup, isReserved, isXenon, isHyperV, targetWorkerCount, targetWorkerSizeId, provisioningState, kubeEnvironmentProfile, isZoneRedundant, kind);
}
/// Initializes a new instance of HybridConnectionData.
@@ -1503,6 +1543,84 @@ public static AppCertificatePatch AppCertificatePatch(ResourceIdentifier id = nu
return new AppCertificatePatch(id, name, resourceType, systemData, password, friendlyName, subjectName, hostNames?.ToList(), pfxBlob, siteName, selfLink, issuer, issueOn, expireOn, thumbprintString, isValid, cerBlob, publicKeyHash, hostingEnvironmentProfile, keyVaultId, keyVaultSecretName, keyVaultSecretStatus, serverFarmId, canonicalName, domainValidationMethod, kind);
}
+ /// Initializes a new instance of ContainerAppData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// Provisioning state of the Container App.
+ /// Resource ID of the Container App's KubeEnvironment.
+ /// Name of the latest revision of the Container App.
+ /// Fully Qualified Domain Name of the latest revision of the Container App.
+ /// Non versioned Container App configuration properties.
+ /// Container App versioned application definition.
+ /// Kind of resource.
+ /// A new instance for mocking.
+ public static ContainerAppData ContainerAppData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ContainerAppProvisioningState? provisioningState = null, string kubeEnvironmentId = null, string latestRevisionName = null, string latestRevisionFqdn = null, Configuration configuration = null, Template template = null, string kind = null)
+ {
+ tags ??= new Dictionary();
+
+ return new ContainerAppData(id, name, resourceType, systemData, tags, location, provisioningState, kubeEnvironmentId, latestRevisionName, latestRevisionFqdn, configuration, template, kind);
+ }
+
+ /// Initializes a new instance of Ingress.
+ /// Hostname.
+ /// Bool indicating if app exposes an external http endpoint.
+ /// Target Port in containers for traffic from ingress.
+ /// Ingress transport protocol.
+ ///
+ /// Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections.
+ /// A new instance for mocking.
+ public static Ingress Ingress(string fqdn = null, bool? external = null, int? targetPort = null, IngressTransportMethod? transport = null, IEnumerable traffic = null, bool? allowInsecure = null)
+ {
+ traffic ??= new List();
+
+ return new Ingress(fqdn, external, targetPort, transport, traffic?.ToList(), allowInsecure);
+ }
+
+ /// Initializes a new instance of ContainerAppSecret.
+ /// Secret Name.
+ /// Secret Value.
+ /// A new instance for mocking.
+ public static ContainerAppSecret ContainerAppSecret(string name = null, string value = null)
+ {
+ return new ContainerAppSecret(name, value);
+ }
+
+ /// Initializes a new instance of RevisionData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ ///
+ /// Timestamp describing when the revision was created
+ /// by controller
+ ///
+ /// Fully qualified domain name of the revision.
+ ///
+ /// Container App Revision Template with all possible settings and the
+ /// defaults if user did not provide them. The defaults are populated
+ /// as they were at the creation time
+ ///
+ /// Boolean describing if the Revision is Active.
+ /// Number of pods currently running for this revision.
+ /// Traffic weight assigned to this revision.
+ /// Optional Field - Platform Error Message.
+ /// Current health State of the revision.
+ /// Current provisioning State of the revision.
+ /// Kind of resource.
+ /// A new instance for mocking.
+ public static RevisionData RevisionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, DateTimeOffset? createdOn = null, string fqdn = null, Template template = null, bool? active = null, int? replicas = null, int? trafficWeight = null, string provisioningError = null, RevisionHealthState? healthState = null, RevisionProvisioningState? provisioningState = null, string kind = null)
+ {
+ tags ??= new Dictionary();
+
+ return new RevisionData(id, name, resourceType, systemData, tags, location, createdOn, fqdn, template, active, replicas, trafficWeight, provisioningError, healthState, provisioningState, kind);
+ }
+
/// Initializes a new instance of DeletedSiteData.
/// The id.
/// The name.
@@ -1647,6 +1765,7 @@ public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name
/// Only visible within Vnet/Subnet.
/// Default Domain Name for the cluster.
/// Static IP of the KubeEnvironment.
+ /// Type of Kubernetes Environment. Only supported for Container App Environments with value as Managed.
///
/// Cluster configuration which determines the ARC cluster
/// components types. Eg: Choosing between BuildService kind,
@@ -1657,14 +1776,15 @@ public static AppSnapshot AppSnapshot(ResourceIdentifier id = null, string name
/// app logs to a destination. Currently only "log-analytics" is
/// supported
///
+ /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration.
///
/// Kind of resource.
/// A new instance for mocking.
- public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null)
+ public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExtendedLocation extendedLocation = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, string environmentType = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ContainerAppsConfiguration containerAppsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null)
{
tags ??= new Dictionary();
- return new KubeEnvironmentData(id, name, resourceType, systemData, tags, location, extendedLocation, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, arcConfiguration, appLogsConfiguration, aksResourceId, kind);
+ return new KubeEnvironmentData(id, name, resourceType, systemData, tags, location, extendedLocation, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, environmentType, arcConfiguration, appLogsConfiguration, containerAppsConfiguration, aksResourceId, kind);
}
/// Initializes a new instance of KubeEnvironmentPatch.
@@ -1687,12 +1807,13 @@ public static KubeEnvironmentData KubeEnvironmentData(ResourceIdentifier id = nu
/// app logs to a destination. Currently only "log-analytics" is
/// supported
///
+ /// Cluster configuration for Container Apps Environments to configure Dapr Instrumentation Key and VNET Configuration.
///
/// Kind of resource.
/// A new instance for mocking.
- public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null)
+ public static KubeEnvironmentPatch KubeEnvironmentPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, KubeEnvironmentProvisioningState? provisioningState = null, string deploymentErrors = null, bool? isInternalLoadBalancerEnabled = null, string defaultDomain = null, string staticIP = null, ArcConfiguration arcConfiguration = null, AppLogsConfiguration appLogsConfiguration = null, ContainerAppsConfiguration containerAppsConfiguration = null, ResourceIdentifier aksResourceId = null, string kind = null)
{
- return new KubeEnvironmentPatch(id, name, resourceType, systemData, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, arcConfiguration, appLogsConfiguration, aksResourceId, kind);
+ return new KubeEnvironmentPatch(id, name, resourceType, systemData, provisioningState, deploymentErrors, isInternalLoadBalancerEnabled, defaultDomain, staticIP, arcConfiguration, appLogsConfiguration, containerAppsConfiguration, aksResourceId, kind);
}
/// Initializes a new instance of ApplicationStackResource.
@@ -2062,6 +2183,36 @@ public static ResourceNameAvailability ResourceNameAvailability(bool? isNameAvai
return new ResourceNameAvailability(isNameAvailable, reason, message);
}
+ /// Initializes a new instance of CustomHostnameSites.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ ///
+ ///
+ ///
+ /// Kind of resource.
+ /// A new instance for mocking.
+ public static CustomHostnameSites CustomHostnameSites(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string customHostname = null, string region = null, IEnumerable siteResourceIds = null, string kind = null)
+ {
+ siteResourceIds ??= new List();
+
+ return new CustomHostnameSites(id, name, resourceType, systemData, customHostname, region, siteResourceIds?.ToList(), kind);
+ }
+
+ /// Initializes a new instance of AppServiceIdentifierData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// String representation of the identity.
+ /// Kind of resource.
+ /// A new instance for mocking.
+ public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null)
+ {
+ return new AppServiceIdentifierData(id, name, resourceType, systemData, value, kind);
+ }
+
/// Initializes a new instance of AppServiceDeploymentLocations.
/// Available regions.
/// Available App Service Environments with full descriptions of the environments.
@@ -2100,17 +2251,25 @@ public static HostingEnvironmentDeploymentInfo HostingEnvironmentDeploymentInfo(
return new HostingEnvironmentDeploymentInfo(name, location);
}
- /// Initializes a new instance of AppServiceIdentifierData.
+ /// Initializes a new instance of AseRegion.
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// String representation of the identity.
+ /// Display name for region.
+ /// Is region standard.
+ /// Dedicated host enabled.
+ /// Zone redundant deployment enabled.
+ /// Available Skus in region.
+ /// Available OSs in region.
/// Kind of resource.
- /// A new instance for mocking.
- public static AppServiceIdentifierData AppServiceIdentifierData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string kind = null)
+ /// A new instance for mocking.
+ public static AseRegion AseRegion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, bool? standard = null, bool? dedicatedHost = null, bool? zoneRedundant = null, IEnumerable availableSku = null, IEnumerable availableOS = null, string kind = null)
{
- return new AppServiceIdentifierData(id, name, resourceType, systemData, value, kind);
+ availableSku ??= new List();
+ availableOS ??= new List();
+
+ return new AseRegion(id, name, resourceType, systemData, displayName, standard, dedicatedHost, zoneRedundant, availableSku?.ToList(), availableOS?.ToList(), kind);
}
/// Initializes a new instance of PremierAddOnOffer.
@@ -2281,17 +2440,23 @@ public static StaticSitesWorkflowPreview StaticSitesWorkflowPreview(ResourceIden
/// The content distribution endpoint for the static site.
/// Identity to use for Key Vault Reference authentication.
/// User provided function apps registered with the static site.
+ /// Backends linked to the static side.
/// The provider that submitted the last deployment to the primary environment of the static site.
+ /// State indicating the status of the enterprise grade CDN serving traffic to the static web app.
+ /// State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string.
+ /// Database connections for the static site.
/// Kind of resource.
/// A new instance for mocking.
- public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, string provider = null, string kind = null)
+ public static StaticSiteData StaticSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AppServiceSkuDescription sku = null, ManagedServiceIdentity identity = null, string defaultHostname = null, Uri repositoryUri = null, string branch = null, IEnumerable customDomains = null, string repositoryToken = null, StaticSiteBuildProperties buildProperties = null, IEnumerable privateEndpointConnections = null, StagingEnvironmentPolicy? stagingEnvironmentPolicy = null, bool? allowConfigFileUpdates = null, StaticSiteTemplate templateProperties = null, string contentDistributionEndpoint = null, string keyVaultReferenceIdentity = null, IEnumerable userProvidedFunctionApps = null, IEnumerable linkedBackends = null, string provider = null, EnterpriseGradeCdnStatus? enterpriseGradeCdnStatus = null, string publicNetworkAccess = null, IEnumerable