diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.cs index ab3ee4fa42..bb93983251 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.cs @@ -1,8 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArmTemplates_Get.json @@ -13,21 +14,32 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabArmTemplateResource created on azure -// for more information of creating DevTestLabArmTemplateResource, please refer to the document of DevTestLabArmTemplateResource +// this example assumes you already have this DevTestLabArtifactSourceResource created on azure +// for more information of creating DevTestLabArtifactSourceResource, please refer to the document of DevTestLabArtifactSourceResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; string artifactSourceName = "{artifactSourceName}"; -string name = "{armTemplateName}"; -ResourceIdentifier devTestLabArmTemplateResourceId = DevTestLabArmTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, artifactSourceName, name); -DevTestLabArmTemplateResource devTestLabArmTemplate = client.GetDevTestLabArmTemplateResource(devTestLabArmTemplateResourceId); +ResourceIdentifier devTestLabArtifactSourceResourceId = DevTestLabArtifactSourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, artifactSourceName); +DevTestLabArtifactSourceResource devTestLabArtifactSource = client.GetDevTestLabArtifactSourceResource(devTestLabArtifactSourceResourceId); + +// get the collection of this DevTestLabArmTemplateResource +DevTestLabArmTemplateCollection collection = devTestLabArtifactSource.GetDevTestLabArmTemplates(); // invoke the operation -DevTestLabArmTemplateResource result = await devTestLabArmTemplate.GetAsync(); +string name = "{armTemplateName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabArmTemplateResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabArmTemplateData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabArmTemplateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.cs index 61ef7f5e34..c270f442a4 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArmTemplates_List.json @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArmTemplates_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.cs index a666cb7b97..989f951551 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_CreateOrUpdate.json // this example is just showing the usage of "ArtifactSources_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -28,7 +28,7 @@ // invoke the operation string name = "{artifactSourceName}"; -DevTestLabArtifactSourceData data = new DevTestLabArtifactSourceData(new AzureLocation("placeholder")) +DevTestLabArtifactSourceData data = new DevTestLabArtifactSourceData(default) { DisplayName = "{displayName}", Uri = new Uri("{artifactSourceUri}"), @@ -40,7 +40,7 @@ Status = new DevTestLabEnableStatus("{Enabled|Disabled}"), Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.cs index 60538f8224..7c559f8ef0 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Delete.json // this example is just showing the usage of "ArtifactSources_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabArtifactSource.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.cs index aaaee14ad4..8d70c74bd7 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Get.json // this example is just showing the usage of "ArtifactSources_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,31 +15,20 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabResource created on azure -// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource +// this example assumes you already have this DevTestLabArtifactSourceResource created on azure +// for more information of creating DevTestLabArtifactSourceResource, please refer to the document of DevTestLabArtifactSourceResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; -ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); -DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); - -// get the collection of this DevTestLabArtifactSourceResource -DevTestLabArtifactSourceCollection collection = devTestLab.GetDevTestLabArtifactSources(); +string name = "{artifactSourceName}"; +ResourceIdentifier devTestLabArtifactSourceResourceId = DevTestLabArtifactSourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, name); +DevTestLabArtifactSourceResource devTestLabArtifactSource = client.GetDevTestLabArtifactSourceResource(devTestLabArtifactSourceResourceId); // invoke the operation -string name = "{artifactSourceName}"; -NullableResponse response = await collection.GetIfExistsAsync(name); -DevTestLabArtifactSourceResource result = response.HasValue ? response.Value : null; +DevTestLabArtifactSourceResource result = await devTestLabArtifactSource.GetAsync(); -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 - DevTestLabArtifactSourceData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); -} +// the variable result is a resource, you could call other operations on this instance as well +// but just for demo, we get its data from this resource instance +DevTestLabArtifactSourceData resourceData = result.Data; +// for demo we just print out the id +Console.WriteLine($"Succeeded on id: {resourceData.Id}"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.cs index b2e43a501c..07791713c8 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_List.json // this example is just showing the usage of "ArtifactSources_List" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.cs index af689ebcc1..7188960e56 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ArtifactSources_Update.json // this example is just showing the usage of "ArtifactSources_Update" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +25,11 @@ DevTestLabArtifactSourceResource devTestLabArtifactSource = client.GetDevTestLabArtifactSourceResource(devTestLabArtifactSourceResourceId); // invoke the operation -DevTestLabArtifactSourcePatch patch = new DevTestLabArtifactSourcePatch() +DevTestLabArtifactSourcePatch patch = new DevTestLabArtifactSourcePatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabArtifactSourceResource result = await devTestLabArtifactSource.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ArtifactSources_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.cs index a024ad31a1..f42c13fe7e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.cs @@ -1,10 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_GenerateArmTemplate.json // this example is just showing the usage of "Artifacts_GenerateArmTemplate" operation, for the dependent resources, they will have to be created separately. @@ -25,7 +26,7 @@ DevTestLabArtifactResource devTestLabArtifact = client.GetDevTestLabArtifactResource(devTestLabArtifactResourceId); // invoke the operation -DevTestLabArtifactGenerateArmTemplateContent content = new DevTestLabArtifactGenerateArmTemplateContent() +DevTestLabArtifactGenerateArmTemplateContent content = new DevTestLabArtifactGenerateArmTemplateContent { VmName = "{vmName}", Location = new AzureLocation("{location}"), diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_GenerateArmTemplate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.cs index e1b32aac24..4eeed7679d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.cs @@ -1,9 +1,10 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; +using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_Get.json @@ -14,32 +15,21 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabArtifactSourceResource created on azure -// for more information of creating DevTestLabArtifactSourceResource, please refer to the document of DevTestLabArtifactSourceResource +// this example assumes you already have this DevTestLabArtifactResource created on azure +// for more information of creating DevTestLabArtifactResource, please refer to the document of DevTestLabArtifactResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; string artifactSourceName = "{artifactSourceName}"; -ResourceIdentifier devTestLabArtifactSourceResourceId = DevTestLabArtifactSourceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, artifactSourceName); -DevTestLabArtifactSourceResource devTestLabArtifactSource = client.GetDevTestLabArtifactSourceResource(devTestLabArtifactSourceResourceId); - -// get the collection of this DevTestLabArtifactResource -DevTestLabArtifactCollection collection = devTestLabArtifactSource.GetDevTestLabArtifacts(); +string name = "{artifactName}"; +ResourceIdentifier devTestLabArtifactResourceId = DevTestLabArtifactResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, artifactSourceName, name); +DevTestLabArtifactResource devTestLabArtifact = client.GetDevTestLabArtifactResource(devTestLabArtifactResourceId); // invoke the operation -string name = "{artifactName}"; -NullableResponse response = await collection.GetIfExistsAsync(name); -DevTestLabArtifactResource result = response.HasValue ? response.Value : null; +DevTestLabArtifactResource result = await devTestLabArtifact.GetAsync(); -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 - DevTestLabArtifactData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); -} +// the variable result is a resource, you could call other operations on this instance as well +// but just for demo, we get its data from this resource instance +DevTestLabArtifactData resourceData = result.Data; +// for demo we just print out the id +Console.WriteLine($"Succeeded on id: {resourceData.Id}"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.cs index 485806b3f2..53242bff64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Artifacts_List.json @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Artifacts_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.cs index 657209c698..5389d13485 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Costs_CreateOrUpdate.json // this example is just showing the usage of "Costs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -25,46 +25,43 @@ DevTestLabCostResource devTestLabCost = client.GetDevTestLabCostResource(devTestLabCostResourceId); // invoke the operation -DevTestLabCostData data = new DevTestLabCostData(new AzureLocation("placeholder")) +DevTestLabCostData data = new DevTestLabCostData(default) { - TargetCost = new DevTestLabTargetCost() + TargetCost = new DevTestLabTargetCost { Status = DevTestLabTargetCostStatus.Enabled, Target = 100, - CostThresholds = - { - new DevTestLabCostThreshold() + CostThresholds = {new DevTestLabCostThreshold { ThresholdId = "00000000-0000-0000-0000-000000000001", ThresholdValue = 25, DisplayOnChart = DevTestLabCostThresholdStatus.Disabled, SendNotificationWhenExceeded = DevTestLabCostThresholdStatus.Disabled, - },new DevTestLabCostThreshold() + }, new DevTestLabCostThreshold { ThresholdId = "00000000-0000-0000-0000-000000000002", ThresholdValue = 50, DisplayOnChart = DevTestLabCostThresholdStatus.Enabled, SendNotificationWhenExceeded = DevTestLabCostThresholdStatus.Enabled, - },new DevTestLabCostThreshold() + }, new DevTestLabCostThreshold { ThresholdId = "00000000-0000-0000-0000-000000000003", ThresholdValue = 75, DisplayOnChart = DevTestLabCostThresholdStatus.Disabled, SendNotificationWhenExceeded = DevTestLabCostThresholdStatus.Disabled, - },new DevTestLabCostThreshold() + }, new DevTestLabCostThreshold { ThresholdId = "00000000-0000-0000-0000-000000000004", ThresholdValue = 100, DisplayOnChart = DevTestLabCostThresholdStatus.Disabled, SendNotificationWhenExceeded = DevTestLabCostThresholdStatus.Disabled, - },new DevTestLabCostThreshold() + }, new DevTestLabCostThreshold { ThresholdId = "00000000-0000-0000-0000-000000000005", ThresholdValue = 125, DisplayOnChart = DevTestLabCostThresholdStatus.Disabled, SendNotificationWhenExceeded = DevTestLabCostThresholdStatus.Disabled, - } - }, + }}, CycleStartOn = DateTimeOffset.Parse("2020-12-01T00:00:00.000Z"), CycleEndOn = DateTimeOffset.Parse("2020-12-31T00:00:00.000Z"), CycleType = DevTestLabReportingCycleType.CalendarMonth, diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.cs index 7cca66797b..43a43be17e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Costs_Get.json // this example is just showing the usage of "Costs_Get" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Costs_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.cs index 9299589e1a..0e1f71d5b9 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_CreateOrUpdate.json // this example is just showing the usage of "CustomImages_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -28,9 +28,9 @@ // invoke the operation string name = "{customImageName}"; -DevTestLabCustomImageData data = new DevTestLabCustomImageData(new AzureLocation("placeholder")) +DevTestLabCustomImageData data = new DevTestLabCustomImageData(default) { - Vm = new DevTestLabCustomImageVm() + Vm = new DevTestLabCustomImageVm { SourceVmId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}", LinuxOSState = DevTestLabLinuxOSState.NonDeprovisioned, @@ -38,7 +38,7 @@ Description = "My Custom Image", Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.cs index d924acb703..5b06e11489 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Delete.json // this example is just showing the usage of "CustomImages_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabCustomImage.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.cs index ddb8af2ed4..9b4c60b11f 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Get.json // this example is just showing the usage of "CustomImages_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,20 +15,31 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabCustomImageResource created on azure -// for more information of creating DevTestLabCustomImageResource, please refer to the document of DevTestLabCustomImageResource +// this example assumes you already have this DevTestLabResource created on azure +// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; -string name = "{customImageName}"; -ResourceIdentifier devTestLabCustomImageResourceId = DevTestLabCustomImageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, name); -DevTestLabCustomImageResource devTestLabCustomImage = client.GetDevTestLabCustomImageResource(devTestLabCustomImageResourceId); +ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); +DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); + +// get the collection of this DevTestLabCustomImageResource +DevTestLabCustomImageCollection collection = devTestLab.GetDevTestLabCustomImages(); // invoke the operation -DevTestLabCustomImageResource result = await devTestLabCustomImage.GetAsync(); +string name = "{customImageName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabCustomImageResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabCustomImageData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabCustomImageData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.cs index aa2ad26b4c..1fce742866 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_List.json // this example is just showing the usage of "CustomImages_List" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.cs index e47a92313f..dcce01add5 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/CustomImages_Update.json // this example is just showing the usage of "CustomImages_Update" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +25,11 @@ DevTestLabCustomImageResource devTestLabCustomImage = client.GetDevTestLabCustomImageResource(devTestLabCustomImageResourceId); // invoke the operation -DevTestLabCustomImagePatch patch = new DevTestLabCustomImagePatch() +DevTestLabCustomImagePatch patch = new DevTestLabCustomImagePatch { Tags = { - ["tagName1"] = "tagValue2", + ["tagName1"] = "tagValue2" }, }; DevTestLabCustomImageResource result = await devTestLabCustomImage.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/CustomImages_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.cs index 1259466dd2..ea2dcccdb1 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Attach.json // this example is just showing the usage of "Disks_Attach" operation, for the dependent resources, they will have to be created separately. @@ -26,10 +26,10 @@ DevTestLabDiskResource devTestLabDisk = client.GetDevTestLabDiskResource(devTestLabDiskResourceId); // invoke the operation -DevTestLabDiskAttachContent content = new DevTestLabDiskAttachContent() +DevTestLabDiskAttachContent content = new DevTestLabDiskAttachContent { LeasedByLabVmId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"), }; await devTestLabDisk.AttachAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Attach.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.cs index 13d8b44475..1962ea5cbf 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_CreateOrUpdate.json // this example is just showing the usage of "Disks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -29,7 +29,7 @@ // invoke the operation string name = "{diskName}"; -DevTestLabDiskData data = new DevTestLabDiskData(new AzureLocation("placeholder")) +DevTestLabDiskData data = new DevTestLabDiskData(default) { DiskType = DevTestLabStorageType.Standard, DiskSizeGiB = 1023, diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.cs index 1de8475367..0a6db3c26d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Delete.json // this example is just showing the usage of "Disks_Delete" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabDisk.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.cs index b64b5c4083..1fdb1398c1 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Detach.json // this example is just showing the usage of "Disks_Detach" operation, for the dependent resources, they will have to be created separately. @@ -26,10 +26,10 @@ DevTestLabDiskResource devTestLabDisk = client.GetDevTestLabDiskResource(devTestLabDiskResourceId); // invoke the operation -DevTestLabDiskDetachContent content = new DevTestLabDiskDetachContent() +DevTestLabDiskDetachContent content = new DevTestLabDiskDetachContent { LeasedByLabVmId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{vmName}"), }; await devTestLabDisk.DetachAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Detach.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.cs index c934215a0a..3050be2a52 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Get.json // this example is just showing the usage of "Disks_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,21 +15,32 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabDiskResource created on azure -// for more information of creating DevTestLabDiskResource, please refer to the document of DevTestLabDiskResource +// this example assumes you already have this DevTestLabUserResource created on azure +// for more information of creating DevTestLabUserResource, please refer to the document of DevTestLabUserResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; string userName = "@me"; -string name = "{diskName}"; -ResourceIdentifier devTestLabDiskResourceId = DevTestLabDiskResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, userName, name); -DevTestLabDiskResource devTestLabDisk = client.GetDevTestLabDiskResource(devTestLabDiskResourceId); +ResourceIdentifier devTestLabUserResourceId = DevTestLabUserResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, userName); +DevTestLabUserResource devTestLabUser = client.GetDevTestLabUserResource(devTestLabUserResourceId); + +// get the collection of this DevTestLabDiskResource +DevTestLabDiskCollection collection = devTestLabUser.GetDevTestLabDisks(); // invoke the operation -DevTestLabDiskResource result = await devTestLabDisk.GetAsync(); +string name = "{diskName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabDiskResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabDiskData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabDiskData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.cs index 286509b129..d7c27f7fae 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_List.json // this example is just showing the usage of "Disks_List" operation, for the dependent resources, they will have to be created separately. @@ -37,4 +37,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.cs index 55f1735190..f1b3d9c37f 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Disks_Update.json // this example is just showing the usage of "Disks_Update" operation, for the dependent resources, they will have to be created separately. @@ -26,11 +26,11 @@ DevTestLabDiskResource devTestLabDisk = client.GetDevTestLabDiskResource(devTestLabDiskResourceId); // invoke the operation -DevTestLabDiskPatch patch = new DevTestLabDiskPatch() +DevTestLabDiskPatch patch = new DevTestLabDiskPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabDiskResource result = await devTestLabDisk.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Disks_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.cs index b51a315b7c..6a93cd0ea3 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_CreateOrUpdate.json // this example is just showing the usage of "Environments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -29,14 +29,12 @@ // invoke the operation string name = "{environmentName}"; -DevTestLabEnvironmentData data = new DevTestLabEnvironmentData(new AzureLocation("placeholder")) +DevTestLabEnvironmentData data = new DevTestLabEnvironmentData(default) { - DeploymentProperties = new DevTestLabEnvironmentDeployment() + DeploymentProperties = new DevTestLabEnvironmentDeployment { ArmTemplateId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/{artifactSourceName}/armTemplates/{armTemplateName}"), - Parameters = - { - }, + Parameters = { }, }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.cs index 28a72322e2..4bd8b1e5ec 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Delete.json // this example is just showing the usage of "Environments_Delete" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabEnvironment.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.cs index b48ef3596c..24f9029f4a 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Get.json // this example is just showing the usage of "Environments_Get" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.cs index 2931a04cb3..4d951abc42 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_List.json // this example is just showing the usage of "Environments_List" operation, for the dependent resources, they will have to be created separately. @@ -37,4 +37,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.cs index 4151943b3b..602af7ad5e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Environments_Update.json // this example is just showing the usage of "Environments_Update" operation, for the dependent resources, they will have to be created separately. @@ -26,11 +26,11 @@ DevTestLabEnvironmentResource devTestLabEnvironment = client.GetDevTestLabEnvironmentResource(devTestLabEnvironmentResourceId); // invoke the operation -DevTestLabEnvironmentPatch patch = new DevTestLabEnvironmentPatch() +DevTestLabEnvironmentPatch patch = new DevTestLabEnvironmentPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabEnvironmentResource result = await devTestLabEnvironment.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Environments_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.cs index 5965c5ab72..0340db47e1 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_CreateOrUpdate.json // this example is just showing the usage of "Formulas_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -31,7 +31,7 @@ DevTestLabFormulaData data = new DevTestLabFormulaData(new AzureLocation("{location}")) { Description = "Formula using a Linux base", - FormulaContent = new DevTestLabVmCreationContent() + FormulaContent = new DevTestLabVmCreationContent { Location = new AzureLocation("{location}"), Notes = "Ubuntu Server 20.10", @@ -41,17 +41,12 @@ LabSubnetName = "Dtl{labName}Subnet", LabVirtualNetworkId = new ResourceIdentifier("/virtualnetworks/dtl{labName}"), DisallowPublicIPAddress = true, - Artifacts = - { - new DevTestLabArtifactInstallInfo() + Artifacts = {new DevTestLabArtifactInstallInfo { ArtifactId = "/artifactsources/{artifactSourceName}/artifacts/linux-install-nodejs", - Parameters = - { - }, - } - }, - GalleryImageReference = new DevTestLabGalleryImageReference() + Parameters = {}, + }}, + GalleryImageReference = new DevTestLabGalleryImageReference { Offer = "0001-com-ubuntu-server-groovy", Publisher = "canonical", @@ -59,16 +54,13 @@ OSType = "Linux", Version = "latest", }, - NetworkInterface = new DevTestLabNetworkInterface() + NetworkInterface = new DevTestLabNetworkInterface { - SharedPublicIPAddressInboundNatRules = - { - new DevTestLabInboundNatRule() + SharedPublicIPAddressInboundNatRules = {new DevTestLabInboundNatRule { TransportProtocol = DevTestLabTransportProtocol.Tcp, BackendPort = 22, - } - }, + }}, }, AllowClaim = false, StorageType = "Standard", diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.cs index 06da3fa2c0..65381d63e6 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Delete.json // this example is just showing the usage of "Formulas_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabFormula.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.cs index 255855a4d2..abb3808a6b 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Get.json // this example is just showing the usage of "Formulas_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,20 +15,31 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabFormulaResource created on azure -// for more information of creating DevTestLabFormulaResource, please refer to the document of DevTestLabFormulaResource +// this example assumes you already have this DevTestLabResource created on azure +// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; -string name = "{formulaName}"; -ResourceIdentifier devTestLabFormulaResourceId = DevTestLabFormulaResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, name); -DevTestLabFormulaResource devTestLabFormula = client.GetDevTestLabFormulaResource(devTestLabFormulaResourceId); +ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); +DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); + +// get the collection of this DevTestLabFormulaResource +DevTestLabFormulaCollection collection = devTestLab.GetDevTestLabFormulas(); // invoke the operation -DevTestLabFormulaResource result = await devTestLabFormula.GetAsync(); +string name = "{formulaName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabFormulaResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabFormulaData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabFormulaData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.cs index c1a2b81828..7c6f1b1261 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_List.json // this example is just showing the usage of "Formulas_List" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.cs index 44232fb5bd..06dd675cce 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Formulas_Update.json // this example is just showing the usage of "Formulas_Update" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +25,11 @@ DevTestLabFormulaResource devTestLabFormula = client.GetDevTestLabFormulaResource(devTestLabFormulaResourceId); // invoke the operation -DevTestLabFormulaPatch patch = new DevTestLabFormulaPatch() +DevTestLabFormulaPatch patch = new DevTestLabFormulaPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabFormulaResource result = await devTestLabFormula.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Formulas_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.cs index 6167440cf7..efd240ef11 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GalleryImages_List.json // this example is just showing the usage of "GalleryImages_List" operation, for the dependent resources, they will have to be created separately. @@ -31,4 +30,4 @@ Console.WriteLine($"Succeeded: {item}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GalleryImages_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.cs index 599bbbd36c..80ef0d28b5 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.cs @@ -1,12 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_CreateOrUpdate.json // this example is just showing the usage of "GlobalSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -28,16 +28,13 @@ // invoke the operation string name = "labvmautostart"; -DevTestLabScheduleData data = new DevTestLabScheduleData(new AzureLocation("placeholder")) +DevTestLabScheduleData data = new DevTestLabScheduleData(default) { Status = DevTestLabEnableStatus.Enabled, TaskType = "LabVmsStartupTask", - WeeklyRecurrence = new DevTestLabWeekDetails() + WeeklyRecurrence = new DevTestLabWeekDetails { - Weekdays = - { - "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" - }, + Weekdays = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }, Time = "0700", }, TimeZoneId = "Hawaiian Standard Time", diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.cs index eecea8a471..e1401f7e24 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.cs @@ -1,12 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Delete.json // this example is just showing the usage of "GlobalSchedules_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +26,4 @@ // invoke the operation await devTestLabGlobalSchedule.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.cs index 71249cc943..3b17c8f23d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.cs @@ -1,12 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Execute.json // this example is just showing the usage of "GlobalSchedules_Execute" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +26,4 @@ // invoke the operation await devTestLabGlobalSchedule.ExecuteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Execute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.cs index a72308c405..f8d847ee69 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.cs @@ -1,12 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Get.json // this example is just showing the usage of "GlobalSchedules_Get" operation, for the dependent resources, they will have to be created separately. @@ -16,19 +16,30 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabGlobalScheduleResource created on azure -// for more information of creating DevTestLabGlobalScheduleResource, please refer to the document of DevTestLabGlobalScheduleResource +// 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 = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; -string name = "labvmautostart"; -ResourceIdentifier devTestLabGlobalScheduleResourceId = DevTestLabGlobalScheduleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, name); -DevTestLabGlobalScheduleResource devTestLabGlobalSchedule = client.GetDevTestLabGlobalScheduleResource(devTestLabGlobalScheduleResourceId); +ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); +ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + +// get the collection of this DevTestLabGlobalScheduleResource +DevTestLabGlobalScheduleCollection collection = resourceGroupResource.GetDevTestLabGlobalSchedules(); // invoke the operation -DevTestLabGlobalScheduleResource result = await devTestLabGlobalSchedule.GetAsync(); +string name = "labvmautostart"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabGlobalScheduleResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabScheduleData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabScheduleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.cs index 68c6fc4bd2..dd6b97b4ce 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.cs @@ -1,12 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_ListByResourceGroup.json // this example is just showing the usage of "GlobalSchedules_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListByResourceGroup.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.cs index 559a7b7088..f8d14da9b6 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.cs @@ -1,12 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; -using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_ListBySubscription.json // this example is just showing the usage of "GlobalSchedules_ListBySubscription" operation, for the dependent resources, they will have to be created separately. @@ -32,4 +31,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_ListBySubscription.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.cs index d6bf7fb8f2..bcfc0b2b8b 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.cs @@ -1,12 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Retarget.json // this example is just showing the usage of "GlobalSchedules_Retarget" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +24,11 @@ DevTestLabGlobalScheduleResource devTestLabGlobalSchedule = client.GetDevTestLabGlobalScheduleResource(devTestLabGlobalScheduleResourceId); // invoke the operation -DevTestLabGlobalScheduleRetargetContent content = new DevTestLabGlobalScheduleRetargetContent() +DevTestLabGlobalScheduleRetargetContent content = new DevTestLabGlobalScheduleRetargetContent { CurrentResourceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{targetLab}"), TargetResourceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{currentLab}"), }; await devTestLabGlobalSchedule.RetargetAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Retarget.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.cs index f6f22879ff..faa5a04008 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.cs @@ -1,12 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/GlobalSchedules_Update.json // this example is just showing the usage of "GlobalSchedules_Update" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +24,11 @@ DevTestLabGlobalScheduleResource devTestLabGlobalSchedule = client.GetDevTestLabGlobalScheduleResource(devTestLabGlobalScheduleResourceId); // invoke the operation -DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch() +DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabGlobalScheduleResource result = await devTestLabGlobalSchedule.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/GlobalSchedules_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.cs index 1d620a48df..37c84bfa46 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ClaimAnyVm.json // this example is just showing the usage of "Labs_ClaimAnyVm" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +27,4 @@ // invoke the operation await devTestLab.ClaimAnyVmAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ClaimAnyVm.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.cs index 13390f7e12..4ff8996ac8 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_CreateEnvironment.json // this example is just showing the usage of "Labs_CreateEnvironment" operation, for the dependent resources, they will have to be created separately. @@ -26,13 +25,13 @@ DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); // invoke the operation -DevTestLabVmCreationContent content = new DevTestLabVmCreationContent() +DevTestLabVmCreationContent content = new DevTestLabVmCreationContent { Name = "{vmName}", Location = new AzureLocation("{location}"), Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, Size = "Standard_A2_v2", UserName = "{userName}", @@ -40,7 +39,7 @@ LabSubnetName = "{virtualnetwork-subnet-name}", LabVirtualNetworkId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}"), DisallowPublicIPAddress = true, - GalleryImageReference = new DevTestLabGalleryImageReference() + GalleryImageReference = new DevTestLabGalleryImageReference { Offer = "UbuntuServer", Publisher = "Canonical", @@ -53,4 +52,4 @@ }; await devTestLab.CreateEnvironmentAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateEnvironment.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.cs index 9b66fd0ad4..5629019ea8 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.cs @@ -1,12 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_CreateOrUpdate.json // this example is just showing the usage of "Labs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -33,7 +33,7 @@ LabStorageType = new DevTestLabStorageType("{Standard|Premium}"), Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.cs index 73a77e5782..0432b93616 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Delete.json // this example is just showing the usage of "Labs_Delete" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +27,4 @@ // invoke the operation await devTestLab.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.cs index 2a84c2e18e..11d38eb443 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ExportResourceUsage.json // this example is just showing the usage of "Labs_ExportResourceUsage" operation, for the dependent resources, they will have to be created separately. @@ -26,11 +25,11 @@ DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); // invoke the operation -DevTestLabExportResourceUsageContent content = new DevTestLabExportResourceUsageContent() +DevTestLabExportResourceUsageContent content = new DevTestLabExportResourceUsageContent { BlobStorageAbsoluteSasUri = new Uri("https://invalid.blob.core.windows.net/export.blob?sv=2015-07-08&sig={sas}&sp=rcw"), UsageStartOn = DateTimeOffset.Parse("2020-12-01T00:00:00Z"), }; await devTestLab.ExportResourceUsageAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ExportResourceUsage.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.cs index f107074d45..cf1cef2859 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_GenerateUploadUri.json // this example is just showing the usage of "Labs_GenerateUploadUri" operation, for the dependent resources, they will have to be created separately. @@ -26,7 +25,7 @@ DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); // invoke the operation -DevTestLabGenerateUploadUriContent content = new DevTestLabGenerateUploadUriContent() +DevTestLabGenerateUploadUriContent content = new DevTestLabGenerateUploadUriContent { BlobName = "{blob-name}", }; diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_GenerateUploadUri.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.cs index e7d9e8da1a..6e1e204a33 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Get.json // this example is just showing the usage of "Labs_Get" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.cs index dcb0d62ec0..0e0edc0a23 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.cs @@ -1,16 +1,15 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ImportVirtualMachine.json -// this example is just showing the usage of "Labs_ImportVirtualMachine" operation, for the dependent resources, they will have to be created separately. +// this example is just showing the usage of "Labs_ImportVm" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -26,11 +25,11 @@ DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); // invoke the operation -DevTestLabImportVmContent content = new DevTestLabImportVmContent() +DevTestLabImportVmContent content = new DevTestLabImportVmContent { SourceVmResourceId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourceGroups/{otherResourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}"), DestinationVmName = "{vmName}", }; await devTestLab.ImportVmAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ImportVirtualMachine.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.cs index f5e26dd294..6624b3caff 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.cs @@ -1,12 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListByResourceGroup.json // this example is just showing the usage of "Labs_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListByResourceGroup.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.cs index a77daabd5f..ef168f9054 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.cs @@ -1,13 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; -using Azure.ResourceManager.DevTestLabs.Models; using Azure.ResourceManager.Resources; -using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListBySubscription.json // this example is just showing the usage of "Labs_ListBySubscription" operation, for the dependent resources, they will have to be created separately. @@ -33,4 +31,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListBySubscription.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.cs index 198c090447..a268016f64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_ListVhds.json // this example is just showing the usage of "Labs_ListVhds" operation, for the dependent resources, they will have to be created separately. @@ -31,4 +30,4 @@ Console.WriteLine($"Succeeded: {item}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_ListVhds.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.cs index 6a90fdc7ec..d0494e697b 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Labs_Update.json // this example is just showing the usage of "Labs_Update" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Labs_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.cs index 468da38481..2f030b913d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_CreateOrUpdate.json // this example is just showing the usage of "NotificationChannels_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -28,19 +28,16 @@ // invoke the operation string name = "{notificationChannelName}"; -DevTestLabNotificationChannelData data = new DevTestLabNotificationChannelData(new AzureLocation("placeholder")) +DevTestLabNotificationChannelData data = new DevTestLabNotificationChannelData(default) { WebHookUri = new Uri("{webhookUrl}"), EmailRecipient = "{email}", NotificationLocale = "en", Description = "Integration configured for auto-shutdown", - Events = - { - new DevTestLabNotificationChannelEvent() + Events = {new DevTestLabNotificationChannelEvent { EventName = DevTestLabNotificationChannelEventType.AutoShutdown, - } - }, + }}, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); DevTestLabNotificationChannelResource result = lro.Value; diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.cs index bb5d3b04de..ccff1a2025 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Delete.json // this example is just showing the usage of "NotificationChannels_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabNotificationChannel.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.cs index 0648f4fb43..cb71c6e740 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Get.json // this example is just showing the usage of "NotificationChannels_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,31 +15,20 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabResource created on azure -// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource +// this example assumes you already have this DevTestLabNotificationChannelResource created on azure +// for more information of creating DevTestLabNotificationChannelResource, please refer to the document of DevTestLabNotificationChannelResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; -ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); -DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); - -// get the collection of this DevTestLabNotificationChannelResource -DevTestLabNotificationChannelCollection collection = devTestLab.GetDevTestLabNotificationChannels(); +string name = "{notificationChannelName}"; +ResourceIdentifier devTestLabNotificationChannelResourceId = DevTestLabNotificationChannelResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, name); +DevTestLabNotificationChannelResource devTestLabNotificationChannel = client.GetDevTestLabNotificationChannelResource(devTestLabNotificationChannelResourceId); // invoke the operation -string name = "{notificationChannelName}"; -NullableResponse response = await collection.GetIfExistsAsync(name); -DevTestLabNotificationChannelResource result = response.HasValue ? response.Value : null; +DevTestLabNotificationChannelResource result = await devTestLabNotificationChannel.GetAsync(); -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 - DevTestLabNotificationChannelData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); -} +// the variable result is a resource, you could call other operations on this instance as well +// but just for demo, we get its data from this resource instance +DevTestLabNotificationChannelData resourceData = result.Data; +// for demo we just print out the id +Console.WriteLine($"Succeeded on id: {resourceData.Id}"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.cs index 2fa8ebedf4..94cfe342a8 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_List.json // this example is just showing the usage of "NotificationChannels_List" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.cs index f70baac35f..798ba08145 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Notify.json // this example is just showing the usage of "NotificationChannels_Notify" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +25,11 @@ DevTestLabNotificationChannelResource devTestLabNotificationChannel = client.GetDevTestLabNotificationChannelResource(devTestLabNotificationChannelResourceId); // invoke the operation -DevTestLabNotificationChannelNotifyContent content = new DevTestLabNotificationChannelNotifyContent() +DevTestLabNotificationChannelNotifyContent content = new DevTestLabNotificationChannelNotifyContent { EventName = DevTestLabNotificationChannelEventType.AutoShutdown, JsonPayload = "{\"eventType\":\"AutoShutdown\",\"subscriptionId\":\"{subscriptionId}\",\"resourceGroupName\":\"resourceGroupName\",\"labName\":\"{labName}\"}", }; await devTestLabNotificationChannel.NotifyAsync(content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Notify.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.cs index 7ba8882902..15347cfd21 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/NotificationChannels_Update.json // this example is just showing the usage of "NotificationChannels_Update" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/NotificationChannels_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.cs index 5df9415c7c..683d4d7995 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_CreateOrUpdate.json // this example is just showing the usage of "Policies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -39,7 +39,7 @@ EvaluatorType = new DevTestLabPolicyEvaluatorType("{policyEvaluatorType}"), Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.cs index 6337742a5d..3e978cbdc9 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Delete.json // this example is just showing the usage of "Policies_Delete" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabPolicy.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.cs index 898f67fe12..b124106894 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Get.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,21 +15,32 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabPolicyResource created on azure -// for more information of creating DevTestLabPolicyResource, please refer to the document of DevTestLabPolicyResource +// this example assumes you already have this DevTestLabResource created on azure +// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; +ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); +DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); + +// get the collection of this DevTestLabPolicyResource string policySetName = "{policySetName}"; -string name = "{policyName}"; -ResourceIdentifier devTestLabPolicyResourceId = DevTestLabPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, policySetName, name); -DevTestLabPolicyResource devTestLabPolicy = client.GetDevTestLabPolicyResource(devTestLabPolicyResourceId); +DevTestLabPolicyCollection collection = devTestLab.GetDevTestLabPolicies(policySetName); // invoke the operation -DevTestLabPolicyResource result = await devTestLabPolicy.GetAsync(); +string name = "{policyName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabPolicyResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabPolicyData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.cs index 938e0c6fa7..f15a093924 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_List.json // this example is just showing the usage of "Policies_List" operation, for the dependent resources, they will have to be created separately. @@ -37,4 +37,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.cs index d2c96bc035..88fe7be0fd 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Policies_Update.json // this example is just showing the usage of "Policies_Update" operation, for the dependent resources, they will have to be created separately. @@ -26,11 +26,11 @@ DevTestLabPolicyResource devTestLabPolicy = client.GetDevTestLabPolicyResource(devTestLabPolicyResourceId); // invoke the operation -DevTestLabPolicyPatch patch = new DevTestLabPolicyPatch() +DevTestLabPolicyPatch patch = new DevTestLabPolicyPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabPolicyResource result = await devTestLabPolicy.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Policies_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.cs index 6ea2bf81f2..6b578e7ba6 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.cs @@ -1,13 +1,12 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; -using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/PolicySets_EvaluatePolicies.json // this example is just showing the usage of "PolicySets_EvaluatePolicies" operation, for the dependent resources, they will have to be created separately. @@ -27,16 +26,13 @@ // invoke the operation string name = "{policySetName}"; -DevTestLabEvaluatePoliciesContent content = new DevTestLabEvaluatePoliciesContent() +DevTestLabEvaluatePoliciesContent content = new DevTestLabEvaluatePoliciesContent { - Policies = - { - new DevTestLabEvaluatePolicy() + Policies = {new DevTestLabEvaluatePolicy { FactName = "LabVmCount", ValueOffset = "1", - } - }, + }}, }; DevTestLabEvaluatePoliciesResult result = await devTestLab.EvaluatePoliciesAsync(name, content); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/PolicySets_EvaluatePolicies.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.cs index 25d97edb3c..6a249fab1d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_CreateOrUpdate.json // this example is just showing the usage of "Schedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -32,18 +32,15 @@ { Status = new DevTestLabEnableStatus("{Enabled|Disabled}"), TaskType = "{myLabVmTaskType}", - WeeklyRecurrence = new DevTestLabWeekDetails() + WeeklyRecurrence = new DevTestLabWeekDetails { - Weekdays = - { - "Monday","Wednesday","Friday" - }, + Weekdays = { "Monday", "Wednesday", "Friday" }, Time = "{timeOfTheDayTheScheduleWillOccurOnThoseDays}", }, DailyRecurrenceTime = "{timeOfTheDayTheScheduleWillOccurEveryDay}", HourlyRecurrenceMinute = 30, TimeZoneId = "Pacific Standard Time", - NotificationSettings = new DevTestLabNotificationSettings() + NotificationSettings = new DevTestLabNotificationSettings { Status = new DevTestLabEnableStatus("{Enabled|Disabled}"), TimeInMinutes = 15, @@ -54,7 +51,7 @@ TargetResourceId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}", Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.cs index 0e7973b24e..f8b306383f 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Delete.json // this example is just showing the usage of "Schedules_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabSchedule.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.cs index bcdbdc87ff..a847ca5c54 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Execute.json // this example is just showing the usage of "Schedules_Execute" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabSchedule.ExecuteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Execute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.cs index bff953986a..d539571cdf 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Get.json // this example is just showing the usage of "Schedules_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,20 +15,31 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabScheduleResource created on azure -// for more information of creating DevTestLabScheduleResource, please refer to the document of DevTestLabScheduleResource +// this example assumes you already have this DevTestLabResource created on azure +// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; -string name = "{scheduleName}"; -ResourceIdentifier devTestLabScheduleResourceId = DevTestLabScheduleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, name); -DevTestLabScheduleResource devTestLabSchedule = client.GetDevTestLabScheduleResource(devTestLabScheduleResourceId); +ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); +DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); + +// get the collection of this DevTestLabScheduleResource +DevTestLabScheduleCollection collection = devTestLab.GetDevTestLabSchedules(); // invoke the operation -DevTestLabScheduleResource result = await devTestLabSchedule.GetAsync(); +string name = "{scheduleName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabScheduleResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabScheduleData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabScheduleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.cs index 9e7e0b3a9d..03f3793479 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_List.json // this example is just showing the usage of "Schedules_List" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.cs index 1424e19316..15a2075c34 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_ListApplicable.json // this example is just showing the usage of "Schedules_ListApplicable" operation, for the dependent resources, they will have to be created separately. @@ -37,4 +37,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_ListApplicable.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.cs index cee15d2f8a..1dfd886dd8 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Schedules_Update.json // this example is just showing the usage of "Schedules_Update" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +25,11 @@ DevTestLabScheduleResource devTestLabSchedule = client.GetDevTestLabScheduleResource(devTestLabScheduleResourceId); // invoke the operation -DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch() +DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabScheduleResource result = await devTestLabSchedule.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Schedules_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.cs index 535a399ab1..7a34a286ec 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_CreateOrUpdate.json @@ -28,7 +28,7 @@ // invoke the operation string name = "{secretName}"; -DevTestLabSecretData data = new DevTestLabSecretData(new AzureLocation("placeholder")) +DevTestLabSecretData data = new DevTestLabSecretData(default) { Value = "{secret}", }; diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.cs index 57b0865f9b..f65b83eba6 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Delete.json // this example is just showing the usage of "Secrets_Delete" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabSecret.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.cs index 82e3b0c167..243dbe7b44 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Get.json // this example is just showing the usage of "Secrets_Get" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.cs index 2aa86b6c90..aeef2f4d8e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_List.json @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.cs index 5badd88f8d..d9ed65c2b8 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Secrets_Update.json // this example is just showing the usage of "Secrets_Update" operation, for the dependent resources, they will have to be created separately. @@ -26,11 +26,11 @@ DevTestLabSecretResource devTestLabSecret = client.GetDevTestLabSecretResource(devTestLabSecretResourceId); // invoke the operation -DevTestLabSecretPatch patch = new DevTestLabSecretPatch() +DevTestLabSecretPatch patch = new DevTestLabSecretPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabSecretResource result = await devTestLabSecret.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Secrets_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.cs index 0b3438db81..42f38d77df 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_CreateOrUpdate.json // this example is just showing the usage of "ServiceFabricSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -34,18 +34,15 @@ { Status = new DevTestLabEnableStatus("{Enabled|Disabled}"), TaskType = "{Unknown|LabVmsShutdownTask|LabVmsStartupTask|LabVmReclamationTask|ComputeVmShutdownTask}", - WeeklyRecurrence = new DevTestLabWeekDetails() + WeeklyRecurrence = new DevTestLabWeekDetails { - Weekdays = - { - "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday" - }, + Weekdays = { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" }, Time = "19:00", }, DailyRecurrenceTime = "19:00", HourlyRecurrenceMinute = 0, TimeZoneId = "Pacific Standard Time", - NotificationSettings = new DevTestLabNotificationSettings() + NotificationSettings = new DevTestLabNotificationSettings { Status = new DevTestLabEnableStatus("{Enabled|Disabled}"), TimeInMinutes = 15, @@ -56,7 +53,7 @@ TargetResourceId = "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/users/{uniqueIdentifier}/servicefabrics/{serviceFrabicName}", Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.cs index 200f469cb4..088f078521 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Delete.json // this example is just showing the usage of "ServiceFabricSchedules_Delete" operation, for the dependent resources, they will have to be created separately. @@ -29,4 +29,4 @@ // invoke the operation await devTestLabServiceFabricSchedule.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.cs index 130e982456..861ebfb60e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Execute.json // this example is just showing the usage of "ServiceFabricSchedules_Execute" operation, for the dependent resources, they will have to be created separately. @@ -29,4 +29,4 @@ // invoke the operation await devTestLabServiceFabricSchedule.ExecuteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Execute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.cs index a2cb434e5a..4ec8c8646c 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Get.json // this example is just showing the usage of "ServiceFabricSchedules_Get" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.cs index 11c9eb066e..f97cceaace 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_List.json // this example is just showing the usage of "ServiceFabricSchedules_List" operation, for the dependent resources, they will have to be created separately. @@ -38,4 +38,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.cs index 3b783c40f6..a3823c6694 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabricSchedules_Update.json // this example is just showing the usage of "ServiceFabricSchedules_Update" operation, for the dependent resources, they will have to be created separately. @@ -27,11 +27,11 @@ DevTestLabServiceFabricScheduleResource devTestLabServiceFabricSchedule = client.GetDevTestLabServiceFabricScheduleResource(devTestLabServiceFabricScheduleResourceId); // invoke the operation -DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch() +DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabServiceFabricScheduleResource result = await devTestLabServiceFabricSchedule.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabricSchedules_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.cs index d3a17ec76f..1bdeb094df 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_CreateOrUpdate.json @@ -34,7 +34,7 @@ EnvironmentId = "{environmentId}", Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.cs index d3ef27e43a..c76794bbba 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Delete.json // this example is just showing the usage of "ServiceFabrics_Delete" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabServiceFabric.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.cs index 33b26fbe62..b0ae0bfcbf 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.cs @@ -1,11 +1,10 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; -using Azure.ResourceManager.DevTestLabs.Models; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Get.json // this example is just showing the usage of "ServiceFabrics_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,21 +14,32 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabServiceFabricResource created on azure -// for more information of creating DevTestLabServiceFabricResource, please refer to the document of DevTestLabServiceFabricResource +// this example assumes you already have this DevTestLabUserResource created on azure +// for more information of creating DevTestLabUserResource, please refer to the document of DevTestLabUserResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; string userName = "{userName}"; -string name = "{serviceFabricName}"; -ResourceIdentifier devTestLabServiceFabricResourceId = DevTestLabServiceFabricResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, userName, name); -DevTestLabServiceFabricResource devTestLabServiceFabric = client.GetDevTestLabServiceFabricResource(devTestLabServiceFabricResourceId); +ResourceIdentifier devTestLabUserResourceId = DevTestLabUserResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, userName); +DevTestLabUserResource devTestLabUser = client.GetDevTestLabUserResource(devTestLabUserResourceId); + +// get the collection of this DevTestLabServiceFabricResource +DevTestLabServiceFabricCollection collection = devTestLabUser.GetDevTestLabServiceFabrics(); // invoke the operation -DevTestLabServiceFabricResource result = await devTestLabServiceFabric.GetAsync(); +string name = "{serviceFabricName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabServiceFabricResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabServiceFabricData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabServiceFabricData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.cs index 34764abeb7..7bbf2530f0 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_List.json @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.cs index 9c7a362b73..b62b3f997e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_ListApplicableSchedules.json // this example is just showing the usage of "ServiceFabrics_ListApplicableSchedules" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_ListApplicableSchedules.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.cs index aa3066ab1a..77eb389850 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Start.json // this example is just showing the usage of "ServiceFabrics_Start" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabServiceFabric.StartAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Start.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.cs index 34503e40ff..721b9a525d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Stop.json // this example is just showing the usage of "ServiceFabrics_Stop" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabServiceFabric.StopAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Stop.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.cs index 7c6a37cbe5..79d418dc46 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceFabrics_Update.json // this example is just showing the usage of "ServiceFabrics_Update" operation, for the dependent resources, they will have to be created separately. @@ -26,11 +26,11 @@ DevTestLabServiceFabricResource devTestLabServiceFabric = client.GetDevTestLabServiceFabricResource(devTestLabServiceFabricResourceId); // invoke the operation -DevTestLabServiceFabricPatch patch = new DevTestLabServiceFabricPatch() +DevTestLabServiceFabricPatch patch = new DevTestLabServiceFabricPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabServiceFabricResource result = await devTestLabServiceFabric.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceFabrics_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.cs index 97c25e76b8..9152111a19 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_CreateOrUpdate.json // this example is just showing the usage of "ServiceRunners_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -30,7 +30,7 @@ string name = "{servicerunnerName}"; DevTestLabServiceRunnerData data = new DevTestLabServiceRunnerData(new AzureLocation("{location}")) { - Identity = new DevTestLabManagedIdentity() + Identity = new DevTestLabManagedIdentity { ManagedIdentityType = "{identityType}", PrincipalId = Guid.Parse("{identityPrincipalId}"), @@ -39,7 +39,7 @@ }, Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.cs index e79633e277..f77c95412d 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_Delete.json // this example is just showing the usage of "ServiceRunners_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabServiceRunner.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.cs index cbff579834..8ec7e15531 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/ServiceRunners_Get.json // this example is just showing the usage of "ServiceRunners_Get" operation, for the dependent resources, they will have to be created separately. @@ -33,7 +33,7 @@ if (result == null) { - Console.WriteLine($"Succeeded with null as result"); + Console.WriteLine("Succeeded with null as result"); } else { diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/ServiceRunners_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.cs index 4bf9ca1b6a..3a1c89eebb 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_CreateOrUpdate.json // this example is just showing the usage of "Users_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -30,7 +30,7 @@ string name = "{userName}"; DevTestLabUserData data = new DevTestLabUserData(new AzureLocation("{location}")) { - Identity = new DevTestLabUserIdentity() + Identity = new DevTestLabUserIdentity { PrincipalName = "{principalName}", PrincipalId = "{principalId}", @@ -38,14 +38,14 @@ ObjectId = "{objectId}", AppId = "{appId}", }, - SecretStore = new DevTestLabUserSecretStore() + SecretStore = new DevTestLabUserSecretStore { KeyVaultUri = new Uri("{keyVaultUri}"), KeyVaultId = new ResourceIdentifier("{keyVaultId}"), }, Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.cs index a02b44f7a1..d92988b0dd 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Delete.json // this example is just showing the usage of "Users_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabUser.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.cs index 53e40a9aea..df3f8b38c4 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Get.json // this example is just showing the usage of "Users_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,20 +15,31 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabUserResource created on azure -// for more information of creating DevTestLabUserResource, please refer to the document of DevTestLabUserResource +// this example assumes you already have this DevTestLabResource created on azure +// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{devtestlabName}"; -string name = "{userName}"; -ResourceIdentifier devTestLabUserResourceId = DevTestLabUserResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, name); -DevTestLabUserResource devTestLabUser = client.GetDevTestLabUserResource(devTestLabUserResourceId); +ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); +DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); + +// get the collection of this DevTestLabUserResource +DevTestLabUserCollection collection = devTestLab.GetDevTestLabUsers(); // invoke the operation -DevTestLabUserResource result = await devTestLabUser.GetAsync(); +string name = "{userName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabUserResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabUserData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabUserData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.cs index 3c4e6fc828..a7ed423c2c 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_List.json // this example is just showing the usage of "Users_List" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.cs index caa089ffd2..328b307fc0 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Users_Update.json // this example is just showing the usage of "Users_Update" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +25,11 @@ DevTestLabUserResource devTestLabUser = client.GetDevTestLabUserResource(devTestLabUserResourceId); // invoke the operation -DevTestLabUserPatch patch = new DevTestLabUserPatch() +DevTestLabUserPatch patch = new DevTestLabUserPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabUserResource result = await devTestLabUser.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/Users_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.cs index 6483735cb4..bdddde2b18 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_CreateOrUpdate.json // this example is just showing the usage of "VirtualMachineSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -33,18 +33,15 @@ { Status = DevTestLabEnableStatus.Enabled, TaskType = "LabVmsShutdownTask", - WeeklyRecurrence = new DevTestLabWeekDetails() + WeeklyRecurrence = new DevTestLabWeekDetails { - Weekdays = - { - "Friday","Saturday","Sunday" - }, + Weekdays = { "Friday", "Saturday", "Sunday" }, Time = "1700", }, DailyRecurrenceTime = "1900", HourlyRecurrenceMinute = 30, TimeZoneId = "Pacific Standard Time", - NotificationSettings = new DevTestLabNotificationSettings() + NotificationSettings = new DevTestLabNotificationSettings { Status = DevTestLabEnableStatus.Enabled, TimeInMinutes = 30, @@ -55,7 +52,7 @@ TargetResourceId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualMachines/{vmName}", Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.cs index bbeb5ad066..6738e6d8dc 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Delete.json // this example is just showing the usage of "VirtualMachineSchedules_Delete" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabVmSchedule.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.cs index 2bbb62edbe..321a72f8d4 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Execute.json // this example is just showing the usage of "VirtualMachineSchedules_Execute" operation, for the dependent resources, they will have to be created separately. @@ -28,4 +28,4 @@ // invoke the operation await devTestLabVmSchedule.ExecuteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Execute.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.cs index 54f12bb280..c3a9ebc91a 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Get.json // this example is just showing the usage of "VirtualMachineSchedules_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,32 +15,21 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabVmResource created on azure -// for more information of creating DevTestLabVmResource, please refer to the document of DevTestLabVmResource +// this example assumes you already have this DevTestLabVmScheduleResource created on azure +// for more information of creating DevTestLabVmScheduleResource, please refer to the document of DevTestLabVmScheduleResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; string vmName = "{vmName}"; -ResourceIdentifier devTestLabVmResourceId = DevTestLabVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, vmName); -DevTestLabVmResource devTestLabVm = client.GetDevTestLabVmResource(devTestLabVmResourceId); - -// get the collection of this DevTestLabVmScheduleResource -DevTestLabVmScheduleCollection collection = devTestLabVm.GetDevTestLabVmSchedules(); +string name = "LabVmsShutdown"; +ResourceIdentifier devTestLabVmScheduleResourceId = DevTestLabVmScheduleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, vmName, name); +DevTestLabVmScheduleResource devTestLabVmSchedule = client.GetDevTestLabVmScheduleResource(devTestLabVmScheduleResourceId); // invoke the operation -string name = "LabVmsShutdown"; -NullableResponse response = await collection.GetIfExistsAsync(name); -DevTestLabVmScheduleResource result = response.HasValue ? response.Value : null; +DevTestLabVmScheduleResource result = await devTestLabVmSchedule.GetAsync(); -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 - DevTestLabScheduleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); -} +// the variable result is a resource, you could call other operations on this instance as well +// but just for demo, we get its data from this resource instance +DevTestLabScheduleData resourceData = result.Data; +// for demo we just print out the id +Console.WriteLine($"Succeeded on id: {resourceData.Id}"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.cs index 025ffe204c..50f6951ee8 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_List.json // this example is just showing the usage of "VirtualMachineSchedules_List" operation, for the dependent resources, they will have to be created separately. @@ -37,4 +37,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.cs index 51e090becd..4f974357c5 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachineSchedules_Update.json // this example is just showing the usage of "VirtualMachineSchedules_Update" operation, for the dependent resources, they will have to be created separately. @@ -26,11 +26,11 @@ DevTestLabVmScheduleResource devTestLabVmSchedule = client.GetDevTestLabVmScheduleResource(devTestLabVmScheduleResourceId); // invoke the operation -DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch() +DevTestLabSchedulePatch patch = new DevTestLabSchedulePatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabVmScheduleResource result = await devTestLabVmSchedule.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachineSchedules_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.cs index 854c32f8bd..dea83ed9a7 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_AddDataDisk.json // this example is just showing the usage of "VirtualMachines_AddDataDisk" operation, for the dependent resources, they will have to be created separately. @@ -25,9 +25,9 @@ DevTestLabVmResource devTestLabVm = client.GetDevTestLabVmResource(devTestLabVmResourceId); // invoke the operation -DevTestLabDataDiskProperties dataDiskProperties = new DevTestLabDataDiskProperties() +DevTestLabDataDiskProperties dataDiskProperties = new DevTestLabDataDiskProperties { - AttachNewDataDiskOptions = new AttachNewDataDiskDetails() + AttachNewDataDiskOptions = new AttachNewDataDiskDetails { DiskSizeGiB = 127, DiskName = "{diskName}", @@ -36,4 +36,4 @@ }; await devTestLabVm.AddDataDiskAsync(WaitUntil.Completed, dataDiskProperties); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_AddDataDisk.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.cs index ea8d4ee11f..7646e3dc6a 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_ApplyArtifacts.json // this example is just showing the usage of "VirtualMachines_ApplyArtifacts" operation, for the dependent resources, they will have to be created separately. @@ -25,16 +25,13 @@ DevTestLabVmResource devTestLabVm = client.GetDevTestLabVmResource(devTestLabVmResourceId); // invoke the operation -DevTestLabVmApplyArtifactsContent content = new DevTestLabVmApplyArtifactsContent() +DevTestLabVmApplyArtifactsContent content = new DevTestLabVmApplyArtifactsContent { - Artifacts = - { - new DevTestLabArtifactInstallInfo() + Artifacts = {new DevTestLabArtifactInstallInfo { ArtifactId = "/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/artifactSources/public repo/artifacts/windows-restart", - } - }, + }}, }; await devTestLabVm.ApplyArtifactsAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ApplyArtifacts.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.cs index 1946ec6975..86a7288492 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Claim.json // this example is just showing the usage of "VirtualMachines_Claim" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.ClaimAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Claim.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.cs index fc7819b4e2..c8c910b7b9 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_CreateOrUpdate.json // this example is just showing the usage of "VirtualMachines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. @@ -36,7 +36,7 @@ LabSubnetName = "{virtualNetworkName}Subnet", LabVirtualNetworkId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}"), DisallowPublicIPAddress = true, - GalleryImageReference = new DevTestLabGalleryImageReference() + GalleryImageReference = new DevTestLabGalleryImageReference { Offer = "UbuntuServer", Publisher = "Canonical", @@ -48,7 +48,7 @@ StorageType = "Standard", Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.cs index 11a2eb780b..11d716fcc3 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Delete.json // this example is just showing the usage of "VirtualMachines_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.cs index 1487b4fe2b..1f1fd54cb4 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_DetachDataDisk.json // this example is just showing the usage of "VirtualMachines_DetachDataDisk" operation, for the dependent resources, they will have to be created separately. @@ -25,10 +25,10 @@ DevTestLabVmResource devTestLabVm = client.GetDevTestLabVmResource(devTestLabVmResourceId); // invoke the operation -DevTestLabVmDetachDataDiskContent content = new DevTestLabVmDetachDataDiskContent() +DevTestLabVmDetachDataDiskContent content = new DevTestLabVmDetachDataDiskContent { ExistingLabDiskId = new ResourceIdentifier("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualmachines/{virtualMachineName}"), }; await devTestLabVm.DetachDataDiskAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_DetachDataDisk.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.cs index e5739a0e74..dd3f331512 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Get.json // this example is just showing the usage of "VirtualMachines_Get" operation, for the dependent resources, they will have to be created separately. @@ -33,7 +33,7 @@ if (result == null) { - Console.WriteLine($"Succeeded with null as result"); + Console.WriteLine("Succeeded with null as result"); } else { diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.cs index a509cd31a4..76b3c33496 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_GetRdpFileContents.json // this example is just showing the usage of "VirtualMachines_GetRdpFileContents" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_GetRdpFileContents.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.cs index 37a16fbc6f..7ad45896d7 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_List.json // this example is just showing the usage of "VirtualMachines_List" operation, for the dependent resources, they will have to be created separately. @@ -36,4 +36,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.cs index ba239ad7f1..8226fbe8fd 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_ListApplicableSchedules.json // this example is just showing the usage of "VirtualMachines_ListApplicableSchedules" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_ListApplicableSchedules.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.cs index 3268283786..a4e8906b92 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Redeploy.json // this example is just showing the usage of "VirtualMachines_Redeploy" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.RedeployAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Redeploy.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.cs index e69a12494e..a12c6f456e 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Resize.json // this example is just showing the usage of "VirtualMachines_Resize" operation, for the dependent resources, they will have to be created separately. @@ -25,10 +25,10 @@ DevTestLabVmResource devTestLabVm = client.GetDevTestLabVmResource(devTestLabVmResourceId); // invoke the operation -DevTestLabVmResizeContent content = new DevTestLabVmResizeContent() +DevTestLabVmResizeContent content = new DevTestLabVmResizeContent { Size = "Standard_A4_v2", }; await devTestLabVm.ResizeAsync(WaitUntil.Completed, content); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Resize.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.cs index d47e79d438..b2268c1445 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Restart.json // this example is just showing the usage of "VirtualMachines_Restart" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.RestartAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Restart.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.cs index 9da982522f..d5fd1c2c36 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Start.json // this example is just showing the usage of "VirtualMachines_Start" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.StartAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Start.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.cs index d2eb1efbd3..63cfc730da 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Stop.json // this example is just showing the usage of "VirtualMachines_Stop" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.StopAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Stop.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.cs index 9fe9fac2dc..f8552218ca 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_TransferDisks.json // this example is just showing the usage of "VirtualMachines_TransferDisks" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.TransferDisksAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_TransferDisks.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.cs index 93d6af2e8d..1c51c2bd39 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_UnClaim.json // this example is just showing the usage of "VirtualMachines_UnClaim" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVm.UnClaimAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_UnClaim.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.cs index 38a464d26a..3b0a5584f0 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualMachines_Update.json // this example is just showing the usage of "VirtualMachines_Update" operation, for the dependent resources, they will have to be created separately. diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualMachines_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.cs index abcf127c2b..a10b7ac5f4 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_CreateOrUpdate.json @@ -31,7 +31,7 @@ { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, name, data); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_CreateOrUpdate.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.cs index bce7695041..24907d29de 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Delete.json // this example is just showing the usage of "VirtualNetworks_Delete" operation, for the dependent resources, they will have to be created separately. @@ -27,4 +27,4 @@ // invoke the operation await devTestLabVirtualNetwork.DeleteAsync(WaitUntil.Completed); -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Delete.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.cs index 88a483b9d5..dcb5fe97c6 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.cs @@ -1,11 +1,10 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; -using Azure.ResourceManager.DevTestLabs.Models; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Get.json // this example is just showing the usage of "VirtualNetworks_Get" operation, for the dependent resources, they will have to be created separately. @@ -15,20 +14,31 @@ // authenticate your client ArmClient client = new ArmClient(cred); -// this example assumes you already have this DevTestLabVirtualNetworkResource created on azure -// for more information of creating DevTestLabVirtualNetworkResource, please refer to the document of DevTestLabVirtualNetworkResource +// this example assumes you already have this DevTestLabResource created on azure +// for more information of creating DevTestLabResource, please refer to the document of DevTestLabResource string subscriptionId = "{subscriptionId}"; string resourceGroupName = "resourceGroupName"; string labName = "{labName}"; -string name = "{virtualNetworkName}"; -ResourceIdentifier devTestLabVirtualNetworkResourceId = DevTestLabVirtualNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName, name); -DevTestLabVirtualNetworkResource devTestLabVirtualNetwork = client.GetDevTestLabVirtualNetworkResource(devTestLabVirtualNetworkResourceId); +ResourceIdentifier devTestLabResourceId = DevTestLabResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, labName); +DevTestLabResource devTestLab = client.GetDevTestLabResource(devTestLabResourceId); + +// get the collection of this DevTestLabVirtualNetworkResource +DevTestLabVirtualNetworkCollection collection = devTestLab.GetDevTestLabVirtualNetworks(); // invoke the operation -DevTestLabVirtualNetworkResource result = await devTestLabVirtualNetwork.GetAsync(); +string name = "{virtualNetworkName}"; +NullableResponse response = await collection.GetIfExistsAsync(name); +DevTestLabVirtualNetworkResource result = response.HasValue ? response.Value : null; -// the variable result is a resource, you could call other operations on this instance as well -// but just for demo, we get its data from this resource instance -DevTestLabVirtualNetworkData resourceData = result.Data; -// for demo we just print out the id -Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +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 + DevTestLabVirtualNetworkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); +} diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Get.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.cs index a3397e0596..3c14dce91f 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.cs @@ -1,9 +1,9 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_List.json @@ -35,4 +35,4 @@ Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } -Console.WriteLine($"Succeeded"); +Console.WriteLine("Succeeded"); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_List.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.cs b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.cs index 720d4c51a0..fb471ba335 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.cs +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.cs @@ -1,11 +1,11 @@ +using Azure; +using Azure.ResourceManager; using System; using System.Threading.Tasks; -using Azure; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.DevTestLabs; using Azure.ResourceManager.DevTestLabs.Models; +using Azure.ResourceManager.DevTestLabs; // Generated from example definition: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/VirtualNetworks_Update.json // this example is just showing the usage of "VirtualNetworks_Update" operation, for the dependent resources, they will have to be created separately. @@ -25,11 +25,11 @@ DevTestLabVirtualNetworkResource devTestLabVirtualNetwork = client.GetDevTestLabVirtualNetworkResource(devTestLabVirtualNetworkResourceId); // invoke the operation -DevTestLabVirtualNetworkPatch patch = new DevTestLabVirtualNetworkPatch() +DevTestLabVirtualNetworkPatch patch = new DevTestLabVirtualNetworkPatch { Tags = { - ["tagName1"] = "tagValue1", + ["tagName1"] = "tagValue1" }, }; DevTestLabVirtualNetworkResource result = await devTestLabVirtualNetwork.UpdateAsync(patch); diff --git a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.json b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.json index 233a0cee90..5bafc88a64 100644 --- a/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.json +++ b/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples-dotnet/VirtualNetworks_Update.json @@ -1 +1 @@ -{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.0/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file +{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.DevTestLabs_1.1.1/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/README.md"} \ No newline at end of file