diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_AddonCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_AddonCollection.cs
new file mode 100644
index 000000000000..dd3c1725ddc6
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_AddonCollection.cs
@@ -0,0 +1,764 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_AddonCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_AddonsCreateOrUpdateArcReg()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_ArcReg.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "arc";
+ AddonData data = new AddonData();
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, addonName, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_AddonsCreateOrUpdateHCX()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_HCX.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ AddonData data = new AddonData();
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, addonName, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_AddonsCreateOrUpdateHCXWithNetworks()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ AddonData data = new AddonData();
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, addonName, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_AddonsCreateOrUpdateSRM()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_SRM.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "srm";
+ AddonData data = new AddonData();
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, addonName, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_AddonsCreateOrUpdateVR()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_VR.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "vr";
+ AddonData data = new AddonData();
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, addonName, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetArcReg()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_ArcReg.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "arc";
+ AddonResource result = await collection.GetAsync(addonName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetHCX()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ AddonResource result = await collection.GetAsync(addonName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetHCXWithNetworks()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX_With_Networks.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ AddonResource result = await collection.GetAsync(addonName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetSRM()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_SRM.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "srm";
+ AddonResource result = await collection.GetAsync(addonName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetVR()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_VR.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "vr";
+ AddonResource result = await collection.GetAsync(addonName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_AddonsList()
+ {
+ // Generated from example definition: 2024-09-01/Addons_List.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation and iterate over the result
+ await foreach (AddonResource 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
+ AddonData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_AddonsGetArcReg()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_ArcReg.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "arc";
+ bool result = await collection.ExistsAsync(addonName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_AddonsGetHCX()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ bool result = await collection.ExistsAsync(addonName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_AddonsGetHCXWithNetworks()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX_With_Networks.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ bool result = await collection.ExistsAsync(addonName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_AddonsGetSRM()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_SRM.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "srm";
+ bool result = await collection.ExistsAsync(addonName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_AddonsGetVR()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_VR.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "vr";
+ bool result = await collection.ExistsAsync(addonName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AddonsGetArcReg()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_ArcReg.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "arc";
+ NullableResponse response = await collection.GetIfExistsAsync(addonName);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AddonsGetHCX()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ NullableResponse response = await collection.GetIfExistsAsync(addonName);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AddonsGetHCXWithNetworks()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX_With_Networks.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "hcx";
+ NullableResponse response = await collection.GetIfExistsAsync(addonName);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AddonsGetSRM()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_SRM.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "srm";
+ NullableResponse response = await collection.GetIfExistsAsync(addonName);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_AddonsGetVR()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_VR.json
+ // this example is just showing the usage of "Addon_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this AddonResource
+ AddonCollection collection = privateCloud.GetAddons();
+
+ // invoke the operation
+ string addonName = "vr";
+ NullableResponse response = await collection.GetIfExistsAsync(addonName);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_AddonResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_AddonResource.cs
new file mode 100644
index 000000000000..c573558be29e
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_AddonResource.cs
@@ -0,0 +1,365 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_AddonResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetArcReg()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_ArcReg.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "arc";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonResource result = await addon.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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetHCX()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "hcx";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonResource result = await addon.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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetHCXWithNetworks()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_HCX_With_Networks.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "hcx";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonResource result = await addon.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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetSRM()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_SRM.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "srm";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonResource result = await addon.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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_AddonsGetVR()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Get_VR.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "vr";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonResource result = await addon.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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_AddonsDelete()
+ {
+ // Generated from example definition: 2024-09-01/Addons_Delete.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "srm";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ await addon.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AddonsCreateOrUpdateArcReg()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_ArcReg.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "arc";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonData data = new AddonData();
+ ArmOperation lro = await addon.UpdateAsync(WaitUntil.Completed, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AddonsCreateOrUpdateHCX()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_HCX.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "hcx";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonData data = new AddonData();
+ ArmOperation lro = await addon.UpdateAsync(WaitUntil.Completed, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AddonsCreateOrUpdateHCXWithNetworks()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_HCX_With_Networks.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "hcx";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonData data = new AddonData();
+ ArmOperation lro = await addon.UpdateAsync(WaitUntil.Completed, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AddonsCreateOrUpdateSRM()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_SRM.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "srm";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonData data = new AddonData();
+ ArmOperation lro = await addon.UpdateAsync(WaitUntil.Completed, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_AddonsCreateOrUpdateVR()
+ {
+ // Generated from example definition: 2024-09-01/Addons_CreateOrUpdate_VR.json
+ // this example is just showing the usage of "Addon_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 AddonResource created on azure
+ // for more information of creating AddonResource, please refer to the document of AddonResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string addonName = "vr";
+ ResourceIdentifier addonResourceId = AddonResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, addonName);
+ AddonResource addon = client.GetAddonResource(addonResourceId);
+
+ // invoke the operation
+ AddonData data = new AddonData();
+ ArmOperation lro = await addon.UpdateAsync(WaitUntil.Completed, data);
+ AddonResource 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
+ AddonData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_CloudLinkCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_CloudLinkCollection.cs
new file mode 100644
index 000000000000..720f04085ba4
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_CloudLinkCollection.cs
@@ -0,0 +1,196 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_CloudLinkCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_CloudLinksCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_CreateOrUpdate.json
+ // this example is just showing the usage of "CloudLink_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this CloudLinkResource
+ CloudLinkCollection collection = privateCloud.GetCloudLinks();
+
+ // invoke the operation
+ string cloudLinkName = "cloudLink1";
+ CloudLinkData data = new CloudLinkData();
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, cloudLinkName, data);
+ CloudLinkResource 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
+ CloudLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_CloudLinksGet()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_Get.json
+ // this example is just showing the usage of "CloudLink_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this CloudLinkResource
+ CloudLinkCollection collection = privateCloud.GetCloudLinks();
+
+ // invoke the operation
+ string cloudLinkName = "cloudLink1";
+ CloudLinkResource result = await collection.GetAsync(cloudLinkName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ CloudLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_CloudLinksList()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_List.json
+ // this example is just showing the usage of "CloudLink_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this CloudLinkResource
+ CloudLinkCollection collection = privateCloud.GetCloudLinks();
+
+ // invoke the operation and iterate over the result
+ await foreach (CloudLinkResource 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
+ CloudLinkData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_CloudLinksGet()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_Get.json
+ // this example is just showing the usage of "CloudLink_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this CloudLinkResource
+ CloudLinkCollection collection = privateCloud.GetCloudLinks();
+
+ // invoke the operation
+ string cloudLinkName = "cloudLink1";
+ bool result = await collection.ExistsAsync(cloudLinkName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_CloudLinksGet()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_Get.json
+ // this example is just showing the usage of "CloudLink_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this CloudLinkResource
+ CloudLinkCollection collection = privateCloud.GetCloudLinks();
+
+ // invoke the operation
+ string cloudLinkName = "cloudLink1";
+ NullableResponse response = await collection.GetIfExistsAsync(cloudLinkName);
+ CloudLinkResource 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
+ CloudLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_CloudLinkResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_CloudLinkResource.cs
new file mode 100644
index 000000000000..29f33f78147a
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_CloudLinkResource.cs
@@ -0,0 +1,109 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_CloudLinkResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_CloudLinksGet()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_Get.json
+ // this example is just showing the usage of "CloudLink_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 CloudLinkResource created on azure
+ // for more information of creating CloudLinkResource, please refer to the document of CloudLinkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string cloudLinkName = "cloudLink1";
+ ResourceIdentifier cloudLinkResourceId = CloudLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, cloudLinkName);
+ CloudLinkResource cloudLink = client.GetCloudLinkResource(cloudLinkResourceId);
+
+ // invoke the operation
+ CloudLinkResource result = await cloudLink.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
+ CloudLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_CloudLinksDelete()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_Delete.json
+ // this example is just showing the usage of "CloudLink_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 CloudLinkResource created on azure
+ // for more information of creating CloudLinkResource, please refer to the document of CloudLinkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string cloudLinkName = "cloudLink1";
+ ResourceIdentifier cloudLinkResourceId = CloudLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, cloudLinkName);
+ CloudLinkResource cloudLink = client.GetCloudLinkResource(cloudLinkResourceId);
+
+ // invoke the operation
+ await cloudLink.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_CloudLinksCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/CloudLinks_CreateOrUpdate.json
+ // this example is just showing the usage of "CloudLink_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 CloudLinkResource created on azure
+ // for more information of creating CloudLinkResource, please refer to the document of CloudLinkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string cloudLinkName = "cloudLink1";
+ ResourceIdentifier cloudLinkResourceId = CloudLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, cloudLinkName);
+ CloudLinkResource cloudLink = client.GetCloudLinkResource(cloudLinkResourceId);
+
+ // invoke the operation
+ CloudLinkData data = new CloudLinkData();
+ ArmOperation lro = await cloudLink.UpdateAsync(WaitUntil.Completed, data);
+ CloudLinkResource 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
+ CloudLinkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ClusterCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ClusterCollection.cs
new file mode 100644
index 000000000000..88ebe1d3f489
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ClusterCollection.cs
@@ -0,0 +1,197 @@
+// 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.Avs.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_ClusterCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_ClustersCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_CreateOrUpdate.json
+ // this example is just showing the usage of "Cluster_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ClusterResource
+ ClusterCollection collection = privateCloud.GetClusters();
+
+ // invoke the operation
+ string clusterName = "cluster1";
+ ClusterData data = new ClusterData(null);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data);
+ ClusterResource 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
+ ClusterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_ClustersGet()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_Get.json
+ // this example is just showing the usage of "Cluster_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ClusterResource
+ ClusterCollection collection = privateCloud.GetClusters();
+
+ // invoke the operation
+ string clusterName = "cluster1";
+ ClusterResource result = await collection.GetAsync(clusterName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ ClusterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_ClustersList()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_List.json
+ // this example is just showing the usage of "Cluster_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ClusterResource
+ ClusterCollection collection = privateCloud.GetClusters();
+
+ // invoke the operation and iterate over the result
+ await foreach (ClusterResource 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
+ ClusterData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_ClustersGet()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_Get.json
+ // this example is just showing the usage of "Cluster_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ClusterResource
+ ClusterCollection collection = privateCloud.GetClusters();
+
+ // invoke the operation
+ string clusterName = "cluster1";
+ bool result = await collection.ExistsAsync(clusterName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_ClustersGet()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_Get.json
+ // this example is just showing the usage of "Cluster_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ClusterResource
+ ClusterCollection collection = privateCloud.GetClusters();
+
+ // invoke the operation
+ string clusterName = "cluster1";
+ NullableResponse response = await collection.GetIfExistsAsync(clusterName);
+ ClusterResource 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
+ ClusterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ClusterResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ClusterResource.cs
new file mode 100644
index 000000000000..c0332acb84d8
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ClusterResource.cs
@@ -0,0 +1,164 @@
+// 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.Avs.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_ClusterResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_ClustersGet()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_Get.json
+ // this example is just showing the usage of "Cluster_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // invoke the operation
+ ClusterResource result = await cluster.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
+ ClusterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_ClustersDelete()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_Delete.json
+ // this example is just showing the usage of "Cluster_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // invoke the operation
+ await cluster.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_ClustersUpdate()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_Update.json
+ // this example is just showing the usage of "Cluster_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // invoke the operation
+ ClusterPatch patch = new ClusterPatch();
+ ArmOperation lro = await cluster.UpdateAsync(WaitUntil.Completed, patch);
+ ClusterResource 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
+ ClusterData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetZones_ClustersListZones()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_ListZones.json
+ // this example is just showing the usage of "Clusters_ListZones" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // invoke the operation
+ ClusterZoneList result = await cluster.GetZonesAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetZones_ClustersListZonesStretched()
+ {
+ // Generated from example definition: 2024-09-01/Clusters_ListZones_Stretched.json
+ // this example is just showing the usage of "Clusters_ListZones" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // invoke the operation
+ ClusterZoneList result = await cluster.GetZonesAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_DatastoreCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_DatastoreCollection.cs
new file mode 100644
index 000000000000..a92c358ae378
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_DatastoreCollection.cs
@@ -0,0 +1,201 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_DatastoreCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_DatastoresCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_CreateOrUpdate.json
+ // this example is just showing the usage of "Datastore_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this DatastoreResource
+ DatastoreCollection collection = cluster.GetDatastores();
+
+ // invoke the operation
+ string datastoreName = "datastore1";
+ DatastoreData data = new DatastoreData();
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, datastoreName, data);
+ DatastoreResource 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
+ DatastoreData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_DatastoresGet()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_Get.json
+ // this example is just showing the usage of "Datastore_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this DatastoreResource
+ DatastoreCollection collection = cluster.GetDatastores();
+
+ // invoke the operation
+ string datastoreName = "datastore1";
+ DatastoreResource result = await collection.GetAsync(datastoreName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ DatastoreData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_DatastoresList()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_List.json
+ // this example is just showing the usage of "Datastore_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this DatastoreResource
+ DatastoreCollection collection = cluster.GetDatastores();
+
+ // invoke the operation and iterate over the result
+ await foreach (DatastoreResource 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
+ DatastoreData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_DatastoresGet()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_Get.json
+ // this example is just showing the usage of "Datastore_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this DatastoreResource
+ DatastoreCollection collection = cluster.GetDatastores();
+
+ // invoke the operation
+ string datastoreName = "datastore1";
+ bool result = await collection.ExistsAsync(datastoreName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_DatastoresGet()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_Get.json
+ // this example is just showing the usage of "Datastore_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this DatastoreResource
+ DatastoreCollection collection = cluster.GetDatastores();
+
+ // invoke the operation
+ string datastoreName = "datastore1";
+ NullableResponse response = await collection.GetIfExistsAsync(datastoreName);
+ DatastoreResource 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
+ DatastoreData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_DatastoreResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_DatastoreResource.cs
new file mode 100644
index 000000000000..9ffca9ca7568
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_DatastoreResource.cs
@@ -0,0 +1,112 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_DatastoreResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_DatastoresGet()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_Get.json
+ // this example is just showing the usage of "Datastore_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 DatastoreResource created on azure
+ // for more information of creating DatastoreResource, please refer to the document of DatastoreResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ string datastoreName = "datastore1";
+ ResourceIdentifier datastoreResourceId = DatastoreResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName, datastoreName);
+ DatastoreResource datastore = client.GetDatastoreResource(datastoreResourceId);
+
+ // invoke the operation
+ DatastoreResource result = await datastore.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
+ DatastoreData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_DatastoresDelete()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_Delete.json
+ // this example is just showing the usage of "Datastore_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 DatastoreResource created on azure
+ // for more information of creating DatastoreResource, please refer to the document of DatastoreResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ string datastoreName = "datastore1";
+ ResourceIdentifier datastoreResourceId = DatastoreResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName, datastoreName);
+ DatastoreResource datastore = client.GetDatastoreResource(datastoreResourceId);
+
+ // invoke the operation
+ await datastore.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_DatastoresCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/Datastores_CreateOrUpdate.json
+ // this example is just showing the usage of "Datastore_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 DatastoreResource created on azure
+ // for more information of creating DatastoreResource, please refer to the document of DatastoreResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ string datastoreName = "datastore1";
+ ResourceIdentifier datastoreResourceId = DatastoreResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName, datastoreName);
+ DatastoreResource datastore = client.GetDatastoreResource(datastoreResourceId);
+
+ // invoke the operation
+ DatastoreData data = new DatastoreData();
+ ArmOperation lro = await datastore.UpdateAsync(WaitUntil.Completed, data);
+ DatastoreResource 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
+ DatastoreData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationCollection.cs
index d3fbf08a0793..2f4ba2288645 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationCollection.cs
@@ -19,24 +19,24 @@ public partial class Sample_ExpressRouteAuthorizationCollection
[Ignore("Only validating compilation of examples")]
public async Task CreateOrUpdate_AuthorizationsCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json
- // this example is just showing the usage of "Authorizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_CreateOrUpdate.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ExpressRouteAuthorizationResource
- ExpressRouteAuthorizationCollection collection = avsPrivateCloud.GetExpressRouteAuthorizations();
+ ExpressRouteAuthorizationCollection collection = privateCloud.GetExpressRouteAuthorizations();
// invoke the operation
string authorizationName = "authorization1";
@@ -55,24 +55,24 @@ public async Task CreateOrUpdate_AuthorizationsCreateOrUpdate()
[Ignore("Only validating compilation of examples")]
public async Task Get_AuthorizationsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json
- // this example is just showing the usage of "Authorizations_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_Get.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ExpressRouteAuthorizationResource
- ExpressRouteAuthorizationCollection collection = avsPrivateCloud.GetExpressRouteAuthorizations();
+ ExpressRouteAuthorizationCollection collection = privateCloud.GetExpressRouteAuthorizations();
// invoke the operation
string authorizationName = "authorization1";
@@ -89,24 +89,24 @@ public async Task Get_AuthorizationsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_AuthorizationsList()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_List.json
- // this example is just showing the usage of "Authorizations_List" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_List.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ExpressRouteAuthorizationResource
- ExpressRouteAuthorizationCollection collection = avsPrivateCloud.GetExpressRouteAuthorizations();
+ ExpressRouteAuthorizationCollection collection = privateCloud.GetExpressRouteAuthorizations();
// invoke the operation and iterate over the result
await foreach (ExpressRouteAuthorizationResource item in collection.GetAllAsync())
@@ -125,24 +125,24 @@ public async Task GetAll_AuthorizationsList()
[Ignore("Only validating compilation of examples")]
public async Task Exists_AuthorizationsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json
- // this example is just showing the usage of "Authorizations_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_Get.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ExpressRouteAuthorizationResource
- ExpressRouteAuthorizationCollection collection = avsPrivateCloud.GetExpressRouteAuthorizations();
+ ExpressRouteAuthorizationCollection collection = privateCloud.GetExpressRouteAuthorizations();
// invoke the operation
string authorizationName = "authorization1";
@@ -155,24 +155,24 @@ public async Task Exists_AuthorizationsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_AuthorizationsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json
- // this example is just showing the usage of "Authorizations_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_Get.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ExpressRouteAuthorizationResource
- ExpressRouteAuthorizationCollection collection = avsPrivateCloud.GetExpressRouteAuthorizations();
+ ExpressRouteAuthorizationCollection collection = privateCloud.GetExpressRouteAuthorizations();
// invoke the operation
string authorizationName = "authorization1";
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationResource.cs
index 89599a692576..23df02c19b7c 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ExpressRouteAuthorizationResource.cs
@@ -19,8 +19,8 @@ public partial class Sample_ExpressRouteAuthorizationResource
[Ignore("Only validating compilation of examples")]
public async Task Get_AuthorizationsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Get.json
- // this example is just showing the usage of "Authorizations_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_Get.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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();
@@ -50,8 +50,8 @@ public async Task Get_AuthorizationsGet()
[Ignore("Only validating compilation of examples")]
public async Task Delete_AuthorizationsDelete()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_Delete.json
- // this example is just showing the usage of "Authorizations_Delete" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_Delete.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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();
@@ -77,8 +77,8 @@ public async Task Delete_AuthorizationsDelete()
[Ignore("Only validating compilation of examples")]
public async Task Update_AuthorizationsCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Authorizations_CreateOrUpdate.json
- // this example is just showing the usage of "Authorizations_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Authorizations_CreateOrUpdate.json
+ // this example is just showing the usage of "ExpressRouteAuthorization_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionCollection.cs
index 9640f2353d2a..2b824faec7ae 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionCollection.cs
@@ -19,32 +19,28 @@ public partial class Sample_GlobalReachConnectionCollection
[Ignore("Only validating compilation of examples")]
public async Task CreateOrUpdate_GlobalReachConnectionsCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_CreateOrUpdate.json
- // this example is just showing the usage of "GlobalReachConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_CreateOrUpdate.json
+ // this example is just showing the usage of "GlobalReachConnection_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this GlobalReachConnectionResource
- GlobalReachConnectionCollection collection = avsPrivateCloud.GetGlobalReachConnections();
+ GlobalReachConnectionCollection collection = privateCloud.GetGlobalReachConnections();
// invoke the operation
string globalReachConnectionName = "connection1";
- GlobalReachConnectionData data = new GlobalReachConnectionData
- {
- AuthorizationKey = "01010101-0101-0101-0101-010101010101",
- PeerExpressRouteCircuit = new ResourceIdentifier("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer"),
- };
+ GlobalReachConnectionData data = new GlobalReachConnectionData();
ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, globalReachConnectionName, data);
GlobalReachConnectionResource result = lro.Value;
@@ -59,24 +55,24 @@ public async Task CreateOrUpdate_GlobalReachConnectionsCreateOrUpdate()
[Ignore("Only validating compilation of examples")]
public async Task Get_GlobalReachConnectionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json
- // this example is just showing the usage of "GlobalReachConnections_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_Get.json
+ // this example is just showing the usage of "GlobalReachConnection_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this GlobalReachConnectionResource
- GlobalReachConnectionCollection collection = avsPrivateCloud.GetGlobalReachConnections();
+ GlobalReachConnectionCollection collection = privateCloud.GetGlobalReachConnections();
// invoke the operation
string globalReachConnectionName = "connection1";
@@ -93,24 +89,24 @@ public async Task Get_GlobalReachConnectionsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_GlobalReachConnectionsList()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_List.json
- // this example is just showing the usage of "GlobalReachConnections_List" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_List.json
+ // this example is just showing the usage of "GlobalReachConnection_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this GlobalReachConnectionResource
- GlobalReachConnectionCollection collection = avsPrivateCloud.GetGlobalReachConnections();
+ GlobalReachConnectionCollection collection = privateCloud.GetGlobalReachConnections();
// invoke the operation and iterate over the result
await foreach (GlobalReachConnectionResource item in collection.GetAllAsync())
@@ -129,24 +125,24 @@ public async Task GetAll_GlobalReachConnectionsList()
[Ignore("Only validating compilation of examples")]
public async Task Exists_GlobalReachConnectionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json
- // this example is just showing the usage of "GlobalReachConnections_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_Get.json
+ // this example is just showing the usage of "GlobalReachConnection_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this GlobalReachConnectionResource
- GlobalReachConnectionCollection collection = avsPrivateCloud.GetGlobalReachConnections();
+ GlobalReachConnectionCollection collection = privateCloud.GetGlobalReachConnections();
// invoke the operation
string globalReachConnectionName = "connection1";
@@ -159,24 +155,24 @@ public async Task Exists_GlobalReachConnectionsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_GlobalReachConnectionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json
- // this example is just showing the usage of "GlobalReachConnections_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_Get.json
+ // this example is just showing the usage of "GlobalReachConnection_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this GlobalReachConnectionResource
- GlobalReachConnectionCollection collection = avsPrivateCloud.GetGlobalReachConnections();
+ GlobalReachConnectionCollection collection = privateCloud.GetGlobalReachConnections();
// invoke the operation
string globalReachConnectionName = "connection1";
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionResource.cs
index 51034d6993d4..f231495fb465 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_GlobalReachConnectionResource.cs
@@ -19,8 +19,8 @@ public partial class Sample_GlobalReachConnectionResource
[Ignore("Only validating compilation of examples")]
public async Task Get_GlobalReachConnectionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Get.json
- // this example is just showing the usage of "GlobalReachConnections_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_Get.json
+ // this example is just showing the usage of "GlobalReachConnection_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();
@@ -50,8 +50,8 @@ public async Task Get_GlobalReachConnectionsGet()
[Ignore("Only validating compilation of examples")]
public async Task Delete_GlobalReachConnectionsDelete()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_Delete.json
- // this example is just showing the usage of "GlobalReachConnections_Delete" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_Delete.json
+ // this example is just showing the usage of "GlobalReachConnection_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();
@@ -77,8 +77,8 @@ public async Task Delete_GlobalReachConnectionsDelete()
[Ignore("Only validating compilation of examples")]
public async Task Update_GlobalReachConnectionsCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/GlobalReachConnections_CreateOrUpdate.json
- // this example is just showing the usage of "GlobalReachConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/GlobalReachConnections_CreateOrUpdate.json
+ // this example is just showing the usage of "GlobalReachConnection_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();
@@ -95,11 +95,7 @@ public async Task Update_GlobalReachConnectionsCreateOrUpdate()
GlobalReachConnectionResource globalReachConnection = client.GetGlobalReachConnectionResource(globalReachConnectionResourceId);
// invoke the operation
- GlobalReachConnectionData data = new GlobalReachConnectionData
- {
- AuthorizationKey = "01010101-0101-0101-0101-010101010101",
- PeerExpressRouteCircuit = new ResourceIdentifier("/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/mygroup/providers/Microsoft.Network/expressRouteCircuits/mypeer"),
- };
+ GlobalReachConnectionData data = new GlobalReachConnectionData();
ArmOperation lro = await globalReachConnection.UpdateAsync(WaitUntil.Completed, data);
GlobalReachConnectionResource result = lro.Value;
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteCollection.cs
index c879da920d4e..9f88306c6ad1 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteCollection.cs
@@ -19,24 +19,24 @@ public partial class Sample_HcxEnterpriseSiteCollection
[Ignore("Only validating compilation of examples")]
public async Task CreateOrUpdate_HcxEnterpriseSitesCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate.json
- // this example is just showing the usage of "HcxEnterpriseSites_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_CreateOrUpdate.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this HcxEnterpriseSiteResource
- HcxEnterpriseSiteCollection collection = avsPrivateCloud.GetHcxEnterpriseSites();
+ HcxEnterpriseSiteCollection collection = privateCloud.GetHcxEnterpriseSites();
// invoke the operation
string hcxEnterpriseSiteName = "site1";
@@ -55,24 +55,24 @@ public async Task CreateOrUpdate_HcxEnterpriseSitesCreateOrUpdate()
[Ignore("Only validating compilation of examples")]
public async Task Get_HcxEnterpriseSitesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json
- // this example is just showing the usage of "HcxEnterpriseSites_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_Get.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this HcxEnterpriseSiteResource
- HcxEnterpriseSiteCollection collection = avsPrivateCloud.GetHcxEnterpriseSites();
+ HcxEnterpriseSiteCollection collection = privateCloud.GetHcxEnterpriseSites();
// invoke the operation
string hcxEnterpriseSiteName = "site1";
@@ -89,24 +89,24 @@ public async Task Get_HcxEnterpriseSitesGet()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_HcxEnterpriseSitesList()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_List.json
- // this example is just showing the usage of "HcxEnterpriseSites_List" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_List.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this HcxEnterpriseSiteResource
- HcxEnterpriseSiteCollection collection = avsPrivateCloud.GetHcxEnterpriseSites();
+ HcxEnterpriseSiteCollection collection = privateCloud.GetHcxEnterpriseSites();
// invoke the operation and iterate over the result
await foreach (HcxEnterpriseSiteResource item in collection.GetAllAsync())
@@ -125,24 +125,24 @@ public async Task GetAll_HcxEnterpriseSitesList()
[Ignore("Only validating compilation of examples")]
public async Task Exists_HcxEnterpriseSitesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json
- // this example is just showing the usage of "HcxEnterpriseSites_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_Get.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this HcxEnterpriseSiteResource
- HcxEnterpriseSiteCollection collection = avsPrivateCloud.GetHcxEnterpriseSites();
+ HcxEnterpriseSiteCollection collection = privateCloud.GetHcxEnterpriseSites();
// invoke the operation
string hcxEnterpriseSiteName = "site1";
@@ -155,24 +155,24 @@ public async Task Exists_HcxEnterpriseSitesGet()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_HcxEnterpriseSitesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json
- // this example is just showing the usage of "HcxEnterpriseSites_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_Get.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this HcxEnterpriseSiteResource
- HcxEnterpriseSiteCollection collection = avsPrivateCloud.GetHcxEnterpriseSites();
+ HcxEnterpriseSiteCollection collection = privateCloud.GetHcxEnterpriseSites();
// invoke the operation
string hcxEnterpriseSiteName = "site1";
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteResource.cs
index d64b015d47dc..a3b7e1836c21 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HcxEnterpriseSiteResource.cs
@@ -19,8 +19,8 @@ public partial class Sample_HcxEnterpriseSiteResource
[Ignore("Only validating compilation of examples")]
public async Task Get_HcxEnterpriseSitesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Get.json
- // this example is just showing the usage of "HcxEnterpriseSites_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_Get.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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();
@@ -50,8 +50,8 @@ public async Task Get_HcxEnterpriseSitesGet()
[Ignore("Only validating compilation of examples")]
public async Task Delete_HcxEnterpriseSitesDelete()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_Delete.json
- // this example is just showing the usage of "HcxEnterpriseSites_Delete" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_Delete.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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();
@@ -77,8 +77,8 @@ public async Task Delete_HcxEnterpriseSitesDelete()
[Ignore("Only validating compilation of examples")]
public async Task Update_HcxEnterpriseSitesCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/HcxEnterpriseSites_CreateOrUpdate.json
- // this example is just showing the usage of "HcxEnterpriseSites_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/HcxEnterpriseSites_CreateOrUpdate.json
+ // this example is just showing the usage of "HcxEnterpriseSite_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HostCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HostCollection.cs
new file mode 100644
index 000000000000..39c4046629c9
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HostCollection.cs
@@ -0,0 +1,164 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_HostCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_HostsGet()
+ {
+ // Generated from example definition: 2024-09-01/Hosts_Get.json
+ // this example is just showing the usage of "Host_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this HostResource
+ HostCollection collection = cluster.GetHosts();
+
+ // invoke the operation
+ string hostId = "esx03-r52.1111111111111111111.westcentralus.prod.azure.com";
+ HostResource result = await collection.GetAsync(hostId);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ HostData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_HostsList()
+ {
+ // Generated from example definition: 2024-09-01/Hosts_List.json
+ // this example is just showing the usage of "Host_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this HostResource
+ HostCollection collection = cluster.GetHosts();
+
+ // invoke the operation and iterate over the result
+ await foreach (HostResource 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
+ HostData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_HostsGet()
+ {
+ // Generated from example definition: 2024-09-01/Hosts_Get.json
+ // this example is just showing the usage of "Host_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this HostResource
+ HostCollection collection = cluster.GetHosts();
+
+ // invoke the operation
+ string hostId = "esx03-r52.1111111111111111111.westcentralus.prod.azure.com";
+ bool result = await collection.ExistsAsync(hostId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_HostsGet()
+ {
+ // Generated from example definition: 2024-09-01/Hosts_Get.json
+ // this example is just showing the usage of "Host_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this HostResource
+ HostCollection collection = cluster.GetHosts();
+
+ // invoke the operation
+ string hostId = "esx03-r52.1111111111111111111.westcentralus.prod.azure.com";
+ NullableResponse response = await collection.GetIfExistsAsync(hostId);
+ HostResource 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
+ HostData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HostResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HostResource.cs
new file mode 100644
index 000000000000..018f35438577
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_HostResource.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_HostResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_HostsGet()
+ {
+ // Generated from example definition: 2024-09-01/Hosts_Get.json
+ // this example is just showing the usage of "Host_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 HostResource created on azure
+ // for more information of creating HostResource, please refer to the document of HostResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ string hostId = "esx03-r52.1111111111111111111.westcentralus.prod.azure.com";
+ ResourceIdentifier hostResourceId = HostResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName, hostId);
+ HostResource host = client.GetHostResource(hostResourceId);
+
+ // invoke the operation
+ HostResource result = await host.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
+ HostData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_IscsiPathResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_IscsiPathResource.cs
index cc4a7e4f5b24..4e604d6dd33f 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_IscsiPathResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_IscsiPathResource.cs
@@ -9,6 +9,7 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
+using Azure.ResourceManager.Avs.Models;
using NUnit.Framework;
namespace Azure.ResourceManager.Avs.Samples
@@ -19,8 +20,8 @@ public partial class Sample_IscsiPathResource
[Ignore("Only validating compilation of examples")]
public async Task Get_IscsiPathsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Get.json
- // this example is just showing the usage of "IscsiPaths_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/IscsiPaths_Get.json
+ // this example is just showing the usage of "IscsiPath_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();
@@ -49,8 +50,8 @@ public async Task Get_IscsiPathsGet()
[Ignore("Only validating compilation of examples")]
public async Task Delete_IscsiPathsDelete()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_Delete.json
- // this example is just showing the usage of "IscsiPaths_Delete" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/IscsiPaths_Delete.json
+ // this example is just showing the usage of "IscsiPath_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();
@@ -75,8 +76,8 @@ public async Task Delete_IscsiPathsDelete()
[Ignore("Only validating compilation of examples")]
public async Task CreateOrUpdate_IscsiPathsCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/IscsiPaths_CreateOrUpdate.json
- // this example is just showing the usage of "IscsiPaths_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/IscsiPaths_CreateOrUpdate.json
+ // this example is just showing the usage of "IscsiPath_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();
@@ -94,7 +95,7 @@ public async Task CreateOrUpdate_IscsiPathsCreateOrUpdate()
// invoke the operation
IscsiPathData data = new IscsiPathData
{
- NetworkBlock = "192.168.0.0/24",
+ Properties = new IscsiPathProperties("192.168.0.0/24"),
};
ArmOperation lro = await iscsiPath.CreateOrUpdateAsync(WaitUntil.Completed, data);
IscsiPathResource result = lro.Value;
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyCollection.cs
index e21e07392afc..ee77d9c27bfd 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyCollection.cs
@@ -9,7 +9,6 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
-using Azure.ResourceManager.Avs.Models;
using NUnit.Framework;
namespace Azure.ResourceManager.Avs.Samples
@@ -20,36 +19,29 @@ public partial class Sample_PlacementPolicyCollection
[Ignore("Only validating compilation of examples")]
public async Task CreateOrUpdate_PlacementPoliciesCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_CreateOrUpdate.json
- // this example is just showing the usage of "PlacementPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_CreateOrUpdate.json
+ // this example is just showing the usage of "PlacementPolicy_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 AvsPrivateCloudClusterResource created on azure
- // for more information of creating AvsPrivateCloudClusterResource, please refer to the document of AvsPrivateCloudClusterResource
+ // this example assumes you already have this ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
string clusterName = "cluster1";
- ResourceIdentifier avsPrivateCloudClusterResourceId = AvsPrivateCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
- AvsPrivateCloudClusterResource avsPrivateCloudCluster = client.GetAvsPrivateCloudClusterResource(avsPrivateCloudClusterResourceId);
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
// get the collection of this PlacementPolicyResource
- PlacementPolicyCollection collection = avsPrivateCloudCluster.GetPlacementPolicies();
+ PlacementPolicyCollection collection = cluster.GetPlacementPolicies();
// invoke the operation
string placementPolicyName = "policy1";
- PlacementPolicyData data = new PlacementPolicyData
- {
- Properties = new VmHostPlacementPolicyProperties(new ResourceIdentifier[] { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256") }, new string[] { "fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", "fakehost24.nyc1.kubernetes.center" }, AvsPlacementPolicyAffinityType.AntiAffinity)
- {
- AffinityStrength = VmHostPlacementPolicyAffinityStrength.Must,
- AzureHybridBenefitType = AzureHybridBenefitType.SqlHost,
- },
- };
+ PlacementPolicyData data = new PlacementPolicyData();
ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, placementPolicyName, data);
PlacementPolicyResource result = lro.Value;
@@ -64,25 +56,25 @@ public async Task CreateOrUpdate_PlacementPoliciesCreateOrUpdate()
[Ignore("Only validating compilation of examples")]
public async Task Get_PlacementPoliciesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json
- // this example is just showing the usage of "PlacementPolicies_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_Get.json
+ // this example is just showing the usage of "PlacementPolicy_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 AvsPrivateCloudClusterResource created on azure
- // for more information of creating AvsPrivateCloudClusterResource, please refer to the document of AvsPrivateCloudClusterResource
+ // this example assumes you already have this ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
string clusterName = "cluster1";
- ResourceIdentifier avsPrivateCloudClusterResourceId = AvsPrivateCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
- AvsPrivateCloudClusterResource avsPrivateCloudCluster = client.GetAvsPrivateCloudClusterResource(avsPrivateCloudClusterResourceId);
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
// get the collection of this PlacementPolicyResource
- PlacementPolicyCollection collection = avsPrivateCloudCluster.GetPlacementPolicies();
+ PlacementPolicyCollection collection = cluster.GetPlacementPolicies();
// invoke the operation
string placementPolicyName = "policy1";
@@ -99,25 +91,25 @@ public async Task Get_PlacementPoliciesGet()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_PlacementPoliciesList()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_List.json
- // this example is just showing the usage of "PlacementPolicies_List" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_List.json
+ // this example is just showing the usage of "PlacementPolicy_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 AvsPrivateCloudClusterResource created on azure
- // for more information of creating AvsPrivateCloudClusterResource, please refer to the document of AvsPrivateCloudClusterResource
+ // this example assumes you already have this ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
string clusterName = "cluster1";
- ResourceIdentifier avsPrivateCloudClusterResourceId = AvsPrivateCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
- AvsPrivateCloudClusterResource avsPrivateCloudCluster = client.GetAvsPrivateCloudClusterResource(avsPrivateCloudClusterResourceId);
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
// get the collection of this PlacementPolicyResource
- PlacementPolicyCollection collection = avsPrivateCloudCluster.GetPlacementPolicies();
+ PlacementPolicyCollection collection = cluster.GetPlacementPolicies();
// invoke the operation and iterate over the result
await foreach (PlacementPolicyResource item in collection.GetAllAsync())
@@ -136,25 +128,25 @@ public async Task GetAll_PlacementPoliciesList()
[Ignore("Only validating compilation of examples")]
public async Task Exists_PlacementPoliciesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json
- // this example is just showing the usage of "PlacementPolicies_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_Get.json
+ // this example is just showing the usage of "PlacementPolicy_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 AvsPrivateCloudClusterResource created on azure
- // for more information of creating AvsPrivateCloudClusterResource, please refer to the document of AvsPrivateCloudClusterResource
+ // this example assumes you already have this ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
string clusterName = "cluster1";
- ResourceIdentifier avsPrivateCloudClusterResourceId = AvsPrivateCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
- AvsPrivateCloudClusterResource avsPrivateCloudCluster = client.GetAvsPrivateCloudClusterResource(avsPrivateCloudClusterResourceId);
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
// get the collection of this PlacementPolicyResource
- PlacementPolicyCollection collection = avsPrivateCloudCluster.GetPlacementPolicies();
+ PlacementPolicyCollection collection = cluster.GetPlacementPolicies();
// invoke the operation
string placementPolicyName = "policy1";
@@ -167,25 +159,25 @@ public async Task Exists_PlacementPoliciesGet()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_PlacementPoliciesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json
- // this example is just showing the usage of "PlacementPolicies_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_Get.json
+ // this example is just showing the usage of "PlacementPolicy_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 AvsPrivateCloudClusterResource created on azure
- // for more information of creating AvsPrivateCloudClusterResource, please refer to the document of AvsPrivateCloudClusterResource
+ // this example assumes you already have this ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
string clusterName = "cluster1";
- ResourceIdentifier avsPrivateCloudClusterResourceId = AvsPrivateCloudClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
- AvsPrivateCloudClusterResource avsPrivateCloudCluster = client.GetAvsPrivateCloudClusterResource(avsPrivateCloudClusterResourceId);
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
// get the collection of this PlacementPolicyResource
- PlacementPolicyCollection collection = avsPrivateCloudCluster.GetPlacementPolicies();
+ PlacementPolicyCollection collection = cluster.GetPlacementPolicies();
// invoke the operation
string placementPolicyName = "policy1";
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyResource.cs
index 883c68646d91..605e2223076a 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PlacementPolicyResource.cs
@@ -20,8 +20,8 @@ public partial class Sample_PlacementPolicyResource
[Ignore("Only validating compilation of examples")]
public async Task Get_PlacementPoliciesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Get.json
- // this example is just showing the usage of "PlacementPolicies_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_Get.json
+ // this example is just showing the usage of "PlacementPolicy_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();
@@ -52,8 +52,8 @@ public async Task Get_PlacementPoliciesGet()
[Ignore("Only validating compilation of examples")]
public async Task Delete_PlacementPoliciesDelete()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Delete.json
- // this example is just showing the usage of "PlacementPolicies_Delete" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_Delete.json
+ // this example is just showing the usage of "PlacementPolicy_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();
@@ -80,8 +80,8 @@ public async Task Delete_PlacementPoliciesDelete()
[Ignore("Only validating compilation of examples")]
public async Task Update_PlacementPoliciesUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PlacementPolicies_Update.json
- // this example is just showing the usage of "PlacementPolicies_Update" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PlacementPolicies_Update.json
+ // this example is just showing the usage of "PlacementPolicy_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();
@@ -99,22 +99,10 @@ public async Task Update_PlacementPoliciesUpdate()
PlacementPolicyResource placementPolicy = client.GetPlacementPolicyResource(placementPolicyResourceId);
// invoke the operation
- PlacementPolicyPatch patch = new PlacementPolicyPatch
- {
- State = PlacementPolicyState.Disabled,
- VmMembers = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-128"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/clusters/cluster1/virtualMachines/vm-256") },
- HostMembers = { "fakehost22.nyc1.kubernetes.center", "fakehost23.nyc1.kubernetes.center", "fakehost24.nyc1.kubernetes.center" },
- AffinityStrength = VmHostPlacementPolicyAffinityStrength.Must,
- AzureHybridBenefitType = AzureHybridBenefitType.SqlHost,
- };
- ArmOperation lro = await placementPolicy.UpdateAsync(WaitUntil.Completed, patch);
- PlacementPolicyResource result = lro.Value;
+ PlacementPolicyPatch patch = new PlacementPolicyPatch();
+ await placementPolicy.UpdateAsync(WaitUntil.Completed, 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
- PlacementPolicyData resourceData = result.Data;
- // for demo we just print out the id
- Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ Console.WriteLine("Succeeded");
}
}
}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PrivateCloudCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PrivateCloudCollection.cs
new file mode 100644
index 000000000000..ed0ae48dea54
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PrivateCloudCollection.cs
@@ -0,0 +1,436 @@
+// 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.Avs.Models;
+using Azure.ResourceManager.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_PrivateCloudCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_PrivateCloudsCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_CreateOrUpdate.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ PrivateCloudData data = new PrivateCloudData(default, null);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateCloudName, data);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_PrivateCloudsCreateOrUpdateFleetNative()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_CreateOrUpdate_FleetNative.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ PrivateCloudData data = new PrivateCloudData(default, null);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateCloudName, data);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_PrivateCloudsCreateOrUpdateStretched()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_CreateOrUpdate_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ PrivateCloudData data = new PrivateCloudData(default, null);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateCloudName, data);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_PrivateCloudsCreateOrUpdateStretchedZones()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_CreateOrUpdate_StretchedZones.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ PrivateCloudData data = new PrivateCloudData(default, null);
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, privateCloudName, data);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_PrivateCloudsGet()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ PrivateCloudResource result = await collection.GetAsync(privateCloudName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_PrivateCloudsGetStretched()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ PrivateCloudResource result = await collection.GetAsync(privateCloudName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_PrivateCloudsList()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_List.json
+ // this example is just showing the usage of "PrivateCloud_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation and iterate over the result
+ await foreach (PrivateCloudResource 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
+ PrivateCloudData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_PrivateCloudsListStretched()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_List_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation and iterate over the result
+ await foreach (PrivateCloudResource 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
+ PrivateCloudData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_PrivateCloudsGet()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ bool result = await collection.ExistsAsync(privateCloudName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_PrivateCloudsGetStretched()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ bool result = await collection.ExistsAsync(privateCloudName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_PrivateCloudsGet()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ NullableResponse response = await collection.GetIfExistsAsync(privateCloudName);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_PrivateCloudsGetStretched()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_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 = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this PrivateCloudResource
+ PrivateCloudCollection collection = resourceGroupResource.GetPrivateClouds();
+
+ // invoke the operation
+ string privateCloudName = "cloud1";
+ NullableResponse response = await collection.GetIfExistsAsync(privateCloudName);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PrivateCloudResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PrivateCloudResource.cs
new file mode 100644
index 000000000000..afbf0d58d9f7
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PrivateCloudResource.cs
@@ -0,0 +1,247 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Avs.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_PrivateCloudResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_PrivateCloudsGet()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get.json
+ // this example is just showing the usage of "PrivateCloud_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ PrivateCloudResource result = await privateCloud.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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_PrivateCloudsGetStretched()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Get_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ PrivateCloudResource result = await privateCloud.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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_PrivateCloudsDelete()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Delete.json
+ // this example is just showing the usage of "PrivateCloud_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ await privateCloud.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_PrivateCloudsUpdate()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Update.json
+ // this example is just showing the usage of "PrivateCloud_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ PrivateCloudPatch patch = new PrivateCloudPatch();
+ ArmOperation lro = await privateCloud.UpdateAsync(WaitUntil.Completed, patch);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_PrivateCloudsUpdateStretched()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_Update_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ PrivateCloudPatch patch = new PrivateCloudPatch();
+ ArmOperation lro = await privateCloud.UpdateAsync(WaitUntil.Completed, patch);
+ PrivateCloudResource 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
+ PrivateCloudData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task RotateVcenterPassword_PrivateCloudsRotateVcenterPassword()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_RotateVcenterPassword.json
+ // this example is just showing the usage of "PrivateClouds_RotateVcenterPassword" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ await privateCloud.RotateVcenterPasswordAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task RotateNsxtPassword_PrivateCloudsRotateNsxtPassword()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_RotateNsxtPassword.json
+ // this example is just showing the usage of "PrivateClouds_RotateNsxtPassword" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ await privateCloud.RotateNsxtPasswordAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAdminCredentials_PrivateCloudsListAdminCredentials()
+ {
+ // Generated from example definition: 2024-09-01/PrivateClouds_ListAdminCredentials.json
+ // this example is just showing the usage of "PrivateClouds_ListAdminCredentials" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // invoke the operation
+ AdminCredentials result = await privateCloud.GetAdminCredentialsAsync();
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ProvisionedNetworkCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ProvisionedNetworkCollection.cs
new file mode 100644
index 000000000000..6f6aad8aceb0
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ProvisionedNetworkCollection.cs
@@ -0,0 +1,160 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_ProvisionedNetworkCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_ProvisionedNetworksGet()
+ {
+ // Generated from example definition: 2024-09-01/ProvisionedNetworks_Get.json
+ // this example is just showing the usage of "ProvisionedNetwork_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ProvisionedNetworkResource
+ ProvisionedNetworkCollection collection = privateCloud.GetProvisionedNetworks();
+
+ // invoke the operation
+ string provisionedNetworkName = "vsan";
+ ProvisionedNetworkResource result = await collection.GetAsync(provisionedNetworkName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ ProvisionedNetworkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_ProvisionedNetworksList()
+ {
+ // Generated from example definition: 2024-09-01/ProvisionedNetworks_List.json
+ // this example is just showing the usage of "ProvisionedNetwork_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ProvisionedNetworkResource
+ ProvisionedNetworkCollection collection = privateCloud.GetProvisionedNetworks();
+
+ // invoke the operation and iterate over the result
+ await foreach (ProvisionedNetworkResource 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
+ ProvisionedNetworkData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_ProvisionedNetworksGet()
+ {
+ // Generated from example definition: 2024-09-01/ProvisionedNetworks_Get.json
+ // this example is just showing the usage of "ProvisionedNetwork_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ProvisionedNetworkResource
+ ProvisionedNetworkCollection collection = privateCloud.GetProvisionedNetworks();
+
+ // invoke the operation
+ string provisionedNetworkName = "vsan";
+ bool result = await collection.ExistsAsync(provisionedNetworkName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_ProvisionedNetworksGet()
+ {
+ // Generated from example definition: 2024-09-01/ProvisionedNetworks_Get.json
+ // this example is just showing the usage of "ProvisionedNetwork_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this ProvisionedNetworkResource
+ ProvisionedNetworkCollection collection = privateCloud.GetProvisionedNetworks();
+
+ // invoke the operation
+ string provisionedNetworkName = "vsan";
+ NullableResponse response = await collection.GetIfExistsAsync(provisionedNetworkName);
+ ProvisionedNetworkResource 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
+ ProvisionedNetworkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ProvisionedNetworkResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ProvisionedNetworkResource.cs
new file mode 100644
index 000000000000..d5d3865d78bc
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ProvisionedNetworkResource.cs
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_ProvisionedNetworkResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_ProvisionedNetworksGet()
+ {
+ // Generated from example definition: 2024-09-01/ProvisionedNetworks_Get.json
+ // this example is just showing the usage of "ProvisionedNetwork_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 ProvisionedNetworkResource created on azure
+ // for more information of creating ProvisionedNetworkResource, please refer to the document of ProvisionedNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string provisionedNetworkName = "vsan";
+ ResourceIdentifier provisionedNetworkResourceId = ProvisionedNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, provisionedNetworkName);
+ ProvisionedNetworkResource provisionedNetwork = client.GetProvisionedNetworkResource(provisionedNetworkResourceId);
+
+ // invoke the operation
+ ProvisionedNetworkResource result = await provisionedNetwork.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
+ ProvisionedNetworkData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PureStoragePolicyCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PureStoragePolicyCollection.cs
new file mode 100644
index 000000000000..ec660eec3fe6
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PureStoragePolicyCollection.cs
@@ -0,0 +1,200 @@
+// 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.Avs.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_PureStoragePolicyCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_PureStoragePoliciesCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_CreateOrUpdate.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this PureStoragePolicyResource
+ PureStoragePolicyCollection collection = privateCloud.GetPureStoragePolicies();
+
+ // invoke the operation
+ string storagePolicyName = "storagePolicy1";
+ PureStoragePolicyData data = new PureStoragePolicyData
+ {
+ Properties = new PureStoragePolicyProperties("storagePolicyDefinition1", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/PureStorage.Block/storagePools/storagePool1"),
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, storagePolicyName, data);
+ PureStoragePolicyResource 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
+ PureStoragePolicyData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_PureStoragePoliciesGet()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_Get.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this PureStoragePolicyResource
+ PureStoragePolicyCollection collection = privateCloud.GetPureStoragePolicies();
+
+ // invoke the operation
+ string storagePolicyName = "storagePolicy1";
+ PureStoragePolicyResource result = await collection.GetAsync(storagePolicyName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ PureStoragePolicyData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_PureStoragePoliciesList()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_List.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this PureStoragePolicyResource
+ PureStoragePolicyCollection collection = privateCloud.GetPureStoragePolicies();
+
+ // invoke the operation and iterate over the result
+ await foreach (PureStoragePolicyResource 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
+ PureStoragePolicyData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_PureStoragePoliciesGet()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_Get.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this PureStoragePolicyResource
+ PureStoragePolicyCollection collection = privateCloud.GetPureStoragePolicies();
+
+ // invoke the operation
+ string storagePolicyName = "storagePolicy1";
+ bool result = await collection.ExistsAsync(storagePolicyName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_PureStoragePoliciesGet()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_Get.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
+
+ // get the collection of this PureStoragePolicyResource
+ PureStoragePolicyCollection collection = privateCloud.GetPureStoragePolicies();
+
+ // invoke the operation
+ string storagePolicyName = "storagePolicy1";
+ NullableResponse response = await collection.GetIfExistsAsync(storagePolicyName);
+ PureStoragePolicyResource 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
+ PureStoragePolicyData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PureStoragePolicyResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PureStoragePolicyResource.cs
new file mode 100644
index 000000000000..c0b607175c17
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_PureStoragePolicyResource.cs
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Identity;
+using Azure.ResourceManager.Avs.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_PureStoragePolicyResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_PureStoragePoliciesGet()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_Get.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PureStoragePolicyResource created on azure
+ // for more information of creating PureStoragePolicyResource, please refer to the document of PureStoragePolicyResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string storagePolicyName = "storagePolicy1";
+ ResourceIdentifier pureStoragePolicyResourceId = PureStoragePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, storagePolicyName);
+ PureStoragePolicyResource pureStoragePolicy = client.GetPureStoragePolicyResource(pureStoragePolicyResourceId);
+
+ // invoke the operation
+ PureStoragePolicyResource result = await pureStoragePolicy.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
+ PureStoragePolicyData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Delete_PureStoragePoliciesDelete()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_Delete.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PureStoragePolicyResource created on azure
+ // for more information of creating PureStoragePolicyResource, please refer to the document of PureStoragePolicyResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string storagePolicyName = "storagePolicy1";
+ ResourceIdentifier pureStoragePolicyResourceId = PureStoragePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, storagePolicyName);
+ PureStoragePolicyResource pureStoragePolicy = client.GetPureStoragePolicyResource(pureStoragePolicyResourceId);
+
+ // invoke the operation
+ await pureStoragePolicy.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_PureStoragePoliciesCreateOrUpdate()
+ {
+ // Generated from example definition: 2024-09-01/PureStoragePolicies_CreateOrUpdate.json
+ // this example is just showing the usage of "PureStoragePolicy_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 PureStoragePolicyResource created on azure
+ // for more information of creating PureStoragePolicyResource, please refer to the document of PureStoragePolicyResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string storagePolicyName = "storagePolicy1";
+ ResourceIdentifier pureStoragePolicyResourceId = PureStoragePolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, storagePolicyName);
+ PureStoragePolicyResource pureStoragePolicy = client.GetPureStoragePolicyResource(pureStoragePolicyResourceId);
+
+ // invoke the operation
+ PureStoragePolicyData data = new PureStoragePolicyData
+ {
+ Properties = new PureStoragePolicyProperties("storagePolicyDefinition1", "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/PureStorage.Block/storagePools/storagePool1"),
+ };
+ ArmOperation lro = await pureStoragePolicy.UpdateAsync(WaitUntil.Completed, data);
+ PureStoragePolicyResource 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
+ PureStoragePolicyData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletCollection.cs
index 45bb7eb51b65..2771ff6f62de 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletCollection.cs
@@ -19,8 +19,8 @@ public partial class Sample_ScriptCmdletCollection
[Ignore("Only validating compilation of examples")]
public async Task Get_ScriptCmdletsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json
- // this example is just showing the usage of "ScriptCmdlets_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptCmdlets_Get.json
+ // this example is just showing the usage of "ScriptCmdlet_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();
@@ -54,8 +54,8 @@ public async Task Get_ScriptCmdletsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_ScriptCmdletsList()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_List.json
- // this example is just showing the usage of "ScriptCmdlets_List" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptCmdlets_List.json
+ // this example is just showing the usage of "ScriptCmdlet_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();
@@ -91,8 +91,8 @@ public async Task GetAll_ScriptCmdletsList()
[Ignore("Only validating compilation of examples")]
public async Task Exists_ScriptCmdletsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json
- // this example is just showing the usage of "ScriptCmdlets_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptCmdlets_Get.json
+ // this example is just showing the usage of "ScriptCmdlet_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();
@@ -122,8 +122,8 @@ public async Task Exists_ScriptCmdletsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_ScriptCmdletsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json
- // this example is just showing the usage of "ScriptCmdlets_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptCmdlets_Get.json
+ // this example is just showing the usage of "ScriptCmdlet_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletResource.cs
index a302f703cd23..a80ac40e6bd4 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptCmdletResource.cs
@@ -19,8 +19,8 @@ public partial class Sample_ScriptCmdletResource
[Ignore("Only validating compilation of examples")]
public async Task Get_ScriptCmdletsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptCmdlets_Get.json
- // this example is just showing the usage of "ScriptCmdlets_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptCmdlets_Get.json
+ // this example is just showing the usage of "ScriptCmdlet_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionCollection.cs
index 7a6e4fb2f0af..52ca06abde63 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionCollection.cs
@@ -9,7 +9,6 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
-using Azure.ResourceManager.Avs.Models;
using NUnit.Framework;
namespace Azure.ResourceManager.Avs.Samples
@@ -20,44 +19,28 @@ public partial class Sample_ScriptExecutionCollection
[Ignore("Only validating compilation of examples")]
public async Task CreateOrUpdate_ScriptExecutionsCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate.json
- // this example is just showing the usage of "ScriptExecutions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_CreateOrUpdate.json
+ // this example is just showing the usage of "ScriptExecution_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptExecutionResource
- ScriptExecutionCollection collection = avsPrivateCloud.GetScriptExecutions();
+ ScriptExecutionCollection collection = privateCloud.GetScriptExecutions();
// invoke the operation
string scriptExecutionName = "addSsoServer";
- ScriptExecutionData data = new ScriptExecutionData
- {
- ScriptCmdletId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource"),
- Parameters = {new ScriptStringExecutionParameterDetails("DomainName")
-{
-Value = "placeholderDomain.local",
-}, new ScriptStringExecutionParameterDetails("BaseUserDN")
-{
-Value = "DC=placeholder, DC=placeholder",
-}},
- HiddenParameters = {new ScriptSecureStringExecutionParameterDetails("Password")
-{
-SecureValue = "PlaceholderPassword",
-}},
- Timeout = "P0Y0M0DT0H60M60S",
- Retention = "P0Y0M60DT0H60M60S",
- };
+ ScriptExecutionData data = new ScriptExecutionData();
ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, scriptExecutionName, data);
ScriptExecutionResource result = lro.Value;
@@ -72,24 +55,24 @@ public async Task CreateOrUpdate_ScriptExecutionsCreateOrUpdate()
[Ignore("Only validating compilation of examples")]
public async Task Get_ScriptExecutionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json
- // this example is just showing the usage of "ScriptExecutions_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_Get.json
+ // this example is just showing the usage of "ScriptExecution_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptExecutionResource
- ScriptExecutionCollection collection = avsPrivateCloud.GetScriptExecutions();
+ ScriptExecutionCollection collection = privateCloud.GetScriptExecutions();
// invoke the operation
string scriptExecutionName = "addSsoServer";
@@ -106,24 +89,24 @@ public async Task Get_ScriptExecutionsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_ScriptExecutionsList()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_List.json
- // this example is just showing the usage of "ScriptExecutions_List" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_List.json
+ // this example is just showing the usage of "ScriptExecution_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptExecutionResource
- ScriptExecutionCollection collection = avsPrivateCloud.GetScriptExecutions();
+ ScriptExecutionCollection collection = privateCloud.GetScriptExecutions();
// invoke the operation and iterate over the result
await foreach (ScriptExecutionResource item in collection.GetAllAsync())
@@ -142,24 +125,24 @@ public async Task GetAll_ScriptExecutionsList()
[Ignore("Only validating compilation of examples")]
public async Task Exists_ScriptExecutionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json
- // this example is just showing the usage of "ScriptExecutions_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_Get.json
+ // this example is just showing the usage of "ScriptExecution_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptExecutionResource
- ScriptExecutionCollection collection = avsPrivateCloud.GetScriptExecutions();
+ ScriptExecutionCollection collection = privateCloud.GetScriptExecutions();
// invoke the operation
string scriptExecutionName = "addSsoServer";
@@ -172,24 +155,24 @@ public async Task Exists_ScriptExecutionsGet()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_ScriptExecutionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json
- // this example is just showing the usage of "ScriptExecutions_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_Get.json
+ // this example is just showing the usage of "ScriptExecution_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptExecutionResource
- ScriptExecutionCollection collection = avsPrivateCloud.GetScriptExecutions();
+ ScriptExecutionCollection collection = privateCloud.GetScriptExecutions();
// invoke the operation
string scriptExecutionName = "addSsoServer";
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionResource.cs
index 4abe44e96dc9..e9d41d76bcfe 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptExecutionResource.cs
@@ -21,8 +21,8 @@ public partial class Sample_ScriptExecutionResource
[Ignore("Only validating compilation of examples")]
public async Task Get_ScriptExecutionsGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Get.json
- // this example is just showing the usage of "ScriptExecutions_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_Get.json
+ // this example is just showing the usage of "ScriptExecution_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();
@@ -52,8 +52,8 @@ public async Task Get_ScriptExecutionsGet()
[Ignore("Only validating compilation of examples")]
public async Task Delete_ScriptExecutionsDelete()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_Delete.json
- // this example is just showing the usage of "ScriptExecutions_Delete" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_Delete.json
+ // this example is just showing the usage of "ScriptExecution_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();
@@ -79,8 +79,8 @@ public async Task Delete_ScriptExecutionsDelete()
[Ignore("Only validating compilation of examples")]
public async Task Update_ScriptExecutionsCreateOrUpdate()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_CreateOrUpdate.json
- // this example is just showing the usage of "ScriptExecutions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptExecutions_CreateOrUpdate.json
+ // this example is just showing the usage of "ScriptExecution_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();
@@ -97,23 +97,7 @@ public async Task Update_ScriptExecutionsCreateOrUpdate()
ScriptExecutionResource scriptExecution = client.GetScriptExecutionResource(scriptExecutionResourceId);
// invoke the operation
- ScriptExecutionData data = new ScriptExecutionData
- {
- ScriptCmdletId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource"),
- Parameters = {new ScriptStringExecutionParameterDetails("DomainName")
-{
-Value = "placeholderDomain.local",
-}, new ScriptStringExecutionParameterDetails("BaseUserDN")
-{
-Value = "DC=placeholder, DC=placeholder",
-}},
- HiddenParameters = {new ScriptSecureStringExecutionParameterDetails("Password")
-{
-SecureValue = "PlaceholderPassword",
-}},
- Timeout = "P0Y0M0DT0H60M60S",
- Retention = "P0Y0M60DT0H60M60S",
- };
+ ScriptExecutionData data = new ScriptExecutionData();
ArmOperation lro = await scriptExecution.UpdateAsync(WaitUntil.Completed, data);
ScriptExecutionResource result = lro.Value;
@@ -128,7 +112,7 @@ public async Task Update_ScriptExecutionsCreateOrUpdate()
[Ignore("Only validating compilation of examples")]
public async Task GetExecutionLogs_ScriptExecutionsGetExecutionLogs()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptExecutions_GetExecutionLogs.json
+ // Generated from example definition: 2024-09-01/ScriptExecutions_GetExecutionLogs.json
// this example is just showing the usage of "ScriptExecutions_GetExecutionLogs" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details 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/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageCollection.cs
index e44083cd3144..4bda8598315a 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageCollection.cs
@@ -19,24 +19,24 @@ public partial class Sample_ScriptPackageCollection
[Ignore("Only validating compilation of examples")]
public async Task Get_ScriptPackagesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json
- // this example is just showing the usage of "ScriptPackages_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptPackages_Get.json
+ // this example is just showing the usage of "ScriptPackage_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptPackageResource
- ScriptPackageCollection collection = avsPrivateCloud.GetScriptPackages();
+ ScriptPackageCollection collection = privateCloud.GetScriptPackages();
// invoke the operation
string scriptPackageName = "Microsoft.AVS.Management@3.0.48";
@@ -53,24 +53,24 @@ public async Task Get_ScriptPackagesGet()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_ScriptPackagesList()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_List.json
- // this example is just showing the usage of "ScriptPackages_List" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptPackages_List.json
+ // this example is just showing the usage of "ScriptPackage_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptPackageResource
- ScriptPackageCollection collection = avsPrivateCloud.GetScriptPackages();
+ ScriptPackageCollection collection = privateCloud.GetScriptPackages();
// invoke the operation and iterate over the result
await foreach (ScriptPackageResource item in collection.GetAllAsync())
@@ -89,24 +89,24 @@ public async Task GetAll_ScriptPackagesList()
[Ignore("Only validating compilation of examples")]
public async Task Exists_ScriptPackagesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json
- // this example is just showing the usage of "ScriptPackages_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptPackages_Get.json
+ // this example is just showing the usage of "ScriptPackage_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptPackageResource
- ScriptPackageCollection collection = avsPrivateCloud.GetScriptPackages();
+ ScriptPackageCollection collection = privateCloud.GetScriptPackages();
// invoke the operation
string scriptPackageName = "Microsoft.AVS.Management@3.0.48";
@@ -119,24 +119,24 @@ public async Task Exists_ScriptPackagesGet()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_ScriptPackagesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json
- // this example is just showing the usage of "ScriptPackages_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptPackages_Get.json
+ // this example is just showing the usage of "ScriptPackage_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 AvsPrivateCloudResource created on azure
- // for more information of creating AvsPrivateCloudResource, please refer to the document of AvsPrivateCloudResource
+ // this example assumes you already have this PrivateCloudResource created on azure
+ // for more information of creating PrivateCloudResource, please refer to the document of PrivateCloudResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "group1";
string privateCloudName = "cloud1";
- ResourceIdentifier avsPrivateCloudResourceId = AvsPrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
- AvsPrivateCloudResource avsPrivateCloud = client.GetAvsPrivateCloudResource(avsPrivateCloudResourceId);
+ ResourceIdentifier privateCloudResourceId = PrivateCloudResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ PrivateCloudResource privateCloud = client.GetPrivateCloudResource(privateCloudResourceId);
// get the collection of this ScriptPackageResource
- ScriptPackageCollection collection = avsPrivateCloud.GetScriptPackages();
+ ScriptPackageCollection collection = privateCloud.GetScriptPackages();
// invoke the operation
string scriptPackageName = "Microsoft.AVS.Management@3.0.48";
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageResource.cs
index 206a9964c3fc..7722e8bd3c50 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_ScriptPackageResource.cs
@@ -19,8 +19,8 @@ public partial class Sample_ScriptPackageResource
[Ignore("Only validating compilation of examples")]
public async Task Get_ScriptPackagesGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/ScriptPackages_Get.json
- // this example is just showing the usage of "ScriptPackages_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/ScriptPackages_Get.json
+ // this example is just showing the usage of "ScriptPackage_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
index a09f3b17dbbd..98297ebb2072 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions
{
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task CheckAvsQuotaAvailability_LocationsCheckQuotaAvailability()
+ public async Task CheckTrialAvailabilityLocation_LocationsCheckTrialAvailability()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckQuotaAvailability.json
- // this example is just showing the usage of "Locations_CheckQuotaAvailability" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Locations_CheckTrialAvailability.json
+ // this example is just showing the usage of "Locations_CheckTrialAvailability" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -36,17 +36,17 @@ public async Task CheckAvsQuotaAvailability_LocationsCheckQuotaAvailability()
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
- AzureLocation location = new AzureLocation("eastus");
- AvsSubscriptionQuotaAvailabilityResult result = await subscriptionResource.CheckAvsQuotaAvailabilityAsync(location);
+ string location = "eastus";
+ Trial result = await subscriptionResource.CheckTrialAvailabilityLocationAsync(location);
Console.WriteLine($"Succeeded: {result}");
}
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task CheckAvsTrialAvailability_LocationsCheckTrialAvailability()
+ public async Task CheckTrialAvailabilityLocation_LocationsCheckTrialAvailabilityWithSku()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailability.json
+ // Generated from example definition: 2024-09-01/Locations_CheckTrialAvailabilityWithSku.json
// this example is just showing the usage of "Locations_CheckTrialAvailability" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details 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,18 +61,19 @@ public async Task CheckAvsTrialAvailability_LocationsCheckTrialAvailability()
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
- AzureLocation location = new AzureLocation("eastus");
- AvsSubscriptionTrialAvailabilityResult result = await subscriptionResource.CheckAvsTrialAvailabilityAsync(location);
+ string location = "eastus";
+ AvsSku sku = new AvsSku("avs52t");
+ Trial result = await subscriptionResource.CheckTrialAvailabilityLocationAsync(location, sku: sku);
Console.WriteLine($"Succeeded: {result}");
}
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task CheckAvsTrialAvailability_LocationsCheckTrialAvailabilityWithSku()
+ public async Task CheckQuotaAvailabilityLocation_LocationsCheckQuotaAvailability()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/Locations_CheckTrialAvailabilityWithSku.json
- // this example is just showing the usage of "Locations_CheckTrialAvailability" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/Locations_CheckQuotaAvailability.json
+ // this example is just showing the usage of "Locations_CheckQuotaAvailability" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -86,19 +87,18 @@ public async Task CheckAvsTrialAvailability_LocationsCheckTrialAvailabilityWithS
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation
- AzureLocation location = new AzureLocation("eastus");
- AvsSku sku = new AvsSku("avs52t");
- AvsSubscriptionTrialAvailabilityResult result = await subscriptionResource.CheckAvsTrialAvailabilityAsync(location, sku: sku);
+ string location = "eastus";
+ Quota result = await subscriptionResource.CheckQuotaAvailabilityLocationAsync(location);
Console.WriteLine($"Succeeded: {result}");
}
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetAvsPrivateClouds_PrivateCloudsListInSubscription()
+ public async Task GetPrivateClouds_PrivateCloudsListInSubscription()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription.json
- // this example is just showing the usage of "PrivateClouds_ListInSubscription" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PrivateClouds_ListInSubscription.json
+ // this example is just showing the usage of "PrivateCloud_ListInSubscription" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -112,11 +112,11 @@ public async Task GetAvsPrivateClouds_PrivateCloudsListInSubscription()
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
- await foreach (AvsPrivateCloudResource item in subscriptionResource.GetAvsPrivateCloudsAsync())
+ await foreach (PrivateCloudResource item in subscriptionResource.GetPrivateCloudsAsync())
{
// 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
- AvsPrivateCloudData resourceData = item.Data;
+ PrivateCloudData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
@@ -126,10 +126,10 @@ public async Task GetAvsPrivateClouds_PrivateCloudsListInSubscription()
[Test]
[Ignore("Only validating compilation of examples")]
- public async Task GetAvsPrivateClouds_PrivateCloudsListInSubscriptionStretched()
+ public async Task GetPrivateClouds_PrivateCloudsListInSubscriptionStretched()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/PrivateClouds_ListInSubscription_Stretched.json
- // this example is just showing the usage of "PrivateClouds_ListInSubscription" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/PrivateClouds_ListInSubscription_Stretched.json
+ // this example is just showing the usage of "PrivateCloud_ListInSubscription" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -143,16 +143,43 @@ public async Task GetAvsPrivateClouds_PrivateCloudsListInSubscriptionStretched()
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
- await foreach (AvsPrivateCloudResource item in subscriptionResource.GetAvsPrivateCloudsAsync())
+ await foreach (PrivateCloudResource item in subscriptionResource.GetPrivateCloudsAsync())
{
// 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
- AvsPrivateCloudData resourceData = item.Data;
+ PrivateCloudData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine("Succeeded");
}
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSkus_SkusList()
+ {
+ // Generated from example definition: 2024-09-01/Skus_List.json
+ // this example is just showing the usage of "Skus_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 = "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 (ResourceSku item in subscriptionResource.GetSkusAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
}
}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_VirtualMachineCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_VirtualMachineCollection.cs
new file mode 100644
index 000000000000..79485a026be9
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_VirtualMachineCollection.cs
@@ -0,0 +1,164 @@
+// 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 NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_VirtualMachineCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_VirtualMachinesGet()
+ {
+ // Generated from example definition: 2024-09-01/VirtualMachines_Get.json
+ // this example is just showing the usage of "VirtualMachine_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this VirtualMachineResource
+ VirtualMachineCollection collection = cluster.GetVirtualMachines();
+
+ // invoke the operation
+ string virtualMachineId = "vm-209";
+ VirtualMachineResource result = await collection.GetAsync(virtualMachineId);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ VirtualMachineData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAll_VirtualMachinesList()
+ {
+ // Generated from example definition: 2024-09-01/VirtualMachines_List.json
+ // this example is just showing the usage of "VirtualMachine_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this VirtualMachineResource
+ VirtualMachineCollection collection = cluster.GetVirtualMachines();
+
+ // invoke the operation and iterate over the result
+ await foreach (VirtualMachineResource 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
+ VirtualMachineData resourceData = item.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_VirtualMachinesGet()
+ {
+ // Generated from example definition: 2024-09-01/VirtualMachines_Get.json
+ // this example is just showing the usage of "VirtualMachine_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this VirtualMachineResource
+ VirtualMachineCollection collection = cluster.GetVirtualMachines();
+
+ // invoke the operation
+ string virtualMachineId = "vm-209";
+ bool result = await collection.ExistsAsync(virtualMachineId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_VirtualMachinesGet()
+ {
+ // Generated from example definition: 2024-09-01/VirtualMachines_Get.json
+ // this example is just showing the usage of "VirtualMachine_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 ClusterResource created on azure
+ // for more information of creating ClusterResource, please refer to the document of ClusterResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ ResourceIdentifier clusterResourceId = ClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName);
+ ClusterResource cluster = client.GetClusterResource(clusterResourceId);
+
+ // get the collection of this VirtualMachineResource
+ VirtualMachineCollection collection = cluster.GetVirtualMachines();
+
+ // invoke the operation
+ string virtualMachineId = "vm-209";
+ NullableResponse response = await collection.GetIfExistsAsync(virtualMachineId);
+ VirtualMachineResource 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
+ VirtualMachineData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_VirtualMachineResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_VirtualMachineResource.cs
new file mode 100644
index 000000000000..4885a2444d62
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_VirtualMachineResource.cs
@@ -0,0 +1,80 @@
+// 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.Avs.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.Avs.Samples
+{
+ public partial class Sample_VirtualMachineResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_VirtualMachinesGet()
+ {
+ // Generated from example definition: 2024-09-01/VirtualMachines_Get.json
+ // this example is just showing the usage of "VirtualMachine_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 VirtualMachineResource created on azure
+ // for more information of creating VirtualMachineResource, please refer to the document of VirtualMachineResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ string virtualMachineId = "vm-209";
+ ResourceIdentifier virtualMachineResourceId = VirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName, virtualMachineId);
+ VirtualMachineResource virtualMachine = client.GetVirtualMachineResource(virtualMachineResourceId);
+
+ // invoke the operation
+ VirtualMachineResource result = await virtualMachine.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
+ VirtualMachineData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task RestrictMovement_VirtualMachinesRestrictMovement()
+ {
+ // Generated from example definition: 2024-09-01/VirtualMachines_RestrictMovement.json
+ // this example is just showing the usage of "VirtualMachines_RestrictMovement" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this VirtualMachineResource created on azure
+ // for more information of creating VirtualMachineResource, please refer to the document of VirtualMachineResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ string clusterName = "cluster1";
+ string virtualMachineId = "vm-209";
+ ResourceIdentifier virtualMachineResourceId = VirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName, clusterName, virtualMachineId);
+ VirtualMachineResource virtualMachine = client.GetVirtualMachineResource(virtualMachineResourceId);
+
+ // invoke the operation
+ VirtualMachineRestrictMovement restrictMovement = new VirtualMachineRestrictMovement();
+ await virtualMachine.RestrictMovementAsync(WaitUntil.Completed, restrictMovement);
+
+ Console.WriteLine("Succeeded");
+ }
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayCollection.cs
index e7437fb83191..72b192c93e8b 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayCollection.cs
@@ -19,8 +19,8 @@ public partial class Sample_WorkloadNetworkGatewayCollection
[Ignore("Only validating compilation of examples")]
public async Task Get_WorkloadNetworksGetGateway()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json
- // this example is just showing the usage of "WorkloadNetworks_GetGateway" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetGateway.json
+ // this example is just showing the usage of "WorkloadNetworkGateway_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();
@@ -53,8 +53,8 @@ public async Task Get_WorkloadNetworksGetGateway()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_WorkloadNetworksListGateways()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListGateways.json
- // this example is just showing the usage of "WorkloadNetworks_ListGateways" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListGateways.json
+ // this example is just showing the usage of "WorkloadNetworkGateway_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();
@@ -89,8 +89,8 @@ public async Task GetAll_WorkloadNetworksListGateways()
[Ignore("Only validating compilation of examples")]
public async Task Exists_WorkloadNetworksGetGateway()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json
- // this example is just showing the usage of "WorkloadNetworks_GetGateway" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetGateway.json
+ // this example is just showing the usage of "WorkloadNetworkGateway_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();
@@ -119,8 +119,8 @@ public async Task Exists_WorkloadNetworksGetGateway()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_WorkloadNetworksGetGateway()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json
- // this example is just showing the usage of "WorkloadNetworks_GetGateway" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetGateway.json
+ // this example is just showing the usage of "WorkloadNetworkGateway_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayResource.cs
index fc95dde97b80..f2282cf1c745 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkGatewayResource.cs
@@ -19,8 +19,8 @@ public partial class Sample_WorkloadNetworkGatewayResource
[Ignore("Only validating compilation of examples")]
public async Task Get_WorkloadNetworksGetGateway()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetGateway.json
- // this example is just showing the usage of "WorkloadNetworks_GetGateway" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetGateway.json
+ // this example is just showing the usage of "WorkloadNetworkGateway_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkResource.cs
index 5f562c034797..5596cec6e575 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkResource.cs
@@ -9,6 +9,7 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
+using Azure.ResourceManager.Avs.Models;
using NUnit.Framework;
namespace Azure.ResourceManager.Avs.Samples
@@ -19,8 +20,8 @@ public partial class Sample_WorkloadNetworkResource
[Ignore("Only validating compilation of examples")]
public async Task Get_WorkloadNetworksGet()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_Get.json
- // this example is just showing the usage of "WorkloadNetworks_Get" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_Get.json
+ // this example is just showing the usage of "WorkloadNetwork_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();
@@ -44,5 +45,822 @@ public async Task Get_WorkloadNetworksGet()
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkDhcpConfigurations_WorkloadNetworksListDhcp()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListDhcp.json
+ // this example is just showing the usage of "WorkloadNetworkDhcp_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkloadNetworkDhcp item in workloadNetwork.GetWorkloadNetworkDhcpConfigurationsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkDhcpConfiguration_WorkloadNetworksGetDhcp()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetDhcp.json
+ // this example is just showing the usage of "WorkloadNetworkDhcpConfigurations_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dhcpId = "dhcp1";
+ WorkloadNetworkDhcp result = await workloadNetwork.GetWorkloadNetworkDhcpConfigurationAsync(dhcpId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateWorkloadNetworkDhcpConfiguration_WorkloadNetworksCreateDhcp()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_CreateDhcp.json
+ // this example is just showing the usage of "WorkloadNetworkDhcp_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dhcpId = "dhcp1";
+ WorkloadNetworkDhcp workloadNetworkDhcp = new WorkloadNetworkDhcp();
+ ArmOperation lro = await workloadNetwork.CreateWorkloadNetworkDhcpConfigurationAsync(WaitUntil.Completed, dhcpId, workloadNetworkDhcp);
+ WorkloadNetworkDhcp result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task UpdateWorkloadNetworkDhcpConfiguration_WorkloadNetworksUpdateDhcp()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateDhcp.json
+ // this example is just showing the usage of "WorkloadNetworkDhcp_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dhcpId = "dhcp1";
+ WorkloadNetworkDhcp workloadNetworkDhcp = new WorkloadNetworkDhcp();
+ ArmOperation lro = await workloadNetwork.UpdateWorkloadNetworkDhcpConfigurationAsync(WaitUntil.Completed, dhcpId, workloadNetworkDhcp);
+ WorkloadNetworkDhcp result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task DeleteWorkloadNetworkDhcpConfiguration_WorkloadNetworksDeleteDhcp()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteDhcp.json
+ // this example is just showing the usage of "WorkloadNetworkDhcp_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dhcpId = "dhcp1";
+ await workloadNetwork.DeleteWorkloadNetworkDhcpConfigurationAsync(WaitUntil.Completed, dhcpId);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkDnsServices_WorkloadNetworksListDnsServices()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListDnsServices.json
+ // this example is just showing the usage of "WorkloadNetworkDnsService_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkloadNetworkDnsService item in workloadNetwork.GetWorkloadNetworkDnsServicesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkDnsService_WorkloadNetworksGetDnsService()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetDnsService.json
+ // this example is just showing the usage of "WorkloadNetworkDnsService_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsServiceId = "dnsService1";
+ WorkloadNetworkDnsService result = await workloadNetwork.GetWorkloadNetworkDnsServiceAsync(dnsServiceId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateWorkloadNetworkDnsService_WorkloadNetworksCreateDnsService()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_CreateDnsService.json
+ // this example is just showing the usage of "WorkloadNetworkDnsService_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsServiceId = "dnsService1";
+ WorkloadNetworkDnsService workloadNetworkDnsService = new WorkloadNetworkDnsService();
+ ArmOperation lro = await workloadNetwork.CreateWorkloadNetworkDnsServiceAsync(WaitUntil.Completed, dnsServiceId, workloadNetworkDnsService);
+ WorkloadNetworkDnsService result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task UpdateWorkloadNetworkDnsService_WorkloadNetworksUpdateDnsService()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateDnsService.json
+ // this example is just showing the usage of "WorkloadNetworkDnsService_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsServiceId = "dnsService1";
+ WorkloadNetworkDnsService workloadNetworkDnsService = new WorkloadNetworkDnsService();
+ ArmOperation lro = await workloadNetwork.UpdateWorkloadNetworkDnsServiceAsync(WaitUntil.Completed, dnsServiceId, workloadNetworkDnsService);
+ WorkloadNetworkDnsService result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task DeleteWorkloadNetworkDnsService_WorkloadNetworksDeleteDnsService()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteDnsService.json
+ // this example is just showing the usage of "WorkloadNetworkDnsService_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsServiceId = "dnsService1";
+ await workloadNetwork.DeleteWorkloadNetworkDnsServiceAsync(WaitUntil.Completed, dnsServiceId);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkDnsZones_WorkloadNetworksListDnsZones()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListDnsZones.json
+ // this example is just showing the usage of "WorkloadNetworkDnsZone_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkloadNetworkDnsZone item in workloadNetwork.GetWorkloadNetworkDnsZonesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkDnsZone_WorkloadNetworksGetDnsZone()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetDnsZone.json
+ // this example is just showing the usage of "WorkloadNetworkDnsZone_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsZoneId = "dnsZone1";
+ WorkloadNetworkDnsZone result = await workloadNetwork.GetWorkloadNetworkDnsZoneAsync(dnsZoneId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateWorkloadNetworkDnsZone_WorkloadNetworksCreateDnsZone()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_CreateDnsZone.json
+ // this example is just showing the usage of "WorkloadNetworkDnsZone_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsZoneId = "dnsZone1";
+ WorkloadNetworkDnsZone workloadNetworkDnsZone = new WorkloadNetworkDnsZone();
+ ArmOperation lro = await workloadNetwork.CreateWorkloadNetworkDnsZoneAsync(WaitUntil.Completed, dnsZoneId, workloadNetworkDnsZone);
+ WorkloadNetworkDnsZone result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task UpdateWorkloadNetworkDnsZone_WorkloadNetworksUpdateDnsZone()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateDnsZone.json
+ // this example is just showing the usage of "WorkloadNetworkDnsZone_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsZoneId = "dnsZone1";
+ WorkloadNetworkDnsZone workloadNetworkDnsZone = new WorkloadNetworkDnsZone();
+ ArmOperation lro = await workloadNetwork.UpdateWorkloadNetworkDnsZoneAsync(WaitUntil.Completed, dnsZoneId, workloadNetworkDnsZone);
+ WorkloadNetworkDnsZone result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task DeleteWorkloadNetworkDnsZone_WorkloadNetworksDeleteDnsZone()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteDnsZone.json
+ // this example is just showing the usage of "WorkloadNetworkDnsZone_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string dnsZoneId = "dnsZone1";
+ await workloadNetwork.DeleteWorkloadNetworkDnsZoneAsync(WaitUntil.Completed, dnsZoneId);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkPortMirroringProfiles_WorkloadNetworksListPortMirroring()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListPortMirroring.json
+ // this example is just showing the usage of "WorkloadNetworkPortMirroring_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkloadNetworkPortMirroring item in workloadNetwork.GetWorkloadNetworkPortMirroringProfilesAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkPortMirroringProfile_WorkloadNetworksGetPortMirroring()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetPortMirroring.json
+ // this example is just showing the usage of "WorkloadNetworkPortMirroring_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string portMirroringId = "portMirroring1";
+ WorkloadNetworkPortMirroring result = await workloadNetwork.GetWorkloadNetworkPortMirroringProfileAsync(portMirroringId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateWorkloadNetworkPortMirroringProfile_WorkloadNetworksCreatePortMirroring()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_CreatePortMirroring.json
+ // this example is just showing the usage of "WorkloadNetworkPortMirroring_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string portMirroringId = "portMirroring1";
+ WorkloadNetworkPortMirroring workloadNetworkPortMirroring = new WorkloadNetworkPortMirroring();
+ ArmOperation lro = await workloadNetwork.CreateWorkloadNetworkPortMirroringProfileAsync(WaitUntil.Completed, portMirroringId, workloadNetworkPortMirroring);
+ WorkloadNetworkPortMirroring result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task UpdateWorkloadNetworkPortMirroringProfile_WorkloadNetworksUpdatePortMirroring()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_UpdatePortMirroring.json
+ // this example is just showing the usage of "WorkloadNetworkPortMirroring_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string portMirroringId = "portMirroring1";
+ WorkloadNetworkPortMirroring workloadNetworkPortMirroring = new WorkloadNetworkPortMirroring();
+ ArmOperation lro = await workloadNetwork.UpdateWorkloadNetworkPortMirroringProfileAsync(WaitUntil.Completed, portMirroringId, workloadNetworkPortMirroring);
+ WorkloadNetworkPortMirroring result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task DeleteWorkloadNetworkPortMirroringProfile_WorkloadNetworksDeletePortMirroring()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_DeletePortMirroring.json
+ // this example is just showing the usage of "WorkloadNetworkPortMirroring_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string portMirroringId = "portMirroring1";
+ await workloadNetwork.DeleteWorkloadNetworkPortMirroringProfileAsync(WaitUntil.Completed, portMirroringId);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkPublicIps_WorkloadNetworksListPublicIPs()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListPublicIPs.json
+ // this example is just showing the usage of "WorkloadNetworkPublicIP_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkloadNetworkPublicIP item in workloadNetwork.GetWorkloadNetworkPublicIpsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkPublicIp_WorkloadNetworksGetPublicIP()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetPublicIP.json
+ // this example is just showing the usage of "WorkloadNetworkPublicIP_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string publicIPId = "publicIP1";
+ WorkloadNetworkPublicIP result = await workloadNetwork.GetWorkloadNetworkPublicIpAsync(publicIPId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateWorkloadNetworkPublicIp_WorkloadNetworksCreatePublicIP()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_CreatePublicIP.json
+ // this example is just showing the usage of "WorkloadNetworkPublicIP_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string publicIPId = "publicIP1";
+ WorkloadNetworkPublicIP workloadNetworkPublicIP = new WorkloadNetworkPublicIP();
+ ArmOperation lro = await workloadNetwork.CreateWorkloadNetworkPublicIpAsync(WaitUntil.Completed, publicIPId, workloadNetworkPublicIP);
+ WorkloadNetworkPublicIP result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task DeleteWorkloadNetworkPublicIp_WorkloadNetworksDeletePublicIP()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_DeletePublicIP.json
+ // this example is just showing the usage of "WorkloadNetworkPublicIP_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string publicIPId = "publicIP1";
+ await workloadNetwork.DeleteWorkloadNetworkPublicIpAsync(WaitUntil.Completed, publicIPId);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkVmGroups_WorkloadNetworksListVMGroups()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListVMGroups.json
+ // this example is just showing the usage of "WorkloadNetworkVMGroup_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (WorkloadNetworkVmGroup item in workloadNetwork.GetWorkloadNetworkVmGroupsAsync())
+ {
+ Console.WriteLine($"Succeeded: {item}");
+ }
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetWorkloadNetworkVmGroup_WorkloadNetworksGetVMGroup()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetVMGroup.json
+ // this example is just showing the usage of "WorkloadNetworkVMGroup_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string vmGroupId = "vmGroup1";
+ WorkloadNetworkVmGroup result = await workloadNetwork.GetWorkloadNetworkVmGroupAsync(vmGroupId);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateWorkloadNetworkVmGroup_WorkloadNetworksCreateVMGroup()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_CreateVMGroup.json
+ // this example is just showing the usage of "WorkloadNetworkVMGroup_Create" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string vmGroupId = "vmGroup1";
+ WorkloadNetworkVmGroup workloadNetworkVmGroup = new WorkloadNetworkVmGroup();
+ ArmOperation lro = await workloadNetwork.CreateWorkloadNetworkVmGroupAsync(WaitUntil.Completed, vmGroupId, workloadNetworkVmGroup);
+ WorkloadNetworkVmGroup result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task UpdateWorkloadNetworkVmGroup_WorkloadNetworksUpdateVMGroup()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateVMGroup.json
+ // this example is just showing the usage of "WorkloadNetworkVMGroup_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string vmGroupId = "vmGroup1";
+ WorkloadNetworkVmGroup workloadNetworkVmGroup = new WorkloadNetworkVmGroup();
+ ArmOperation lro = await workloadNetwork.UpdateWorkloadNetworkVmGroupAsync(WaitUntil.Completed, vmGroupId, workloadNetworkVmGroup);
+ WorkloadNetworkVmGroup result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task DeleteWorkloadNetworkVmGroup_WorkloadNetworksDeleteVMGroup()
+ {
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteVMGroup.json
+ // this example is just showing the usage of "WorkloadNetworkVMGroup_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 WorkloadNetworkResource created on azure
+ // for more information of creating WorkloadNetworkResource, please refer to the document of WorkloadNetworkResource
+ string subscriptionId = "00000000-0000-0000-0000-000000000000";
+ string resourceGroupName = "group1";
+ string privateCloudName = "cloud1";
+ ResourceIdentifier workloadNetworkResourceId = WorkloadNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, privateCloudName);
+ WorkloadNetworkResource workloadNetwork = client.GetWorkloadNetworkResource(workloadNetworkResourceId);
+
+ // invoke the operation
+ string vmGroupId = "vmGroup1";
+ await workloadNetwork.DeleteWorkloadNetworkVmGroupAsync(WaitUntil.Completed, vmGroupId);
+
+ Console.WriteLine("Succeeded");
+ }
}
}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentCollection.cs
index a741a307dc4b..63e16484d0ba 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentCollection.cs
@@ -9,7 +9,6 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
-using Azure.ResourceManager.Avs.Models;
using NUnit.Framework;
namespace Azure.ResourceManager.Avs.Samples
@@ -20,8 +19,8 @@ public partial class Sample_WorkloadNetworkSegmentCollection
[Ignore("Only validating compilation of examples")]
public async Task CreateOrUpdate_WorkloadNetworksCreateSegments()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_CreateSegments.json
- // this example is just showing the usage of "WorkloadNetworks_CreateSegments" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_CreateSegments.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_Create" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -41,17 +40,7 @@ public async Task CreateOrUpdate_WorkloadNetworksCreateSegments()
// invoke the operation
string segmentId = "segment1";
- WorkloadNetworkSegmentData data = new WorkloadNetworkSegmentData
- {
- DisplayName = "segment1",
- ConnectedGateway = "/infra/tier-1s/gateway",
- Subnet = new WorkloadNetworkSegmentSubnet
- {
- DhcpRanges = { "40.20.0.0-40.20.0.1" },
- GatewayAddress = "40.20.20.20/16",
- },
- Revision = 1L,
- };
+ WorkloadNetworkSegmentData data = new WorkloadNetworkSegmentData();
ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, segmentId, data);
WorkloadNetworkSegmentResource result = lro.Value;
@@ -66,8 +55,8 @@ public async Task CreateOrUpdate_WorkloadNetworksCreateSegments()
[Ignore("Only validating compilation of examples")]
public async Task Get_WorkloadNetworksGetSegment()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json
- // this example is just showing the usage of "WorkloadNetworks_GetSegment" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetSegment.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_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();
@@ -100,8 +89,8 @@ public async Task Get_WorkloadNetworksGetSegment()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_WorkloadNetworksListSegments()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListSegments.json
- // this example is just showing the usage of "WorkloadNetworks_ListSegments" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListSegments.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_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();
@@ -136,8 +125,8 @@ public async Task GetAll_WorkloadNetworksListSegments()
[Ignore("Only validating compilation of examples")]
public async Task Exists_WorkloadNetworksGetSegment()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json
- // this example is just showing the usage of "WorkloadNetworks_GetSegment" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetSegment.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_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();
@@ -166,8 +155,8 @@ public async Task Exists_WorkloadNetworksGetSegment()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_WorkloadNetworksGetSegment()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json
- // this example is just showing the usage of "WorkloadNetworks_GetSegment" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetSegment.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentResource.cs
index ddc503288bdc..cd3f1167a090 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkSegmentResource.cs
@@ -9,7 +9,6 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
-using Azure.ResourceManager.Avs.Models;
using NUnit.Framework;
namespace Azure.ResourceManager.Avs.Samples
@@ -20,8 +19,8 @@ public partial class Sample_WorkloadNetworkSegmentResource
[Ignore("Only validating compilation of examples")]
public async Task Get_WorkloadNetworksGetSegment()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetSegment.json
- // this example is just showing the usage of "WorkloadNetworks_GetSegment" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetSegment.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_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();
@@ -51,8 +50,8 @@ public async Task Get_WorkloadNetworksGetSegment()
[Ignore("Only validating compilation of examples")]
public async Task Delete_WorkloadNetworksDeleteSegment()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_DeleteSegment.json
- // this example is just showing the usage of "WorkloadNetworks_DeleteSegment" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_DeleteSegment.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_DeleteSegment" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
@@ -78,8 +77,8 @@ public async Task Delete_WorkloadNetworksDeleteSegment()
[Ignore("Only validating compilation of examples")]
public async Task Update_WorkloadNetworksUpdateSegments()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_UpdateSegments.json
- // this example is just showing the usage of "WorkloadNetworks_UpdateSegments" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_UpdateSegments.json
+ // this example is just showing the usage of "WorkloadNetworkSegment_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();
@@ -96,16 +95,7 @@ public async Task Update_WorkloadNetworksUpdateSegments()
WorkloadNetworkSegmentResource workloadNetworkSegment = client.GetWorkloadNetworkSegmentResource(workloadNetworkSegmentResourceId);
// invoke the operation
- WorkloadNetworkSegmentData data = new WorkloadNetworkSegmentData
- {
- ConnectedGateway = "/infra/tier-1s/gateway",
- Subnet = new WorkloadNetworkSegmentSubnet
- {
- DhcpRanges = { "40.20.0.0-40.20.0.1" },
- GatewayAddress = "40.20.20.20/16",
- },
- Revision = 1L,
- };
+ WorkloadNetworkSegmentData data = new WorkloadNetworkSegmentData();
ArmOperation lro = await workloadNetworkSegment.UpdateAsync(WaitUntil.Completed, data);
WorkloadNetworkSegmentResource result = lro.Value;
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineCollection.cs
index 7008c5527d7b..6270a42102fa 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineCollection.cs
@@ -19,8 +19,8 @@ public partial class Sample_WorkloadNetworkVirtualMachineCollection
[Ignore("Only validating compilation of examples")]
public async Task Get_WorkloadNetworksGetVirtualMachine()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json
- // this example is just showing the usage of "WorkloadNetworks_GetVirtualMachine" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json
+ // this example is just showing the usage of "WorkloadNetworkVirtualMachine_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();
@@ -53,8 +53,8 @@ public async Task Get_WorkloadNetworksGetVirtualMachine()
[Ignore("Only validating compilation of examples")]
public async Task GetAll_WorkloadNetworksListVirtualMachines()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_ListVirtualMachines.json
- // this example is just showing the usage of "WorkloadNetworks_ListVirtualMachines" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_ListVirtualMachines.json
+ // this example is just showing the usage of "WorkloadNetworkVirtualMachine_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();
@@ -89,8 +89,8 @@ public async Task GetAll_WorkloadNetworksListVirtualMachines()
[Ignore("Only validating compilation of examples")]
public async Task Exists_WorkloadNetworksGetVirtualMachine()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json
- // this example is just showing the usage of "WorkloadNetworks_GetVirtualMachine" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json
+ // this example is just showing the usage of "WorkloadNetworkVirtualMachine_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();
@@ -119,8 +119,8 @@ public async Task Exists_WorkloadNetworksGetVirtualMachine()
[Ignore("Only validating compilation of examples")]
public async Task GetIfExists_WorkloadNetworksGetVirtualMachine()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json
- // this example is just showing the usage of "WorkloadNetworks_GetVirtualMachine" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json
+ // this example is just showing the usage of "WorkloadNetworkVirtualMachine_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineResource.cs b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineResource.cs
index caa4bb73c7c0..03d675e8e74b 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/samples/Generated/Samples/Sample_WorkloadNetworkVirtualMachineResource.cs
@@ -19,8 +19,8 @@ public partial class Sample_WorkloadNetworkVirtualMachineResource
[Ignore("Only validating compilation of examples")]
public async Task Get_WorkloadNetworksGetVirtualMachine()
{
- // Generated from example definition: specification/vmware/resource-manager/Microsoft.AVS/stable/2023-09-01/examples/WorkloadNetworks_GetVirtualMachine.json
- // this example is just showing the usage of "WorkloadNetworks_GetVirtualMachine" operation, for the dependent resources, they will have to be created separately.
+ // Generated from example definition: 2024-09-01/WorkloadNetworks_GetVirtualMachine.json
+ // this example is just showing the usage of "WorkloadNetworkVirtualMachine_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();
diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonCollection.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonCollection.cs
similarity index 60%
rename from sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonCollection.cs
rename to sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonCollection.cs
index 2294956f0fa7..b533db559f97 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonCollection.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonCollection.cs
@@ -18,28 +18,28 @@
namespace Azure.ResourceManager.Avs
{
///
- /// A class representing a collection of and their operations.
- /// Each in the collection will belong to the same instance of .
- /// To get an instance call the GetAvsPrivateCloudAddons method from an instance of .
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get an instance call the GetAddons method from an instance of .
///
- public partial class AvsPrivateCloudAddonCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ public partial class AddonCollection : ArmCollection, IEnumerable, IAsyncEnumerable
{
- private readonly ClientDiagnostics _avsPrivateCloudAddonAddonsClientDiagnostics;
- private readonly AddonsRestOperations _avsPrivateCloudAddonAddonsRestClient;
+ private readonly ClientDiagnostics _addonClientDiagnostics;
+ private readonly AddonsRestOperations _addonRestClient;
- /// Initializes a new instance of the class for mocking.
- protected AvsPrivateCloudAddonCollection()
+ /// Initializes a new instance of the class for mocking.
+ protected AddonCollection()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
/// The client parameters to use in these operations.
/// The identifier of the parent resource that is the target of operations.
- internal AvsPrivateCloudAddonCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ internal AddonCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
{
- _avsPrivateCloudAddonAddonsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Avs", AvsPrivateCloudAddonResource.ResourceType.Namespace, Diagnostics);
- TryGetApiVersion(AvsPrivateCloudAddonResource.ResourceType, out string avsPrivateCloudAddonAddonsApiVersion);
- _avsPrivateCloudAddonAddonsRestClient = new AddonsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsPrivateCloudAddonAddonsApiVersion);
+ _addonClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Avs", AddonResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(AddonResource.ResourceType, out string addonApiVersion);
+ _addonRestClient = new AddonsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, addonApiVersion);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -47,8 +47,8 @@ internal AvsPrivateCloudAddonCollection(ArmClient client, ResourceIdentifier id)
internal static void ValidateResourceId(ResourceIdentifier id)
{
- if (id.ResourceType != AvsPrivateCloudResource.ResourceType)
- throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AvsPrivateCloudResource.ResourceType), nameof(id));
+ if (id.ResourceType != PrivateCloudResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, PrivateCloudResource.ResourceType), nameof(id));
}
///
@@ -60,15 +60,15 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id
- /// Addons_CreateOrUpdate
+ /// Addon_CreateOrUpdate
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -78,17 +78,17 @@ internal static void ValidateResourceId(ResourceIdentifier id)
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string addonName, AvsPrivateCloudAddonData data, CancellationToken cancellationToken = default)
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string addonName, AddonData data, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
Argument.AssertNotNull(data, nameof(data));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.CreateOrUpdate");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.CreateOrUpdate");
scope.Start();
try
{
- var response = await _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data, cancellationToken).ConfigureAwait(false);
- var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = await _addonRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new AvsArmOperation(new AddonOperationSource(Client), _addonClientDiagnostics, Pipeline, _addonRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -109,15 +109,15 @@ public virtual async Task> CreateOrUp
///
/// -
/// Operation Id
- /// Addons_CreateOrUpdate
+ /// Addon_CreateOrUpdate
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -127,17 +127,17 @@ public virtual async Task> CreateOrUp
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string addonName, AvsPrivateCloudAddonData data, CancellationToken cancellationToken = default)
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string addonName, AddonData data, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
Argument.AssertNotNull(data, nameof(data));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.CreateOrUpdate");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.CreateOrUpdate");
scope.Start();
try
{
- var response = _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data, cancellationToken);
- var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = _addonRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data, cancellationToken);
+ var operation = new AvsArmOperation(new AddonOperationSource(Client), _addonClientDiagnostics, Pipeline, _addonRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -158,15 +158,15 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -174,18 +174,18 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual async Task> GetAsync(string addonName, CancellationToken cancellationToken = default)
+ public virtual async Task> GetAsync(string addonName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.Get");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.Get");
scope.Start();
try
{
- var response = await _avsPrivateCloudAddonAddonsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken).ConfigureAwait(false);
+ var response = await _addonRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken).ConfigureAwait(false);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
- return Response.FromValue(new AvsPrivateCloudAddonResource(Client, response.Value), response.GetRawResponse());
+ return Response.FromValue(new AddonResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -203,15 +203,15 @@ public virtual async Task> GetAsync(strin
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -219,18 +219,18 @@ public virtual async Task> GetAsync(strin
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual Response Get(string addonName, CancellationToken cancellationToken = default)
+ public virtual Response Get(string addonName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.Get");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.Get");
scope.Start();
try
{
- var response = _avsPrivateCloudAddonAddonsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken);
+ var response = _addonRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
- return Response.FromValue(new AvsPrivateCloudAddonResource(Client, response.Value), response.GetRawResponse());
+ return Response.FromValue(new AddonResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -248,25 +248,25 @@ public virtual Response Get(string addonName, Canc
///
/// -
/// Operation Id
- /// Addons_List
+ /// Addon_List
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => _avsPrivateCloudAddonAddonsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsPrivateCloudAddonAddonsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
- return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AvsPrivateCloudAddonResource(Client, AvsPrivateCloudAddonData.DeserializeAvsPrivateCloudAddonData(e)), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, "AvsPrivateCloudAddonCollection.GetAll", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _addonRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _addonRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AddonResource(Client, AddonData.DeserializeAddonData(e)), _addonClientDiagnostics, Pipeline, "AddonCollection.GetAll", "value", "nextLink", cancellationToken);
}
///
@@ -278,25 +278,25 @@ public virtual AsyncPageable GetAllAsync(Cancellat
///
/// -
/// Operation Id
- /// Addons_List
+ /// Addon_List
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => _avsPrivateCloudAddonAddonsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _avsPrivateCloudAddonAddonsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
- return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AvsPrivateCloudAddonResource(Client, AvsPrivateCloudAddonData.DeserializeAvsPrivateCloudAddonData(e)), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, "AvsPrivateCloudAddonCollection.GetAll", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _addonRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _addonRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AddonResource(Client, AddonData.DeserializeAddonData(e)), _addonClientDiagnostics, Pipeline, "AddonCollection.GetAll", "value", "nextLink", cancellationToken);
}
///
@@ -308,15 +308,15 @@ public virtual Pageable GetAll(CancellationToken c
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -328,11 +328,11 @@ public virtual async Task> ExistsAsync(string addonName, Cancella
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.Exists");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.Exists");
scope.Start();
try
{
- var response = await _avsPrivateCloudAddonAddonsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _addonRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken).ConfigureAwait(false);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
@@ -351,15 +351,15 @@ public virtual async Task> ExistsAsync(string addonName, Cancella
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -371,11 +371,11 @@ public virtual Response Exists(string addonName, CancellationToken cancell
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.Exists");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.Exists");
scope.Start();
try
{
- var response = _avsPrivateCloudAddonAddonsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken);
+ var response = _addonRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken);
return Response.FromValue(response.Value != null, response.GetRawResponse());
}
catch (Exception e)
@@ -394,15 +394,15 @@ public virtual Response Exists(string addonName, CancellationToken cancell
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -410,18 +410,18 @@ public virtual Response Exists(string addonName, CancellationToken cancell
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual async Task> GetIfExistsAsync(string addonName, CancellationToken cancellationToken = default)
+ public virtual async Task> GetIfExistsAsync(string addonName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.GetIfExists");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.GetIfExists");
scope.Start();
try
{
- var response = await _avsPrivateCloudAddonAddonsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var response = await _addonRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken).ConfigureAwait(false);
if (response.Value == null)
- return new NoValueResponse(response.GetRawResponse());
- return Response.FromValue(new AvsPrivateCloudAddonResource(Client, response.Value), response.GetRawResponse());
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AddonResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -439,15 +439,15 @@ public virtual async Task> GetIfE
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -455,18 +455,18 @@ public virtual async Task> GetIfE
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
- public virtual NullableResponse GetIfExists(string addonName, CancellationToken cancellationToken = default)
+ public virtual NullableResponse GetIfExists(string addonName, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(addonName, nameof(addonName));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonCollection.GetIfExists");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonCollection.GetIfExists");
scope.Start();
try
{
- var response = _avsPrivateCloudAddonAddonsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken);
+ var response = _addonRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, addonName, cancellationToken: cancellationToken);
if (response.Value == null)
- return new NoValueResponse(response.GetRawResponse());
- return Response.FromValue(new AvsPrivateCloudAddonResource(Client, response.Value), response.GetRawResponse());
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new AddonResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -475,7 +475,7 @@ public virtual NullableResponse GetIfExists(string
}
}
- IEnumerator IEnumerable.GetEnumerator()
+ IEnumerator IEnumerable.GetEnumerator()
{
return GetAll().GetEnumerator();
}
@@ -485,7 +485,7 @@ IEnumerator IEnumerable.GetEnumerator()
return GetAll().GetEnumerator();
}
- IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
{
return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonData.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonData.Serialization.cs
new file mode 100644
index 000000000000..17991b4c8e44
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonData.Serialization.cs
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.Avs.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.Avs
+{
+ public partial class AddonData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AddonData)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ }
+
+ AddonData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AddonData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAddonData(document.RootElement, options);
+ }
+
+ internal static AddonData DeserializeAddonData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AddonProperties properties = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = AddonProperties.DeserializeAddonProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AddonData(
+ id,
+ name,
+ type,
+ systemData,
+ properties,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AddonData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AddonData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAddonData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AddonData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonData.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonData.cs
similarity index 72%
rename from sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonData.cs
rename to sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonData.cs
index ee048fa34e28..e332fd64c628 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonData.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonData.cs
@@ -14,10 +14,10 @@
namespace Azure.ResourceManager.Avs
{
///
- /// A class representing the AvsPrivateCloudAddon data model.
+ /// A class representing the Addon data model.
/// An addon resource
///
- public partial class AvsPrivateCloudAddonData : ResourceData
+ public partial class AddonData : ResourceData
{
///
/// Keeps track of any properties unknown to the library.
@@ -51,23 +51,23 @@ public partial class AvsPrivateCloudAddonData : ResourceData
///
private IDictionary _serializedAdditionalRawData;
- /// Initializes a new instance of .
- public AvsPrivateCloudAddonData()
+ /// Initializes a new instance of .
+ public AddonData()
{
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
///
/// The resource-specific properties for this resource.
- /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include , , and .
///
/// Keeps track of any properties unknown to the library.
- internal AvsPrivateCloudAddonData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AvsPrivateCloudAddonProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal AddonData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AddonProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
Properties = properties;
_serializedAdditionalRawData = serializedAdditionalRawData;
@@ -75,9 +75,9 @@ internal AvsPrivateCloudAddonData(ResourceIdentifier id, string name, ResourceTy
///
/// The resource-specific properties for this resource.
- /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include , , and .
///
- public AvsPrivateCloudAddonProperties Properties { get; set; }
+ public AddonProperties Properties { get; set; }
}
}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonResource.Serialization.cs
new file mode 100644
index 000000000000..d96d968a5dfe
--- /dev/null
+++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.Avs
+{
+ public partial class AddonResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ AddonData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ AddonData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonResource.cs
similarity index 64%
rename from sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.cs
rename to sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonResource.cs
index 2f4bbb5d238b..abcd6cfdbe36 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AddonResource.cs
@@ -15,14 +15,14 @@
namespace Azure.ResourceManager.Avs
{
///
- /// A Class representing an AvsPrivateCloudAddon along with the instance operations that can be performed on it.
- /// If you have a you can construct an
- /// from an instance of using the GetAvsPrivateCloudAddonResource method.
- /// Otherwise you can get one from its parent resource using the GetAvsPrivateCloudAddon method.
+ /// A Class representing an Addon along with the instance operations that can be performed on it.
+ /// If you have a you can construct an
+ /// from an instance of using the GetAddonResource method.
+ /// Otherwise you can get one from its parent resource using the GetAddon method.
///
- public partial class AvsPrivateCloudAddonResource : ArmResource
+ public partial class AddonResource : ArmResource
{
- /// Generate the resource identifier of a instance.
+ /// Generate the resource identifier of a instance.
/// The subscriptionId.
/// The resourceGroupName.
/// The privateCloudName.
@@ -33,35 +33,35 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId,
return new ResourceIdentifier(resourceId);
}
- private readonly ClientDiagnostics _avsPrivateCloudAddonAddonsClientDiagnostics;
- private readonly AddonsRestOperations _avsPrivateCloudAddonAddonsRestClient;
- private readonly AvsPrivateCloudAddonData _data;
+ private readonly ClientDiagnostics _addonClientDiagnostics;
+ private readonly AddonsRestOperations _addonRestClient;
+ private readonly AddonData _data;
/// Gets the resource type for the operations.
public static readonly ResourceType ResourceType = "Microsoft.AVS/privateClouds/addons";
- /// Initializes a new instance of the class for mocking.
- protected AvsPrivateCloudAddonResource()
+ /// Initializes a new instance of the class for mocking.
+ protected AddonResource()
{
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
/// The client parameters to use in these operations.
/// The resource that is the target of operations.
- internal AvsPrivateCloudAddonResource(ArmClient client, AvsPrivateCloudAddonData data) : this(client, data.Id)
+ internal AddonResource(ArmClient client, AddonData data) : this(client, data.Id)
{
HasData = true;
_data = data;
}
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
/// The client parameters to use in these operations.
/// The identifier of the resource that is the target of operations.
- internal AvsPrivateCloudAddonResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ internal AddonResource(ArmClient client, ResourceIdentifier id) : base(client, id)
{
- _avsPrivateCloudAddonAddonsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Avs", ResourceType.Namespace, Diagnostics);
- TryGetApiVersion(ResourceType, out string avsPrivateCloudAddonAddonsApiVersion);
- _avsPrivateCloudAddonAddonsRestClient = new AddonsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, avsPrivateCloudAddonAddonsApiVersion);
+ _addonClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Avs", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string addonApiVersion);
+ _addonRestClient = new AddonsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, addonApiVersion);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -72,7 +72,7 @@ internal AvsPrivateCloudAddonResource(ArmClient client, ResourceIdentifier id) :
/// Gets the data representing this Feature.
/// Throws if there is no data loaded in the current instance.
- public virtual AvsPrivateCloudAddonData Data
+ public virtual AddonData Data
{
get
{
@@ -97,29 +97,29 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The cancellation token to use.
- public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
{
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonResource.Get");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonResource.Get");
scope.Start();
try
{
- var response = await _avsPrivateCloudAddonAddonsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var response = await _addonRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
- return Response.FromValue(new AvsPrivateCloudAddonResource(Client, response.Value), response.GetRawResponse());
+ return Response.FromValue(new AddonResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -137,29 +137,29 @@ public virtual async Task> GetAsync(Cance
///
/// -
/// Operation Id
- /// Addons_Get
+ /// Addon_Get
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
/// The cancellation token to use.
- public virtual Response Get(CancellationToken cancellationToken = default)
+ public virtual Response Get(CancellationToken cancellationToken = default)
{
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonResource.Get");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonResource.Get");
scope.Start();
try
{
- var response = _avsPrivateCloudAddonAddonsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var response = _addonRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
if (response.Value == null)
throw new RequestFailedException(response.GetRawResponse());
- return Response.FromValue(new AvsPrivateCloudAddonResource(Client, response.Value), response.GetRawResponse());
+ return Response.FromValue(new AddonResource(Client, response.Value), response.GetRawResponse());
}
catch (Exception e)
{
@@ -177,15 +177,15 @@ public virtual Response Get(CancellationToken canc
///
/// -
/// Operation Id
- /// Addons_Delete
+ /// Addon_Delete
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -193,12 +193,12 @@ public virtual Response Get(CancellationToken canc
/// The cancellation token to use.
public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonResource.Delete");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonResource.Delete");
scope.Start();
try
{
- var response = await _avsPrivateCloudAddonAddonsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
- var operation = new AvsArmOperation(_avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ var response = await _addonRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new AvsArmOperation(_addonClientDiagnostics, Pipeline, _addonRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -219,15 +219,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Operation Id
- /// Addons_Delete
+ /// Addon_Delete
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -235,12 +235,12 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
/// The cancellation token to use.
public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonResource.Delete");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonResource.Delete");
scope.Start();
try
{
- var response = _avsPrivateCloudAddonAddonsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
- var operation = new AvsArmOperation(_avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ var response = _addonRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new AvsArmOperation(_addonClientDiagnostics, Pipeline, _addonRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletionResponse(cancellationToken);
return operation;
@@ -261,15 +261,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Operation Id
- /// Addons_CreateOrUpdate
+ /// Addon_CreateOrUpdate
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -277,16 +277,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
/// Resource create parameters.
/// The cancellation token to use.
/// is null.
- public virtual async Task> UpdateAsync(WaitUntil waitUntil, AvsPrivateCloudAddonData data, CancellationToken cancellationToken = default)
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, AddonData data, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(data, nameof(data));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonResource.Update");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonResource.Update");
scope.Start();
try
{
- var response = await _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
- var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = await _addonRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var operation = new AvsArmOperation(new AddonOperationSource(Client), _addonClientDiagnostics, Pipeline, _addonRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -307,15 +307,15 @@ public virtual async Task> UpdateAsyn
///
/// -
/// Operation Id
- /// Addons_CreateOrUpdate
+ /// Addon_CreateOrUpdate
///
/// -
/// Default Api Version
- /// 2023-09-01
+ /// 2024-09-01
///
/// -
/// Resource
- ///
+ ///
///
///
///
@@ -323,16 +323,16 @@ public virtual async Task> UpdateAsyn
/// Resource create parameters.
/// The cancellation token to use.
/// is null.
- public virtual ArmOperation Update(WaitUntil waitUntil, AvsPrivateCloudAddonData data, CancellationToken cancellationToken = default)
+ public virtual ArmOperation Update(WaitUntil waitUntil, AddonData data, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(data, nameof(data));
- using var scope = _avsPrivateCloudAddonAddonsClientDiagnostics.CreateScope("AvsPrivateCloudAddonResource.Update");
+ using var scope = _addonClientDiagnostics.CreateScope("AddonResource.Update");
scope.Start();
try
{
- var response = _avsPrivateCloudAddonAddonsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
- var operation = new AvsArmOperation(new AvsPrivateCloudAddonOperationSource(Client), _avsPrivateCloudAddonAddonsClientDiagnostics, Pipeline, _avsPrivateCloudAddonAddonsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ var response = _addonRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
+ var operation = new AvsArmOperation(new AddonOperationSource(Client), _addonClientDiagnostics, Pipeline, _addonRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs
index 76dc4245065b..f8a925a02883 100644
--- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs
+++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ArmAvsModelFactory.cs
@@ -7,9 +7,7 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Linq;
-using System.Net;
using Azure.Core;
using Azure.ResourceManager.Models;
@@ -18,199 +16,91 @@ namespace Azure.ResourceManager.Avs.Models
/// Model factory for models.
public static partial class ArmAvsModelFactory
{
- /// Initializes a new instance of .
- /// Remaining hosts quota by sku type.
- /// Host quota is active for current subscription.
- /// A new instance for mocking.
- public static AvsSubscriptionQuotaAvailabilityResult AvsSubscriptionQuotaAvailabilityResult(IReadOnlyDictionary hostsRemaining = null, AvsSubscriptionQuotaEnabled? quotaEnabled = null)
- {
- hostsRemaining ??= new Dictionary();
-
- return new AvsSubscriptionQuotaAvailabilityResult(hostsRemaining, quotaEnabled, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// Trial status.
- /// Number of trial hosts available.
- /// A new instance for mocking.
- public static AvsSubscriptionTrialAvailabilityResult AvsSubscriptionTrialAvailabilityResult(AvsSubscriptionTrialStatus? status = null, int? availableHosts = null)
- {
- return new AvsSubscriptionTrialAvailabilityResult(status, availableHosts, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The tags.
- /// The location.
- /// The SKU (Stock Keeping Unit) assigned to this resource.
- /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned.
- /// The default cluster used for management.
- /// Connectivity to internet is enabled or disabled.
- /// vCenter Single Sign On Identity Sources.
- /// Properties describing how the cloud is distributed across availability zones.
- /// Customer managed key encryption, can be enabled or disabled.
- ///
- /// Array of additional networks noncontiguous with networkBlock. Networks must be
- /// unique and non-overlapping across VNet in your subscription, on-premise, and
- /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to
- /// (A.B.C.D/X).
- ///
- /// The provisioning state.
- /// An ExpressRoute Circuit.
- /// The endpoints.
- ///
- /// The block of addresses should be unique across VNet in your subscription as
- /// well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where
- /// A,B,C,D are between 0 and 255, and X is between 0 and 22
- ///
- /// Network used to access vCenter Server and NSX-T Manager.
- /// Used for virtual machine cold migration, cloning, and snapshot migration.
- /// Used for live migration of virtual machines.
- /// Optionally, set the vCenter admin password when the private cloud is created.
- /// Optionally, set the NSX-T Manager password when the private cloud is created.
- /// Thumbprint of the vCenter Server SSL certificate.
- /// Thumbprint of the NSX-T Manager SSL certificate.
- /// Array of cloud link IDs from other clouds that connect to this one.
- ///
- /// A secondary expressRoute circuit from a separate AZ. Only present in a
- /// stretched private cloud
- ///
- ///
- /// Flag to indicate whether the private cloud has the quota for provisioned NSX
- /// Public IP count raised from 64 to 1024
+ ///
+ /// The resource-specific properties for this resource.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , and .
///
- /// Azure resource ID of the virtual network.
- /// The type of DNS zone to use.
- /// A new instance for mocking.
- public static AvsPrivateCloudData AvsPrivateCloudData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AvsSku sku = null, ManagedServiceIdentity identity = null, AvsManagementCluster managementCluster = null, InternetConnectivityState? internet = null, IEnumerable identitySources = null, PrivateCloudAvailabilityProperties availability = null, CustomerManagedEncryption encryption = null, IEnumerable extendedNetworkBlocks = null, AvsPrivateCloudProvisioningState? provisioningState = null, ExpressRouteCircuit circuit = null, AvsPrivateCloudEndpoints endpoints = null, string networkBlock = null, string managementNetwork = null, string provisioningNetwork = null, string vMotionNetwork = null, string vCenterPassword = null, string nsxtPassword = null, string vCenterCertificateThumbprint = null, string nsxtCertificateThumbprint = null, IEnumerable externalCloudLinks = null, ExpressRouteCircuit secondaryCircuit = null, NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised = null, ResourceIdentifier virtualNetworkId = null, AvsDnsZoneType? dnsZoneType = null)
+ /// A new instance for mocking.
+ public static AddonData AddonData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AddonProperties properties = null)
{
- tags ??= new Dictionary();
- identitySources ??= new List();
- extendedNetworkBlocks ??= new List();
- externalCloudLinks ??= new List();
-
- return new AvsPrivateCloudData(
+ return new AddonData(
id,
name,
resourceType,
systemData,
- tags,
- location,
- sku,
- identity,
- managementCluster,
- internet,
- identitySources?.ToList(),
- availability,
- encryption,
- extendedNetworkBlocks?.ToList(),
- provisioningState,
- circuit,
- endpoints,
- networkBlock,
- managementNetwork,
- provisioningNetwork,
- vMotionNetwork,
- vCenterPassword,
- nsxtPassword,
- vCenterCertificateThumbprint,
- nsxtCertificateThumbprint,
- externalCloudLinks?.ToList(),
- secondaryCircuit,
- nsxPublicIPQuotaRaised,
- virtualNetworkId,
- dnsZoneType,
+ properties,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The cluster size.
- /// The state of the cluster provisioning.
- /// The identity.
- /// The hosts.
- /// Name of the vsan datastore associated with the cluster.
- /// A new instance for mocking.
- public static AvsManagementCluster AvsManagementCluster(int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null, string vsanDatastoreName = null)
+ /// Initializes a new instance of .
+ /// Addon type.
+ /// The state of the addon provisioning.
+ /// A new instance for mocking.
+ public static AddonProperties AddonProperties(string addonType = null, AddonProvisioningState? provisioningState = null)
{
- hosts ??= new List();
+ return new UnknownAddonProperties(addonType == null ? default : new AddonType(addonType), provisioningState, serializedAdditionalRawData: null);
+ }
- return new AvsManagementCluster(
- clusterSize,
- provisioningState,
- clusterId,
- hosts?.ToList(),
- vsanDatastoreName,
- serializedAdditionalRawData: null);
+ /// Initializes a new instance of .
+ /// The state of the addon provisioning.
+ /// The Site Recovery Manager (SRM) license.
+ /// A new instance for mocking.
+ public static AddonSrmProperties AddonSrmProperties(AddonProvisioningState? provisioningState = null, string licenseKey = null)
+ {
+ return new AddonSrmProperties(AddonType.SRM, provisioningState, serializedAdditionalRawData: null, licenseKey);
}
- /// Initializes a new instance of .
- /// The name of the key.
- /// The version of the key.
- /// The auto-detected version of the key if versionType is auto-detected.
- /// The URL of the vault.
- /// The state of key provided.
- /// Property of the key if user provided or auto detected.
- /// A new instance for mocking.
- public static AvsEncryptionKeyVaultProperties AvsEncryptionKeyVaultProperties(string keyName = null, string keyVersion = null, string autoDetectedKeyVersion = null, Uri keyVaultUri = null, AvsEncryptionKeyStatus? keyState = null, AvsEncryptionVersionType? versionType = null)
+ /// Initializes a new instance of .
+ /// The state of the addon provisioning.
+ /// The vSphere Replication Server (VRS) count.
+ /// A new instance for mocking.
+ public static AddonVrProperties AddonVrProperties(AddonProvisioningState? provisioningState = null, int vrsCount = default)
{
- return new AvsEncryptionKeyVaultProperties(
- keyName,
- keyVersion,
- autoDetectedKeyVersion,
- keyVaultUri,
- keyState,
- versionType,
- serializedAdditionalRawData: null);
+ return new AddonVrProperties(AddonType.VR, provisioningState, serializedAdditionalRawData: null, vrsCount);
}
- /// Initializes a new instance of .
- /// CIDR of primary subnet.
- /// CIDR of secondary subnet.
- /// Identifier of the ExpressRoute Circuit (Microsoft Colo only).
- /// ExpressRoute Circuit private peering identifier.
- /// A new instance for mocking.
- public static ExpressRouteCircuit ExpressRouteCircuit(string primarySubnet = null, string secondarySubnet = null, ResourceIdentifier expressRouteId = null, ResourceIdentifier expressRoutePrivatePeeringId = null)
+ /// Initializes a new instance of .
+ /// The state of the addon provisioning.
+ /// The HCX offer, example VMware MaaS Cloud Provider (Enterprise).
+ /// HCX management network.
+ /// HCX uplink network.
+ /// A new instance for mocking.
+ public static AddonHcxProperties AddonHcxProperties(AddonProvisioningState? provisioningState = null, string offer = null, string managementNetwork = null, string uplinkNetwork = null)
{
- return new ExpressRouteCircuit(primarySubnet, secondarySubnet, expressRouteId, expressRoutePrivatePeeringId, serializedAdditionalRawData: null);
+ return new AddonHcxProperties(
+ AddonType.HCX,
+ provisioningState,
+ serializedAdditionalRawData: null,
+ offer,
+ managementNetwork,
+ uplinkNetwork);
}
- /// Initializes a new instance of .
- /// Endpoint FQDN for the NSX-T Data Center manager.
- /// Endpoint FQDN for Virtual Center Server Appliance.
- /// Endpoint FQDN for the HCX Cloud Manager.
- /// Endpoint IP for the NSX-T Data Center manager.
- /// Endpoint IP for Virtual Center Server Appliance.
- /// Endpoint IP for the HCX Cloud Manager.
- /// A new instance for mocking.
- public static AvsPrivateCloudEndpoints AvsPrivateCloudEndpoints(string nsxtManager = null, string vcsa = null, string hcxCloudManager = null, string nsxtManagerIP = null, string vcenterIP = null, string hcxCloudManagerIP = null)
+ /// Initializes a new instance of .
+ /// The state of the addon provisioning.
+ /// The VMware vCenter resource ID.
+ /// A new instance for mocking.
+ public static AddonArcProperties AddonArcProperties(AddonProvisioningState? provisioningState = null, string vCenter = null)
{
- return new AvsPrivateCloudEndpoints(
- nsxtManager,
- vcsa,
- hcxCloudManager,
- nsxtManagerIP,
- vcenterIP,
- hcxCloudManagerIP,
- serializedAdditionalRawData: null);
+ return new AddonArcProperties(AddonType.Arc, provisioningState, serializedAdditionalRawData: null, vCenter);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- ///
- /// The resource-specific properties for this resource.
- /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , and .
- ///
- /// A new instance for mocking.
- public static AvsPrivateCloudAddonData AvsPrivateCloudAddonData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsPrivateCloudAddonProperties properties = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ExpressRouteAuthorizationData ExpressRouteAuthorizationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExpressRouteAuthorizationProperties properties = null)
{
- return new AvsPrivateCloudAddonData(
+ return new ExpressRouteAuthorizationData(
id,
name,
resourceType,
@@ -219,83 +109,77 @@ public static AvsPrivateCloudAddonData AvsPrivateCloudAddonData(ResourceIdentifi
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Addon type.
- /// The state of the addon provisioning.
- /// A new instance for mocking.
- public static AvsPrivateCloudAddonProperties AvsPrivateCloudAddonProperties(string addonType = null, AddonProvisioningState? provisioningState = null)
+ /// Initializes a new instance of .
+ /// The state of the ExpressRoute Circuit Authorization provisioning.
+ /// The ID of the ExpressRoute Circuit Authorization.
+ /// The key of the ExpressRoute Circuit Authorization.
+ /// The ID of the ExpressRoute Circuit.
+ /// A new instance for mocking.
+ public static ExpressRouteAuthorizationProperties ExpressRouteAuthorizationProperties(ExpressRouteAuthorizationProvisioningState? provisioningState = null, string expressRouteAuthorizationId = null, string expressRouteAuthorizationKey = null, string expressRouteId = null)
{
- return new UnknownAddonProperties(addonType == null ? default : new AddonType(addonType), provisioningState, serializedAdditionalRawData: null);
+ return new ExpressRouteAuthorizationProperties(provisioningState, expressRouteAuthorizationId, expressRouteAuthorizationKey, expressRouteId, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The state of the ExpressRoute Circuit Authorization provisioning.
- /// The ID of the ExpressRoute Circuit Authorization.
- /// The key of the ExpressRoute Circuit Authorization.
- /// The ID of the ExpressRoute Circuit.
- /// A new instance for mocking.
- public static ExpressRouteAuthorizationData ExpressRouteAuthorizationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExpressRouteAuthorizationProvisioningState? provisioningState = null, ResourceIdentifier expressRouteAuthorizationId = null, string expressRouteAuthorizationKey = null, ResourceIdentifier expressRouteId = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static CloudLinkData CloudLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CloudLinkProperties properties = null)
{
- return new ExpressRouteAuthorizationData(
+ return new CloudLinkData(
id,
name,
resourceType,
systemData,
- provisioningState,
- expressRouteAuthorizationId,
- expressRouteAuthorizationKey,
- expressRouteId,
+ properties,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The provisioning state of the resource.
+ /// The state of the cloud link.
+ /// Identifier of the other private cloud participating in the link.
+ /// A new instance for mocking.
+ public static CloudLinkProperties CloudLinkProperties(CloudLinkProvisioningState? provisioningState = null, CloudLinkStatus? status = null, string linkedCloud = null)
+ {
+ return new CloudLinkProperties(provisioningState, status, linkedCloud, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The provisioning state of the resource.
- /// The state of the cloud link.
- /// Identifier of the other private cloud participating in the link.
- /// A new instance for mocking.
- public static AvsCloudLinkData AvsCloudLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsCloudLinkProvisioningState? provisioningState = null, AvsCloudLinkStatus? status = null, ResourceIdentifier linkedCloud = null)
+ /// The resource-specific properties for this resource.
+ /// The SKU (Stock Keeping Unit) assigned to this resource.
+ /// A new instance for mocking.
+ public static ClusterData ClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ClusterProperties properties = null, AvsSku sku = null)
{
- return new AvsCloudLinkData(
+ return new ClusterData(
id,
name,
resourceType,
systemData,
- provisioningState,
- status,
- linkedCloud,
+ properties,
+ sku,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The SKU (Stock Keeping Unit) assigned to this resource.
+ /// Initializes a new instance of .
/// The cluster size.
/// The state of the cluster provisioning.
/// The identity.
/// The hosts.
/// Name of the vsan datastore associated with the cluster.
- /// A new instance for mocking.
- public static AvsPrivateCloudClusterData AvsPrivateCloudClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsSku sku = null, int? clusterSize = null, AvsPrivateCloudClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null, string vsanDatastoreName = null)
+ /// A new instance for mocking.
+ public static ClusterProperties ClusterProperties(int? clusterSize = null, ClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null, string vsanDatastoreName = null)
{
hosts ??= new List();
- return new AvsPrivateCloudClusterData(
- id,
- name,
- resourceType,
- systemData,
- sku,
+ return new ClusterProperties(
clusterSize,
provisioningState,
clusterId,
@@ -304,28 +188,61 @@ public static AvsPrivateCloudClusterData AvsPrivateCloudClusterData(ResourceIden
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// Zone and associated hosts info.
+ /// A new instance for mocking.
+ public static ClusterZoneList ClusterZoneList(IEnumerable zones = null)
+ {
+ zones ??= new List();
+
+ return new ClusterZoneList(zones?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// List of hosts belonging to the availability zone in a cluster.
+ /// Availability zone identifier.
+ /// A new instance for mocking.
+ public static ClusterZone ClusterZone(IEnumerable hosts = null, string zone = null)
+ {
+ hosts ??= new List();
+
+ return new ClusterZone(hosts?.ToList(), zone, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static DatastoreData DatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DatastoreProperties properties = null)
+ {
+ return new DatastoreData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The state of the datastore provisioning.
/// An Azure NetApp Files volume.
/// An iSCSI volume.
/// An Elastic SAN volume.
+ /// A Pure Storage volume.
/// The operational status of the datastore.
- /// A new instance for mocking.
- public static AvsPrivateCloudDatastoreData AvsPrivateCloudDatastoreData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsPrivateCloudDatastoreProvisioningState? provisioningState = null, ResourceIdentifier netAppVolumeId = null, DiskPoolVolume diskPoolVolume = null, ResourceIdentifier elasticSanVolumeTargetId = null, DatastoreStatus? status = null)
+ /// A new instance for mocking.
+ public static DatastoreProperties DatastoreProperties(DatastoreProvisioningState? provisioningState = null, ResourceIdentifier netAppVolumeId = null, DiskPoolVolume diskPoolVolume = null, ResourceIdentifier elasticSanVolumeTargetId = null, PureStorageVolume pureStorageVolume = null, DatastoreStatus? status = null)
{
- return new AvsPrivateCloudDatastoreData(
- id,
- name,
- resourceType,
- systemData,
+ return new DatastoreProperties(
provisioningState,
netAppVolumeId != null ? ResourceManagerModelFactory.WritableSubResource(netAppVolumeId) : null,
diskPoolVolume,
elasticSanVolumeTargetId != null ? new ElasticSanVolume(elasticSanVolumeTargetId, serializedAdditionalRawData: null) : null,
+ pureStorageVolume,
status,
serializedAdditionalRawData: null);
}
@@ -339,36 +256,21 @@ public static AvsPrivateCloudDatastoreData AvsPrivateCloudDatastoreData(Resource
///
/// Device path.
/// A new instance for mocking.
- public static DiskPoolVolume DiskPoolVolume(ResourceIdentifier targetId = null, string lunName = null, LunMountMode? mountOption = null, string path = null)
+ public static DiskPoolVolume DiskPoolVolume(string targetId = null, string lunName = null, MountOptionEnum? mountOption = null, string path = null)
{
return new DiskPoolVolume(targetId, lunName, mountOption, path, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// List of hosts belonging to the availability zone in a cluster.
- /// Availability zone identifier.
- /// A new instance for mocking.
- public static AvsClusterZone AvsClusterZone(IEnumerable hosts = null, string zone = null)
- {
- hosts ??= new List();
-
- return new AvsClusterZone(hosts?.ToList(), zone, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- ///
- /// The resource-specific properties for this resource.
- /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include and .
- ///
- /// A new instance for mocking.
- public static PlacementPolicyData PlacementPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlacementPolicyProperties properties = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static GlobalReachConnectionData GlobalReachConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GlobalReachConnectionProperties properties = null)
{
- return new PlacementPolicyData(
+ return new GlobalReachConnectionData(
id,
name,
resourceType,
@@ -377,48 +279,7 @@ public static PlacementPolicyData PlacementPolicyData(ResourceIdentifier id = nu
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Placement Policy type.
- /// Whether the placement policy is enabled or disabled.
- /// Display name of the placement policy.
- /// The provisioning state.
- /// A new instance for mocking.
- public static PlacementPolicyProperties PlacementPolicyProperties(string policyType = null, PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null)
- {
- return new UnknownPlacementPolicyProperties(policyType == null ? default : new PlacementPolicyType(policyType), state, displayName, provisioningState, serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The provisioning state of the resource.
- /// Display name of the VM.
- /// Virtual machine managed object reference id.
- /// Path to virtual machine's folder starting from datacenter virtual machine folder.
- /// Whether VM DRS-driven movement is restricted (enabled) or not (disabled).
- /// A new instance for mocking.
- public static AvsPrivateCloudClusterVirtualMachineData AvsPrivateCloudClusterVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AvsVirtualMachineProvisioningState? provisioningState = null, string displayName = null, string moRefId = null, string folderPath = null, VirtualMachineRestrictMovementState? restrictMovement = null)
- {
- return new AvsPrivateCloudClusterVirtualMachineData(
- id,
- name,
- resourceType,
- systemData,
- provisioningState,
- displayName,
- moRefId,
- folderPath,
- restrictMovement,
- serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
+ /// Initializes a new instance of .
/// The state of the ExpressRoute Circuit Authorization provisioning.
///
/// The network used for global reach carved out from the original network block
@@ -437,14 +298,10 @@ public static AvsPrivateCloudClusterVirtualMachineData AvsPrivateCloudClusterVir
/// The ID of the Private Cloud's ExpressRoute Circuit that is participating in the
/// global reach connection
///
- /// A new instance for mocking.
- public static GlobalReachConnectionData GlobalReachConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GlobalReachConnectionProvisioningState? provisioningState = null, string addressPrefix = null, string authorizationKey = null, GlobalReachConnectionStatus? circuitConnectionStatus = null, ResourceIdentifier peerExpressRouteCircuit = null, ResourceIdentifier expressRouteId = null)
+ /// A new instance for mocking.
+ public static GlobalReachConnectionProperties GlobalReachConnectionProperties(GlobalReachConnectionProvisioningState? provisioningState = null, string addressPrefix = null, string authorizationKey = null, GlobalReachConnectionStatus? circuitConnectionStatus = null, string peerExpressRouteCircuit = null, string expressRouteId = null)
{
- return new GlobalReachConnectionData(
- id,
- name,
- resourceType,
- systemData,
+ return new GlobalReachConnectionProperties(
provisioningState,
addressPrefix,
authorizationKey,
@@ -459,229 +316,182 @@ public static GlobalReachConnectionData GlobalReachConnectionData(ResourceIdenti
/// The name.
/// The resourceType.
/// The systemData.
- /// The provisioning state of the resource.
- /// The activation key.
- /// The status of the HCX Enterprise Site.
+ /// The resource-specific properties for this resource.
/// A new instance for mocking.
- public static HcxEnterpriseSiteData HcxEnterpriseSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HcxEnterpriseSiteProvisioningState? provisioningState = null, string activationKey = null, HcxEnterpriseSiteStatus? status = null)
+ public static HcxEnterpriseSiteData HcxEnterpriseSiteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HcxEnterpriseSiteProperties properties = null)
{
return new HcxEnterpriseSiteData(
id,
name,
resourceType,
systemData,
- provisioningState,
- activationKey,
- status,
- serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The state of the iSCSI path provisioning.
- /// CIDR Block for iSCSI path.
- /// A new instance for mocking.
- public static IscsiPathData IscsiPathData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IscsiPathProvisioningState? provisioningState = null, string networkBlock = null)
- {
- return new IscsiPathData(
- id,
- name,
- resourceType,
- systemData,
- provisioningState,
- networkBlock,
+ properties,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// NSX-T Manager username.
- /// NSX-T Manager password.
- /// vCenter admin username.
- /// vCenter admin password.
- /// A new instance for mocking.
- public static AdminCredentials AdminCredentials(string nsxtUsername = null, string nsxtPassword = null, string vCenterUsername = null, string vCenterPassword = null)
+ /// Initializes a new instance of .
+ /// The provisioning state of the resource.
+ /// The activation key.
+ /// The status of the HCX Enterprise Site.
+ /// A new instance for mocking.
+ public static HcxEnterpriseSiteProperties HcxEnterpriseSiteProperties(HcxEnterpriseSiteProvisioningState? provisioningState = null, string activationKey = null, HcxEnterpriseSiteStatus? status = null)
{
- return new AdminCredentials(nsxtUsername, nsxtPassword, vCenterUsername, vCenterPassword, serializedAdditionalRawData: null);
+ return new HcxEnterpriseSiteProperties(provisioningState, activationKey, status, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// A reference to the script cmdlet resource if user is running a AVS script.
- ///
- /// Parameters the script will accept
- /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , and .
- ///
- ///
- /// Parameters that will be hidden/not visible to ARM, such as passwords and
- /// credentials
- /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , and .
- ///
- ///
- /// Error message if the script was able to run, but if the script itself had
- /// errors or powershell threw an exception
+ ///
+ /// The resource-specific properties for this resource.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
///
- /// Time limit for execution.
- /// Time to live for the resource. If not provided, will be available for 60 days.
- /// Time the script execution was submitted.
- /// Time the script execution was started.
- /// Time the script execution was finished.
- /// The state of the script execution resource.
- /// Standard output stream from the powershell execution.
- /// User-defined dictionary.
- /// Standard information out stream from the powershell execution.
- /// Standard warning out stream from the powershell execution.
- /// Standard error output stream from the powershell execution.
- /// A new instance for mocking.
- public static ScriptExecutionData ScriptExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier scriptCmdletId = null, IEnumerable parameters = null, IEnumerable hiddenParameters = null, string failureReason = null, string timeout = null, string retention = null, DateTimeOffset? submittedOn = null, DateTimeOffset? startedOn = null, DateTimeOffset? finishedOn = null, ScriptExecutionProvisioningState? provisioningState = null, IEnumerable output = null, BinaryData namedOutputs = null, IEnumerable information = null, IEnumerable warnings = null, IEnumerable errors = null)
+ /// The availability zones.
+ /// The SKU (Stock Keeping Unit) assigned to this resource.
+ /// A new instance for mocking.
+ public static HostData HostData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HostProperties properties = null, IEnumerable zones = null, AvsSku sku = null)
{
- parameters ??= new List();
- hiddenParameters ??= new List();
- output ??= new List();
- information ??= new List();
- warnings ??= new List();
- errors ??= new List();
+ zones ??= new List();
- return new ScriptExecutionData(
+ return new HostData(
id,
name,
resourceType,
systemData,
- scriptCmdletId,
- parameters?.ToList(),
- hiddenParameters?.ToList(),
- failureReason,
- timeout,
- retention,
- submittedOn,
- startedOn,
- finishedOn,
- provisioningState,
- output?.ToList(),
- namedOutputs,
- information?.ToList(),
- warnings?.ToList(),
- errors?.ToList(),
+ properties,
+ zones?.ToList(),
+ sku,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The provisioning state of the resource.
- /// User friendly description of the package.
- /// Module version.
- /// Company that created and supports the package.
- /// Link to support by the package vendor.
- /// A new instance for mocking.
- public static ScriptPackageData ScriptPackageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScriptPackageProvisioningState? provisioningState = null, string description = null, string version = null, string company = null, Uri uri = null)
+ /// Initializes a new instance of .
+ /// The kind of host.
+ /// The state of the host provisioning.
+ /// Display name of the host in VMware vCenter.
+ /// vCenter managed object reference ID of the host.
+ /// Fully qualified domain name of the host.
+ /// If provided, the host is in maintenance. The value is the reason for maintenance.
+ ///
+ /// A new instance for mocking.
+ public static HostProperties HostProperties(string kind = null, HostProvisioningState? provisioningState = null, string displayName = null, string moRefId = null, string fqdn = null, HostMaintenance? maintenance = null, string faultDomain = null)
{
- return new ScriptPackageData(
- id,
- name,
- resourceType,
- systemData,
+ return new UnknownHostProperties(
+ kind == null ? default : new HostKind(kind),
provisioningState,
- description,
- version,
- company,
- uri,
+ displayName,
+ moRefId,
+ fqdn,
+ maintenance,
+ faultDomain,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// The provisioning state of the resource.
- /// Description of the scripts functionality.
- /// Recommended time limit for execution.
- /// Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers.
- /// Parameters the script will accept.
- /// A new instance for mocking.
- public static ScriptCmdletData ScriptCmdletData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScriptCmdletProvisioningState? provisioningState = null, string description = null, TimeSpan? timeout = null, ScriptCmdletAudience? audience = null, IEnumerable parameters = null)
+ /// Initializes a new instance of .
+ /// The state of the host provisioning.
+ /// Display name of the host in VMware vCenter.
+ /// vCenter managed object reference ID of the host.
+ /// Fully qualified domain name of the host.
+ /// If provided, the host is in maintenance. The value is the reason for maintenance.
+ ///
+ /// A new instance for mocking.
+ public static GeneralHostProperties GeneralHostProperties(HostProvisioningState? provisioningState = null, string displayName = null, string moRefId = null, string fqdn = null, HostMaintenance? maintenance = null, string faultDomain = null)
{
- parameters ??= new List();
-
- return new ScriptCmdletData(
- id,
- name,
- resourceType,
- systemData,
+ return new GeneralHostProperties(
+ HostKind.General,
provisioningState,
- description,
- timeout,
- audience,
- parameters?.ToList(),
+ displayName,
+ moRefId,
+ fqdn,
+ maintenance,
+ faultDomain,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- ///
- /// The type of parameter the script is expecting. psCredential is a
- /// PSCredentialObject
- ///
- /// The parameter name that the script will expect a parameter value for.
- /// User friendly description of the parameter.
- ///
- /// Should this parameter be visible to arm and passed in the parameters argument
- /// when executing
- ///
- /// Is this parameter required or optional.
- /// A new instance for mocking.
- public static ScriptParameter ScriptParameter(ScriptParameterType? parameterType = null, string name = null, string description = null, ParameterVisibilityStatus? visibility = null, ParameterOptionalityStatus? optional = null)
+ /// Initializes a new instance of .
+ /// The state of the host provisioning.
+ /// Display name of the host in VMware vCenter.
+ /// vCenter managed object reference ID of the host.
+ /// Fully qualified domain name of the host.
+ /// If provided, the host is in maintenance. The value is the reason for maintenance.
+ ///
+ /// A new instance for mocking.
+ public static SpecializedHostProperties SpecializedHostProperties(HostProvisioningState? provisioningState = null, string displayName = null, string moRefId = null, string fqdn = null, HostMaintenance? maintenance = null, string faultDomain = null)
{
- return new ScriptParameter(
- parameterType,
- name,
- description,
- visibility,
- optional,
+ return new SpecializedHostProperties(
+ HostKind.Specialized,
+ provisioningState,
+ displayName,
+ moRefId,
+ fqdn,
+ maintenance,
+ faultDomain,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The provisioning state of the resource.
- /// A new instance for mocking.
- public static WorkloadNetworkData WorkloadNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkProvisioningState? provisioningState = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static IscsiPathData IscsiPathData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IscsiPathProperties properties = null)
{
- return new WorkloadNetworkData(
+ return new IscsiPathData(
id,
name,
resourceType,
systemData,
- provisioningState,
+ properties,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The state of the iSCSI path provisioning.
+ /// CIDR Block for iSCSI path.
+ /// A new instance for mocking.
+ public static IscsiPathProperties IscsiPathProperties(IscsiPathProvisioningState? provisioningState = null, string networkBlock = null)
+ {
+ return new IscsiPathProperties(provisioningState, networkBlock, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Trial status.
+ /// Number of trial hosts available.
+ /// A new instance for mocking.
+ public static Trial Trial(TrialStatus? status = null, int? availableHosts = null)
+ {
+ return new Trial(status, availableHosts, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Remaining hosts quota by sku type.
+ /// Host quota is active for current subscription.
+ /// A new instance for mocking.
+ public static Quota Quota(IReadOnlyDictionary hostsRemaining = null, QuotaEnabled? quotaEnabled = null)
+ {
+ hostsRemaining ??= new Dictionary();
+
+ return new Quota(hostsRemaining, quotaEnabled, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
///
/// The resource-specific properties for this resource.
- /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include and .
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
///
- /// A new instance for mocking.
- public static WorkloadNetworkDhcpData WorkloadNetworkDhcpData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkDhcpEntity properties = null)
+ /// A new instance for mocking.
+ public static PlacementPolicyData PlacementPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PlacementPolicyProperties properties = null)
{
- return new WorkloadNetworkDhcpData(
+ return new PlacementPolicyData(
id,
name,
resourceType,
@@ -690,364 +500,646 @@ public static WorkloadNetworkDhcpData WorkloadNetworkDhcpData(ResourceIdentifier
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Type of DHCP: SERVER or RELAY.
- /// Display name of the DHCP entity.
- /// NSX Segments consuming DHCP.
+ /// Initializes a new instance of .
+ /// Placement Policy type.
+ /// Whether the placement policy is enabled or disabled.
+ /// Display name of the placement policy.
/// The provisioning state.
- /// NSX revision number.
- /// A new instance for mocking.
- public static WorkloadNetworkDhcpEntity WorkloadNetworkDhcpEntity(string dhcpType = null, string displayName = null, IEnumerable segments = null, WorkloadNetworkDhcpProvisioningState? provisioningState = null, long? revision = null)
+ /// A new instance for mocking.
+ public static PlacementPolicyProperties PlacementPolicyProperties(string type = null, PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null)
{
- segments ??= new List();
-
- return new UnknownWorkloadNetworkDhcpEntity(
- dhcpType == null ? default : new DhcpTypeEnum(dhcpType),
- displayName,
- segments?.ToList(),
- provisioningState,
- revision,
- serializedAdditionalRawData: null);
+ return new UnknownPlacementPolicyProperties(type == null ? default : new PlacementPolicyType(type), state, displayName, provisioningState, serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// Display name of the DNS Service.
- /// DNS service IP of the DNS Service.
- /// Default DNS zone of the DNS Service.
- /// FQDN zones of the DNS Service.
- /// DNS Service log level.
- /// DNS Service status.
+ /// Initializes a new instance of .
+ /// Whether the placement policy is enabled or disabled.
+ /// Display name of the placement policy.
/// The provisioning state.
- /// NSX revision number.
- /// A new instance for mocking.
- public static WorkloadNetworkDnsServiceData WorkloadNetworkDnsServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IPAddress dnsServiceIP = null, string defaultDnsZone = null, IEnumerable fqdnZones = null, DnsServiceLogLevel? logLevel = null, DnsServiceStatus? status = null, WorkloadNetworkDnsServiceProvisioningState? provisioningState = null, long? revision = null)
+ /// Virtual machine members list.
+ /// placement policy affinity type.
+ /// A new instance for mocking.
+ public static VmVmPlacementPolicyProperties VmVmPlacementPolicyProperties(PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null, IEnumerable vmMembers = null, AffinityType affinityType = default)
{
- fqdnZones ??= new List();
+ vmMembers ??= new List();
- return new WorkloadNetworkDnsServiceData(
- id,
- name,
- resourceType,
- systemData,
+ return new VmVmPlacementPolicyProperties(
+ PlacementPolicyType.VmVm,
+ state,
displayName,
- dnsServiceIP,
- defaultDnsZone,
- fqdnZones?.ToList(),
- logLevel,
- status,
provisioningState,
- revision,
- serializedAdditionalRawData: null);
- }
-
- /// Initializes a new instance of .
- /// The id.
- /// The name.
- /// The resourceType.
- /// The systemData.
- /// Display name of the DNS Zone.
- /// Domain names of the DNS Zone.
- /// DNS Server IP array of the DNS Zone.
- /// Source IP of the DNS Zone.
- /// Number of DNS Services using the DNS zone.
+ serializedAdditionalRawData: null,
+ vmMembers?.ToList(),
+ affinityType);
+ }
+
+ /// Initializes a new instance of .
+ /// Whether the placement policy is enabled or disabled.
+ /// Display name of the placement policy.
/// The provisioning state.
- /// NSX revision number.
- /// A new instance for mocking.
- public static WorkloadNetworkDnsZoneData WorkloadNetworkDnsZoneData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable domain = null, IEnumerable dnsServerIPs = null, IPAddress sourceIP = null, long? dnsServices = null, WorkloadNetworkDnsZoneProvisioningState? provisioningState = null, long? revision = null)
+ /// Virtual machine members list.
+ /// Host members list.
+ /// placement policy affinity type.
+ /// vm-host placement policy affinity strength (should/must).
+ /// placement policy azure hybrid benefit opt-in type.
+ /// A new instance for mocking.
+ public static VmHostPlacementPolicyProperties VmHostPlacementPolicyProperties(PlacementPolicyState? state = null, string displayName = null, PlacementPolicyProvisioningState? provisioningState = null, IEnumerable vmMembers = null, IEnumerable hostMembers = null, AffinityType affinityType = default, AffinityStrength? affinityStrength = null, AzureHybridBenefitType? azureHybridBenefitType = null)
{
- domain ??= new List();
- dnsServerIPs ??= new List();
+ vmMembers ??= new List();
+ hostMembers ??= new List();
- return new WorkloadNetworkDnsZoneData(
- id,
- name,
- resourceType,
- systemData,
+ return new VmHostPlacementPolicyProperties(
+ PlacementPolicyType.VmHost,
+ state,
displayName,
- domain?.ToList(),
- dnsServerIPs?.ToList(),
- sourceIP,
- dnsServices,
provisioningState,
- revision,
- serializedAdditionalRawData: null);
+ serializedAdditionalRawData: null,
+ vmMembers?.ToList(),
+ hostMembers?.ToList(),
+ affinityType,
+ affinityStrength,
+ azureHybridBenefitType);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The provisioning state of the resource.
- /// Display name of the DHCP entity.
- /// NSX Gateway Path.
- /// A new instance for mocking.
- public static WorkloadNetworkGatewayData WorkloadNetworkGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkProvisioningState? provisioningState = null, string displayName = null, string path = null)
+ /// The tags.
+ /// The location.
+ /// The resource-specific properties for this resource.
+ /// The SKU (Stock Keeping Unit) assigned to this resource.
+ /// The managed service identities assigned to this resource. Current supported identity types: None, SystemAssigned.
+ /// The availability zones.
+ /// A new instance for mocking.
+ public static PrivateCloudData PrivateCloudData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PrivateCloudProperties properties = null, AvsSku sku = null, ManagedServiceIdentity identity = null, IEnumerable zones = null)
{
- return new WorkloadNetworkGatewayData(
+ tags ??= new Dictionary();
+ zones ??= new List();
+
+ return new PrivateCloudData(
id,
name,
resourceType,
systemData,
+ tags,
+ location,
+ properties,
+ sku,
+ identity,
+ zones?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The default cluster used for management.
+ /// Connectivity to internet is enabled or disabled.
+ /// vCenter Single Sign On Identity Sources.
+ /// Properties describing how the cloud is distributed across availability zones.
+ /// Customer managed key encryption, can be enabled or disabled.
+ ///
+ /// Array of additional networks noncontiguous with networkBlock. Networks must be
+ /// unique and non-overlapping across VNet in your subscription, on-premise, and
+ /// this privateCloud networkBlock attribute. Make sure the CIDR format conforms to
+ /// (A.B.C.D/X).
+ ///
+ /// The provisioning state.
+ /// An ExpressRoute Circuit.
+ /// The endpoints.
+ ///
+ /// The block of addresses should be unique across VNet in your subscription as
+ /// well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where
+ /// A,B,C,D are between 0 and 255, and X is between 0 and 22
+ ///
+ /// Network used to access vCenter Server and NSX-T Manager.
+ /// Used for virtual machine cold migration, cloning, and snapshot migration.
+ /// Used for live migration of virtual machines.
+ /// Optionally, set the vCenter admin password when the private cloud is created.
+ /// Optionally, set the NSX-T Manager password when the private cloud is created.
+ /// Thumbprint of the vCenter Server SSL certificate.
+ /// Thumbprint of the NSX-T Manager SSL certificate.
+ /// Array of cloud link IDs from other clouds that connect to this one.
+ ///
+ /// A secondary expressRoute circuit from a separate AZ. Only present in a
+ /// stretched private cloud
+ ///
+ ///
+ /// Flag to indicate whether the private cloud has the quota for provisioned NSX
+ /// Public IP count raised from 64 to 1024
+ ///
+ /// Azure resource ID of the virtual network.
+ /// The type of DNS zone to use.
+ /// A new instance for mocking.
+ public static PrivateCloudProperties PrivateCloudProperties(ManagementCluster managementCluster = null, InternetEnum? internet = null, IEnumerable identitySources = null, AvailabilityProperties availability = null, Encryption encryption = null, IEnumerable extendedNetworkBlocks = null, PrivateCloudProvisioningState? provisioningState = null, Circuit circuit = null, Endpoints endpoints = null, string networkBlock = null, string managementNetwork = null, string provisioningNetwork = null, string vmotionNetwork = null, string vcenterPassword = null, string nsxtPassword = null, string vcenterCertificateThumbprint = null, string nsxtCertificateThumbprint = null, IEnumerable externalCloudLinks = null, Circuit secondaryCircuit = null, NsxPublicIPQuotaRaisedEnum? nsxPublicIPQuotaRaised = null, ResourceIdentifier virtualNetworkId = null, DnsZoneType? dnsZoneType = null)
+ {
+ identitySources ??= new List();
+ extendedNetworkBlocks ??= new List();
+ externalCloudLinks ??= new List();
+
+ return new PrivateCloudProperties(
+ managementCluster,
+ internet,
+ identitySources?.ToList(),
+ availability,
+ encryption,
+ extendedNetworkBlocks?.ToList(),
provisioningState,
- displayName,
- path,
+ circuit,
+ endpoints,
+ networkBlock,
+ managementNetwork,
+ provisioningNetwork,
+ vmotionNetwork,
+ vcenterPassword,
+ nsxtPassword,
+ vcenterCertificateThumbprint,
+ nsxtCertificateThumbprint,
+ externalCloudLinks?.ToList(),
+ secondaryCircuit,
+ nsxPublicIPQuotaRaised,
+ virtualNetworkId,
+ dnsZoneType,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The cluster size.
+ /// The state of the cluster provisioning.
+ /// The identity.
+ /// The hosts.
+ /// Name of the vsan datastore associated with the cluster.
+ /// A new instance for mocking.
+ public static ManagementCluster ManagementCluster(int? clusterSize = null, ClusterProvisioningState? provisioningState = null, int? clusterId = null, IEnumerable hosts = null, string vsanDatastoreName = null)
+ {
+ hosts ??= new List();
+
+ return new ManagementCluster(
+ clusterSize,
+ provisioningState,
+ clusterId,
+ hosts?.ToList(),
+ vsanDatastoreName,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The name of the key.
+ /// The version of the key.
+ /// The auto-detected version of the key if versionType is auto-detected.
+ /// The URL of the vault.
+ /// The state of key provided.
+ /// Property of the key if user provided or auto detected.
+ /// A new instance for mocking.
+ public static EncryptionKeyVaultProperties EncryptionKeyVaultProperties(string keyName = null, string keyVersion = null, string autoDetectedKeyVersion = null, string keyVaultUri = null, EncryptionKeyStatus? keyState = null, EncryptionVersionType? versionType = null)
+ {
+ return new EncryptionKeyVaultProperties(
+ keyName,
+ keyVersion,
+ autoDetectedKeyVersion,
+ keyVaultUri,
+ keyState,
+ versionType,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// CIDR of primary subnet.
+ /// CIDR of secondary subnet.
+ /// Identifier of the ExpressRoute Circuit (Microsoft Colo only).
+ /// ExpressRoute Circuit private peering identifier.
+ /// A new instance for mocking.
+ public static Circuit Circuit(string primarySubnet = null, string secondarySubnet = null, string expressRouteId = null, string expressRoutePrivatePeeringId = null)
+ {
+ return new Circuit(primarySubnet, secondarySubnet, expressRouteId, expressRoutePrivatePeeringId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Endpoint FQDN for the NSX-T Data Center manager.
+ /// Endpoint FQDN for Virtual Center Server Appliance.
+ /// Endpoint FQDN for the HCX Cloud Manager.
+ /// Endpoint IP for the NSX-T Data Center manager.
+ /// Endpoint IP for Virtual Center Server Appliance.
+ /// Endpoint IP for the HCX Cloud Manager.
+ /// A new instance for mocking.
+ public static Endpoints Endpoints(string nsxtManager = null, string vcsa = null, string hcxCloudManager = null, string nsxtManagerIP = null, string vcenterIP = null, string hcxCloudManagerIP = null)
+ {
+ return new Endpoints(
+ nsxtManager,
+ vcsa,
+ hcxCloudManager,
+ nsxtManagerIP,
+ vcenterIP,
+ hcxCloudManagerIP,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// NSX-T Manager username.
+ /// NSX-T Manager password.
+ /// vCenter admin username.
+ /// vCenter admin password.
+ /// A new instance for mocking.
+ public static AdminCredentials AdminCredentials(string nsxtUsername = null, string nsxtPassword = null, string vcenterUsername = null, string vcenterPassword = null)
+ {
+ return new AdminCredentials(nsxtUsername, nsxtPassword, vcenterUsername, vcenterPassword, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// Display name of the port mirroring profile.
- /// Direction of port mirroring profile.
- /// Source VM Group.
- /// Destination VM Group.
- /// Port Mirroring Status.
- /// The provisioning state.
- /// NSX revision number.
- /// A new instance for mocking.
- public static WorkloadNetworkPortMirroringProfileData WorkloadNetworkPortMirroringProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, PortMirroringProfileDirection? direction = null, string source = null, string destination = null, PortMirroringProfileStatus? status = null, WorkloadNetworkPortMirroringProfileProvisioningState? provisioningState = null, long? revision = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ProvisionedNetworkData ProvisionedNetworkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ProvisionedNetworkProperties properties = null)
{
- return new WorkloadNetworkPortMirroringProfileData(
+ return new ProvisionedNetworkData(
id,
name,
resourceType,
systemData,
- displayName,
- direction,
- source,
- destination,
- status,
- provisioningState,
- revision,
+ properties,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// The provisioning state of the resource.
+ /// The address prefixes of the provisioned network in CIDR notation.
+ /// The type of network provisioned.
+ /// A new instance for mocking.
+ public static ProvisionedNetworkProperties ProvisionedNetworkProperties(ProvisionedNetworkProvisioningState? provisioningState = null, string addressPrefix = null, ProvisionedNetworkType? networkType = null)
+ {
+ return new ProvisionedNetworkProperties(provisioningState, addressPrefix, networkType, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// Display name of the Public IP Block.
- /// Number of Public IPs requested.
- /// CIDR Block of the Public IP Block.
- /// The provisioning state.
- /// A new instance for mocking.
- public static WorkloadNetworkPublicIPData WorkloadNetworkPublicIPData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, long? numberOfPublicIPs = null, string publicIPBlock = null, WorkloadNetworkPublicIPProvisioningState? provisioningState = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static PureStoragePolicyData PureStoragePolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PureStoragePolicyProperties properties = null)
{
- return new WorkloadNetworkPublicIPData(
+ return new PureStoragePolicyData(
id,
name,
resourceType,
systemData,
- displayName,
- numberOfPublicIPs,
- publicIPBlock,
- provisioningState,
+ properties,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
+ /// Definition of a Pure Storage Policy Based Management policy.
+ /// Azure resource ID of the Pure Storage Pool associated with the storage policy.
+ /// The state of the Pure Storage Policy Based Management policy provisioning.
+ /// A new instance for mocking.
+ public static PureStoragePolicyProperties PureStoragePolicyProperties(string storagePolicyDefinition = null, string storagePoolId = null, PureStoragePolicyProvisioningState? provisioningState = null)
+ {
+ return new PureStoragePolicyProperties(storagePolicyDefinition, storagePoolId, provisioningState, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// Display name of the segment.
- /// Gateway which to connect segment to.
- /// Subnet which to connect segment to.
- /// Port Vif which segment is associated with.
- /// Segment status.
- /// The provisioning state.
- /// NSX revision number.
- /// A new instance for mocking.
- public static WorkloadNetworkSegmentData WorkloadNetworkSegmentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, string connectedGateway = null, WorkloadNetworkSegmentSubnet subnet = null, IEnumerable portVif = null, WorkloadNetworkSegmentStatus? status = null, WorkloadNetworkSegmentProvisioningState? provisioningState = null, long? revision = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ScriptCmdletData ScriptCmdletData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScriptCmdletProperties properties = null)
{
- portVif ??= new List();
-
- return new WorkloadNetworkSegmentData(
+ return new ScriptCmdletData(
id,
name,
resourceType,
systemData,
- displayName,
- connectedGateway,
- subnet,
- portVif?.ToList(),
- status,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The provisioning state of the resource.
+ /// Description of the scripts functionality.
+ /// Recommended time limit for execution.
+ /// Specifies whether a script cmdlet is intended to be invoked only through automation or visible to customers.
+ /// Parameters the script will accept.
+ /// A new instance for mocking.
+ public static ScriptCmdletProperties ScriptCmdletProperties(ScriptCmdletProvisioningState? provisioningState = null, string description = null, string timeout = null, ScriptCmdletAudience? audience = null, IEnumerable parameters = null)
+ {
+ parameters ??= new List();
+
+ return new ScriptCmdletProperties(
provisioningState,
- revision,
+ description,
+ timeout,
+ audience,
+ parameters?.ToList(),
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Name of port or VIF attached to segment.
- /// A new instance for mocking.
- public static WorkloadNetworkSegmentPortVif WorkloadNetworkSegmentPortVif(string portName = null)
+ /// Initializes a new instance of .
+ ///
+ /// The type of parameter the script is expecting. psCredential is a
+ /// PSCredentialObject
+ ///
+ /// The parameter name that the script will expect a parameter value for.
+ /// User friendly description of the parameter.
+ ///
+ /// Should this parameter be visible to arm and passed in the parameters argument
+ /// when executing
+ ///
+ /// Is this parameter required or optional.
+ /// A new instance for mocking.
+ public static ScriptParameter ScriptParameter(ScriptParameterType? type = null, string name = null, string description = null, VisibilityParameterEnum? visibility = null, OptionalParamEnum? optional = null)
{
- return new WorkloadNetworkSegmentPortVif(portName, serializedAdditionalRawData: null);
+ return new ScriptParameter(
+ type,
+ name,
+ description,
+ visibility,
+ optional,
+ serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The provisioning state of the resource.
- /// Display name of the VM.
- /// Virtual machine type.
- /// A new instance for mocking.
- public static WorkloadNetworkVirtualMachineData WorkloadNetworkVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, WorkloadNetworkProvisioningState? provisioningState = null, string displayName = null, WorkloadNetworkVmType? vmType = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ScriptExecutionData ScriptExecutionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScriptExecutionProperties properties = null)
{
- return new WorkloadNetworkVirtualMachineData(
+ return new ScriptExecutionData(
id,
name,
resourceType,
systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// A reference to the script cmdlet resource if user is running a AVS script.
+ ///
+ /// Parameters the script will accept
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , and .
+ ///
+ ///
+ /// Parameters that will be hidden/not visible to ARM, such as passwords and
+ /// credentials
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , and .
+ ///
+ ///
+ /// Error message if the script was able to run, but if the script itself had
+ /// errors or powershell threw an exception
+ ///
+ /// Time limit for execution.
+ /// Time to live for the resource. If not provided, will be available for 60 days.
+ /// Time the script execution was submitted.
+ /// Time the script execution was started.
+ /// Time the script execution was finished.
+ /// The state of the script execution resource.
+ /// Standard output stream from the powershell execution.
+ /// User-defined dictionary.
+ /// Standard information out stream from the powershell execution.
+ /// Standard warning out stream from the powershell execution.
+ /// Standard error output stream from the powershell execution.
+ /// A new instance for mocking.
+ public static ScriptExecutionProperties ScriptExecutionProperties(string scriptCmdletId = null, IEnumerable parameters = null, IEnumerable hiddenParameters = null, string failureReason = null, string timeout = null, string retention = null, DateTimeOffset? submittedOn = null, DateTimeOffset? startedOn = null, DateTimeOffset? finishedOn = null, ScriptExecutionProvisioningState? provisioningState = null, IEnumerable output = null, IDictionary namedOutputs = null, IEnumerable information = null, IEnumerable warnings = null, IEnumerable errors = null)
+ {
+ parameters ??= new List();
+ hiddenParameters ??= new List();
+ output ??= new List();
+ namedOutputs ??= new Dictionary();
+ information ??= new List();
+ warnings ??= new List();
+ errors ??= new List();
+
+ return new ScriptExecutionProperties(
+ scriptCmdletId,
+ parameters?.ToList(),
+ hiddenParameters?.ToList(),
+ failureReason,
+ timeout,
+ retention,
+ submittedOn,
+ startedOn,
+ finishedOn,
provisioningState,
- displayName,
- vmType,
+ output?.ToList(),
+ namedOutputs,
+ information?.ToList(),
+ warnings?.ToList(),
+ errors?.ToList(),
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// Display name of the VM group.
- /// Virtual machine members of this group.
- /// VM Group status.
- /// The provisioning state.
- /// NSX revision number.
- /// A new instance for mocking.
- public static WorkloadNetworkVmGroupData WorkloadNetworkVmGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable members = null, WorkloadNetworkVmGroupStatus? status = null, WorkloadNetworkVmGroupProvisioningState? provisioningState = null, long? revision = null)
+ /// The resource-specific properties for this resource.
+ /// A new instance for mocking.
+ public static ScriptPackageData ScriptPackageData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ScriptPackageProperties properties = null)
{
- members ??= new List();
-
- return new WorkloadNetworkVmGroupData(
+ return new ScriptPackageData(
id,
name,
resourceType,
systemData,
- displayName,
- members?.ToList(),
- status,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The provisioning state of the resource.
+ /// User friendly description of the package.
+ /// Module version.
+ /// Company that created and supports the package.
+ /// Link to support by the package vendor.
+ /// A new instance for mocking.
+ public static ScriptPackageProperties ScriptPackageProperties(ScriptPackageProvisioningState? provisioningState = null, string description = null, string version = null, string company = null, string uri = null)
+ {
+ return new ScriptPackageProperties(
provisioningState,
- revision,
+ description,
+ version,
+ company,
+ uri,
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The state of the addon provisioning.
- /// The VMware vCenter resource ID.
- /// A new instance for mocking.
- public static AddonArcProperties AddonArcProperties(AddonProvisioningState? provisioningState = null, string vCenter = null)
+ /// Initializes a new instance of .
+ /// The type of resource the SKU applies to.
+ /// The name of the SKU.
+ /// The tier of virtual machines in a scale set.
+ /// The size of the SKU.
+ /// The family of the SKU.
+ /// The set of locations that the SKU is available.
+ /// A list of locations and availability zones in those locations where the SKU is available.
+ /// Name value pairs to describe the capability.
+ /// The restrictions of the SKU.
+ /// A new instance for mocking.
+ public static ResourceSku ResourceSku(ResourceSkuResourceType resourceType = default, string name = null, string tier = null, string size = null, string family = null, IEnumerable locations = null, IEnumerable locationInfo = null, IEnumerable capabilities = null, IEnumerable restrictions = null)
{
- return new AddonArcProperties(AddonType.Arc, provisioningState, serializedAdditionalRawData: null, vCenter);
+ locations ??= new List();
+ locationInfo ??= new List();
+ capabilities ??= new List();
+ restrictions ??= new List();
+
+ return new ResourceSku(
+ resourceType,
+ name,
+ tier,
+ size,
+ family,
+ locations?.ToList(),
+ locationInfo?.ToList(),
+ capabilities?.ToList(),
+ restrictions?.ToList(),
+ serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// The state of the addon provisioning.
- /// The HCX offer, example VMware MaaS Cloud Provider (Enterprise).
- /// A new instance for mocking.
- public static AddonHcxProperties AddonHcxProperties(AddonProvisioningState? provisioningState = null, string offer = null)
+ /// Initializes a new instance of .
+ /// Location of the SKU.
+ /// List of availability zones where the SKU is supported.
+ /// Gets details of capabilities available to a SKU in specific zones.
+ /// A new instance for mocking.
+ public static ResourceSkuLocationInfo ResourceSkuLocationInfo(AzureLocation location = default, IEnumerable zones = null, IEnumerable zoneDetails = null)
{
- return new AddonHcxProperties(AddonType.HCX, provisioningState, serializedAdditionalRawData: null, offer);
+ zones ??= new List();
+ zoneDetails ??= new List();
+
+ return new ResourceSkuLocationInfo(location, zones?.ToList(), zoneDetails?.ToList(), serializedAdditionalRawData: null);
}
- ///