diff --git a/sdk/durabletask/ci.mgmt.yml b/sdk/durabletask/ci.mgmt.yml
index 5f63204cd804..32b11e75b082 100644
--- a/sdk/durabletask/ci.mgmt.yml
+++ b/sdk/durabletask/ci.mgmt.yml
@@ -1,7 +1,6 @@
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
trigger: none
-
pr:
branches:
include:
diff --git a/sdk/pineconevectordb/ci.yml b/sdk/pineconevectordb/ci.yml
deleted file mode 100644
index 0b8325c8c903..000000000000
--- a/sdk/pineconevectordb/ci.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
-
-trigger:
- branches:
- include:
- - main
- - hotfix/*
- - release/*
- paths:
- include:
- - sdk/pineconevectordb
- - sdk/pineconevectordb/ci.yml
- - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb
-
-pr:
- branches:
- include:
- - main
- - feature/*
- - hotfix/*
- - release/*
- paths:
- include:
- - sdk/pineconevectordb
- - sdk/pineconevectordb/ci.yml
- - sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDb
-
-extends:
- template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
- parameters:
- ServiceDirectory: pineconevectordb
- ArtifactName: packages
- Artifacts:
- - name: Azure.ResourceManager.PineconeVectorDb
- safeName: AzureResourceManagerPineconeVectorDb
diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml
index 1c0fe85cd2f6..9ae0a7e75290 100644
--- a/sdk/resourcemanager/ci.mgmt.yml
+++ b/sdk/resourcemanager/ci.mgmt.yml
@@ -213,6 +213,7 @@ trigger:
- sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases
- sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor
- sdk/workloads/Azure.ResourceManager.Workloads
+ - sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance
pr:
branches:
@@ -428,6 +429,7 @@ pr:
- sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases
- sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor
- sdk/workloads/Azure.ResourceManager.Workloads
+ - sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance
extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml
index 2ca0501b60bd..4e749e6b85b1 100644
--- a/sdk/storage/ci.yml
+++ b/sdk/storage/ci.yml
@@ -12,6 +12,8 @@ trigger:
- sdk/storage/Azure.Storage.DataMovement/
- sdk/storage/Azure.Storage.DataMovement.Blobs/
- sdk/storage/Azure.Storage.DataMovement.Files/
+ exclude:
+ - sdk/storage/Azure.ResourceManager.Storage/
- sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/
exclude:
- sdk/storage/Azure.ResourceManager.Storage/
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Azure.ResourceManager.WorkloadsSapVirtualInstance.sln b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Azure.ResourceManager.WorkloadsSapVirtualInstance.sln
new file mode 100644
index 000000000000..f7c0a7b68767
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Azure.ResourceManager.WorkloadsSapVirtualInstance.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples", "samples\Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.WorkloadsSapVirtualInstance", "src\Azure.ResourceManager.WorkloadsSapVirtualInstance.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.WorkloadsSapVirtualInstance.Tests", "tests\Azure.ResourceManager.WorkloadsSapVirtualInstance.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7A2DFF15-5746-49F4-BD0F-C6C35337088A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/CHANGELOG.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/CHANGELOG.md
new file mode 100644
index 000000000000..8b33f0fedccc
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
\ No newline at end of file
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Directory.Build.props b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/README.md b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/README.md
new file mode 100644
index 000000000000..25bd4aaace57
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/README.md
@@ -0,0 +1,80 @@
+# Microsoft Azure WorkloadsSapVirtualInstance management client library for .NET
+
+**[Describe the service briefly first.]**
+
+This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities:
+
+ - Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET.
+ - Support [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
+ - HTTP pipeline with custom policies.
+ - Better error-handling.
+ - Support uniform telemetry across all languages.
+
+## Getting started
+
+### Install the package
+
+Install the Microsoft Azure WorkloadsSapVirtualInstance management library for .NET with [NuGet](https://www.nuget.org/):
+
+```dotnetcli
+dotnet add package Azure.ResourceManager.WorkloadsSapVirtualInstance --prerelease
+```
+
+### Prerequisites
+
+* You must have an [Microsoft Azure subscription](https://azure.microsoft.com/free/dotnet/).
+
+### Authenticate the Client
+
+To create an authenticated client and start interacting with Microsoft Azure resources, see the [quickstart guide here](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+
+## Key concepts
+
+Key concepts of the Microsoft Azure SDK for .NET can be found [here](https://azure.github.io/azure-sdk/dotnet_introduction.html)
+
+## Documentation
+
+Documentation is available to help you learn how to use this package:
+
+- [Quickstart](https://github.com/Azure/azure-sdk-for-net/blob/main/doc/dev/mgmt_quickstart.md).
+- [API References](https://learn.microsoft.com/dotnet/api/?view=azure-dotnet).
+- [Authentication](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md).
+
+## Examples
+
+Code samples for using the management library for .NET can be found in the following locations
+- [.NET Management Library Code Samples](https://aka.ms/azuresdk-net-mgmt-samples)
+
+## Troubleshooting
+
+- File an issue via [GitHub Issues](https://github.com/Azure/azure-sdk-for-net/issues).
+- Check [previous questions](https://stackoverflow.com/questions/tagged/azure+.net) or ask new ones on Stack Overflow using Azure and .NET tags.
+
+## Next steps
+
+For more information about Microsoft Azure SDK, see [this website](https://azure.github.io/azure-sdk/).
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing
+guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions
+require you to agree to a Contributor License Agreement (CLA) declaring
+that you have the right to, and actually do, grant us the rights to use
+your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine
+whether you need to provide a CLA and decorate the PR appropriately
+(for example, label, comment). Follow the instructions provided by the
+bot. You'll only need to do this action once across all repositories
+using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For
+more information, see the [Code of Conduct FAQ][coc_faq] or contact
+ with any other questions or comments.
+
+
+[cg]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/resourcemanager/Azure.ResourceManager/docs/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
\ No newline at end of file
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/assets.json b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/assets.json
new file mode 100644
index 000000000000..e42ea82f4c67
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/assets.json
@@ -0,0 +1,7 @@
+
+{
+ "AssetsRepo": "Azure/azure-sdk-assets",
+ "AssetsRepoPrefixPath": "net",
+ "TagPrefix": "net/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance",
+ "Tag": ""
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj
new file mode 100644
index 000000000000..34d0f04e38a3
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples.csproj
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs
new file mode 100644
index 000000000000..d2743b90592c
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceCollection.cs
@@ -0,0 +1,238 @@
+// 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.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapApplicationServerInstanceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_SAPApplicationServerInstancesCreate()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Create.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapApplicationServerInstanceResource
+ SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances();
+
+ // invoke the operation
+ string applicationInstanceName = "app01";
+ SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data);
+ SapApplicationServerInstanceResource 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
+ SapApplicationServerInstanceData 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_CreateSAPApplicationServerInstancesForHASystemWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_CreateForHaWithAvailabilitySet.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapApplicationServerInstanceResource
+ SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances();
+
+ // invoke the operation
+ string applicationInstanceName = "app01";
+ SapApplicationServerInstanceData data = new SapApplicationServerInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationInstanceName, data);
+ SapApplicationServerInstanceResource 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
+ SapApplicationServerInstanceData 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_SAPApplicationServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapApplicationServerInstanceResource
+ SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances();
+
+ // invoke the operation
+ string applicationInstanceName = "app01";
+ SapApplicationServerInstanceResource result = await collection.GetAsync(applicationInstanceName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapApplicationServerInstanceData 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_SapApplicationServerInstancesListBySAPVirtualInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_ListBySapVirtualInstance.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapApplicationServerInstanceResource
+ SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances();
+
+ // invoke the operation and iterate over the result
+ await foreach (SapApplicationServerInstanceResource 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
+ SapApplicationServerInstanceData 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_SAPApplicationServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapApplicationServerInstanceResource
+ SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances();
+
+ // invoke the operation
+ string applicationInstanceName = "app01";
+ bool result = await collection.ExistsAsync(applicationInstanceName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_SAPApplicationServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapApplicationServerInstanceResource
+ SapApplicationServerInstanceCollection collection = sapVirtualInstance.GetSapApplicationServerInstances();
+
+ // invoke the operation
+ string applicationInstanceName = "app01";
+ NullableResponse response = await collection.GetIfExistsAsync(applicationInstanceName);
+ SapApplicationServerInstanceResource 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
+ SapApplicationServerInstanceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs
new file mode 100644
index 000000000000..fcd4b6c9a3ea
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapApplicationServerInstanceResource.cs
@@ -0,0 +1,306 @@
+// 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.WorkloadsSapVirtualInstance.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapApplicationServerInstanceResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_SAPApplicationServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Get.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ SapApplicationServerInstanceResource result = await sapApplicationServerInstance.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
+ SapApplicationServerInstanceData 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_SAPApplicationServerInstancesDelete()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Delete.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_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 SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ await sapApplicationServerInstance.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_SAPApplicationServerInstancesUpdate()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_Update.json
+ // this example is just showing the usage of "SAPApplicationServerInstance_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 SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ SapApplicationServerInstancePatch patch = new SapApplicationServerInstancePatch
+ {
+ Tags =
+{
+["tag1"] = "value1"
+},
+ };
+ SapApplicationServerInstanceResource result = await sapApplicationServerInstance.UpdateAsync(patch);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapApplicationServerInstanceData 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 Start_StartTheSAPApplicationServerInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstance.json
+ // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent();
+ ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Start_StartVirtualMachineAndTheSAPApplicationServerInstanceOnIt()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StartInstanceVM.json
+ // this example is just showing the usage of "SAPApplicationServerInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent
+ {
+ StartVm = true,
+ };
+ ArmOperation lro = await sapApplicationServerInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_StopTheSAPApplicationServerInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstance.json
+ // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 0L,
+ };
+ ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_StopTheSAPApplicationServerInstanceAndItSInfrastructure()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceInfrastructure.json
+ // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 0L,
+ DeallocateVm = true,
+ };
+ ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_SoftStopTheSAPApplicationServerInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoft.json
+ // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 300L,
+ };
+ ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_SoftStopTheSAPApplicationServerInstanceAndItSInfrastructure()
+ {
+ // Generated from example definition: 2024-09-01/SapApplicationServerInstances_StopInstanceSoftInfrastructure.json
+ // this example is just showing the usage of "SAPApplicationServerInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapApplicationServerInstanceResource created on azure
+ // for more information of creating SapApplicationServerInstanceResource, please refer to the document of SapApplicationServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string applicationInstanceName = "app01";
+ ResourceIdentifier sapApplicationServerInstanceResourceId = SapApplicationServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName);
+ SapApplicationServerInstanceResource sapApplicationServerInstance = client.GetSapApplicationServerInstanceResource(sapApplicationServerInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 300L,
+ DeallocateVm = true,
+ };
+ ArmOperation lro = await sapApplicationServerInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs
new file mode 100644
index 000000000000..58fc61bccc08
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceCollection.cs
@@ -0,0 +1,238 @@
+// 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.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapCentralServerInstanceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_SapCentralServerInstancesCreate()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_Create.json
+ // this example is just showing the usage of "SAPCentralServerInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapCentralServerInstanceResource
+ SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances();
+
+ // invoke the operation
+ string centralInstanceName = "centralServer";
+ SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data);
+ SapCentralServerInstanceResource 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
+ SapCentralServerInstanceData 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_CreateSAPCentralInstancesForHASystemWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_CreateForHaWithAvailabilitySet.json
+ // this example is just showing the usage of "SAPCentralServerInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapCentralServerInstanceResource
+ SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances();
+
+ // invoke the operation
+ string centralInstanceName = "centralServer";
+ SapCentralServerInstanceData data = new SapCentralServerInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, centralInstanceName, data);
+ SapCentralServerInstanceResource 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
+ SapCentralServerInstanceData 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_SapCentralServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json
+ // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapCentralServerInstanceResource
+ SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances();
+
+ // invoke the operation
+ string centralInstanceName = "centralServer";
+ SapCentralServerInstanceResource result = await collection.GetAsync(centralInstanceName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapCentralServerInstanceData 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_SAPCentralInstancesListBySAPVirtualInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralServerInstances_ListBySapVirtualInstance.json
+ // this example is just showing the usage of "SAPCentralServerInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapCentralServerInstanceResource
+ SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances();
+
+ // invoke the operation and iterate over the result
+ await foreach (SapCentralServerInstanceResource 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
+ SapCentralServerInstanceData 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_SapCentralServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json
+ // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapCentralServerInstanceResource
+ SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances();
+
+ // invoke the operation
+ string centralInstanceName = "centralServer";
+ bool result = await collection.ExistsAsync(centralInstanceName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_SapCentralServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json
+ // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapCentralServerInstanceResource
+ SapCentralServerInstanceCollection collection = sapVirtualInstance.GetSapCentralServerInstances();
+
+ // invoke the operation
+ string centralInstanceName = "centralServer";
+ NullableResponse response = await collection.GetIfExistsAsync(centralInstanceName);
+ SapCentralServerInstanceResource 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
+ SapCentralServerInstanceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs
new file mode 100644
index 000000000000..3f6cd76b5aab
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapCentralServerInstanceResource.cs
@@ -0,0 +1,240 @@
+// 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.WorkloadsSapVirtualInstance.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapCentralServerInstanceResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_SapCentralServerInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_Get.json
+ // this example is just showing the usage of "SAPCentralServerInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapCentralServerInstanceResource created on azure
+ // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string centralInstanceName = "centralServer";
+ ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName);
+ SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId);
+
+ // invoke the operation
+ SapCentralServerInstanceResource result = await sapCentralServerInstance.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
+ SapCentralServerInstanceData 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_SapCentralServerInstancesDelete()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_Delete.json
+ // this example is just showing the usage of "SAPCentralServerInstance_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 SapCentralServerInstanceResource created on azure
+ // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string centralInstanceName = "centralServer";
+ ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName);
+ SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId);
+
+ // invoke the operation
+ await sapCentralServerInstance.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_SapCentralServerInstancesUpdate()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_Update.json
+ // this example is just showing the usage of "SAPCentralServerInstance_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 SapCentralServerInstanceResource created on azure
+ // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string centralInstanceName = "centralServer";
+ ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName);
+ SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId);
+
+ // invoke the operation
+ SapCentralServerInstancePatch patch = new SapCentralServerInstancePatch
+ {
+ Tags =
+{
+["tag1"] = "value1"
+},
+ };
+ SapCentralServerInstanceResource result = await sapCentralServerInstance.UpdateAsync(patch);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapCentralServerInstanceData 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 Start_StartTheSAPCentralServicesInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstance.json
+ // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapCentralServerInstanceResource created on azure
+ // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string centralInstanceName = "centralServer";
+ ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName);
+ SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent();
+ ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Start_StartTheVirtualMachineSAndTheSAPCentralServicesInstanceOnIt()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_StartInstanceVM.json
+ // this example is just showing the usage of "SAPCentralServerInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapCentralServerInstanceResource created on azure
+ // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string centralInstanceName = "centralServer";
+ ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName);
+ SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent
+ {
+ StartVm = true,
+ };
+ ArmOperation lro = await sapCentralServerInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_StopTheSAPCentralServicesInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstance.json
+ // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapCentralServerInstanceResource created on azure
+ // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string centralInstanceName = "centralServer";
+ ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName);
+ SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 1200L,
+ };
+ ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_StopTheSAPCentralServicesInstanceAndItsUnderlyingVirtualMachineS()
+ {
+ // Generated from example definition: 2024-09-01/SapCentralInstances_StopInstanceVM.json
+ // this example is just showing the usage of "SAPCentralServerInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapCentralServerInstanceResource created on azure
+ // for more information of creating SapCentralServerInstanceResource, please refer to the document of SapCentralServerInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string centralInstanceName = "centralServer";
+ ResourceIdentifier sapCentralServerInstanceResourceId = SapCentralServerInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName);
+ SapCentralServerInstanceResource sapCentralServerInstance = client.GetSapCentralServerInstanceResource(sapCentralServerInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ DeallocateVm = true,
+ };
+ ArmOperation lro = await sapCentralServerInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs
new file mode 100644
index 000000000000..e960a49cb406
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceCollection.cs
@@ -0,0 +1,238 @@
+// 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.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapDatabaseInstanceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_SAPDatabaseInstancesCreate()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_Create.json
+ // this example is just showing the usage of "SAPDatabaseInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapDatabaseInstanceResource
+ SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances();
+
+ // invoke the operation
+ string databaseInstanceName = "databaseServer";
+ SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data);
+ SapDatabaseInstanceResource 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
+ SapDatabaseInstanceData 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_CreateSAPDatabaseInstancesForHASystemWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_CreateForHaWithAvailabilitySet.json
+ // this example is just showing the usage of "SAPDatabaseInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapDatabaseInstanceResource
+ SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances();
+
+ // invoke the operation
+ string databaseInstanceName = "databaseServer";
+ SapDatabaseInstanceData data = new SapDatabaseInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, databaseInstanceName, data);
+ SapDatabaseInstanceResource 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
+ SapDatabaseInstanceData 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_SAPDatabaseInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json
+ // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapDatabaseInstanceResource
+ SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances();
+
+ // invoke the operation
+ string databaseInstanceName = "databaseServer";
+ SapDatabaseInstanceResource result = await collection.GetAsync(databaseInstanceName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapDatabaseInstanceData 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_SAPDatabaseInstancesListBySAPVirtualInstance()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_List.json
+ // this example is just showing the usage of "SAPDatabaseInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapDatabaseInstanceResource
+ SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances();
+
+ // invoke the operation and iterate over the result
+ await foreach (SapDatabaseInstanceResource 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
+ SapDatabaseInstanceData 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_SAPDatabaseInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json
+ // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapDatabaseInstanceResource
+ SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances();
+
+ // invoke the operation
+ string databaseInstanceName = "databaseServer";
+ bool result = await collection.ExistsAsync(databaseInstanceName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_SAPDatabaseInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json
+ // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // get the collection of this SapDatabaseInstanceResource
+ SapDatabaseInstanceCollection collection = sapVirtualInstance.GetSapDatabaseInstances();
+
+ // invoke the operation
+ string databaseInstanceName = "databaseServer";
+ NullableResponse response = await collection.GetIfExistsAsync(databaseInstanceName);
+ SapDatabaseInstanceResource 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
+ SapDatabaseInstanceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs
new file mode 100644
index 000000000000..91d1ce9488cd
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapDatabaseInstanceResource.cs
@@ -0,0 +1,306 @@
+// 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.WorkloadsSapVirtualInstance.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapDatabaseInstanceResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_SAPDatabaseInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_Get.json
+ // this example is just showing the usage of "SAPDatabaseInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "databaseServer";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ SapDatabaseInstanceResource result = await sapDatabaseInstance.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
+ SapDatabaseInstanceData 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_SAPDatabaseInstancesDelete()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_Delete.json
+ // this example is just showing the usage of "SAPDatabaseInstance_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 SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "databaseServer";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ await sapDatabaseInstance.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_SAPDatabaseInstancesUpdate()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_Update.json
+ // this example is just showing the usage of "SAPDatabaseInstance_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 SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "databaseServer";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ SapDatabaseInstancePatch patch = new SapDatabaseInstancePatch
+ {
+ Tags =
+{
+["key1"] = "value1"
+},
+ };
+ SapDatabaseInstanceResource result = await sapDatabaseInstance.UpdateAsync(patch);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapDatabaseInstanceData 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 Start_StartTheDatabaseInstanceOfTheSAPSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstance.json
+ // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "db0";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent();
+ ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Start_StartVirtualMachineAndTheDatabaseInstanceOfTheSAPSystemOnIt()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_StartInstanceVM.json
+ // this example is just showing the usage of "SAPDatabaseInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "db0";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent
+ {
+ StartVm = true,
+ };
+ ArmOperation lro = await sapDatabaseInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstance.json
+ // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "db0";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 0L,
+ };
+ ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoft.json
+ // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "db0";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 300L,
+ };
+ ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_SoftStopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceSoftVM.json
+ // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "db0";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 300L,
+ DeallocateVm = true,
+ };
+ ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_StopTheDatabaseInstanceOfTheSAPSystemAndTheUnderlyingVirtualMachineS()
+ {
+ // Generated from example definition: 2024-09-01/SapDatabaseInstances_StopInstanceVM.json
+ // this example is just showing the usage of "SAPDatabaseInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapDatabaseInstanceResource created on azure
+ // for more information of creating SapDatabaseInstanceResource, please refer to the document of SapDatabaseInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ string databaseInstanceName = "db0";
+ ResourceIdentifier sapDatabaseInstanceResourceId = SapDatabaseInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName);
+ SapDatabaseInstanceResource sapDatabaseInstance = client.GetSapDatabaseInstanceResource(sapDatabaseInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 0L,
+ DeallocateVm = true,
+ };
+ ArmOperation lro = await sapDatabaseInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs
new file mode 100644
index 000000000000..07f589225789
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceCollection.cs
@@ -0,0 +1,1418 @@
+// 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.Resources;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapVirtualInstanceCollection
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task CreateOrUpdate_DetectSAPSoftwareInstallationOnADistributedSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectDS.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2"))
+ {
+ Tags =
+{
+["created by"] = "azureuser"
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilitySet.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_DetectSAPSoftwareInstallationOnAnHASystemWithAvailabilityZone()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectHaAvailabilityZone.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_DetectSAPSoftwareInstallationOnASingleServerSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateDetectSingleServer.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureOnlyForDistributedSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDS.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithDiskAndOSConfigurationForDistributedSystemRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsDSRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilitySetRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilitySetRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithDiskAndOSConfigurationForHASystemWithAvailabilityZoneRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsHaAvailabilityZoneRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithDiskAndOSConfigurationsForSingleServerSystemRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraDiskOsSingleServerRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureOnlyForHASystemWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilitySet.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureOnlyForHASystemWithAvailabilityZone()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraHaAvailabilityZone.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationWithAzureComputeGalleryImage()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsComputeGalleryImage.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForDistributedSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesDS.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilitySet.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForHASystemWithAvailabilityZone()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesHaAvailabilityZone.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationWithCustomResourceNamesForSingleServerSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsCustomResourceNamesSingleServer.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationForDistributedSystemRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsDSRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilitySetRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilitySetRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationForHASystemWithAvailabilityZoneRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsHaAvailabilityZoneRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationForSingleServerSystemRecommended()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraOsSIngleServerRecommended.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureOnlyForSingleServerSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraSingleServer.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithAnExistingSAPTransportDirectoryFileshare()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithExistingFileshare.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithANewSAPTransportDirectoryFileshare()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithNewFileshare.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithOSConfigurationWithTrustedAccessEnabled()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithOsTrustedAccess.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_CreateInfrastructureWithoutASAPTransportDirectoryFileshare()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInfraWithoutFileshare.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("westcentralus"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_InstallSAPSoftwareOnDistributedSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallDS.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2"))
+ {
+ Tags =
+{
+["created by"] = "azureuser"
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_InstallSAPSoftwareOnSingleServerSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateInstallSingleServer.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("eastus2"))
+ {
+ Tags = { },
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutions()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutions.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope"))
+ {
+ Tags =
+{
+["createdby"] = "abc@microsoft.com",
+["test"] = "abc"
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_RegisterExistingSAPSystemAsVirtualInstanceForSAPSolutionsWithOptionalCustomizations()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterSapSolutionsCustom.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope"))
+ {
+ Tags =
+{
+["createdby"] = "abc@microsoft.com",
+["test"] = "abc"
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_RegisterWithTrustedAccessEnabled()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_CreateRegisterWithTrustedAccess.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceData data = new SapVirtualInstanceData(new AzureLocation("northeurope"))
+ {
+ Tags =
+{
+["createdby"] = "abc@microsoft.com",
+["test"] = "abc"
+},
+ };
+ ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sapVirtualInstanceName, data);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_SAPVirtualInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapVirtualInstanceData 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_SAPVirtualInstancesGetWithACSSInstallationBlocked()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ SapVirtualInstanceResource result = await collection.GetAsync(sapVirtualInstanceName);
+
+ // the variable result is a resource, you could call other operations on this instance as well
+ // but just for demo, we get its data from this resource instance
+ SapVirtualInstanceData 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_SAPVirtualInstancesListByResourceGroup()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_ListByResourceGroup.json
+ // this example is just showing the usage of "SAPVirtualInstance_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this ResourceGroupResource created on azure
+ // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation and iterate over the result
+ await foreach (SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_SAPVirtualInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ bool result = await collection.ExistsAsync(sapVirtualInstanceName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Exists_SAPVirtualInstancesGetWithACSSInstallationBlocked()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ bool result = await collection.ExistsAsync(sapVirtualInstanceName);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetIfExists_SAPVirtualInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_SAPVirtualInstancesGetWithACSSInstallationBlocked()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
+ ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
+
+ // get the collection of this SapVirtualInstanceResource
+ SapVirtualInstanceCollection collection = resourceGroupResource.GetSapVirtualInstances();
+
+ // invoke the operation
+ string sapVirtualInstanceName = "X00";
+ NullableResponse response = await collection.GetIfExistsAsync(sapVirtualInstanceName);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData resourceData = result.Data;
+ // for demo we just print out the id
+ Console.WriteLine($"Succeeded on id: {resourceData.Id}");
+ }
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs
new file mode 100644
index 000000000000..cc5c35a5cf00
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SapVirtualInstanceResource.cs
@@ -0,0 +1,372 @@
+// 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.WorkloadsSapVirtualInstance.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SapVirtualInstanceResource
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Get_SAPVirtualInstancesGet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Get.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ SapVirtualInstanceResource result = await sapVirtualInstance.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
+ SapVirtualInstanceData 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_SAPVirtualInstancesGetWithACSSInstallationBlocked()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_GetAcssInstallationBlocked.json
+ // this example is just showing the usage of "SAPVirtualInstance_Get" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ SapVirtualInstanceResource result = await sapVirtualInstance.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
+ SapVirtualInstanceData 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_SAPVirtualInstancesDelete()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Delete.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ await sapVirtualInstance.DeleteAsync(WaitUntil.Completed);
+
+ Console.WriteLine("Succeeded");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Update_SAPVirtualInstancesUpdate()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Update.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ SapVirtualInstancePatch patch = new SapVirtualInstancePatch
+ {
+ Tags =
+{
+["key1"] = "svi1"
+},
+ Identity = new SapVirtualInstanceIdentity(SapVirtualInstanceIdentityType.None),
+ };
+ ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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_SAPVirtualInstancesTrustedAccessEnableUpdate()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_UpdateTrustedAccess.json
+ // this example is just showing the usage of "SAPVirtualInstance_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 SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ SapVirtualInstancePatch patch = new SapVirtualInstancePatch
+ {
+ Tags =
+{
+["key1"] = "svi1"
+},
+ Identity = new SapVirtualInstanceIdentity(SapVirtualInstanceIdentityType.None),
+ UpdateSapVirtualInstanceManagedResourcesNetworkAccessType = ManagedResourcesNetworkAccessType.Private,
+ };
+ ArmOperation lro = await sapVirtualInstance.UpdateAsync(WaitUntil.Completed, patch);
+ SapVirtualInstanceResource 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
+ SapVirtualInstanceData 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 Start_SAPVirtualInstancesStart()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Start.json
+ // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent
+ {
+ StartVm = true,
+ };
+ ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Start_SAPVirtualInstancesStartWithInfraOperations()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_StartWithInfraOperations.json
+ // this example is just showing the usage of "SAPVirtualInstances_Start" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ StartSapInstanceContent content = new StartSapInstanceContent
+ {
+ StartVm = true,
+ };
+ ArmOperation lro = await sapVirtualInstance.StartAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_SoftStopOfSapVirtualInstancesStop()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStop.json
+ // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 300L,
+ };
+ ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_SoftStopTheVirtualMachineSAndTheSAPSystemOnIt()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_SoftStopVMAndSystem.json
+ // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 300L,
+ DeallocateVm = true,
+ };
+ ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_SAPVirtualInstancesStop()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_Stop.json
+ // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 0L,
+ };
+ ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task Stop_StopTheVirtualMachineSAndTheSAPSystemOnIt()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_StopVMAndSystem.json
+ // this example is just showing the usage of "SAPVirtualInstances_Stop" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SapVirtualInstanceResource created on azure
+ // for more information of creating SapVirtualInstanceResource, please refer to the document of SapVirtualInstanceResource
+ string subscriptionId = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ string resourceGroupName = "test-rg";
+ string sapVirtualInstanceName = "X00";
+ ResourceIdentifier sapVirtualInstanceResourceId = SapVirtualInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sapVirtualInstanceName);
+ SapVirtualInstanceResource sapVirtualInstance = client.GetSapVirtualInstanceResource(sapVirtualInstanceResourceId);
+
+ // invoke the operation
+ StopSapInstanceContent content = new StopSapInstanceContent
+ {
+ SoftStopTimeoutSeconds = 0L,
+ DeallocateVm = true,
+ };
+ ArmOperation lro = await sapVirtualInstance.StopAsync(WaitUntil.Completed, content: content);
+ OperationStatusResult result = lro.Value;
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
new file mode 100644
index 000000000000..c20dc162cafb
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs
@@ -0,0 +1,423 @@
+// 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.Resources;
+using Azure.ResourceManager.WorkloadsSapVirtualInstance.Models;
+using NUnit.Framework;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Samples
+{
+ public partial class Sample_SubscriptionResourceExtensions
+ {
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSapVirtualInstances_SAPVirtualInstancesListBySubscription()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_ListBySubscription.json
+ // this example is just showing the usage of "SAPVirtualInstance_ListBySubscription" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
+ TokenCredential cred = new DefaultAzureCredential();
+ // authenticate your client
+ ArmClient client = new ArmClient(cred);
+
+ // this example assumes you already have this SubscriptionResource created on azure
+ // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
+ string subscriptionId = "6d875e77-e412-4d7d-9af4-8895278b4443";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation and iterate over the result
+ await foreach (SapVirtualInstanceResource item in subscriptionResource.GetSapVirtualInstancesAsync())
+ {
+ // 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
+ SapVirtualInstanceData 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 GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForNonHADistributedSystem()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_Distributed.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSizingRecommendationContent content = new SapSizingRecommendationContent(
+ new AzureLocation("eastus"),
+ SapEnvironmentType.Prod,
+ SapProductType.S4Hana,
+ SapDeploymentType.ThreeTier,
+ 20000L,
+ 1024L,
+ SapDatabaseType.Hana)
+ {
+ DBScaleMethod = SapDatabaseScaleMethod.ScaleUp,
+ };
+ SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvSet.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSizingRecommendationContent content = new SapSizingRecommendationContent(
+ new AzureLocation("eastus"),
+ SapEnvironmentType.Prod,
+ SapProductType.S4Hana,
+ SapDeploymentType.ThreeTier,
+ 75000L,
+ 1024L,
+ SapDatabaseType.Hana)
+ {
+ DBScaleMethod = SapDatabaseScaleMethod.ScaleUp,
+ HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet,
+ };
+ SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForHAWithAvailabilityZone()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_HA_AvZone.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSizingRecommendationContent content = new SapSizingRecommendationContent(
+ new AzureLocation("eastus"),
+ SapEnvironmentType.Prod,
+ SapProductType.S4Hana,
+ SapDeploymentType.ThreeTier,
+ 75000L,
+ 1024L,
+ SapDatabaseType.Hana)
+ {
+ DBScaleMethod = SapDatabaseScaleMethod.ScaleUp,
+ HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone,
+ };
+ SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSizingRecommendationsSapVirtualInstance_SAPSizingRecommendationsForSingleServer()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSizingRecommendations_S4HANA_SingleServer.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSizingRecommendations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSizingRecommendationContent content = new SapSizingRecommendationContent(
+ new AzureLocation("eastus"),
+ SapEnvironmentType.NonProd,
+ SapProductType.S4Hana,
+ SapDeploymentType.SingleServer,
+ 60000L,
+ 2000L,
+ SapDatabaseType.Hana)
+ {
+ DBScaleMethod = SapDatabaseScaleMethod.ScaleUp,
+ };
+ SapSizingRecommendationResult result = await subscriptionResource.GetSizingRecommendationsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedNonHAEnvironment()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_Distributed.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSupportedSkusContent content = new SapSupportedSkusContent(new AzureLocation("eastus"), SapEnvironmentType.Prod, SapProductType.S4Hana, SapDeploymentType.ThreeTier, SapDatabaseType.Hana);
+ SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForDistributedHAEnvironmentWithAvailabilitySet()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvSet.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSupportedSkusContent content = new SapSupportedSkusContent(new AzureLocation("eastus"), SapEnvironmentType.Prod, SapProductType.S4Hana, SapDeploymentType.ThreeTier, SapDatabaseType.Hana)
+ {
+ HighAvailabilityType = SapHighAvailabilityType.AvailabilitySet,
+ };
+ SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSkusForHAWithAvailabilityZone()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_DistributedHA_AvZone.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSupportedSkusContent content = new SapSupportedSkusContent(new AzureLocation("eastus"), SapEnvironmentType.Prod, SapProductType.S4Hana, SapDeploymentType.ThreeTier, SapDatabaseType.Hana)
+ {
+ HighAvailabilityType = SapHighAvailabilityType.AvailabilityZone,
+ };
+ SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetSapSupportedSkuSapVirtualInstance_SAPSupportedSKUsForSingleServer()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeSapSupportedSku_SingleServer.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetSapSupportedSku" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapSupportedSkusContent content = new SapSupportedSkusContent(new AzureLocation("eastus"), SapEnvironmentType.NonProd, SapProductType.S4Hana, SapDeploymentType.SingleServer, SapDatabaseType.Hana);
+ SapSupportedResourceSkusResult result = await subscriptionResource.GetSapSupportedSkuSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentNonProd()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_NonProd.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapDiskConfigurationsContent content = new SapDiskConfigurationsContent(
+ new AzureLocation("eastus"),
+ SapEnvironmentType.NonProd,
+ SapProductType.S4Hana,
+ SapDatabaseType.Hana,
+ SapDeploymentType.ThreeTier,
+ "Standard_M32ts");
+ SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetDiskConfigurationsSapVirtualInstance_SAPDiskConfigurationsForInputEnvironmentProd()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeDiskConfigurations_Prod.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetDiskConfigurations" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("centralus");
+ SapDiskConfigurationsContent content = new SapDiskConfigurationsContent(
+ new AzureLocation("eastus"),
+ SapEnvironmentType.Prod,
+ SapProductType.S4Hana,
+ SapDatabaseType.Hana,
+ SapDeploymentType.ThreeTier,
+ "Standard_M32ts");
+ SapDiskConfigurationsResult result = await subscriptionResource.GetDiskConfigurationsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInEastUs()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_eastus.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("eastus");
+ SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent(new AzureLocation("eastus"), SapProductType.S4Hana, SapDatabaseType.Hana);
+ SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+
+ [Test]
+ [Ignore("Only validating compilation of examples")]
+ public async Task GetAvailabilityZoneDetailsSapVirtualInstance_SAPAvailabilityZoneDetailsInNorthEurope()
+ {
+ // Generated from example definition: 2024-09-01/SapVirtualInstances_InvokeAvailabilityZoneDetails_northeurope.json
+ // this example is just showing the usage of "SAPVirtualInstances_GetAvailabilityZoneDetails" operation, for the dependent resources, they will have to be created separately.
+
+ // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "8e17e36c-42e9-4cd5-a078-7b44883414e0";
+ ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
+ SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
+
+ // invoke the operation
+ AzureLocation location = new AzureLocation("northeurope");
+ SapAvailabilityZoneDetailsContent content = new SapAvailabilityZoneDetailsContent(new AzureLocation("northeurope"), SapProductType.S4Hana, SapDatabaseType.Hana);
+ SapAvailabilityZoneDetailsResult result = await subscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content);
+
+ Console.WriteLine($"Succeeded: {result}");
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Azure.ResourceManager.WorkloadsSapVirtualInstance.csproj b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Azure.ResourceManager.WorkloadsSapVirtualInstance.csproj
new file mode 100644
index 000000000000..188eeef8c1d3
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Azure.ResourceManager.WorkloadsSapVirtualInstance.csproj
@@ -0,0 +1,8 @@
+
+
+ Azure Resource Manager client SDK for Azure resource provider WorkloadsSapVirtualInstance.
+ 1.0.0-beta.1
+ azure;management;arm;resource manager;workloadssapvirtualinstance
+ Azure.ResourceManager.WorkloadsSapVirtualInstance
+
+
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/ArmWorkloadsSapVirtualInstanceModelFactory.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/ArmWorkloadsSapVirtualInstanceModelFactory.cs
new file mode 100644
index 000000000000..c93dc4c7abe1
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/ArmWorkloadsSapVirtualInstanceModelFactory.cs
@@ -0,0 +1,523 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+using Azure.ResourceManager.Resources.Models;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Models
+{
+ /// Model factory for models.
+ public static partial class ArmWorkloadsSapVirtualInstanceModelFactory
+ {
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// Defines the environment type - Production/Non Production.
+ /// Defines the SAP Product type.
+ /// Specifies the network access configuration for the resources that will be deployed in the Managed Resource Group. The options to choose from are Public and Private. If 'Private' is chosen, the Storage Account service tag should be enabled on the subnets in which the SAP VMs exist. This is required for establishing connectivity between VM extensions and the managed resource group storage account. This setting is currently applicable only to Storage Account. Learn more here https://go.microsoft.com/fwlink/?linkid=2247228.
+ ///
+ /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS
+ /// 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 .
+ ///
+ /// Managed resource group configuration.
+ /// Defines the SAP Instance status.
+ /// Defines the health of SAP Instances.
+ /// Defines the Virtual Instance for SAP state.
+ /// Defines the provisioning states.
+ /// Indicates any errors on the Virtual Instance for SAP solutions resource.
+ /// The managed service identities assigned to this resource.
+ /// A new instance for mocking.
+ public static SapVirtualInstanceData SapVirtualInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SapEnvironmentType? environment = null, SapProductType? sapProduct = null, ManagedResourcesNetworkAccessType? managedResourcesNetworkAccessType = null, SapConfiguration configuration = null, string managedResourceGroupName = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceState? state = null, SapVirtualInstanceProvisioningState? provisioningState = null, SapVirtualInstanceErrorDetail errorsProperties = null, SapVirtualInstanceIdentity identity = null)
+ {
+ tags ??= new Dictionary();
+
+ return new SapVirtualInstanceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ environment,
+ sapProduct,
+ managedResourcesNetworkAccessType,
+ configuration,
+ managedResourceGroupName != null ? new ManagedRGConfiguration(managedResourceGroupName, serializedAdditionalRawData: null) : null,
+ status,
+ health,
+ state,
+ provisioningState,
+ errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null,
+ identity,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The virtual machine ID of the Central Server.
+ /// The custom storage account name for the storage account created by the service in the managed resource group created as part of VIS deployment.<br><br>Refer to the storage account naming rules [here](https://learn.microsoft.com/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage).<br><br>If not provided, the service will create the storage account with a random name.
+ /// The geo-location where the SAP system exists.
+ /// A new instance for mocking.
+ public static DiscoveryConfiguration DiscoveryConfiguration(ResourceIdentifier centralServerVmId = null, string managedRgStorageAccountName = null, AzureLocation? appLocation = null)
+ {
+ return new DiscoveryConfiguration(SapConfigurationType.Discovery, serializedAdditionalRawData: null, centralServerVmId, managedRgStorageAccountName, appLocation);
+ }
+
+ /// Initializes a new instance of .
+ /// Service specific error code which serves as the substatus for the HTTP error code.
+ /// Description of the error.
+ /// Internal error details.
+ /// A new instance for mocking.
+ public static SapVirtualInstanceErrorDetail SapVirtualInstanceErrorDetail(string code = null, string message = null, IEnumerable details = null)
+ {
+ details ??= new List();
+
+ return new SapVirtualInstanceErrorDetail(code, message, details?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Fully qualified ID for the async operation.
+ /// Name of the async operation.
+ /// Operation status.
+ /// Percent of the operation that is complete.
+ /// The start time of the operation.
+ /// The end time of the operation.
+ /// The operations list.
+ /// If present, details of the operation error.
+ /// Fully qualified ID of the resource against which the original async operation was started.
+ /// A new instance for mocking.
+ public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, string name = null, string status = null, double? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null, ResourceIdentifier resourceId = null)
+ {
+ operations ??= new List();
+
+ return new OperationStatusResult(
+ id,
+ name,
+ status,
+ percentComplete,
+ startOn,
+ endOn,
+ operations?.ToList(),
+ error,
+ resourceId,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The geo-location where the resource is to be created.
+ /// Defines the environment type - Production/Non Production.
+ /// Defines the SAP Product type.
+ /// The deployment type. Eg: SingleServer/ThreeTier.
+ /// The SAP Application Performance Standard measurement.
+ /// The database memory configuration.
+ /// The database type.
+ /// The DB scale method.
+ /// The high availability type.
+ /// A new instance for mocking.
+ public static SapSizingRecommendationContent SapSizingRecommendationContent(AzureLocation appLocation = default, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, long saps = default, long dbMemory = default, SapDatabaseType databaseType = default, SapDatabaseScaleMethod? dbScaleMethod = null, SapHighAvailabilityType? highAvailabilityType = null)
+ {
+ return new SapSizingRecommendationContent(
+ appLocation,
+ environment,
+ sapProduct,
+ deploymentType,
+ saps,
+ dbMemory,
+ databaseType,
+ dbScaleMethod,
+ highAvailabilityType,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The recommended VM SKU for single server.
+ /// A new instance for mocking.
+ public static SingleServerRecommendationResult SingleServerRecommendationResult(string vmSku = null)
+ {
+ return new SingleServerRecommendationResult(SapDeploymentType.SingleServer, serializedAdditionalRawData: null, vmSku);
+ }
+
+ /// Initializes a new instance of .
+ /// The database VM SKU.
+ /// The database server instance count.
+ /// The central server VM SKU.
+ /// The central server instance count.
+ /// The application server VM SKU.
+ /// The application server instance count.
+ /// A new instance for mocking.
+ public static ThreeTierRecommendationResult ThreeTierRecommendationResult(string dbVmSku = null, long? databaseInstanceCount = null, string centralServerVmSku = null, long? centralServerInstanceCount = null, string applicationServerVmSku = null, long? applicationServerInstanceCount = null)
+ {
+ return new ThreeTierRecommendationResult(
+ SapDeploymentType.ThreeTier,
+ serializedAdditionalRawData: null,
+ dbVmSku,
+ databaseInstanceCount,
+ centralServerVmSku,
+ centralServerInstanceCount,
+ applicationServerVmSku,
+ applicationServerInstanceCount);
+ }
+
+ /// Initializes a new instance of .
+ /// The geo-location where the resource is to be created.
+ /// Defines the environment type - Production/Non Production.
+ /// Defines the SAP Product type.
+ /// The deployment type. Eg: SingleServer/ThreeTier.
+ /// The database type. Eg: HANA, DB2, etc.
+ /// The high availability type.
+ /// A new instance for mocking.
+ public static SapSupportedSkusContent SapSupportedSkusContent(AzureLocation appLocation = default, SapEnvironmentType environment = default, SapProductType sapProduct = default, SapDeploymentType deploymentType = default, SapDatabaseType databaseType = default, SapHighAvailabilityType? highAvailabilityType = null)
+ {
+ return new SapSupportedSkusContent(
+ appLocation,
+ environment,
+ sapProduct,
+ deploymentType,
+ databaseType,
+ highAvailabilityType,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Gets the list of SAP supported SKUs.
+ /// A new instance for mocking.
+ public static SapSupportedResourceSkusResult SapSupportedResourceSkusResult(IEnumerable supportedSkus = null)
+ {
+ supportedSkus ??= new List();
+
+ return new SapSupportedResourceSkusResult(supportedSkus?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The VM Sku.
+ /// True if the Sku is certified for App server in the SAP system.
+ /// True if the Sku is certified for Database server in the SAP system.
+ /// A new instance for mocking.
+ public static SapSupportedSku SapSupportedSku(string vmSku = null, bool? isAppServerCertified = null, bool? isDatabaseCertified = null)
+ {
+ return new SapSupportedSku(vmSku, isAppServerCertified, isDatabaseCertified, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup'].
+ /// A new instance for mocking.
+ public static SapDiskConfigurationsResult SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations = null)
+ {
+ volumeConfigurations ??= new Dictionary();
+
+ return new SapDiskConfigurationsResult(volumeConfigurations, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The recommended disk details for a given VM Sku.
+ /// The list of supported disks for a given VM Sku.
+ /// A new instance for mocking.
+ public static SapDiskConfiguration SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration = null, IEnumerable supportedConfigurations = null)
+ {
+ supportedConfigurations ??= new List();
+
+ return new SapDiskConfiguration(recommendedConfiguration, supportedConfigurations?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The type of disk sku. For example, Standard_LRS, Standard_ZRS, Premium_LRS, Premium_ZRS.
+ /// The disk size in GB.
+ /// The minimum supported disk count.
+ /// The maximum supported disk count.
+ /// The disk Iops.
+ /// The disk provisioned throughput in MBps.
+ /// The disk tier, e.g. P10, E10.
+ /// A new instance for mocking.
+ public static SupportedConfigurationsDiskDetails SupportedConfigurationsDiskDetails(DiskDetailsDiskSkuName? skuName = null, long? sizeInGB = null, long? minimumSupportedDiskCount = null, long? maximumSupportedDiskCount = null, long? iopsReadWrite = null, long? mbpsReadWrite = null, string diskTier = null)
+ {
+ return new SupportedConfigurationsDiskDetails(
+ skuName != null ? new SapDiskSku(skuName, serializedAdditionalRawData: null) : null,
+ sizeInGB,
+ minimumSupportedDiskCount,
+ maximumSupportedDiskCount,
+ iopsReadWrite,
+ mbpsReadWrite,
+ diskTier,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Gets the list of availability zone pairs.
+ /// A new instance for mocking.
+ public static SapAvailabilityZoneDetailsResult SapAvailabilityZoneDetailsResult(IEnumerable availabilityZonePairs = null)
+ {
+ availabilityZonePairs ??= new List();
+
+ return new SapAvailabilityZoneDetailsResult(availabilityZonePairs?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The zone A.
+ /// The zone B.
+ /// A new instance for mocking.
+ public static SapAvailabilityZonePair SapAvailabilityZonePair(long? zoneA = null, long? zoneB = null)
+ {
+ return new SapAvailabilityZonePair(zoneA, zoneB, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// The central services instance number.
+ /// The central services instance subnet.
+ /// Defines the SAP message server properties.
+ /// Defines the SAP Enqueue Server properties.
+ /// Defines the SAP Gateway Server properties.
+ /// Defines the SAP Enqueue Replication Server (ERS) properties.
+ /// The central services instance Kernel Version.
+ /// The central services instance Kernel Patch level.
+ /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines.
+ /// The list of virtual machines corresponding to the Central Services instance.
+ /// Defines the SAP Instance status.
+ /// Defines the health of SAP Instances.
+ /// Defines the provisioning states.
+ /// Defines the errors related to SAP Central Services Instance resource.
+ /// A new instance for mocking.
+ public static SapCentralServerInstanceData SapCentralServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string instanceNo = null, ResourceIdentifier subnetId = null, MessageServerProperties messageServerProperties = null, EnqueueServerProperties enqueueServerProperties = null, GatewayServerProperties gatewayServerProperties = null, EnqueueReplicationServerProperties enqueueReplicationServerProperties = null, string kernelVersion = null, string kernelPatch = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, SapVirtualInstanceErrorDetail errorsProperties = null)
+ {
+ tags ??= new Dictionary();
+ vmDetails ??= new List();
+
+ return new SapCentralServerInstanceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ instanceNo,
+ subnetId,
+ messageServerProperties,
+ enqueueServerProperties,
+ gatewayServerProperties,
+ enqueueReplicationServerProperties,
+ kernelVersion,
+ kernelPatch,
+ loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null,
+ vmDetails?.ToList(),
+ status,
+ health,
+ provisioningState,
+ errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// message server port.
+ /// message server internal MS port.
+ /// message server HTTP Port.
+ /// message server HTTPS Port.
+ /// message server SAP Hostname.
+ /// message server IP Address.
+ /// Defines the health of SAP Instances.
+ /// A new instance for mocking.
+ public static MessageServerProperties MessageServerProperties(long? msPort = null, long? internalMsPort = null, long? httpPort = null, long? httpsPort = null, string hostname = null, IPAddress ipAddress = null, SapHealthState? health = null)
+ {
+ return new MessageServerProperties(
+ msPort,
+ internalMsPort,
+ httpPort,
+ httpsPort,
+ hostname,
+ ipAddress,
+ health,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Enqueue Server SAP Hostname.
+ /// Enqueue Server SAP IP Address.
+ /// Enqueue Server Port.
+ /// Defines the health of SAP Instances.
+ /// A new instance for mocking.
+ public static EnqueueServerProperties EnqueueServerProperties(string hostname = null, IPAddress ipAddress = null, long? port = null, SapHealthState? health = null)
+ {
+ return new EnqueueServerProperties(hostname, ipAddress, port, health, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Gateway Port.
+ /// Defines the health of SAP Instances.
+ /// A new instance for mocking.
+ public static GatewayServerProperties GatewayServerProperties(long? port = null, SapHealthState? health = null)
+ {
+ return new GatewayServerProperties(port, health, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Defines the type of Enqueue Replication Server.
+ /// ERS Instance Number.
+ /// ERS SAP Hostname.
+ /// ERS SAP Kernel Version.
+ /// ERS SAP Kernel Patch level.
+ /// ERS SAP IP Address.
+ /// Defines the health of SAP Instances.
+ /// A new instance for mocking.
+ public static EnqueueReplicationServerProperties EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion = null, string instanceNo = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, IPAddress ipAddress = null, SapHealthState? health = null)
+ {
+ return new EnqueueReplicationServerProperties(
+ ersVersion,
+ instanceNo,
+ hostname,
+ kernelVersion,
+ kernelPatch,
+ ipAddress,
+ health,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Defines the type of central server VM.
+ /// The virtual machine id.
+ /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage.
+ /// A new instance for mocking.
+ public static CentralServerVmDetails CentralServerVmDetails(CentralServerVirtualMachineType? virtualMachineType = null, ResourceIdentifier virtualMachineId = null, IEnumerable storageDetails = null)
+ {
+ storageDetails ??= new List();
+
+ return new CentralServerVmDetails(virtualMachineType, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// Database subnet.
+ /// Database SID name.
+ /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server.
+ /// Database IP Address.
+ /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines.
+ /// The list of virtual machines corresponding to the Database resource.
+ /// Defines the SAP Instance status.
+ /// Defines the provisioning states.
+ /// Defines the errors related to Database resource.
+ /// A new instance for mocking.
+ public static SapDatabaseInstanceData SapDatabaseInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier subnetId = null, string databaseSid = null, string databaseType = null, IPAddress ipAddress = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapVirtualInstanceProvisioningState? provisioningState = null, SapVirtualInstanceErrorDetail errorsProperties = null)
+ {
+ tags ??= new Dictionary();
+ vmDetails ??= new List();
+
+ return new SapDatabaseInstanceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ subnetId,
+ databaseSid,
+ databaseType,
+ ipAddress,
+ loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null,
+ vmDetails?.ToList(),
+ status,
+ provisioningState,
+ errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The virtual machine id.
+ /// Defines the SAP Instance status.
+ /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage.
+ /// A new instance for mocking.
+ public static DatabaseVmDetails DatabaseVmDetails(ResourceIdentifier virtualMachineId = null, SapVirtualInstanceStatus? status = null, IEnumerable storageDetails = null)
+ {
+ storageDetails ??= new List();
+
+ return new DatabaseVmDetails(virtualMachineId, status, storageDetails?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// Application server Instance Number.
+ /// Application server Subnet.
+ /// Application server instance SAP hostname.
+ /// Application server instance SAP Kernel Version.
+ /// Application server instance SAP Kernel Patch level.
+ /// Application server instance SAP IP Address.
+ /// Application server instance gateway Port.
+ /// Application server instance ICM HTTP Port.
+ /// Application server instance ICM HTTPS Port.
+ /// Application server instance dispatcher status.
+ /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines.
+ /// The list of virtual machines.
+ /// Defines the SAP Instance status.
+ /// Defines the health of SAP Instances.
+ /// Defines the provisioning states.
+ /// Defines the Application Instance errors.
+ /// A new instance for mocking.
+ public static SapApplicationServerInstanceData SapApplicationServerInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string instanceNo = null, ResourceIdentifier subnetId = null, string hostname = null, string kernelVersion = null, string kernelPatch = null, IPAddress ipAddress = null, long? gatewayPort = null, long? icmHttpPort = null, long? icmHttpsPort = null, string dispatcherStatus = null, ResourceIdentifier loadBalancerDetailsId = null, IEnumerable vmDetails = null, SapVirtualInstanceStatus? status = null, SapHealthState? health = null, SapVirtualInstanceProvisioningState? provisioningState = null, SapVirtualInstanceErrorDetail errorsProperties = null)
+ {
+ tags ??= new Dictionary();
+ vmDetails ??= new List();
+
+ return new SapApplicationServerInstanceData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ instanceNo,
+ subnetId,
+ hostname,
+ kernelVersion,
+ kernelPatch,
+ ipAddress,
+ gatewayPort,
+ icmHttpPort,
+ icmHttpsPort,
+ dispatcherStatus,
+ loadBalancerDetailsId != null ? ResourceManagerModelFactory.SubResource(loadBalancerDetailsId) : null,
+ vmDetails?.ToList(),
+ status,
+ health,
+ provisioningState,
+ errorsProperties != null ? new SapVirtualInstanceError(errorsProperties, serializedAdditionalRawData: null) : null,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Defines the type of application server VM.
+ /// The virtual machine id.
+ /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage.
+ /// A new instance for mocking.
+ public static ApplicationServerVmDetails ApplicationServerVmDetails(ApplicationServerVirtualMachineType? virtualMachineType = null, ResourceIdentifier virtualMachineId = null, IEnumerable storageDetails = null)
+ {
+ storageDetails ??= new List();
+
+ return new ApplicationServerVmDetails(virtualMachineType, virtualMachineId, storageDetails?.ToList(), serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceArmClient.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceArmClient.cs
new file mode 100644
index 000000000000..e2d33a8e9a1d
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceArmClient.cs
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Mocking
+{
+ /// A class to add extension methods to ArmClient.
+ public partial class MockableWorkloadsSapVirtualInstanceArmClient : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableWorkloadsSapVirtualInstanceArmClient()
+ {
+ }
+
+ /// 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 MockableWorkloadsSapVirtualInstanceArmClient(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ internal MockableWorkloadsSapVirtualInstanceArmClient(ArmClient client) : this(client, ResourceIdentifier.Root)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual SapVirtualInstanceResource GetSapVirtualInstanceResource(ResourceIdentifier id)
+ {
+ SapVirtualInstanceResource.ValidateResourceId(id);
+ return new SapVirtualInstanceResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual SapCentralServerInstanceResource GetSapCentralServerInstanceResource(ResourceIdentifier id)
+ {
+ SapCentralServerInstanceResource.ValidateResourceId(id);
+ return new SapCentralServerInstanceResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual SapDatabaseInstanceResource GetSapDatabaseInstanceResource(ResourceIdentifier id)
+ {
+ SapDatabaseInstanceResource.ValidateResourceId(id);
+ return new SapDatabaseInstanceResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(ResourceIdentifier id)
+ {
+ SapApplicationServerInstanceResource.ValidateResourceId(id);
+ return new SapApplicationServerInstanceResource(Client, id);
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceResourceGroupResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceResourceGroupResource.cs
new file mode 100644
index 000000000000..cad0d92c87ba
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceResourceGroupResource.cs
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Mocking
+{
+ /// A class to add extension methods to ResourceGroupResource.
+ public partial class MockableWorkloadsSapVirtualInstanceResourceGroupResource : ArmResource
+ {
+ /// Initializes a new instance of the class for mocking.
+ protected MockableWorkloadsSapVirtualInstanceResourceGroupResource()
+ {
+ }
+
+ /// 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 MockableWorkloadsSapVirtualInstanceResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource.
+ /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource.
+ public virtual SapVirtualInstanceCollection GetSapVirtualInstances()
+ {
+ return GetCachedClient(client => new SapVirtualInstanceCollection(client, Id));
+ }
+
+ ///
+ /// Gets a Virtual Instance for SAP solutions resource
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_Get
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Virtual Instances for SAP solutions resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetSapVirtualInstanceAsync(string sapVirtualInstanceName, CancellationToken cancellationToken = default)
+ {
+ return await GetSapVirtualInstances().GetAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a Virtual Instance for SAP solutions resource
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_Get
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Virtual Instances for SAP solutions resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetSapVirtualInstance(string sapVirtualInstanceName, CancellationToken cancellationToken = default)
+ {
+ return GetSapVirtualInstances().Get(sapVirtualInstanceName, cancellationToken);
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceSubscriptionResource.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceSubscriptionResource.cs
new file mode 100644
index 000000000000..346f9696995c
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/MockableWorkloadsSapVirtualInstanceSubscriptionResource.cs
@@ -0,0 +1,449 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.WorkloadsSapVirtualInstance.Models;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance.Mocking
+{
+ /// A class to add extension methods to SubscriptionResource.
+ public partial class MockableWorkloadsSapVirtualInstanceSubscriptionResource : ArmResource
+ {
+ private ClientDiagnostics _sapVirtualInstanceClientDiagnostics;
+ private SapVirtualInstancesRestOperations _sapVirtualInstanceRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MockableWorkloadsSapVirtualInstanceSubscriptionResource()
+ {
+ }
+
+ /// 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 MockableWorkloadsSapVirtualInstanceSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ }
+
+ private ClientDiagnostics SapVirtualInstanceClientDiagnostics => _sapVirtualInstanceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.WorkloadsSapVirtualInstance", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics);
+ private SapVirtualInstancesRestOperations SapVirtualInstanceRestClient => _sapVirtualInstanceRestClient ??= new SapVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SapVirtualInstanceResource.ResourceType));
+
+ private string GetApiVersionOrNull(ResourceType resourceType)
+ {
+ TryGetApiVersion(resourceType, out string apiVersion);
+ return apiVersion;
+ }
+
+ ///
+ /// Gets all Virtual Instances for SAP solutions resources in a Subscription.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_ListBySubscription
+ ///
+ ///
+ /// Default Api Version
+ /// 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 GetSapVirtualInstancesAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets all Virtual Instances for SAP solutions resources in a Subscription.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_ListBySubscription
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetSapVirtualInstances(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => SapVirtualInstanceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapVirtualInstanceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapVirtualInstanceResource(Client, SapVirtualInstanceData.DeserializeSapVirtualInstanceData(e)), SapVirtualInstanceClientDiagnostics, Pipeline, "MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetSapVirtualInstances", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets the sizing recommendations.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSizingRecommendations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> GetSizingRecommendationsSapVirtualInstanceAsync(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetSizingRecommendationsSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = await SapVirtualInstanceRestClient.GetSizingRecommendationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the sizing recommendations.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSizingRecommendations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response GetSizingRecommendationsSapVirtualInstance(AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetSizingRecommendationsSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = SapVirtualInstanceRestClient.GetSizingRecommendations(Id.SubscriptionId, location, content, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a list of SAP supported SKUs for ASCS, Application and Database tier.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSapSupportedSku
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> GetSapSupportedSkuSapVirtualInstanceAsync(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetSapSupportedSkuSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = await SapVirtualInstanceRestClient.GetSapSupportedSkuAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a list of SAP supported SKUs for ASCS, Application and Database tier.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSapSupportedSku
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response GetSapSupportedSkuSapVirtualInstance(AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetSapSupportedSkuSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = SapVirtualInstanceRestClient.GetSapSupportedSku(Id.SubscriptionId, location, content, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the SAP Disk Configuration Layout prod/non-prod SAP System.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetDiskConfigurations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> GetDiskConfigurationsSapVirtualInstanceAsync(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetDiskConfigurationsSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = await SapVirtualInstanceRestClient.GetDiskConfigurationsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the SAP Disk Configuration Layout prod/non-prod SAP System.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetDiskConfigurations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response GetDiskConfigurationsSapVirtualInstance(AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetDiskConfigurationsSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = SapVirtualInstanceRestClient.GetDiskConfigurations(Id.SubscriptionId, location, content, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the recommended SAP Availability Zone Pair Details for your region.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetAvailabilityZoneDetails
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = await SapVirtualInstanceRestClient.GetAvailabilityZoneDetailsAsync(Id.SubscriptionId, location, content, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the recommended SAP Availability Zone Pair Details for your region.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetAvailabilityZoneDetails
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response GetAvailabilityZoneDetailsSapVirtualInstance(AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = SapVirtualInstanceClientDiagnostics.CreateScope("MockableWorkloadsSapVirtualInstanceSubscriptionResource.GetAvailabilityZoneDetailsSapVirtualInstance");
+ scope.Start();
+ try
+ {
+ var response = SapVirtualInstanceRestClient.GetAvailabilityZoneDetails(Id.SubscriptionId, location, content, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/WorkloadsSapVirtualInstanceExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/WorkloadsSapVirtualInstanceExtensions.cs
new file mode 100644
index 000000000000..88a5cd46ad43
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Extensions/WorkloadsSapVirtualInstanceExtensions.cs
@@ -0,0 +1,573 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.ResourceManager.Resources;
+using Azure.ResourceManager.WorkloadsSapVirtualInstance.Mocking;
+using Azure.ResourceManager.WorkloadsSapVirtualInstance.Models;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance
+{
+ /// A class to add extension methods to Azure.ResourceManager.WorkloadsSapVirtualInstance.
+ public static partial class WorkloadsSapVirtualInstanceExtensions
+ {
+ private static MockableWorkloadsSapVirtualInstanceArmClient GetMockableWorkloadsSapVirtualInstanceArmClient(ArmClient client)
+ {
+ return client.GetCachedClient(client0 => new MockableWorkloadsSapVirtualInstanceArmClient(client0));
+ }
+
+ private static MockableWorkloadsSapVirtualInstanceResourceGroupResource GetMockableWorkloadsSapVirtualInstanceResourceGroupResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableWorkloadsSapVirtualInstanceResourceGroupResource(client, resource.Id));
+ }
+
+ private static MockableWorkloadsSapVirtualInstanceSubscriptionResource GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(ArmResource resource)
+ {
+ return resource.GetCachedClient(client => new MockableWorkloadsSapVirtualInstanceSubscriptionResource(client, resource.Id));
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SapVirtualInstanceResource GetSapVirtualInstanceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableWorkloadsSapVirtualInstanceArmClient(client).GetSapVirtualInstanceResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SapCentralServerInstanceResource GetSapCentralServerInstanceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableWorkloadsSapVirtualInstanceArmClient(client).GetSapCentralServerInstanceResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SapDatabaseInstanceResource GetSapDatabaseInstanceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableWorkloadsSapVirtualInstanceArmClient(client).GetSapDatabaseInstanceResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SapApplicationServerInstanceResource GetSapApplicationServerInstanceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableWorkloadsSapVirtualInstanceArmClient(client).GetSapApplicationServerInstanceResource(id);
+ }
+
+ ///
+ /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource.
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// is null.
+ /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource.
+ public static SapVirtualInstanceCollection GetSapVirtualInstances(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceResourceGroupResource(resourceGroupResource).GetSapVirtualInstances();
+ }
+
+ ///
+ /// Gets a Virtual Instance for SAP solutions resource
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_Get
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Virtual Instances for SAP solutions resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetSapVirtualInstanceAsync(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableWorkloadsSapVirtualInstanceResourceGroupResource(resourceGroupResource).GetSapVirtualInstanceAsync(sapVirtualInstanceName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a Virtual Instance for SAP solutions resource
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_Get
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Virtual Instances for SAP solutions resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetSapVirtualInstance(this ResourceGroupResource resourceGroupResource, string sapVirtualInstanceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceResourceGroupResource(resourceGroupResource).GetSapVirtualInstance(sapVirtualInstanceName, cancellationToken);
+ }
+
+ ///
+ /// Gets all Virtual Instances for SAP solutions resources in a Subscription.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_ListBySubscription
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetSapVirtualInstancesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetSapVirtualInstancesAsync(cancellationToken);
+ }
+
+ ///
+ /// Gets all Virtual Instances for SAP solutions resources in a Subscription.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/sapVirtualInstances
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstance_ListBySubscription
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetSapVirtualInstances(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetSapVirtualInstances(cancellationToken);
+ }
+
+ ///
+ /// Gets the sizing recommendations.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSizingRecommendations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static async Task> GetSizingRecommendationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the sizing recommendations.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSizingRecommendations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSizingRecommendations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static Response GetSizingRecommendationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSizingRecommendationContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetSizingRecommendationsSapVirtualInstance(location, content, cancellationToken);
+ }
+
+ ///
+ /// Get a list of SAP supported SKUs for ASCS, Application and Database tier.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSapSupportedSku
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static async Task> GetSapSupportedSkuSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a list of SAP supported SKUs for ASCS, Application and Database tier.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getSapSupportedSku
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetSapSupportedSku
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static Response GetSapSupportedSkuSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapSupportedSkusContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetSapSupportedSkuSapVirtualInstance(location, content, cancellationToken);
+ }
+
+ ///
+ /// Get the SAP Disk Configuration Layout prod/non-prod SAP System.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetDiskConfigurations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static async Task> GetDiskConfigurationsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get the SAP Disk Configuration Layout prod/non-prod SAP System.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getDiskConfigurations
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetDiskConfigurations
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static Response GetDiskConfigurationsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapDiskConfigurationsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetDiskConfigurationsSapVirtualInstance(location, content, cancellationToken);
+ }
+
+ ///
+ /// Get the recommended SAP Availability Zone Pair Details for your region.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetAvailabilityZoneDetails
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static async Task> GetAvailabilityZoneDetailsSapVirtualInstanceAsync(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstanceAsync(location, content, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get the recommended SAP Availability Zone Pair Details for your region.
+ ///
+ ///
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/locations/{location}/sapVirtualInstanceMetadata/default/getAvailabilityZoneDetails
+ ///
+ ///
+ /// Operation Id
+ /// SAPVirtualInstances_GetAvailabilityZoneDetails
+ ///
+ ///
+ /// Default Api Version
+ /// 2024-09-01
+ ///
+ ///
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// The content of the action request.
+ /// The cancellation token to use.
+ /// or is null.
+ public static Response GetAvailabilityZoneDetailsSapVirtualInstance(this SubscriptionResource subscriptionResource, AzureLocation location, SapAvailabilityZoneDetailsContent content, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableWorkloadsSapVirtualInstanceSubscriptionResource(subscriptionResource).GetAvailabilityZoneDetailsSapVirtualInstance(location, content, cancellationToken);
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/Argument.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..457e83c736b5
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..67d908b38e7b
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ public bool IsUndefined => _innerDictionary == null;
+
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ IEnumerable IReadOnlyDictionary.Keys => Keys;
+
+ IEnumerable IReadOnlyDictionary.Values => Values;
+
+ public IEnumerator> GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator> enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureDictionary().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(KeyValuePair item)
+ {
+ EnsureDictionary().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureDictionary().Clear();
+ }
+
+ public bool Contains(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Contains(item);
+ }
+
+ public void CopyTo(KeyValuePair[] array, int index)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureDictionary().CopyTo(array, index);
+ }
+
+ public bool Remove(KeyValuePair item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(item);
+ }
+
+ public void Add(TKey key, TValue value)
+ {
+ EnsureDictionary().Add(key, value);
+ }
+
+ public bool ContainsKey(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().ContainsKey(key);
+ }
+
+ public bool Remove(TKey key)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureDictionary().Remove(key);
+ }
+
+ public bool TryGetValue(TKey key, out TValue value)
+ {
+ if (IsUndefined)
+ {
+ value = default;
+ return false;
+ }
+ return EnsureDictionary().TryGetValue(key, out value);
+ }
+
+ public IDictionary EnsureDictionary()
+ {
+ return _innerDictionary ??= new Dictionary();
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ChangeTrackingList.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ChangeTrackingList.cs
new file mode 100644
index 000000000000..a5f4399610ae
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ChangeTrackingList.cs
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance
+{
+ internal class ChangeTrackingList : IList, IReadOnlyList
+ {
+ private IList _innerList;
+
+ public ChangeTrackingList()
+ {
+ }
+
+ public ChangeTrackingList(IList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList;
+ }
+ }
+
+ public ChangeTrackingList(IReadOnlyList innerList)
+ {
+ if (innerList != null)
+ {
+ _innerList = innerList.ToList();
+ }
+ }
+
+ public bool IsUndefined => _innerList == null;
+
+ public int Count => IsUndefined ? 0 : EnsureList().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly;
+
+ public T this[int index]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ return EnsureList()[index];
+ }
+ set
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList()[index] = value;
+ }
+ }
+
+ public void Reset()
+ {
+ _innerList = null;
+ }
+
+ public IEnumerator GetEnumerator()
+ {
+ if (IsUndefined)
+ {
+ IEnumerator enumerateEmpty()
+ {
+ yield break;
+ }
+ return enumerateEmpty();
+ }
+ return EnsureList().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
+
+ public void Add(T item)
+ {
+ EnsureList().Add(item);
+ }
+
+ public void Clear()
+ {
+ EnsureList().Clear();
+ }
+
+ public bool Contains(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Contains(item);
+ }
+
+ public void CopyTo(T[] array, int arrayIndex)
+ {
+ if (IsUndefined)
+ {
+ return;
+ }
+ EnsureList().CopyTo(array, arrayIndex);
+ }
+
+ public bool Remove(T item)
+ {
+ if (IsUndefined)
+ {
+ return false;
+ }
+ return EnsureList().Remove(item);
+ }
+
+ public int IndexOf(T item)
+ {
+ if (IsUndefined)
+ {
+ return -1;
+ }
+ return EnsureList().IndexOf(item);
+ }
+
+ public void Insert(int index, T item)
+ {
+ EnsureList().Insert(index, item);
+ }
+
+ public void RemoveAt(int index)
+ {
+ if (IsUndefined)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+ EnsureList().RemoveAt(index);
+ }
+
+ public IList EnsureList()
+ {
+ return _innerList ??= new List();
+ }
+ }
+}
diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ModelSerializationExtensions.cs
new file mode 100644
index 000000000000..a7c33845e8fa
--- /dev/null
+++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/Internal/ModelSerializationExtensions.cs
@@ -0,0 +1,399 @@
+// 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.Diagnostics;
+using System.Globalization;
+using System.Text.Json;
+using System.Xml;
+using Azure.Core;
+
+namespace Azure.ResourceManager.WorkloadsSapVirtualInstance
+{
+ internal static class ModelSerializationExtensions
+ {
+ internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 };
+ internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W");
+
+ public static object GetObject(this JsonElement element)
+ {
+ switch (element.ValueKind)
+ {
+ case JsonValueKind.String:
+ return element.GetString();
+ case JsonValueKind.Number:
+ if (element.TryGetInt32(out int intValue))
+ {
+ return intValue;
+ }
+ if (element.TryGetInt64(out long longValue))
+ {
+ return longValue;
+ }
+ return element.GetDouble();
+ case JsonValueKind.True:
+ return true;
+ case JsonValueKind.False:
+ return false;
+ case JsonValueKind.Undefined:
+ case JsonValueKind.Null:
+ return null;
+ case JsonValueKind.Object:
+ var dictionary = new Dictionary();
+ foreach (var jsonProperty in element.EnumerateObject())
+ {
+ dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject());
+ }
+ return dictionary;
+ case JsonValueKind.Array:
+ var list = new List