From 978e7ad46db24e24fdc2eebbf0b023fdf8b27ab8 Mon Sep 17 00:00:00 2001 From: James Voong Date: Thu, 8 May 2025 13:02:27 -0700 Subject: [PATCH 01/27] Add API version 2025-05-01 --- .../CHANGELOG.md | 13 + .../assets.json | 2 +- .../Sample_DnsForwardingRuleCollection.cs | 215 +++++++++++ .../Sample_DnsForwardingRuleResource.cs | 116 ++++++ .../Sample_DnsForwardingRulesetCollection.cs | 209 +++++++++++ .../Sample_DnsForwardingRulesetResource.cs | 113 ++++++ ...dingRulesetVirtualNetworkLinkCollection.cs | 206 +++++++++++ ...ardingRulesetVirtualNetworkLinkResource.cs | 116 ++++++ .../Samples/Sample_DnsResolverCollection.cs | 202 +++++++++++ .../Sample_DnsResolverDomainListCollection.cs | 343 ++++++++++++++++++ .../Sample_DnsResolverDomainListResource.cs | 208 +++++++++++ ...le_DnsResolverInboundEndpointCollection.cs | 213 +++++++++++ ...mple_DnsResolverInboundEndpointResource.cs | 116 ++++++ ...e_DnsResolverOutboundEndpointCollection.cs | 206 +++++++++++ ...ple_DnsResolverOutboundEndpointResource.cs | 116 ++++++ .../Sample_DnsResolverPolicyCollection.cs | 198 ++++++++++ .../Sample_DnsResolverPolicyResource.cs | 113 ++++++ ...olverPolicyVirtualNetworkLinkCollection.cs | 206 +++++++++++ ...esolverPolicyVirtualNetworkLinkResource.cs | 116 ++++++ .../Samples/Sample_DnsResolverResource.cs | 113 ++++++ .../Sample_DnsSecurityRuleCollection.cs | 215 +++++++++++ .../Samples/Sample_DnsSecurityRuleResource.cs | 117 ++++++ .../Sample_SubscriptionResourceExtensions.cs | 143 ++++++++ ...ample_VirtualNetworkDnsResolverResource.cs | 107 ++++++ .../Generated/ArmDnsResolverModelFactory.cs | 4 +- .../Generated/DnsForwardingRuleCollection.cs | 20 +- .../Generated/DnsForwardingRuleResource.cs | 12 +- .../DnsForwardingRulesetCollection.cs | 20 +- .../Generated/DnsForwardingRulesetResource.cs | 32 +- ...dingRulesetVirtualNetworkLinkCollection.cs | 20 +- ...ardingRulesetVirtualNetworkLinkResource.cs | 12 +- .../src/Generated/DnsResolverCollection.cs | 20 +- .../DnsResolverDomainListCollection.cs | 20 +- ...DnsResolverDomainListData.Serialization.cs | 35 +- .../Generated/DnsResolverDomainListData.cs | 15 +- .../DnsResolverDomainListResource.cs | 120 +++++- .../DnsResolverInboundEndpointCollection.cs | 20 +- .../DnsResolverInboundEndpointResource.cs | 24 +- .../DnsResolverOutboundEndpointCollection.cs | 20 +- .../DnsResolverOutboundEndpointResource.cs | 24 +- .../Generated/DnsResolverPolicyCollection.cs | 20 +- .../Generated/DnsResolverPolicyResource.cs | 32 +- ...olverPolicyVirtualNetworkLinkCollection.cs | 20 +- ...esolverPolicyVirtualNetworkLinkResource.cs | 24 +- .../src/Generated/DnsResolverResource.cs | 32 +- .../Generated/DnsSecurityRuleCollection.cs | 20 +- .../src/Generated/DnsSecurityRuleResource.cs | 24 +- .../Extensions/DnsResolverExtensions.cs | 32 +- ...ockableDnsResolverResourceGroupResource.cs | 16 +- ...MockableDnsResolverSubscriptionResource.cs | 16 +- ...DnsResolverDomainListBulk.Serialization.cs | 149 ++++++++ .../Models/DnsResolverDomainListBulk.cs | 81 +++++ .../Models/DnsResolverDomainListBulkAction.cs | 51 +++ .../DnsForwardingRulesetsRestOperations.cs | 2 +- .../DnsResolverDomainListsRestOperations.cs | 108 +++++- .../DnsResolverPoliciesRestOperations.cs | 2 +- ...PolicyVirtualNetworkLinksRestOperations.cs | 2 +- .../DnsResolversRestOperations.cs | 2 +- .../DnsSecurityRulesRestOperations.cs | 2 +- .../ForwardingRulesRestOperations.cs | 2 +- .../InboundEndpointsRestOperations.cs | 2 +- .../OutboundEndpointsRestOperations.cs | 2 +- .../VirtualNetworkLinksRestOperations.cs | 2 +- .../VirtualNetworkDnsResolverResource.cs | 12 +- .../src/autorest.md | 8 +- .../tests/DnsResolverTestBase.cs | 2 +- .../tests/Tests/DnsForwardingRulesetTests.cs | 2 +- .../tests/Tests/DnsResolverDomainListTests.cs | 33 +- .../tests/Tests/DnsSecurityRuleTests.cs | 13 +- .../tests/Tests/ForwardingRuleTests.cs | 2 +- .../tests/Tests/InboundEndpointTests.cs | 2 +- .../tests/Tests/OutboundEndpointTests.cs | 2 +- .../tests/Tests/VirtualNetworkLinkTests.cs | 2 +- 73 files changed, 4558 insertions(+), 303 deletions(-) create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index a9f7d6260fa8..5fa42e0e4efa 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -1,5 +1,18 @@ # Release History +## 1.2.0 (2025-05-01) + +### Features Added +- TODO change below link +- Upgraded api-version tag from 'package-preview-2023-07' to 'package-2025-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md. +- Adds new POST bulk API for large domain list usage. + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.2.0-beta.2 (Unreleased) ### Features Added diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json index afed3d8d1bd5..6f3756f3153e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/dnsresolver/Azure.ResourceManager.DnsResolver", - "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_24b7185c51" + "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_7a28818ac1" } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs new file mode 100644 index 000000000000..72fe3d12d4e2 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Net; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsForwardingRuleCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertForwardingRuleInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Put.json + // this example is just showing the usage of "ForwardingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRuleResource + DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); + + // invoke the operation + string forwardingRuleName = "sampleForwardingRule"; + DnsForwardingRuleData data = new DnsForwardingRuleData("contoso.com.", new TargetDnsServer[] + { +new TargetDnsServer(IPAddress.Parse("10.0.0.1")) +{ +Port = 53, +}, +new TargetDnsServer(IPAddress.Parse("10.0.0.2")) +{ +Port = 53, +} + }) + { + Metadata = +{ +["additionalProp1"] = "value1" +}, + DnsForwardingRuleState = DnsForwardingRuleState.Enabled, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, forwardingRuleName, data); + DnsForwardingRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveForwardingRuleInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json + // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRuleResource + DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); + + // invoke the operation + string forwardingRuleName = "sampleForwardingRule"; + DnsForwardingRuleResource result = await collection.GetAsync(forwardingRuleName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListForwardingRulesInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_List.json + // this example is just showing the usage of "ForwardingRules_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRuleResource + DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); + + // invoke the operation and iterate over the result + await foreach (DnsForwardingRuleResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveForwardingRuleInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json + // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRuleResource + DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); + + // invoke the operation + string forwardingRuleName = "sampleForwardingRule"; + bool result = await collection.ExistsAsync(forwardingRuleName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveForwardingRuleInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json + // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRuleResource + DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); + + // invoke the operation + string forwardingRuleName = "sampleForwardingRule"; + NullableResponse response = await collection.GetIfExistsAsync(forwardingRuleName); + DnsForwardingRuleResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs new file mode 100644 index 000000000000..fdec1a224d92 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsForwardingRuleResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveForwardingRuleInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json + // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRuleResource created on azure + // for more information of creating DnsForwardingRuleResource, please refer to the document of DnsForwardingRuleResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + string forwardingRuleName = "sampleForwardingRule"; + ResourceIdentifier dnsForwardingRuleResourceId = DnsForwardingRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, forwardingRuleName); + DnsForwardingRuleResource dnsForwardingRule = client.GetDnsForwardingRuleResource(dnsForwardingRuleResourceId); + + // invoke the operation + DnsForwardingRuleResource result = await dnsForwardingRule.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteForwardingRuleInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Delete.json + // this example is just showing the usage of "ForwardingRules_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRuleResource created on azure + // for more information of creating DnsForwardingRuleResource, please refer to the document of DnsForwardingRuleResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + string forwardingRuleName = "sampleForwardingRule"; + ResourceIdentifier dnsForwardingRuleResourceId = DnsForwardingRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, forwardingRuleName); + DnsForwardingRuleResource dnsForwardingRule = client.GetDnsForwardingRuleResource(dnsForwardingRuleResourceId); + + // invoke the operation + await dnsForwardingRule.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateForwardingRuleInADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Patch.json + // this example is just showing the usage of "ForwardingRules_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRuleResource created on azure + // for more information of creating DnsForwardingRuleResource, please refer to the document of DnsForwardingRuleResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + string forwardingRuleName = "sampleForwardingRule"; + ResourceIdentifier dnsForwardingRuleResourceId = DnsForwardingRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, forwardingRuleName); + DnsForwardingRuleResource dnsForwardingRule = client.GetDnsForwardingRuleResource(dnsForwardingRuleResourceId); + + // invoke the operation + DnsForwardingRulePatch patch = new DnsForwardingRulePatch + { + Metadata = +{ +["additionalProp2"] = "value2" +}, + DnsForwardingRuleState = DnsForwardingRuleState.Disabled, + }; + DnsForwardingRuleResource result = await dnsForwardingRule.UpdateAsync(patch); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs new file mode 100644 index 000000000000..3fbdbe0c2b26 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsForwardingRulesetCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertDNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Put.json + // this example is just showing the usage of "DnsForwardingRulesets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsForwardingRulesetResource + DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); + + // invoke the operation + string rulesetName = "samplednsForwardingRuleset"; + DnsForwardingRulesetData data = new DnsForwardingRulesetData(new AzureLocation("westus2"), new WritableSubResource[] + { +new WritableSubResource +{ +Id = new ResourceIdentifier("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"), +}, +new WritableSubResource +{ +Id = new ResourceIdentifier("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"), +} + }) + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, rulesetName, data); + DnsForwardingRulesetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json + // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsForwardingRulesetResource + DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); + + // invoke the operation + string rulesetName = "sampleDnsForwardingRuleset"; + DnsForwardingRulesetResource result = await collection.GetAsync(rulesetName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDNSForwardingRulesetsByResourceGroup() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByResourceGroup.json + // this example is just showing the usage of "DnsForwardingRulesets_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsForwardingRulesetResource + DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); + + // invoke the operation and iterate over the result + await foreach (DnsForwardingRulesetResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json + // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsForwardingRulesetResource + DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); + + // invoke the operation + string rulesetName = "sampleDnsForwardingRuleset"; + bool result = await collection.ExistsAsync(rulesetName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json + // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsForwardingRulesetResource + DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); + + // invoke the operation + string rulesetName = "sampleDnsForwardingRuleset"; + NullableResponse response = await collection.GetIfExistsAsync(rulesetName); + DnsForwardingRulesetResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs new file mode 100644 index 000000000000..5d928ab995b2 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsForwardingRulesetResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json + // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // invoke the operation + DnsForwardingRulesetResource result = await dnsForwardingRuleset.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Delete.json + // this example is just showing the usage of "DnsForwardingRulesets_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "samplednsForwardingRulesetName"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // invoke the operation + await dnsForwardingRuleset.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateDNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Patch.json + // this example is just showing the usage of "DnsForwardingRulesets_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // invoke the operation + DnsForwardingRulesetPatch patch = new DnsForwardingRulesetPatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await dnsForwardingRuleset.UpdateAsync(WaitUntil.Completed, patch); + DnsForwardingRulesetResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs new file mode 100644 index 000000000000..2350dfeeb3c7 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsForwardingRulesetVirtualNetworkLinkCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertVirtualNetworkLinkToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Put.json + // this example is just showing the usage of "VirtualNetworkLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource + DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); + + // invoke the operation + string virtualNetworkLinkName = "sampleVirtualNetworkLink"; + DnsForwardingRulesetVirtualNetworkLinkData data = new DnsForwardingRulesetVirtualNetworkLinkData(new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), + }) + { + Metadata = +{ +["additionalProp1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkLinkName, data); + DnsForwardingRulesetVirtualNetworkLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json + // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource + DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); + + // invoke the operation + string virtualNetworkLinkName = "sampleVirtualNetworkLink"; + DnsForwardingRulesetVirtualNetworkLinkResource result = await collection.GetAsync(virtualNetworkLinkName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListVirtualNetworkLinksToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_List.json + // this example is just showing the usage of "VirtualNetworkLinks_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource + DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); + + // invoke the operation and iterate over the result + await foreach (DnsForwardingRulesetVirtualNetworkLinkResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetVirtualNetworkLinkData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json + // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource + DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); + + // invoke the operation + string virtualNetworkLinkName = "sampleVirtualNetworkLink"; + bool result = await collection.ExistsAsync(virtualNetworkLinkName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json + // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetResource created on azure + // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); + DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); + + // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource + DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); + + // invoke the operation + string virtualNetworkLinkName = "sampleVirtualNetworkLink"; + NullableResponse response = await collection.GetIfExistsAsync(virtualNetworkLinkName); + DnsForwardingRulesetVirtualNetworkLinkResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs new file mode 100644 index 000000000000..23f3d39a0c0b --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsForwardingRulesetVirtualNetworkLinkResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json + // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetVirtualNetworkLinkResource created on azure + // for more information of creating DnsForwardingRulesetVirtualNetworkLinkResource, please refer to the document of DnsForwardingRulesetVirtualNetworkLinkResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + string virtualNetworkLinkName = "sampleVirtualNetworkLink"; + ResourceIdentifier dnsForwardingRulesetVirtualNetworkLinkResourceId = DnsForwardingRulesetVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, virtualNetworkLinkName); + DnsForwardingRulesetVirtualNetworkLinkResource dnsForwardingRulesetVirtualNetworkLink = client.GetDnsForwardingRulesetVirtualNetworkLinkResource(dnsForwardingRulesetVirtualNetworkLinkResourceId); + + // invoke the operation + DnsForwardingRulesetVirtualNetworkLinkResource result = await dnsForwardingRulesetVirtualNetworkLink.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteVirtualNetworkLinkToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Delete.json + // this example is just showing the usage of "VirtualNetworkLinks_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetVirtualNetworkLinkResource created on azure + // for more information of creating DnsForwardingRulesetVirtualNetworkLinkResource, please refer to the document of DnsForwardingRulesetVirtualNetworkLinkResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + string virtualNetworkLinkName = "sampleVirtualNetworkLink"; + ResourceIdentifier dnsForwardingRulesetVirtualNetworkLinkResourceId = DnsForwardingRulesetVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, virtualNetworkLinkName); + DnsForwardingRulesetVirtualNetworkLinkResource dnsForwardingRulesetVirtualNetworkLink = client.GetDnsForwardingRulesetVirtualNetworkLinkResource(dnsForwardingRulesetVirtualNetworkLinkResourceId); + + // invoke the operation + await dnsForwardingRulesetVirtualNetworkLink.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateVirtualNetworkLinkToADNSForwardingRuleset() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Patch.json + // this example is just showing the usage of "VirtualNetworkLinks_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsForwardingRulesetVirtualNetworkLinkResource created on azure + // for more information of creating DnsForwardingRulesetVirtualNetworkLinkResource, please refer to the document of DnsForwardingRulesetVirtualNetworkLinkResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string rulesetName = "sampleDnsForwardingRuleset"; + string virtualNetworkLinkName = "sampleVirtualNetworkLink"; + ResourceIdentifier dnsForwardingRulesetVirtualNetworkLinkResourceId = DnsForwardingRulesetVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, virtualNetworkLinkName); + DnsForwardingRulesetVirtualNetworkLinkResource dnsForwardingRulesetVirtualNetworkLink = client.GetDnsForwardingRulesetVirtualNetworkLinkResource(dnsForwardingRulesetVirtualNetworkLinkResourceId); + + // invoke the operation + DnsForwardingRulesetVirtualNetworkLinkPatch patch = new DnsForwardingRulesetVirtualNetworkLinkPatch + { + Metadata = +{ +["additionalProp1"] = "value1" +}, + }; + ArmOperation lro = await dnsForwardingRulesetVirtualNetworkLink.UpdateAsync(WaitUntil.Completed, patch); + DnsForwardingRulesetVirtualNetworkLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs new file mode 100644 index 000000000000..6be63b37c291 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Put.json + // this example is just showing the usage of "DnsResolvers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverResource + DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); + + // invoke the operation + string dnsResolverName = "sampleDnsResolver"; + DnsResolverData data = new DnsResolverData(new AzureLocation("westus2"), new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), + }) + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverName, data); + DnsResolverResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json + // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverResource + DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); + + // invoke the operation + string dnsResolverName = "sampleDnsResolver"; + DnsResolverResource result = await collection.GetAsync(dnsResolverName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDNSResolversByResourceGroup() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByResourceGroup.json + // this example is just showing the usage of "DnsResolvers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverResource + DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); + + // invoke the operation and iterate over the result + await foreach (DnsResolverResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json + // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverResource + DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); + + // invoke the operation + string dnsResolverName = "sampleDnsResolver"; + bool result = await collection.ExistsAsync(dnsResolverName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json + // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverResource + DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); + + // invoke the operation + string dnsResolverName = "sampleDnsResolver"; + NullableResponse response = await collection.GetIfExistsAsync(dnsResolverName); + DnsResolverResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs new file mode 100644 index 000000000000..78d4673aa44a --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverDomainListCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertDNSResolverDomainListWithBulkNumberOfDomains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Put.json + // this example is just showing the usage of "DnsResolverDomainLists_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + DnsResolverDomainListData data = new DnsResolverDomainListData(new AzureLocation("westus2")) + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, data); + DnsResolverDomainListResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertDNSResolverDomainListWithLessThan1000Domains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Put.json + // this example is just showing the usage of "DnsResolverDomainLists_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + DnsResolverDomainListData data = new DnsResolverDomainListData(new AzureLocation("westus2")) + { + Domains = { "contoso.com" }, + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, data); + DnsResolverDomainListResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + DnsResolverDomainListResource result = await collection.GetAsync(dnsResolverDomainListName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverDomainListWithLessThan1000Domains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + DnsResolverDomainListResource result = await collection.GetAsync(dnsResolverDomainListName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDNSResolverDomainListsByResourceGroup() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_ListByResourceGroup.json + // this example is just showing the usage of "DnsResolverDomainLists_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation and iterate over the result + await foreach (DnsResolverDomainListResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + bool result = await collection.ExistsAsync(dnsResolverDomainListName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDNSResolverDomainListWithLessThan1000Domains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + bool result = await collection.ExistsAsync(dnsResolverDomainListName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + NullableResponse response = await collection.GetIfExistsAsync(dnsResolverDomainListName); + DnsResolverDomainListResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDNSResolverDomainListWithLessThan1000Domains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverDomainListResource + DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); + + // invoke the operation + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + NullableResponse response = await collection.GetIfExistsAsync(dnsResolverDomainListName); + DnsResolverDomainListResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs new file mode 100644 index 000000000000..dba81bfc03de --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverDomainListResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverDomainListResource created on azure + // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); + DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); + + // invoke the operation + DnsResolverDomainListResource result = await dnsResolverDomainList.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverDomainListWithLessThan1000Domains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json + // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverDomainListResource created on azure + // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); + DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); + + // invoke the operation + DnsResolverDomainListResource result = await dnsResolverDomainList.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDNSResolverDomainList() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Delete.json + // this example is just showing the usage of "DnsResolverDomainLists_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverDomainListResource created on azure + // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); + DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); + + // invoke the operation + await dnsResolverDomainList.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateDNSResolverDomainList() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Patch.json + // this example is just showing the usage of "DnsResolverDomainLists_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverDomainListResource created on azure + // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); + DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); + + // invoke the operation + DnsResolverDomainListPatch patch = new DnsResolverDomainListPatch + { + Tags = +{ +["key1"] = "value1" +}, + Domains = { "contoso.com" }, + }; + ArmOperation lro = await dnsResolverDomainList.UpdateAsync(WaitUntil.Completed, patch); + DnsResolverDomainListResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Bulk_DownloadDNSResolverDomainListDomains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDownload.json + // this example is just showing the usage of "DnsResolverDomainLists_Bulk" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverDomainListResource created on azure + // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); + DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); + + // invoke the operation + DnsResolverDomainListBulk dnsResolverDomainListBulk = new DnsResolverDomainListBulk(new Uri("https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw"), DnsResolverDomainListBulkAction.Download); + ArmOperation lro = await dnsResolverDomainList.BulkAsync(WaitUntil.Completed, dnsResolverDomainListBulk); + DnsResolverDomainListResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Bulk_UploadDNSResolverDomainListDomains() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkUpload.json + // this example is just showing the usage of "DnsResolverDomainLists_Bulk" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverDomainListResource created on azure + // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverDomainListName = "sampleDnsResolverDomainList"; + ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); + DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); + + // invoke the operation + DnsResolverDomainListBulk dnsResolverDomainListBulk = new DnsResolverDomainListBulk(new Uri("https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw"), DnsResolverDomainListBulkAction.Upload); + ArmOperation lro = await dnsResolverDomainList.BulkAsync(WaitUntil.Completed, dnsResolverDomainListBulk); + DnsResolverDomainListResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs new file mode 100644 index 000000000000..4c0c200219e6 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverInboundEndpointCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertInboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Put.json + // this example is just showing the usage of "InboundEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverInboundEndpointResource + DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); + + // invoke the operation + string inboundEndpointName = "sampleInboundEndpoint"; + DnsResolverInboundEndpointData data = new DnsResolverInboundEndpointData(new AzureLocation("westus2"), new InboundEndpointIPConfiguration[] + { +new InboundEndpointIPConfiguration(new WritableSubResource +{ +Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"), +}) +{ +PrivateIPAllocationMethod = InboundEndpointIPAllocationMethod.Dynamic, +} + }) + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, inboundEndpointName, data); + DnsResolverInboundEndpointResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverInboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveInboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json + // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverInboundEndpointResource + DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); + + // invoke the operation + string inboundEndpointName = "sampleInboundEndpoint"; + DnsResolverInboundEndpointResource result = await collection.GetAsync(inboundEndpointName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverInboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListInboundEndpointsByDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_List.json + // this example is just showing the usage of "InboundEndpoints_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverInboundEndpointResource + DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); + + // invoke the operation and iterate over the result + await foreach (DnsResolverInboundEndpointResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverInboundEndpointData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveInboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json + // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverInboundEndpointResource + DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); + + // invoke the operation + string inboundEndpointName = "sampleInboundEndpoint"; + bool result = await collection.ExistsAsync(inboundEndpointName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveInboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json + // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverInboundEndpointResource + DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); + + // invoke the operation + string inboundEndpointName = "sampleInboundEndpoint"; + NullableResponse response = await collection.GetIfExistsAsync(inboundEndpointName); + DnsResolverInboundEndpointResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverInboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs new file mode 100644 index 000000000000..38690863a8c1 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverInboundEndpointResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveInboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json + // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverInboundEndpointResource created on azure + // for more information of creating DnsResolverInboundEndpointResource, please refer to the document of DnsResolverInboundEndpointResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + string inboundEndpointName = "sampleInboundEndpoint"; + ResourceIdentifier dnsResolverInboundEndpointResourceId = DnsResolverInboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, inboundEndpointName); + DnsResolverInboundEndpointResource dnsResolverInboundEndpoint = client.GetDnsResolverInboundEndpointResource(dnsResolverInboundEndpointResourceId); + + // invoke the operation + DnsResolverInboundEndpointResource result = await dnsResolverInboundEndpoint.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverInboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteInboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Delete.json + // this example is just showing the usage of "InboundEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverInboundEndpointResource created on azure + // for more information of creating DnsResolverInboundEndpointResource, please refer to the document of DnsResolverInboundEndpointResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + string inboundEndpointName = "sampleInboundEndpoint"; + ResourceIdentifier dnsResolverInboundEndpointResourceId = DnsResolverInboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, inboundEndpointName); + DnsResolverInboundEndpointResource dnsResolverInboundEndpoint = client.GetDnsResolverInboundEndpointResource(dnsResolverInboundEndpointResourceId); + + // invoke the operation + await dnsResolverInboundEndpoint.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateInboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Patch.json + // this example is just showing the usage of "InboundEndpoints_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverInboundEndpointResource created on azure + // for more information of creating DnsResolverInboundEndpointResource, please refer to the document of DnsResolverInboundEndpointResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + string inboundEndpointName = "sampleInboundEndpoint"; + ResourceIdentifier dnsResolverInboundEndpointResourceId = DnsResolverInboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, inboundEndpointName); + DnsResolverInboundEndpointResource dnsResolverInboundEndpoint = client.GetDnsResolverInboundEndpointResource(dnsResolverInboundEndpointResourceId); + + // invoke the operation + DnsResolverInboundEndpointPatch patch = new DnsResolverInboundEndpointPatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await dnsResolverInboundEndpoint.UpdateAsync(WaitUntil.Completed, patch); + DnsResolverInboundEndpointResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverInboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs new file mode 100644 index 000000000000..51d9bfaab2dc --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverOutboundEndpointCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertOutboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Put.json + // this example is just showing the usage of "OutboundEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverOutboundEndpointResource + DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); + + // invoke the operation + string outboundEndpointName = "sampleOutboundEndpoint"; + DnsResolverOutboundEndpointData data = new DnsResolverOutboundEndpointData(new AzureLocation("westus2"), new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"), + }) + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, outboundEndpointName, data); + DnsResolverOutboundEndpointResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverOutboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveOutboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json + // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverOutboundEndpointResource + DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); + + // invoke the operation + string outboundEndpointName = "sampleOutboundEndpoint"; + DnsResolverOutboundEndpointResource result = await collection.GetAsync(outboundEndpointName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverOutboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListOutboundEndpointsByDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_List.json + // this example is just showing the usage of "OutboundEndpoints_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverOutboundEndpointResource + DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); + + // invoke the operation and iterate over the result + await foreach (DnsResolverOutboundEndpointResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverOutboundEndpointData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveOutboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json + // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverOutboundEndpointResource + DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); + + // invoke the operation + string outboundEndpointName = "sampleOutboundEndpoint"; + bool result = await collection.ExistsAsync(outboundEndpointName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveOutboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json + // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // get the collection of this DnsResolverOutboundEndpointResource + DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); + + // invoke the operation + string outboundEndpointName = "sampleOutboundEndpoint"; + NullableResponse response = await collection.GetIfExistsAsync(outboundEndpointName); + DnsResolverOutboundEndpointResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverOutboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs new file mode 100644 index 000000000000..4bbf6c135955 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverOutboundEndpointResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveOutboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json + // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverOutboundEndpointResource created on azure + // for more information of creating DnsResolverOutboundEndpointResource, please refer to the document of DnsResolverOutboundEndpointResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + string outboundEndpointName = "sampleOutboundEndpoint"; + ResourceIdentifier dnsResolverOutboundEndpointResourceId = DnsResolverOutboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, outboundEndpointName); + DnsResolverOutboundEndpointResource dnsResolverOutboundEndpoint = client.GetDnsResolverOutboundEndpointResource(dnsResolverOutboundEndpointResourceId); + + // invoke the operation + DnsResolverOutboundEndpointResource result = await dnsResolverOutboundEndpoint.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverOutboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteOutboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Delete.json + // this example is just showing the usage of "OutboundEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverOutboundEndpointResource created on azure + // for more information of creating DnsResolverOutboundEndpointResource, please refer to the document of DnsResolverOutboundEndpointResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + string outboundEndpointName = "sampleOutboundEndpoint"; + ResourceIdentifier dnsResolverOutboundEndpointResourceId = DnsResolverOutboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, outboundEndpointName); + DnsResolverOutboundEndpointResource dnsResolverOutboundEndpoint = client.GetDnsResolverOutboundEndpointResource(dnsResolverOutboundEndpointResourceId); + + // invoke the operation + await dnsResolverOutboundEndpoint.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateOutboundEndpointForDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Patch.json + // this example is just showing the usage of "OutboundEndpoints_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverOutboundEndpointResource created on azure + // for more information of creating DnsResolverOutboundEndpointResource, please refer to the document of DnsResolverOutboundEndpointResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + string outboundEndpointName = "sampleOutboundEndpoint"; + ResourceIdentifier dnsResolverOutboundEndpointResourceId = DnsResolverOutboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, outboundEndpointName); + DnsResolverOutboundEndpointResource dnsResolverOutboundEndpoint = client.GetDnsResolverOutboundEndpointResource(dnsResolverOutboundEndpointResourceId); + + // invoke the operation + DnsResolverOutboundEndpointPatch patch = new DnsResolverOutboundEndpointPatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await dnsResolverOutboundEndpoint.UpdateAsync(WaitUntil.Completed, patch); + DnsResolverOutboundEndpointResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverOutboundEndpointData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs new file mode 100644 index 000000000000..8700dd62b865 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverPolicyCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Put.json + // this example is just showing the usage of "DnsResolverPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverPolicyResource + DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); + + // invoke the operation + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + DnsResolverPolicyData data = new DnsResolverPolicyData(new AzureLocation("westus2")) + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, data); + DnsResolverPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json + // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverPolicyResource + DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); + + // invoke the operation + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + DnsResolverPolicyResource result = await collection.GetAsync(dnsResolverPolicyName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDNSResolverPoliciesByResourceGroup() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByResourceGroup.json + // this example is just showing the usage of "DnsResolverPolicies_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverPolicyResource + DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); + + // invoke the operation and iterate over the result + await foreach (DnsResolverPolicyResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json + // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverPolicyResource + DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); + + // invoke the operation + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + bool result = await collection.ExistsAsync(dnsResolverPolicyName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json + // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this DnsResolverPolicyResource + DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); + + // invoke the operation + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + NullableResponse response = await collection.GetIfExistsAsync(dnsResolverPolicyName); + DnsResolverPolicyResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs new file mode 100644 index 000000000000..d56eb5b3d3aa --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverPolicyResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json + // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // invoke the operation + DnsResolverPolicyResource result = await dnsResolverPolicy.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Delete.json + // this example is just showing the usage of "DnsResolverPolicies_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // invoke the operation + await dnsResolverPolicy.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Patch.json + // this example is just showing the usage of "DnsResolverPolicies_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // invoke the operation + DnsResolverPolicyPatch patch = new DnsResolverPolicyPatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await dnsResolverPolicy.UpdateAsync(WaitUntil.Completed, patch); + DnsResolverPolicyResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs new file mode 100644 index 000000000000..b329e2078527 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverPolicyVirtualNetworkLinkCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertDNSResolverPolicyVirtualNetworkLink() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Put.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource + DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); + + // invoke the operation + string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; + DnsResolverPolicyVirtualNetworkLinkData data = new DnsResolverPolicyVirtualNetworkLinkData(new AzureLocation("westus2"), new WritableSubResource + { + Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), + }) + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyVirtualNetworkLinkName, data); + DnsResolverPolicyVirtualNetworkLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverPolicyVirtualNetworkLink() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource + DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); + + // invoke the operation + string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; + DnsResolverPolicyVirtualNetworkLinkResource result = await collection.GetAsync(dnsResolverPolicyVirtualNetworkLinkName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDNSResolverPolicyVirtualNetworkLinksByDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_List.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource + DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); + + // invoke the operation and iterate over the result + await foreach (DnsResolverPolicyVirtualNetworkLinkResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyVirtualNetworkLinkData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDNSResolverPolicyVirtualNetworkLink() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource + DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); + + // invoke the operation + string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; + bool result = await collection.ExistsAsync(dnsResolverPolicyVirtualNetworkLinkName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDNSResolverPolicyVirtualNetworkLink() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource + DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); + + // invoke the operation + string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; + NullableResponse response = await collection.GetIfExistsAsync(dnsResolverPolicyVirtualNetworkLinkName); + DnsResolverPolicyVirtualNetworkLinkResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs new file mode 100644 index 000000000000..89a849b54c46 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverPolicyVirtualNetworkLinkResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolverPolicyVirtualNetworkLink() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyVirtualNetworkLinkResource created on azure + // for more information of creating DnsResolverPolicyVirtualNetworkLinkResource, please refer to the document of DnsResolverPolicyVirtualNetworkLinkResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; + ResourceIdentifier dnsResolverPolicyVirtualNetworkLinkResourceId = DnsResolverPolicyVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); + DnsResolverPolicyVirtualNetworkLinkResource dnsResolverPolicyVirtualNetworkLink = client.GetDnsResolverPolicyVirtualNetworkLinkResource(dnsResolverPolicyVirtualNetworkLinkResourceId); + + // invoke the operation + DnsResolverPolicyVirtualNetworkLinkResource result = await dnsResolverPolicyVirtualNetworkLink.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDNSResolverPolicyVirtualNetworkLink() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Delete.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyVirtualNetworkLinkResource created on azure + // for more information of creating DnsResolverPolicyVirtualNetworkLinkResource, please refer to the document of DnsResolverPolicyVirtualNetworkLinkResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; + ResourceIdentifier dnsResolverPolicyVirtualNetworkLinkResourceId = DnsResolverPolicyVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); + DnsResolverPolicyVirtualNetworkLinkResource dnsResolverPolicyVirtualNetworkLink = client.GetDnsResolverPolicyVirtualNetworkLinkResource(dnsResolverPolicyVirtualNetworkLinkResourceId); + + // invoke the operation + await dnsResolverPolicyVirtualNetworkLink.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateDNSResolverPolicyVirtualNetworkLink() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Patch.json + // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyVirtualNetworkLinkResource created on azure + // for more information of creating DnsResolverPolicyVirtualNetworkLinkResource, please refer to the document of DnsResolverPolicyVirtualNetworkLinkResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; + ResourceIdentifier dnsResolverPolicyVirtualNetworkLinkResourceId = DnsResolverPolicyVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); + DnsResolverPolicyVirtualNetworkLinkResource dnsResolverPolicyVirtualNetworkLink = client.GetDnsResolverPolicyVirtualNetworkLinkResource(dnsResolverPolicyVirtualNetworkLinkResourceId); + + // invoke the operation + DnsResolverPolicyVirtualNetworkLinkPatch patch = new DnsResolverPolicyVirtualNetworkLinkPatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await dnsResolverPolicyVirtualNetworkLink.UpdateAsync(WaitUntil.Completed, patch); + DnsResolverPolicyVirtualNetworkLinkResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs new file mode 100644 index 000000000000..0fc951c6281e --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsResolverResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json + // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // invoke the operation + DnsResolverResource result = await dnsResolver.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Delete.json + // this example is just showing the usage of "DnsResolvers_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // invoke the operation + await dnsResolver.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateDNSResolver() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Patch.json + // this example is just showing the usage of "DnsResolvers_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverResource created on azure + // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverName = "sampleDnsResolver"; + ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); + DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); + + // invoke the operation + DnsResolverPatch patch = new DnsResolverPatch + { + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await dnsResolver.UpdateAsync(WaitUntil.Completed, patch); + DnsResolverResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs new file mode 100644 index 000000000000..1c569cf11aa9 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsSecurityRuleCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_UpsertDNSSecurityRule() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Put.json + // this example is just showing the usage of "DnsSecurityRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsSecurityRuleResource + DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); + + // invoke the operation + string dnsSecurityRuleName = "sampleDnsSecurityRule"; + DnsSecurityRuleData data = new DnsSecurityRuleData(new AzureLocation("westus2"), 100, new DnsSecurityRuleAction + { + ActionType = DnsSecurityRuleActionType.Block, + BlockResponseCode = BlockResponseCode.Servfail, + }, new WritableSubResource[] + { +new WritableSubResource +{ +Id = new ResourceIdentifier("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"), +} + }) + { + DnsSecurityRuleState = DnsSecurityRuleState.Enabled, + Tags = +{ +["key1"] = "value1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsSecurityRuleName, data); + DnsSecurityRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSSecurityRuleForDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json + // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsSecurityRuleResource + DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); + + // invoke the operation + string dnsSecurityRuleName = "sampleDnsSecurityRule"; + DnsSecurityRuleResource result = await collection.GetAsync(dnsSecurityRuleName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_ListDNSSecurityRulesByDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_List.json + // this example is just showing the usage of "DnsSecurityRules_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsSecurityRuleResource + DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); + + // invoke the operation and iterate over the result + await foreach (DnsSecurityRuleResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsSecurityRuleData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RetrieveDNSSecurityRuleForDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json + // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsSecurityRuleResource + DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); + + // invoke the operation + string dnsSecurityRuleName = "sampleDnsSecurityRule"; + bool result = await collection.ExistsAsync(dnsSecurityRuleName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RetrieveDNSSecurityRuleForDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json + // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsResolverPolicyResource created on azure + // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); + DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); + + // get the collection of this DnsSecurityRuleResource + DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); + + // invoke the operation + string dnsSecurityRuleName = "sampleDnsSecurityRule"; + NullableResponse response = await collection.GetIfExistsAsync(dnsSecurityRuleName); + DnsSecurityRuleResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs new file mode 100644 index 000000000000..45d05ed44073 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_DnsSecurityRuleResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RetrieveDNSSecurityRuleForDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json + // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsSecurityRuleResource created on azure + // for more information of creating DnsSecurityRuleResource, please refer to the document of DnsSecurityRuleResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + string dnsSecurityRuleName = "sampleDnsSecurityRule"; + ResourceIdentifier dnsSecurityRuleResourceId = DnsSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); + DnsSecurityRuleResource dnsSecurityRule = client.GetDnsSecurityRuleResource(dnsSecurityRuleResourceId); + + // invoke the operation + DnsSecurityRuleResource result = await dnsSecurityRule.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeleteDNSSecurityRuleForDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Delete.json + // this example is just showing the usage of "DnsSecurityRules_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsSecurityRuleResource created on azure + // for more information of creating DnsSecurityRuleResource, please refer to the document of DnsSecurityRuleResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsDnsResolverPolicy"; + string dnsSecurityRuleName = "sampleDnsSecurityRule"; + ResourceIdentifier dnsSecurityRuleResourceId = DnsSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); + DnsSecurityRuleResource dnsSecurityRule = client.GetDnsSecurityRuleResource(dnsSecurityRuleResourceId); + + // invoke the operation + await dnsSecurityRule.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdateDNSSecurityRuleForDNSResolverPolicy() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Patch.json + // this example is just showing the usage of "DnsSecurityRules_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DnsSecurityRuleResource created on azure + // for more information of creating DnsSecurityRuleResource, please refer to the document of DnsSecurityRuleResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string dnsResolverPolicyName = "sampleDnsResolverPolicy"; + string dnsSecurityRuleName = "sampleDnsSecurityRule"; + ResourceIdentifier dnsSecurityRuleResourceId = DnsSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); + DnsSecurityRuleResource dnsSecurityRule = client.GetDnsSecurityRuleResource(dnsSecurityRuleResourceId); + + // invoke the operation + DnsSecurityRulePatch patch = new DnsSecurityRulePatch + { + Tags = +{ +["key1"] = "value1" +}, + DnsSecurityRuleState = DnsSecurityRuleState.Disabled, + }; + ArmOperation lro = await dnsSecurityRule.UpdateAsync(WaitUntil.Completed, patch); + DnsSecurityRuleResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsSecurityRuleData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..b110f07ef72d --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolvers_ListDNSResolversBySubscription() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListBySubscription.json + // this example is just showing the usage of "DnsResolvers_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (DnsResolverResource item in subscriptionResource.GetDnsResolversAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsBySubscription() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListBySubscription.json + // this example is just showing the usage of "DnsForwardingRulesets_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (DnsForwardingRulesetResource item in subscriptionResource.GetDnsForwardingRulesetsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsForwardingRulesetData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolverPolicies_ListDNSResolverPoliciesBySubscription() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListBySubscription.json + // this example is just showing the usage of "DnsResolverPolicies_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (DnsResolverPolicyResource item in subscriptionResource.GetDnsResolverPoliciesAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverPolicyData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolverDomainLists_ListDNSResolverDomainListsBySubscription() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_ListBySubscription.json + // this example is just showing the usage of "DnsResolverDomainLists_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (DnsResolverDomainListResource item in subscriptionResource.GetDnsResolverDomainListsAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DnsResolverDomainListData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs new file mode 100644 index 000000000000..8444655507d9 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_VirtualNetworkDnsResolverResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs index 36d2fc4a724d..6244efcfd417 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs @@ -307,10 +307,11 @@ public static DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNe /// The location. /// ETag of the DNS resolver domain list. /// The domains in the domain list. + /// The URL for bulk upload or download for domain lists containing larger set of domains. /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. /// The resourceGuid property of the DNS resolver domain list resource. /// A new instance for mocking. - public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable domains = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable domains = null, Uri domainsUri = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { tags ??= new Dictionary(); domains ??= new List(); @@ -324,6 +325,7 @@ public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdenti location, etag, domains?.ToList(), + domainsUri, provisioningState, resourceGuid, serializedAdditionalRawData: null); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs index 266f58828707..9c3e8ceafcea 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(string f /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Get(string forwardingRuleName /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(int? top = n /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, Cance /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string forwardingRuleName, /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string forwardingRuleName, CancellationToke /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs index ffb498cb8c03..88ba28f49390 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(DnsFo /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs index 3d9789adba84..d9b73e141efe 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string rulesetName, Ca /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Ca /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string rulesetName, Cancel /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string rulesetName, CancellationToken cance /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs index d0dbc6c3e84d..324a8791e037 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs @@ -110,7 +110,7 @@ public virtual DnsForwardingRuleCollection GetDnsForwardingRules() /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsForwardingR /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsForwardingRulesetVirtualNetworkLinkCollection GetDnsForwarding /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsFo /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs index 0c410059b1e1..13d629de1e6c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(i /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkLinkN /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string virtualNetworkLinkName, Cancellation /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs index 8fb7d95eea61..aef45c8ce23c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs index 9e47260b6d33..10d56e5ececc 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string dnsReso /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string dnsResolverName, Cancell /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Cancellatio /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string dnsResolverName, Ca /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string dnsResolverName, CancellationToken c /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs index 6bd5bc5f2eea..5ad7018aa942 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string dnsResolverDom /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string dnsResolverDomainLi /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string dnsResolverDomainListName, Cancellat /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs index dfeaa29a32eb..d47f4a42c805 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs @@ -44,13 +44,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - writer.WritePropertyName("domains"u8); - writer.WriteStartArray(); - foreach (var item in Domains) + if (Optional.IsCollectionDefined(Domains)) { - writer.WriteStringValue(item); + writer.WritePropertyName("domains"u8); + writer.WriteStartArray(); + foreach (var item in Domains) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(DomainsUri)) + { + writer.WritePropertyName("domainsUrl"u8); + writer.WriteStringValue(DomainsUri.AbsoluteUri); } - writer.WriteEndArray(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -92,6 +100,7 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J ResourceType type = default; SystemData systemData = default; IList domains = default; + Uri domainsUrl = default; DnsResolverProvisioningState? provisioningState = default; Guid? resourceGuid = default; IDictionary serializedAdditionalRawData = default; @@ -161,6 +170,10 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J { if (property0.NameEquals("domains"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { @@ -169,6 +182,15 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J domains = array; continue; } + if (property0.NameEquals("domainsUrl"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + domainsUrl = new Uri(property0.Value.GetString()); + continue; + } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -204,7 +226,8 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J tags ?? new ChangeTrackingDictionary(), location, etag, - domains, + domains ?? new ChangeTrackingList(), + domainsUrl, provisioningState, resourceGuid, serializedAdditionalRawData); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs index b911f6de43a2..fdfe279729b3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; using Azure.Core; using Azure.ResourceManager.DnsResolver.Models; using Azure.ResourceManager.Models; @@ -54,13 +53,9 @@ public partial class DnsResolverDomainListData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The domains in the domain list. - /// is null. - public DnsResolverDomainListData(AzureLocation location, IEnumerable domains) : base(location) + public DnsResolverDomainListData(AzureLocation location) : base(location) { - Argument.AssertNotNull(domains, nameof(domains)); - - Domains = domains.ToList(); + Domains = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -72,13 +67,15 @@ public DnsResolverDomainListData(AzureLocation location, IEnumerable dom /// The location. /// ETag of the DNS resolver domain list. /// The domains in the domain list. + /// The URL for bulk upload or download for domain lists containing larger set of domains. /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. /// The resourceGuid property of the DNS resolver domain list resource. /// Keeps track of any properties unknown to the library. - internal DnsResolverDomainListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList domains, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DnsResolverDomainListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList domains, Uri domainsUri, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; Domains = domains; + DomainsUri = domainsUri; ProvisioningState = provisioningState; ResourceGuid = resourceGuid; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -93,6 +90,8 @@ internal DnsResolverDomainListData() public ETag? ETag { get; } /// The domains in the domain list. public IList Domains { get; } + /// The URL for bulk upload or download for domain lists containing larger set of domains. + public Uri DomainsUri { get; } /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } /// The resourceGuid property of the DNS resolver domain list resource. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs index 6861574160d1..b0298f839677 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -350,6 +350,102 @@ public virtual ArmOperation Update(WaitUntil wait } } + /// + /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}/bulk + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Bulk + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the bulk domain list operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is null. + public virtual async Task> BulkAsync(WaitUntil waitUntil, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Bulk"); + scope.Start(); + try + { + var response = await _dnsResolverDomainListRestClient.BulkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); + var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}/bulk + /// + /// + /// Operation Id + /// DnsResolverDomainLists_Bulk + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the bulk domain list operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Bulk(WaitUntil waitUntil, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); + + using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Bulk"); + scope.Start(); + try + { + var response = _dnsResolverDomainListRestClient.Bulk(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch, cancellationToken); + var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -363,7 +459,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -425,7 +521,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -487,7 +583,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -544,7 +640,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -601,7 +697,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -661,7 +757,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs index f8c3a4eb5aab..1f6fc43dc1e8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string inboundEn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string inboundEndpointName /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string inboundEndpointName, CancellationTok /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs index c5756885bdb6..3523d11a41ef 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs index 035d84c40b95..9e7b09a6bd70 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string outbound /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(in /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = n /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string outboundEndpointNam /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string outboundEndpointName, CancellationTo /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs index fc91a12b44a2..4f3300411904 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagA /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTags /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveT /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs index 42bf813d68c1..c6173c42081a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string d /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string dnsResolverPolicyN /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = n /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Cance /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string dnsResolverPolicyNa /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string dnsResolverPolicyName, CancellationT /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs index 143ac6b4ff7a..2786f2aa3146 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs @@ -110,7 +110,7 @@ public virtual DnsSecurityRuleCollection GetDnsSecurityRules() /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsSecurityRuleA /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsResolverPolicyVirtualNetworkLinkCollection GetDnsResolverPolic /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsResol /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs index 02f37e6b3614..38e276033711 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string dnsResolverPolicyVi /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string dnsResolverPolicyVirtualNetworkLinkN /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs index 6c297f0cd695..a752883d1de1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update( /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(stri /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDi /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs index 2cc180b5eb02..5ff209490565 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs @@ -110,7 +110,7 @@ public virtual DnsResolverInboundEndpointCollection GetDnsResolverInboundEndpoin /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsRe /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsResolverOutboundEndpointCollection GetDnsResolverOutboundEndpo /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetDnsR /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsResolverOutbo /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Dns /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs index 3af6c0c5919d..713e10041c94 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string dns /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string dnsSecurityRuleName, /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nul /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = null, Cancell /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string dnsSecurityRuleName /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string dnsSecurityRuleName, CancellationTok /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs index 39a55cc73c5a..0bebd8c2f50a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs index 0a8644e11603..bc5c5ae40b8c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs @@ -271,7 +271,7 @@ public static DnsResolverCollection GetDnsResolvers(this ResourceGroupResource r /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public static async Task> GetDnsResolverAsync(this /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public static DnsForwardingRulesetCollection GetDnsForwardingRulesets(this Resou /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -402,7 +402,7 @@ public static async Task> GetDnsForwardin /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -457,7 +457,7 @@ public static DnsResolverPolicyCollection GetDnsResolverPolicies(this ResourceGr /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -495,7 +495,7 @@ public static async Task> GetDnsResolverPoli /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -550,7 +550,7 @@ public static DnsResolverDomainListCollection GetDnsResolverDomainLists(this Res /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -588,7 +588,7 @@ public static async Task> GetDnsResolver /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -626,7 +626,7 @@ public static Response GetDnsResolverDomainList(t /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -663,7 +663,7 @@ public static AsyncPageable GetDnsResolversAsync(this Subsc /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -700,7 +700,7 @@ public static Pageable GetDnsResolvers(this SubscriptionRes /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -737,7 +737,7 @@ public static AsyncPageable GetDnsForwardingRulese /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -774,7 +774,7 @@ public static Pageable GetDnsForwardingRulesets(th /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -811,7 +811,7 @@ public static AsyncPageable GetDnsResolverPoliciesAsy /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -848,7 +848,7 @@ public static Pageable GetDnsResolverPolicies(this Su /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -885,7 +885,7 @@ public static AsyncPageable GetDnsResolverDomainL /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs index 5bd8723fdc94..1def3d6766ce 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual DnsResolverCollection GetDnsResolvers() /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetDnsResolverAsync(str /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -122,7 +122,7 @@ public virtual DnsForwardingRulesetCollection GetDnsForwardingRulesets() /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetDnsForwardi /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual DnsResolverPolicyCollection GetDnsResolverPolicies() /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetDnsResolverPol /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual DnsResolverDomainListCollection GetDnsResolverDomainLists() /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual async Task> GetDnsResolve /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs index 3d6400b09296..091df0281a8f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs @@ -64,7 +64,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -95,7 +95,7 @@ public virtual AsyncPageable GetDnsResolversAsync(int? top /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -126,7 +126,7 @@ public virtual Pageable GetDnsResolvers(int? top = null, Ca /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual AsyncPageable GetDnsForwardingRules /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Pageable GetDnsForwardingRulesets(i /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual AsyncPageable GetDnsResolverPoliciesAs /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Pageable GetDnsResolverPolicies(int? t /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetDnsResolverDomain /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs new file mode 100644 index 000000000000..87ee292e0b1a --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + public partial class DnsResolverDomainListBulk : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + writer.WritePropertyName("storageUrl"u8); + writer.WriteStringValue(StorageUri.AbsoluteUri); + writer.WritePropertyName("action"u8); + writer.WriteStringValue(Action.ToString()); + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DnsResolverDomainListBulk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDnsResolverDomainListBulk(document.RootElement, options); + } + + internal static DnsResolverDomainListBulk DeserializeDnsResolverDomainListBulk(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri storageUrl = default; + DnsResolverDomainListBulkAction action = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("storageUrl"u8)) + { + storageUrl = new Uri(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("action"u8)) + { + action = new DnsResolverDomainListBulkAction(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DnsResolverDomainListBulk(storageUrl, action, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support writing '{options.Format}' format."); + } + } + + DnsResolverDomainListBulk IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDnsResolverDomainListBulk(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs new file mode 100644 index 000000000000..e55031a540b4 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// Describes a DNS resolver domain list for bulk UPLOAD or DOWNLOAD operations. + public partial class DnsResolverDomainListBulk + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. + /// The action to take in the request, Upload or Download. + /// is null. + public DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action) + { + Argument.AssertNotNull(storageUri, nameof(storageUri)); + + StorageUri = storageUri; + Action = action; + } + + /// Initializes a new instance of . + /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. + /// The action to take in the request, Upload or Download. + /// Keeps track of any properties unknown to the library. + internal DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action, IDictionary serializedAdditionalRawData) + { + StorageUri = storageUri; + Action = action; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DnsResolverDomainListBulk() + { + } + + /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. + public Uri StorageUri { get; } + /// The action to take in the request, Upload or Download. + public DnsResolverDomainListBulkAction Action { get; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs new file mode 100644 index 000000000000..1814196f43bd --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The action type in requests for bulk upload or download of a DNS resolver domain list. + public readonly partial struct DnsResolverDomainListBulkAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DnsResolverDomainListBulkAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UploadValue = "Upload"; + private const string DownloadValue = "Download"; + + /// Upload. + public static DnsResolverDomainListBulkAction Upload { get; } = new DnsResolverDomainListBulkAction(UploadValue); + /// Download. + public static DnsResolverDomainListBulkAction Download { get; } = new DnsResolverDomainListBulkAction(DownloadValue); + /// Determines if two values are the same. + public static bool operator ==(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DnsResolverDomainListBulkAction(string value) => new DnsResolverDomainListBulkAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DnsResolverDomainListBulkAction other && Equals(other); + /// + public bool Equals(DnsResolverDomainListBulkAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs index f1730e0be3b3..acd09b7f9e39 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs @@ -32,7 +32,7 @@ public DnsForwardingRulesetsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs index d0c8b760b2b7..cc1ddd9c9df4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolverDomainListsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -608,6 +608,112 @@ public Response List(string subscriptionId, int? to } } + internal RequestUriBuilder CreateBulkRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch, string ifNoneMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); + uri.AppendPath("/bulk", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateBulkRequest(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); + uri.AppendPath(dnsResolverDomainListName, true); + uri.AppendPath("/bulk", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(dnsResolverDomainListBulk, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the bulk domain list operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task BulkAsync(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); + + using var message = CreateBulkRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, dnsResolverDomainListBulk, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the DNS resolver domain list. + /// Parameters supplied to the bulk domain list operation. + /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. + /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Bulk(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); + Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); + + using var message = CreateBulkRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, dnsResolverDomainListBulk, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, int? top) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs index b190191b2f65..431b30544e3e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolverPoliciesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs index 61ff283456a7..c0bd4eeb76e4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolverPolicyVirtualNetworkLinksRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs index 0df9499ab9e3..380bfd2f01fe 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolversRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs index 7d12053d8694..dce055c7e042 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs @@ -32,7 +32,7 @@ public DnsSecurityRulesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs index d49dbc898f82..7a04d564385e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs @@ -32,7 +32,7 @@ public ForwardingRulesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs index cdec5dc65596..c98b6be4d31d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public InboundEndpointsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs index 63d3d747b4d7..bbbc7114b08d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public OutboundEndpointsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs index bf33cb72d447..8a3ed609c477 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkLinksRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-07-01-preview"; + _apiVersion = apiVersion ?? "2025-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs index 22ac369eb7f4..d75455ae48f3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs @@ -86,7 +86,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual AsyncPageable GetDnsResolversAsync(int? top /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual Pageable GetDnsResolvers(int? top = null, Ca /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual AsyncPageable GetDnsForwardin /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual Pageable GetDnsForwardingRule /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource @@ -240,7 +240,7 @@ public virtual AsyncPageable GetDnsResolverPoliciesByVirtua /// /// /// Default Api Version - /// 2023-07-01-preview + /// 2025-05-01 /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index 586cfa881160..0453b69e8d89 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -4,14 +4,15 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -require: https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md -#tag: package-preview-2023-07 +# TODO REPLACE WITH PUBLIC LINK +require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/tree/108c4eed0da1236a63ad6c0d18c33fdd14f8e439/specification/dnsresolver/resource-manager/readme.md +tag: package-2025-01 library-name: dnsresolver namespace: Azure.ResourceManager.DnsResolver output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: - sample: false #true + sample: true output-folder: $(this-folder)/../samples/Generated clear-output-folder: true skip-csproj: true @@ -71,6 +72,7 @@ rename-mapping: OutboundEndpoint: DnsResolverOutboundEndpoint VirtualNetworkLink: DnsForwardingRulesetVirtualNetworkLink ActionType: DnsSecurityRuleActionType + Action: DnsResolverDomainListBulkAction directive: - from: dnsresolver.json diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs index acd9569ad716..5623718337da 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/DnsResolverTestBase.cs @@ -17,7 +17,7 @@ public class DnsResolverTestBase : ManagementRecordedTestBase "snet-endpoint"; public ResourceIdentifier DefaultVnetID; public ResourceIdentifier DefaultSubnetID; - protected AzureLocation DefaultLocation => AzureLocation.AustraliaEast; + protected AzureLocation DefaultLocation => AzureLocation.WestUS2; protected int DefaultDnsSecurityRulePriority => 100; protected ArmClient Client { get; private set; } protected SubscriptionResource DefaultSubscription { get; private set; } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs index 81e5e7d14fca..c86fb068291a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs @@ -19,7 +19,7 @@ public class DnsForwardingRulesetTests : DnsResolverTestBase //private string _vnetId ; //private string _subnetId; - public DnsForwardingRulesetTests(bool async) : base(async)//, RecordedTestMode.Record) + public DnsForwardingRulesetTests(bool async) : base(async, RecordedTestMode.Record) { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs index e9b3be0c4698..e92b5aaa472f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs @@ -34,7 +34,9 @@ public async Task CreateDnsResolverDomainListAsync() // ARRANGE var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); await CreateDnsResolverDomainListCollectionAsync(); - var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com.", "contoso.com." }); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation); + dnsResolverDomainListData.Domains.Add("example.com."); + dnsResolverDomainListData.Domains.Add("contoso.com."); // ACT var dnsResolverDomainList = await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); @@ -43,6 +45,23 @@ public async Task CreateDnsResolverDomainListAsync() Assert.AreEqual(dnsResolverDomainList.Value.Data.ProvisioningState, DnsResolverProvisioningState.Succeeded); } + [Test] + [RecordedTest] + public async Task CreateDnsResolverDomainListNoDomainsAsync() + { + // ARRANGE + var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); + await CreateDnsResolverDomainListCollectionAsync(); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation); + + // ACT + var dnsResolverDomainList = await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); + + // ASSERT + Assert.AreEqual(dnsResolverDomainList.Value.Data.ProvisioningState, DnsResolverProvisioningState.Succeeded); + Assert.AreEqual(dnsResolverDomainList.Value.Data.Domains.Count, 0); + } + [Test] [RecordedTest] public async Task GetDnsResolverDomainListAsync() @@ -50,7 +69,9 @@ public async Task GetDnsResolverDomainListAsync() // ARRANGE var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); await CreateDnsResolverDomainListCollectionAsync(); - var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com.", "contoso.com." }); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation); + dnsResolverDomainListData.Domains.Add("example.com."); + dnsResolverDomainListData.Domains.Add("contoso.com."); await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); @@ -70,7 +91,9 @@ public async Task UpdateDnsResolverDomainListAsync() var newTagKey = Recording.GenerateAlphaNumericId("tagKey"); var newTagValue = Recording.GenerateAlphaNumericId("tagValue"); await CreateDnsResolverDomainListCollectionAsync(); - var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com.", "contoso.com." }); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation); + dnsResolverDomainListData.Domains.Add("example.com."); + dnsResolverDomainListData.Domains.Add("contoso.com."); var createdDnsResolverDomainList = await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); @@ -88,7 +111,9 @@ public async Task RemoveDnsResolverDomainListAsync() // ARRANGE var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); await CreateDnsResolverDomainListCollectionAsync(); - var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, new List() { "example.com." , "contoso.com."}); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation); + dnsResolverDomainListData.Domains.Add("example.com."); + dnsResolverDomainListData.Domains.Add("contoso.com."); var dnsResolverDomainList = await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsSecurityRuleTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsSecurityRuleTests.cs index 9d89fce049e3..d4a26e42b289 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsSecurityRuleTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsSecurityRuleTests.cs @@ -45,8 +45,9 @@ private async Task CreateDnsResolverPolicy(string dns private async Task CreateDnsResolverDomainList(string dnsResolverDomainListName) { - var defaultDomains = new List() { "test.com.", "env.com." }; - var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation, defaultDomains); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation); + dnsResolverDomainListData.Domains.Add("test.com."); + dnsResolverDomainListData.Domains.Add("env.com."); return (await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData)).Value; } @@ -58,7 +59,7 @@ public async Task CreateDnsSecurityRule() // ARRANGE var dnsSecurityRuleName = Recording.GenerateAssetName("dnsSecurityRule-"); await CreateDnsResolverCollection(); - var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block }; var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, new List { @@ -83,7 +84,7 @@ public async Task GetDnsSecurityRule() // ARRANGE var dnsSecurityRuleName = Recording.GenerateAssetName("dnsSecurityRule-"); await CreateDnsResolverCollection(); - var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block }; var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, new List { @@ -112,7 +113,7 @@ public async Task UpdateDnsSecurityRule() var newTagKey = Recording.GenerateAlphaNumericId("tagKey"); var newTagValue = Recording.GenerateAlphaNumericId("tagValue"); await CreateDnsResolverCollection(); - var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block }; var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, new List { @@ -142,7 +143,7 @@ public async Task RemoveDnsSecurityRule() // ARRANGE var dnsSecurityRuleName = Recording.GenerateAssetName("dnsSecurityRule-"); await CreateDnsResolverCollection(); - var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block, BlockResponseCode = BlockResponseCode.Servfail }; + var dnsSecurityRuleAction = new DnsSecurityRuleAction() { ActionType = DnsSecurityRuleActionType.Block }; var dnsSecurityRuleData = new DnsSecurityRuleData(this.DefaultLocation, this.DefaultDnsSecurityRulePriority, dnsSecurityRuleAction, new List { diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs index ab85e00b0826..a24c670dd672 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs @@ -20,7 +20,7 @@ public class ForwardingRuleTests : DnsResolverTestBase private ResourceIdentifier _outboundEndpointId; private string _dnsForwardingRulesetName; - public ForwardingRuleTests(bool async) : base(async)//, RecordedTestMode.Record) + public ForwardingRuleTests(bool async) : base(async, RecordedTestMode.Record) { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs index 417d2d213927..3c7616d181d6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs @@ -17,7 +17,7 @@ public class InboundEndpointTests : DnsResolverTestBase { private DnsResolverResource _dnsResolver; - public InboundEndpointTests(bool async) : base(async)//, RecordedTestMode.Record) + public InboundEndpointTests(bool async) : base(async, RecordedTestMode.Record) { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs index 281ea50c180f..1fdf04b72e89 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs @@ -16,7 +16,7 @@ public class OutboundEndpointTests : DnsResolverTestBase { private DnsResolverResource _dnsResolver; - public OutboundEndpointTests(bool async) : base(async)//, RecordedTestMode.Record) + public OutboundEndpointTests(bool async) : base(async, RecordedTestMode.Record) { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs index 990bac173078..1a8937c30e9f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs @@ -19,7 +19,7 @@ public class VirtualNetworkLinkTests : DnsResolverTestBase private ResourceIdentifier _outboundEndpointId; private string _dnsForwardingRulesetName; - public VirtualNetworkLinkTests(bool async) : base(async)//, RecordedTestMode.Record) + public VirtualNetworkLinkTests(bool async) : base(async, RecordedTestMode.Record) { } From d13c93650aa31677a8af0fd80ca4d9342387630c Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 15:06:44 -0700 Subject: [PATCH 02/27] Remove recording mode --- .../tests/Tests/ForwardingRuleTests.cs | 2 +- .../tests/Tests/InboundEndpointTests.cs | 2 +- .../tests/Tests/OutboundEndpointTests.cs | 2 +- .../tests/Tests/VirtualNetworkLinkTests.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs index a24c670dd672..dfa9650f18b8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/ForwardingRuleTests.cs @@ -20,7 +20,7 @@ public class ForwardingRuleTests : DnsResolverTestBase private ResourceIdentifier _outboundEndpointId; private string _dnsForwardingRulesetName; - public ForwardingRuleTests(bool async) : base(async, RecordedTestMode.Record) + public ForwardingRuleTests(bool async) : base(async) //, RecordedTestMode.Record) { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs index 3c7616d181d6..ad67fa5e0f04 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/InboundEndpointTests.cs @@ -17,7 +17,7 @@ public class InboundEndpointTests : DnsResolverTestBase { private DnsResolverResource _dnsResolver; - public InboundEndpointTests(bool async) : base(async, RecordedTestMode.Record) + public InboundEndpointTests(bool async) : base(async) // RecordedTestMode.Record) { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs index 1fdf04b72e89..a5db6693fe4c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/OutboundEndpointTests.cs @@ -16,7 +16,7 @@ public class OutboundEndpointTests : DnsResolverTestBase { private DnsResolverResource _dnsResolver; - public OutboundEndpointTests(bool async) : base(async, RecordedTestMode.Record) + public OutboundEndpointTests(bool async) : base(async) //RecordedTestMode.Record) { } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs index 1a8937c30e9f..5ca9c5cd0f75 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs @@ -19,7 +19,7 @@ public class VirtualNetworkLinkTests : DnsResolverTestBase private ResourceIdentifier _outboundEndpointId; private string _dnsForwardingRulesetName; - public VirtualNetworkLinkTests(bool async) : base(async, RecordedTestMode.Record) + public VirtualNetworkLinkTests(bool async) : base(async) //, RecordedTestMode.Record) { } From 8836066cdc994ad806b0b96ba51edaedcf0072fc Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 15:14:58 -0700 Subject: [PATCH 03/27] Add changes for readme.md --- .../Azure.ResourceManager.DnsResolver/src/autorest.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index 0453b69e8d89..2334f8b555fe 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -4,8 +4,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -# TODO REPLACE WITH PUBLIC LINK -require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/tree/108c4eed0da1236a63ad6c0d18c33fdd14f8e439/specification/dnsresolver/resource-manager/readme.md +# TODO REPLACE WITH PUBLIC LINK ONCE MERGED +require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/blob/7c4c86c168665d76c618d4ce98be83e914537f3d/specification/dnsresolver/resource-manager/readme.md tag: package-2025-01 library-name: dnsresolver namespace: Azure.ResourceManager.DnsResolver From 9af1072e4a5a528e868d61446f9d486786fbc0d3 Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 15:23:01 -0700 Subject: [PATCH 04/27] Changes after removing blockresponsecode --- .../Sample_DnsSecurityRuleCollection.cs | 1 - .../Generated/ArmDnsResolverModelFactory.cs | 6 +-- .../src/Generated/DnsSecurityRuleData.cs | 14 +++++- .../src/Generated/Models/BlockResponseCode.cs | 48 ------------------- .../DnsSecurityRuleAction.Serialization.cs | 17 +------ .../Generated/Models/DnsSecurityRuleAction.cs | 6 +-- .../Generated/Models/DnsSecurityRulePatch.cs | 14 +++++- .../src/autorest.md | 2 +- 8 files changed, 32 insertions(+), 76 deletions(-) delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs index 1c569cf11aa9..845b3e4435db 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs @@ -45,7 +45,6 @@ public async Task CreateOrUpdate_UpsertDNSSecurityRule() DnsSecurityRuleData data = new DnsSecurityRuleData(new AzureLocation("westus2"), 100, new DnsSecurityRuleAction { ActionType = DnsSecurityRuleActionType.Block, - BlockResponseCode = BlockResponseCode.Servfail, }, new WritableSubResource[] { new WritableSubResource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs index 6244efcfd417..75b289ee2122 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs @@ -244,12 +244,12 @@ public static DnsResolverPolicyData DnsResolverPolicyData(ResourceIdentifier id /// The location. /// ETag of the DNS security rule. /// The priority of the DNS security rule. - /// The action to take on DNS requests that match the DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. /// DNS resolver policy domains lists that the DNS security rule applies to. /// The state of DNS security rule. /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. /// A new instance for mocking. - public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, DnsSecurityRuleAction action = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) + public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, DnsSecurityRuleActionType? actionType = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) { tags ??= new Dictionary(); dnsResolverDomainLists ??= new List(); @@ -263,7 +263,7 @@ public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = nu location, etag, priority, - action, + actionType != null ? new DnsSecurityRuleAction(actionType, serializedAdditionalRawData: null) : null, dnsResolverDomainLists?.ToList(), dnsSecurityRuleState, provisioningState, diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs index 12f1d9cbd105..ac53fb3884d1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs @@ -104,7 +104,19 @@ internal DnsSecurityRuleData() /// The priority of the DNS security rule. public int Priority { get; set; } /// The action to take on DNS requests that match the DNS security rule. - public DnsSecurityRuleAction Action { get; set; } + internal DnsSecurityRuleAction Action { get; set; } + /// The type of action to take. + public DnsSecurityRuleActionType? ActionType + { + get => Action is null ? default : Action.ActionType; + set + { + if (Action is null) + Action = new DnsSecurityRuleAction(); + Action.ActionType = value; + } + } + /// DNS resolver policy domains lists that the DNS security rule applies to. public IList DnsResolverDomainLists { get; } /// The state of DNS security rule. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs deleted file mode 100644 index d90e68da243e..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DnsResolver.Models -{ - /// The response code for block actions. - public readonly partial struct BlockResponseCode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BlockResponseCode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServfailValue = "SERVFAIL"; - - /// SERVFAIL. - public static BlockResponseCode Servfail { get; } = new BlockResponseCode(ServfailValue); - /// Determines if two values are the same. - public static bool operator ==(BlockResponseCode left, BlockResponseCode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BlockResponseCode left, BlockResponseCode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator BlockResponseCode(string value) => new BlockResponseCode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BlockResponseCode other && Equals(other); - /// - public bool Equals(BlockResponseCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs index e85287ae9283..e9e4b6d310e7 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs @@ -39,11 +39,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("actionType"u8); writer.WriteStringValue(ActionType.Value.ToString()); } - if (Optional.IsDefined(BlockResponseCode)) - { - writer.WritePropertyName("blockResponseCode"u8); - writer.WriteStringValue(BlockResponseCode.Value.ToString()); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -82,7 +77,6 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme return null; } DnsSecurityRuleActionType? actionType = default; - BlockResponseCode? blockResponseCode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -96,22 +90,13 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme actionType = new DnsSecurityRuleActionType(property.Value.GetString()); continue; } - if (property.NameEquals("blockResponseCode"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - blockResponseCode = new BlockResponseCode(property.Value.GetString()); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DnsSecurityRuleAction(actionType, blockResponseCode, serializedAdditionalRawData); + return new DnsSecurityRuleAction(actionType, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs index 7ed7262c0583..f975419c0e52 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs @@ -52,18 +52,14 @@ public DnsSecurityRuleAction() /// Initializes a new instance of . /// The type of action to take. - /// The response code for block actions. /// Keeps track of any properties unknown to the library. - internal DnsSecurityRuleAction(DnsSecurityRuleActionType? actionType, BlockResponseCode? blockResponseCode, IDictionary serializedAdditionalRawData) + internal DnsSecurityRuleAction(DnsSecurityRuleActionType? actionType, IDictionary serializedAdditionalRawData) { ActionType = actionType; - BlockResponseCode = blockResponseCode; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The type of action to take. public DnsSecurityRuleActionType? ActionType { get; set; } - /// The response code for block actions. - public BlockResponseCode? BlockResponseCode { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs index 14ff31677085..462329a7736a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs @@ -73,7 +73,19 @@ internal DnsSecurityRulePatch(IDictionary tags, DnsSecurityRuleA /// Tags for DNS security rule. public IDictionary Tags { get; } /// The action to take on DNS requests that match the DNS security rule. - public DnsSecurityRuleAction Action { get; set; } + internal DnsSecurityRuleAction Action { get; set; } + /// The type of action to take. + public DnsSecurityRuleActionType? ActionType + { + get => Action is null ? default : Action.ActionType; + set + { + if (Action is null) + Action = new DnsSecurityRuleAction(); + Action.ActionType = value; + } + } + /// DNS resolver policy domains lists that the DNS security rule applies to. public IList DnsResolverDomainLists { get; } /// The state of DNS security rule. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index 2334f8b555fe..cb29bb3d0263 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -5,7 +5,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true # TODO REPLACE WITH PUBLIC LINK ONCE MERGED -require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/blob/7c4c86c168665d76c618d4ce98be83e914537f3d/specification/dnsresolver/resource-manager/readme.md +require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/blob/16c277599f69e854b89e4ca7658eded7507e98f3/specification/dnsresolver/resource-manager/readme.md tag: package-2025-01 library-name: dnsresolver namespace: Azure.ResourceManager.DnsResolver From e58eb3a0959d86b454ead65e0879ebe703543878 Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 16:22:49 -0700 Subject: [PATCH 05/27] Fix forwarding ruleset tests --- sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json | 2 +- .../tests/Tests/VirtualNetworkLinkTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json index 6f3756f3153e..e083fed794e3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/dnsresolver/Azure.ResourceManager.DnsResolver", - "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_7a28818ac1" + "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_ce770c6ced" } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs index 5ca9c5cd0f75..aeee073ab35d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/VirtualNetworkLinkTests.cs @@ -19,7 +19,7 @@ public class VirtualNetworkLinkTests : DnsResolverTestBase private ResourceIdentifier _outboundEndpointId; private string _dnsForwardingRulesetName; - public VirtualNetworkLinkTests(bool async) : base(async) //, RecordedTestMode.Record) + public VirtualNetworkLinkTests(bool async) : base(async) // RecordedTestMode.Record) { } From dcedb690d1057f4b20e65392f3c0be7ab2f446b0 Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 22:25:59 -0700 Subject: [PATCH 06/27] Run build failure commands --- ...zure.ResourceManager.DnsResolver.net8.0.cs | 61 ++++++++++++------- ...ourceManager.DnsResolver.netstandard2.0.cs | 61 ++++++++++++------- 2 files changed, 76 insertions(+), 46 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs index 98470f700bd8..55b5bbf0a94b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs @@ -221,8 +221,9 @@ protected DnsResolverDomainListCollection() { } } public partial class DnsResolverDomainListData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DnsResolverDomainListData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable domains) { } + public DnsResolverDomainListData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IList Domains { get { throw null; } } + public System.Uri DomainsUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } @@ -241,6 +242,8 @@ protected DnsResolverDomainListResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Bulk(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BulkAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -571,7 +574,7 @@ protected DnsSecurityRuleCollection() { } public partial class DnsSecurityRuleData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRuleData(Azure.Core.AzureLocation location, int priority, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action, System.Collections.Generic.IEnumerable dnsResolverDomainLists) { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } @@ -675,31 +678,14 @@ public static partial class ArmDnsResolverModelFactory public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetData DnsForwardingRulesetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable dnsResolverOutboundEndpoints = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverData DnsResolverData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverState? dnsResolverState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, System.Uri domainsUri = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointData DnsResolverInboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyData DnsResolverPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action = null, System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? actionType = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType?), System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.Models.VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier virtualNetworkLinkId = null) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BlockResponseCode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BlockResponseCode(string value) { throw null; } - public static Azure.ResourceManager.DnsResolver.Models.BlockResponseCode Servfail { get { throw null; } } - public bool Equals(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } - public static implicit operator Azure.ResourceManager.DnsResolver.Models.BlockResponseCode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } - public override string ToString() { throw null; } - } public partial class DnsForwardingRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsForwardingRulePatch() { } @@ -754,6 +740,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState left, Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState right) { throw null; } public override string ToString() { throw null; } } + public partial class DnsResolverDomainListBulk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverDomainListBulk(System.Uri storageUri, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction action) { } + public Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Action { get { throw null; } } + public System.Uri StorageUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DnsResolverDomainListBulkAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DnsResolverDomainListBulkAction(string value) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Download { get { throw null; } } + public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Upload { get { throw null; } } + public bool Equals(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } + public static implicit operator Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } + public override string ToString() { throw null; } + } public partial class DnsResolverDomainListPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsResolverDomainListPatch() { } @@ -865,7 +881,6 @@ public partial class DnsSecurityRuleAction : System.ClientModel.Primitives.IJson { public DnsSecurityRuleAction() { } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } - public Azure.ResourceManager.DnsResolver.Models.BlockResponseCode? BlockResponseCode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -895,7 +910,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DnsSecurityRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRulePatch() { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index 98470f700bd8..55b5bbf0a94b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -221,8 +221,9 @@ protected DnsResolverDomainListCollection() { } } public partial class DnsResolverDomainListData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DnsResolverDomainListData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable domains) { } + public DnsResolverDomainListData(Azure.Core.AzureLocation location) { } public System.Collections.Generic.IList Domains { get { throw null; } } + public System.Uri DomainsUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } @@ -241,6 +242,8 @@ protected DnsResolverDomainListResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Bulk(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> BulkAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -571,7 +574,7 @@ protected DnsSecurityRuleCollection() { } public partial class DnsSecurityRuleData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRuleData(Azure.Core.AzureLocation location, int priority, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action, System.Collections.Generic.IEnumerable dnsResolverDomainLists) { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } @@ -675,31 +678,14 @@ public static partial class ArmDnsResolverModelFactory public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetData DnsForwardingRulesetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable dnsResolverOutboundEndpoints = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverData DnsResolverData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverState? dnsResolverState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, System.Uri domainsUri = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointData DnsResolverInboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyData DnsResolverPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action = null, System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? actionType = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType?), System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.Models.VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier virtualNetworkLinkId = null) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BlockResponseCode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BlockResponseCode(string value) { throw null; } - public static Azure.ResourceManager.DnsResolver.Models.BlockResponseCode Servfail { get { throw null; } } - public bool Equals(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } - public static implicit operator Azure.ResourceManager.DnsResolver.Models.BlockResponseCode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } - public override string ToString() { throw null; } - } public partial class DnsForwardingRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsForwardingRulePatch() { } @@ -754,6 +740,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState left, Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState right) { throw null; } public override string ToString() { throw null; } } + public partial class DnsResolverDomainListBulk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DnsResolverDomainListBulk(System.Uri storageUri, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction action) { } + public Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Action { get { throw null; } } + public System.Uri StorageUri { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DnsResolverDomainListBulkAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DnsResolverDomainListBulkAction(string value) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Download { get { throw null; } } + public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Upload { get { throw null; } } + public bool Equals(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } + public static implicit operator Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } + public override string ToString() { throw null; } + } public partial class DnsResolverDomainListPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsResolverDomainListPatch() { } @@ -865,7 +881,6 @@ public partial class DnsSecurityRuleAction : System.ClientModel.Primitives.IJson { public DnsSecurityRuleAction() { } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } - public Azure.ResourceManager.DnsResolver.Models.BlockResponseCode? BlockResponseCode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -895,7 +910,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DnsSecurityRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRulePatch() { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } From e82004e14f53314d17de5c673b9705addd08f3d1 Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 23:02:33 -0700 Subject: [PATCH 07/27] Regenerate after rebase --- .../Generated/Models/DnsResolverDomainListBulk.Serialization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs index 87ee292e0b1a..02e1bb7512f6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs @@ -122,7 +122,7 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO switch (format) { case "J": - return ModelReaderWriter.Write(this, options); + return ModelReaderWriter.Write(this, options, AzureResourceManagerDnsResolverContext.Default); default: throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support writing '{options.Format}' format."); } From ec814f08f26889b264b3db95b5bf31fcac34c70d Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 23:03:37 -0700 Subject: [PATCH 08/27] Make test changes --- sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json | 2 +- .../tests/Tests/DnsForwardingRulesetTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json index e083fed794e3..ae5fbe7dfe9b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/dnsresolver/Azure.ResourceManager.DnsResolver", - "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_ce770c6ced" + "Tag": "net/dnsresolver/Azure.ResourceManager.DnsResolver_79910daa3c" } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs index c86fb068291a..ce5ce5df75af 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsForwardingRulesetTests.cs @@ -19,7 +19,7 @@ public class DnsForwardingRulesetTests : DnsResolverTestBase //private string _vnetId ; //private string _subnetId; - public DnsForwardingRulesetTests(bool async) : base(async, RecordedTestMode.Record) + public DnsForwardingRulesetTests(bool async) : base(async) // RecordedTestMode.Record) { } From cf3eabda2abf5b4849401c2fff10ff1b6e028cab Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 23:42:16 -0700 Subject: [PATCH 09/27] Remove poorly generated file --- ...ample_VirtualNetworkDnsResolverResource.cs | 107 ------------------ .../tests/Tests/DnsResolverDomainListTests.cs | 28 +++++ 2 files changed, 28 insertions(+), 107 deletions(-) delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs deleted file mode 100644 index 8444655507d9..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_VirtualNetworkDnsResolverResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs index e92b5aaa472f..6781349e887f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/tests/Tests/DnsResolverDomainListTests.cs @@ -8,6 +8,7 @@ using Azure.ResourceManager.Resources.Models; using Azure.Core; using Azure.ResourceManager.DnsResolver.Models; +using System; namespace Azure.ResourceManager.DnsResolver.Tests { @@ -62,6 +63,33 @@ public async Task CreateDnsResolverDomainListNoDomainsAsync() Assert.AreEqual(dnsResolverDomainList.Value.Data.Domains.Count, 0); } + [Test] + [RecordedTest] + [Ignore("Requires SAS URL which cannot be added to code")] + public async Task PostDnsResolverDomainListBulkRequestSucceedsAsync() + { + // ARRANGE + var dnsResolverDomainListName = Recording.GenerateAssetName("dnsResolverDomainList-"); + var subscription = await Client.GetSubscriptions().GetAsync(TestEnvironment.SubscriptionId); + var resourceGroup = await CreateResourceGroupAsync(); + _dnsResolverDomainListCollection = resourceGroup.GetDnsResolverDomainLists(); + var dnsResolverDomainListData = new DnsResolverDomainListData(this.DefaultLocation); + + await _dnsResolverDomainListCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, dnsResolverDomainListData); + ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(TestEnvironment.SubscriptionId, resourceGroup.Data.Id, dnsResolverDomainListName); + DnsResolverDomainListResource dnsResolverDomainList = Client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); + + // invoke the operation + var dnsResolverDomainListBulk = new DnsResolverDomainListBulk(new Uri("ADD_STORAGE_URL_HERE"), DnsResolverDomainListBulkAction.Download); + + // ACT + var lro = await dnsResolverDomainList.BulkAsync(WaitUntil.Completed, dnsResolverDomainListBulk); + + // ASSERT + DnsResolverDomainListResource result = lro.Value; + Assert.AreNotEqual(result.Data.DomainsUri, null); + } + [Test] [RecordedTest] public async Task GetDnsResolverDomainListAsync() From 05d03e1526994467e1d644d7054e69f205d3aad6 Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 23:53:11 -0700 Subject: [PATCH 10/27] Add generated logic --- ...ample_VirtualNetworkDnsResolverResource.cs | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs new file mode 100644 index 000000000000..8444655507d9 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_VirtualNetworkDnsResolverResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} From 0ce36e1d9e313125a5a0c68f4ec723f6243ef421 Mon Sep 17 00:00:00 2001 From: James Voong Date: Mon, 12 May 2025 23:58:50 -0700 Subject: [PATCH 11/27] Remove partial vnet usage due to bad generation of code --- ...Sample_ResourceGroupResourceExtensions.cs} | 39 +-- .../Extensions/DnsResolverExtensions.cs | 253 +++++++++++++++-- .../MockableDnsResolverArmClient.cs | 12 - ...ockableDnsResolverResourceGroupResource.cs | 233 ++++++++++++++++ .../VirtualNetworkDnsResolverResource.cs | 260 ------------------ .../src/autorest.md | 3 - 6 files changed, 487 insertions(+), 313 deletions(-) rename sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/{Sample_VirtualNetworkDnsResolverResource.cs => Sample_ResourceGroupResourceExtensions.cs} (67%) delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs similarity index 67% rename from sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs rename to sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 8444655507d9..ea2e53176f29 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -10,12 +10,13 @@ using Azure.Core; using Azure.Identity; using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources; using Azure.ResourceManager.Resources.Models; using NUnit.Framework; namespace Azure.ResourceManager.DnsResolver.Samples { - public partial class Sample_VirtualNetworkDnsResolverResource + public partial class Sample_ResourceGroupResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] @@ -29,16 +30,16 @@ public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + // 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 = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) + string virtualNetworkName = "sampleVirtualNetwork"; + await foreach (WritableSubResource item in resourceGroupResource.GetDnsResolversAsync(virtualNetworkName)) { Console.WriteLine($"Succeeded: {item}"); } @@ -58,16 +59,16 @@ public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNet // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + // 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 = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // invoke the operation and iterate over the result - await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) + string virtualNetworkName = "sampleVirtualNetwork"; + await foreach (VirtualNetworkDnsForwardingRuleset item in resourceGroupResource.GetDnsForwardingRulesetsAsync(virtualNetworkName)) { Console.WriteLine($"Succeeded: {item}"); } @@ -87,16 +88,16 @@ public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPolicies // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + // 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 = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) + string virtualNetworkName = "sampleVirtualNetwork"; + await foreach (WritableSubResource item in resourceGroupResource.GetDnsResolverPoliciesByVirtualNetworkAsync(virtualNetworkName)) { Console.WriteLine($"Succeeded: {item}"); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs index bc5c5ae40b8c..531613f82c05 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs @@ -10,7 +10,9 @@ using System.Threading.Tasks; using Azure.Core; using Azure.ResourceManager.DnsResolver.Mocking; +using Azure.ResourceManager.DnsResolver.Models; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.DnsResolver { @@ -222,25 +224,6 @@ public static DnsResolverDomainListResource GetDnsResolverDomainListResource(thi return GetMockableDnsResolverArmClient(client).GetDnsResolverDomainListResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableDnsResolverArmClient(client).GetVirtualNetworkDnsResolverResource(id); - } - /// /// Gets a collection of DnsResolverResources in the ResourceGroupResource. /// @@ -613,6 +596,238 @@ public static Response GetDnsResolverDomainList(t return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverDomainList(dnsResolverDomainListName, cancellationToken); } + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDnsResolversAsync(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolversAsync(virtualNetworkName, top, cancellationToken); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDnsResolvers(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolvers(virtualNetworkName, top, cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDnsForwardingRulesetsAsync(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsForwardingRulesetsAsync(virtualNetworkName, top, cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDnsForwardingRulesets(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsForwardingRulesets(virtualNetworkName, top, cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the virtual network. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverPoliciesByVirtualNetworkAsync(virtualNetworkName, cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the virtual network. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDnsResolverPoliciesByVirtualNetwork(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverPoliciesByVirtualNetwork(virtualNetworkName, cancellationToken); + } + /// /// Lists DNS resolvers in all resource groups of a subscription. /// diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs index fe7c724bb0fd..d4b177a104a8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs @@ -153,17 +153,5 @@ public virtual DnsResolverDomainListResource GetDnsResolverDomainListResource(Re DnsResolverDomainListResource.ValidateResourceId(id); return new DnsResolverDomainListResource(Client, id); } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(ResourceIdentifier id) - { - VirtualNetworkDnsResolverResource.ValidateResourceId(id); - return new VirtualNetworkDnsResolverResource(Client, id); - } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs index 1def3d6766ce..fd1c7ee36e84 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs @@ -6,15 +6,27 @@ #nullable disable using System; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.DnsResolver.Mocking { /// A class to add extension methods to ResourceGroupResource. public partial class MockableDnsResolverResourceGroupResource : ArmResource { + private ClientDiagnostics _dnsResolverClientDiagnostics; + private DnsResolversRestOperations _dnsResolverRestClient; + private ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; + private DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; + private ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; + /// Initializes a new instance of the class for mocking. protected MockableDnsResolverResourceGroupResource() { @@ -27,6 +39,13 @@ internal MockableDnsResolverResourceGroupResource(ArmClient client, ResourceIden { } + private ClientDiagnostics DnsResolverClientDiagnostics => _dnsResolverClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); + private DnsResolversRestOperations DnsResolverRestClient => _dnsResolverRestClient ??= new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsResolverResource.ResourceType)); + private ClientDiagnostics DnsForwardingRulesetClientDiagnostics => _dnsForwardingRulesetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); + private DnsForwardingRulesetsRestOperations DnsForwardingRulesetRestClient => _dnsForwardingRulesetRestClient ??= new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsForwardingRulesetResource.ResourceType)); + private ClientDiagnostics DnsResolverPolicyClientDiagnostics => _dnsResolverPolicyClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); + private DnsResolverPoliciesRestOperations DnsResolverPolicyRestClient => _dnsResolverPolicyRestClient ??= new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsResolverPolicyResource.ResourceType)); + private string GetApiVersionOrNull(ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); @@ -308,5 +327,219 @@ public virtual Response GetDnsResolverDomainList( { return GetDnsResolverDomainLists().Get(dnsResolverDomainListName, cancellationToken); } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolversAsync(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolvers(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsForwardingRulesetsAsync(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), DnsForwardingRulesetClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the virtual network. + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsForwardingRulesets(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), DnsForwardingRulesetClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the virtual network. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverPolicyClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the virtual network. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(string virtualNetworkName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverPolicyClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs deleted file mode 100644 index d75455ae48f3..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Text.Json; -using System.Threading; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.DnsResolver -{ - /// - /// A class extending from the VirtualNetworkResource in Azure.ResourceManager.DnsResolver along with the instance operations that can be performed on it. - /// You can only construct a from a with a resource type of Microsoft.Network/virtualNetworks. - /// - public partial class VirtualNetworkDnsResolverResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The virtualNetworkName. - internal static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dnsResolverClientDiagnostics; - private readonly DnsResolversRestOperations _dnsResolverRestClient; - private readonly ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; - private readonly DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; - private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; - private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; - - /// Initializes a new instance of the class for mocking. - protected VirtualNetworkDnsResolverResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal VirtualNetworkDnsResolverResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dnsResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsResolverResource.ResourceType, out string dnsResolverApiVersion); - _dnsResolverRestClient = new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverApiVersion); - _dnsForwardingRulesetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsForwardingRulesetResource.ResourceType, out string dnsForwardingRulesetApiVersion); - _dnsForwardingRulesetRestClient = new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsForwardingRulesetApiVersion); - _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); - _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Network/virtualNetworks"; - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolversAsync(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolvers(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsForwardingRulesetsAsync(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsForwardingRulesets(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index cb29bb3d0263..fe3b5bb7ad53 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -20,9 +20,6 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true -partial-resources: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}: VirtualNetwork - override-operation-name: DnsResolvers_ListByVirtualNetwork: GetDnsResolvers DnsForwardingRulesets_ListByVirtualNetwork: GetDnsForwardingRulesets From 8b023145c304795bea540cf841c5dbe5d90f09ab Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 13 May 2025 00:15:26 -0700 Subject: [PATCH 12/27] Re-generate --- ...zure.ResourceManager.DnsResolver.net8.0.cs | 25 +++++++++---------- ...ourceManager.DnsResolver.netstandard2.0.cs | 25 +++++++++---------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs index 55b5bbf0a94b..b7b708a0bf08 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs @@ -268,7 +268,9 @@ public static partial class DnsResolverExtensions public static System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetResource GetDnsForwardingRulesetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRulesetVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDnsResolver(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -284,16 +286,19 @@ public static partial class DnsResolverExtensions public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetDnsResolverPolicies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolverPoliciesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDnsResolverPolicy(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyResource GetDnsResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class DnsResolverInboundEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -612,17 +617,6 @@ protected DnsSecurityRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected VirtualNetworkDnsResolverResource() { } - public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetDnsResolvers(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolversAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } } namespace Azure.ResourceManager.DnsResolver.Mocking { @@ -639,7 +633,6 @@ protected MockableDnsResolverArmClient() { } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDnsResolverResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -647,15 +640,21 @@ protected MockableDnsResolverResourceGroupResource() { } public virtual Azure.Response GetDnsForwardingRuleset(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets() { throw null; } + public virtual Azure.Pageable GetDnsForwardingRulesets(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolver(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverAsync(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverDomainList(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverDomainListAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverDomainListCollection GetDnsResolverDomainLists() { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies() { throw null; } + public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverPolicy(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers() { throw null; } + public virtual Azure.Pageable GetDnsResolvers(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolversAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableDnsResolverSubscriptionResource : Azure.ResourceManager.ArmResource { diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index 55b5bbf0a94b..b7b708a0bf08 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -268,7 +268,9 @@ public static partial class DnsResolverExtensions public static System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetResource GetDnsForwardingRulesetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRulesetVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDnsResolver(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -284,16 +286,19 @@ public static partial class DnsResolverExtensions public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetDnsResolverPolicies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolverPoliciesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDnsResolverPolicy(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyResource GetDnsResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class DnsResolverInboundEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -612,17 +617,6 @@ protected DnsSecurityRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected VirtualNetworkDnsResolverResource() { } - public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetDnsResolvers(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolversAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } } namespace Azure.ResourceManager.DnsResolver.Mocking { @@ -639,7 +633,6 @@ protected MockableDnsResolverArmClient() { } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDnsResolverResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -647,15 +640,21 @@ protected MockableDnsResolverResourceGroupResource() { } public virtual Azure.Response GetDnsForwardingRuleset(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets() { throw null; } + public virtual Azure.Pageable GetDnsForwardingRulesets(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolver(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverAsync(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverDomainList(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverDomainListAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverDomainListCollection GetDnsResolverDomainLists() { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies() { throw null; } + public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverPolicy(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers() { throw null; } + public virtual Azure.Pageable GetDnsResolvers(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolversAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableDnsResolverSubscriptionResource : Azure.ResourceManager.ArmResource { From 4e4264b3e65df7ab243380fda4ce3aff3fca620a Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 13 May 2025 00:39:12 -0700 Subject: [PATCH 13/27] Revert back partial-resources --- ...zure.ResourceManager.DnsResolver.net8.0.cs | 25 +- ...ourceManager.DnsResolver.netstandard2.0.cs | 25 +- ...ample_VirtualNetworkDnsResolverResource.cs | 107 +++++++ .../Extensions/DnsResolverExtensions.cs | 253 ++--------------- .../MockableDnsResolverArmClient.cs | 12 + ...ockableDnsResolverResourceGroupResource.cs | 233 ---------------- .../VirtualNetworkDnsResolverResource.cs | 260 ++++++++++++++++++ .../src/autorest.md | 3 + 8 files changed, 427 insertions(+), 491 deletions(-) create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs index b7b708a0bf08..55b5bbf0a94b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs @@ -268,9 +268,7 @@ public static partial class DnsResolverExtensions public static System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetResource GetDnsForwardingRulesetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRulesetVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDnsResolver(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -286,19 +284,16 @@ public static partial class DnsResolverExtensions public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetDnsResolverPolicies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolverPoliciesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDnsResolverPolicy(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyResource GetDnsResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class DnsResolverInboundEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -617,6 +612,17 @@ protected DnsSecurityRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected VirtualNetworkDnsResolverResource() { } + public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDnsResolvers(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolversAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.DnsResolver.Mocking { @@ -633,6 +639,7 @@ protected MockableDnsResolverArmClient() { } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDnsResolverResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -640,21 +647,15 @@ protected MockableDnsResolverResourceGroupResource() { } public virtual Azure.Response GetDnsForwardingRuleset(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets() { throw null; } - public virtual Azure.Pageable GetDnsForwardingRulesets(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolver(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverAsync(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverDomainList(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverDomainListAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverDomainListCollection GetDnsResolverDomainLists() { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies() { throw null; } - public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverPolicy(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers() { throw null; } - public virtual Azure.Pageable GetDnsResolvers(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolversAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableDnsResolverSubscriptionResource : Azure.ResourceManager.ArmResource { diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index b7b708a0bf08..55b5bbf0a94b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -268,9 +268,7 @@ public static partial class DnsResolverExtensions public static System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetResource GetDnsForwardingRulesetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsForwardingRulesets(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsForwardingRulesetsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkResource GetDnsForwardingRulesetVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetDnsResolver(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -286,19 +284,16 @@ public static partial class DnsResolverExtensions public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetDnsResolverPolicies(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolverPoliciesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetDnsResolverPolicy(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyResource GetDnsResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetDnsResolvers(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDnsResolversAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class DnsResolverInboundEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -617,6 +612,17 @@ protected DnsSecurityRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRulePatch patch, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected VirtualNetworkDnsResolverResource() { } + public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDnsResolvers(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDnsResolversAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.DnsResolver.Mocking { @@ -633,6 +639,7 @@ protected MockableDnsResolverArmClient() { } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkResource GetDnsResolverPolicyVirtualNetworkLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverResource GetDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsSecurityRuleResource GetDnsSecurityRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.DnsResolver.VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableDnsResolverResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -640,21 +647,15 @@ protected MockableDnsResolverResourceGroupResource() { } public virtual Azure.Response GetDnsForwardingRuleset(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsForwardingRulesetAsync(string rulesetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsForwardingRulesetCollection GetDnsForwardingRulesets() { throw null; } - public virtual Azure.Pageable GetDnsForwardingRulesets(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolver(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverAsync(string dnsResolverName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverDomainList(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverDomainListAsync(string dnsResolverDomainListName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverDomainListCollection GetDnsResolverDomainLists() { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverPolicyCollection GetDnsResolverPolicies() { throw null; } - public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(string virtualNetworkName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDnsResolverPolicy(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDnsResolverPolicyAsync(string dnsResolverPolicyName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.DnsResolver.DnsResolverCollection GetDnsResolvers() { throw null; } - public virtual Azure.Pageable GetDnsResolvers(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetDnsResolversAsync(string virtualNetworkName, int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class MockableDnsResolverSubscriptionResource : Azure.ResourceManager.ArmResource { diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs new file mode 100644 index 000000000000..8444655507d9 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_VirtualNetworkDnsResolverResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs index 531613f82c05..bc5c5ae40b8c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs @@ -10,9 +10,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.ResourceManager.DnsResolver.Mocking; -using Azure.ResourceManager.DnsResolver.Models; using Azure.ResourceManager.Resources; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.DnsResolver { @@ -224,6 +222,25 @@ public static DnsResolverDomainListResource GetDnsResolverDomainListResource(thi return GetMockableDnsResolverArmClient(client).GetDnsResolverDomainListResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableDnsResolverArmClient(client).GetVirtualNetworkDnsResolverResource(id); + } + /// /// Gets a collection of DnsResolverResources in the ResourceGroupResource. /// @@ -596,238 +613,6 @@ public static Response GetDnsResolverDomainList(t return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverDomainList(dnsResolverDomainListName, cancellationToken); } - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDnsResolversAsync(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolversAsync(virtualNetworkName, top, cancellationToken); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDnsResolvers(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolvers(virtualNetworkName, top, cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDnsForwardingRulesetsAsync(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsForwardingRulesetsAsync(virtualNetworkName, top, cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDnsForwardingRulesets(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsForwardingRulesets(virtualNetworkName, top, cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the virtual network. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverPoliciesByVirtualNetworkAsync(virtualNetworkName, cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the virtual network. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDnsResolverPoliciesByVirtualNetwork(this ResourceGroupResource resourceGroupResource, string virtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableDnsResolverResourceGroupResource(resourceGroupResource).GetDnsResolverPoliciesByVirtualNetwork(virtualNetworkName, cancellationToken); - } - /// /// Lists DNS resolvers in all resource groups of a subscription. /// diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs index d4b177a104a8..fe7c724bb0fd 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs @@ -153,5 +153,17 @@ public virtual DnsResolverDomainListResource GetDnsResolverDomainListResource(Re DnsResolverDomainListResource.ValidateResourceId(id); return new DnsResolverDomainListResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual VirtualNetworkDnsResolverResource GetVirtualNetworkDnsResolverResource(ResourceIdentifier id) + { + VirtualNetworkDnsResolverResource.ValidateResourceId(id); + return new VirtualNetworkDnsResolverResource(Client, id); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs index fd1c7ee36e84..1def3d6766ce 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs @@ -6,27 +6,15 @@ #nullable disable using System; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.DnsResolver.Mocking { /// A class to add extension methods to ResourceGroupResource. public partial class MockableDnsResolverResourceGroupResource : ArmResource { - private ClientDiagnostics _dnsResolverClientDiagnostics; - private DnsResolversRestOperations _dnsResolverRestClient; - private ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; - private DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; - private ClientDiagnostics _dnsResolverPolicyClientDiagnostics; - private DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; - /// Initializes a new instance of the class for mocking. protected MockableDnsResolverResourceGroupResource() { @@ -39,13 +27,6 @@ internal MockableDnsResolverResourceGroupResource(ArmClient client, ResourceIden { } - private ClientDiagnostics DnsResolverClientDiagnostics => _dnsResolverClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); - private DnsResolversRestOperations DnsResolverRestClient => _dnsResolverRestClient ??= new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsResolverResource.ResourceType)); - private ClientDiagnostics DnsForwardingRulesetClientDiagnostics => _dnsForwardingRulesetClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); - private DnsForwardingRulesetsRestOperations DnsForwardingRulesetRestClient => _dnsForwardingRulesetRestClient ??= new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsForwardingRulesetResource.ResourceType)); - private ClientDiagnostics DnsResolverPolicyClientDiagnostics => _dnsResolverPolicyClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); - private DnsResolverPoliciesRestOperations DnsResolverPolicyRestClient => _dnsResolverPolicyRestClient ??= new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(DnsResolverPolicyResource.ResourceType)); - private string GetApiVersionOrNull(ResourceType resourceType) { TryGetApiVersion(resourceType, out string apiVersion); @@ -327,219 +308,5 @@ public virtual Response GetDnsResolverDomainList( { return GetDnsResolverDomainLists().Get(dnsResolverDomainListName, cancellationToken); } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolversAsync(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolvers(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsForwardingRulesetsAsync(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), DnsForwardingRulesetClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the virtual network. - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsForwardingRulesets(string virtualNetworkName, int? top = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), DnsForwardingRulesetClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the virtual network. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(string virtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverPolicyClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The name of the virtual network. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(string virtualNetworkName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(virtualNetworkName, nameof(virtualNetworkName)); - - HttpMessage FirstPageRequest(int? pageSizeHint) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => DnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, virtualNetworkName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), DnsResolverPolicyClientDiagnostics, Pipeline, "MockableDnsResolverResourceGroupResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs new file mode 100644 index 000000000000..d75455ae48f3 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Text.Json; +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class extending from the VirtualNetworkResource in Azure.ResourceManager.DnsResolver along with the instance operations that can be performed on it. + /// You can only construct a from a with a resource type of Microsoft.Network/virtualNetworks. + /// + public partial class VirtualNetworkDnsResolverResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The virtualNetworkName. + internal static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dnsResolverClientDiagnostics; + private readonly DnsResolversRestOperations _dnsResolverRestClient; + private readonly ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; + private readonly DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; + private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected VirtualNetworkDnsResolverResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal VirtualNetworkDnsResolverResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverResource.ResourceType, out string dnsResolverApiVersion); + _dnsResolverRestClient = new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverApiVersion); + _dnsForwardingRulesetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsForwardingRulesetResource.ResourceType, out string dnsForwardingRulesetApiVersion); + _dnsForwardingRulesetRestClient = new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsForwardingRulesetApiVersion); + _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); + _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Network/virtualNetworks"; + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolversAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolvers(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsForwardingRulesetsAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsForwardingRulesets(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index fe3b5bb7ad53..cb29bb3d0263 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -20,6 +20,9 @@ modelerfour: flatten-payloads: false use-model-reader-writer: true +partial-resources: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}: VirtualNetwork + override-operation-name: DnsResolvers_ListByVirtualNetwork: GetDnsResolvers DnsForwardingRulesets_ListByVirtualNetwork: GetDnsForwardingRulesets From daf0053ce2355cc51c1c49048ee5eca6688bc075 Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 13 May 2025 08:52:16 -0700 Subject: [PATCH 14/27] Add comment and remove previous gen sample --- .../CHANGELOG.md | 2 +- .../Sample_ResourceGroupResourceExtensions.cs | 108 ------------------ .../src/autorest.md | 1 - 3 files changed, 1 insertion(+), 110 deletions(-) delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index 5fa42e0e4efa..588dfcb89286 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -3,11 +3,11 @@ ## 1.2.0 (2025-05-01) ### Features Added -- TODO change below link - Upgraded api-version tag from 'package-preview-2023-07' to 'package-2025-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md. - Adds new POST bulk API for large domain list usage. ### Breaking Changes +- BlockResponseCode has been removed from the DnsSecurityRule Action type and can no longer be specified. ### Bugs Fixed diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs deleted file mode 100644 index ea2e53176f29..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_ResourceGroupResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // invoke the operation and iterate over the result - string virtualNetworkName = "sampleVirtualNetwork"; - await foreach (WritableSubResource item in resourceGroupResource.GetDnsResolversAsync(virtualNetworkName)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // invoke the operation and iterate over the result - string virtualNetworkName = "sampleVirtualNetwork"; - await foreach (VirtualNetworkDnsForwardingRuleset item in resourceGroupResource.GetDnsForwardingRulesetsAsync(virtualNetworkName)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // invoke the operation and iterate over the result - string virtualNetworkName = "sampleVirtualNetwork"; - await foreach (WritableSubResource item in resourceGroupResource.GetDnsResolverPoliciesByVirtualNetworkAsync(virtualNetworkName)) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index cb29bb3d0263..7ba5e48efe80 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -4,7 +4,6 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -# TODO REPLACE WITH PUBLIC LINK ONCE MERGED require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/blob/16c277599f69e854b89e4ca7658eded7507e98f3/specification/dnsresolver/resource-manager/readme.md tag: package-2025-01 library-name: dnsresolver From 94fd9abc57f326e7b05dc375b41e47ee6934ec7c Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 13 May 2025 09:14:08 -0700 Subject: [PATCH 15/27] Update sdk version --- .../src/Azure.ResourceManager.DnsResolver.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj index c267fe1a50bc..053aee5fcc24 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj @@ -1,6 +1,6 @@ - 1.2.0-beta.2 + 1.2.0 1.1.0 Azure.ResourceManager.DnsResolver From efc95595eb8cf6f311d66007a2678e4c30a7f940 Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 13 May 2025 10:51:09 -0700 Subject: [PATCH 16/27] Fix issues with readme --- .../CHANGELOG.md | 6 +- ...ample_VirtualNetworkDnsResolverResource.cs | 107 ------------------ 2 files changed, 1 insertion(+), 112 deletions(-) delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index 588dfcb89286..795409b50f75 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0 (2025-05-01) +## 1.2.0 (2025-06-10) ### Features Added - Upgraded api-version tag from 'package-preview-2023-07' to 'package-2025-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md. @@ -9,10 +9,6 @@ ### Breaking Changes - BlockResponseCode has been removed from the DnsSecurityRule Action type and can no longer be specified. -### Bugs Fixed - -### Other Changes - ## 1.2.0-beta.2 (Unreleased) ### Features Added diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs deleted file mode 100644 index 8444655507d9..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_VirtualNetworkDnsResolverResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - } -} From fee58d7459c73a08cb128b863581239ff54a9691 Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 13 May 2025 11:49:03 -0700 Subject: [PATCH 17/27] Add version change --- sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md | 2 +- .../src/Azure.ResourceManager.DnsResolver.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index 795409b50f75..417c2b4b9f99 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0 (2025-06-10) +## 2.0.0 (2025-06-10) ### Features Added - Upgraded api-version tag from 'package-preview-2023-07' to 'package-2025-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj index 053aee5fcc24..621d5a65fff8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj @@ -1,6 +1,6 @@ - 1.2.0 + 2.0.0 1.1.0 Azure.ResourceManager.DnsResolver From 6b006377fc5c0151a249db2bc92fae425aeb8c70 Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 13 May 2025 14:44:42 -0700 Subject: [PATCH 18/27] Re-do readme --- .../Azure.ResourceManager.DnsResolver/CHANGELOG.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index 417c2b4b9f99..c8d340ecf4d1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.0.0 (2025-06-10) +## 2.0.0 (2025-06-06) ### Features Added - Upgraded api-version tag from 'package-preview-2023-07' to 'package-2025-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md. @@ -9,16 +9,6 @@ ### Breaking Changes - BlockResponseCode has been removed from the DnsSecurityRule Action type and can no longer be specified. -## 1.2.0-beta.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - ## 1.2.0-beta.1 (2024-10-24) ### Features Added From df1628ece197c081551b4a6b2b0ad1f5f9cc3037 Mon Sep 17 00:00:00 2001 From: James Voong Date: Wed, 14 May 2025 14:03:12 -0700 Subject: [PATCH 19/27] Move vnetresource to customized --- ...zure.ResourceManager.DnsResolver.net8.0.cs | 1 + ...ourceManager.DnsResolver.netstandard2.0.cs | 1 + ...ample_VirtualNetworkDnsResolverResource.cs | 107 +++++++ .../VirtualNetworkDnsResolverResource.cs | 260 ++++++++++++++++++ .../Extensions/DnsResolverExtensions.cs | 2 +- .../MockableDnsResolverArmClient.cs | 2 +- .../VirtualNetworkDnsResolverResource.cs | 233 ---------------- 7 files changed, 371 insertions(+), 235 deletions(-) create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs index 55b5bbf0a94b..1593cae2a6c4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs @@ -616,6 +616,7 @@ public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.A { public static readonly Azure.Core.ResourceType ResourceType; protected VirtualNetworkDnsResolverResource() { } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) { throw null; } public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index 55b5bbf0a94b..1593cae2a6c4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -616,6 +616,7 @@ public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.A { public static readonly Azure.Core.ResourceType ResourceType; protected VirtualNetworkDnsResolverResource() { } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) { throw null; } public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs new file mode 100644 index 000000000000..8444655507d9 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.DnsResolver.Samples +{ + public partial class Sample_VirtualNetworkDnsResolverResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() + { + // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json + // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure + // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource + string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; + string resourceGroupName = "sampleResourceGroup"; + string virtualNetworkName = "sampleVirtualNetwork"; + ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); + VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); + + // invoke the operation and iterate over the result + await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs new file mode 100644 index 000000000000..1aefeca77a50 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Text.Json; +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.DnsResolver.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.DnsResolver +{ + /// + /// A class extending from the VirtualNetworkResource in Azure.ResourceManager.DnsResolver along with the instance operations that can be performed on it. + /// You can only construct a from a with a resource type of Microsoft.Network/virtualNetworks. + /// + public partial class VirtualNetworkDnsResolverResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The virtualNetworkName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dnsResolverClientDiagnostics; + private readonly DnsResolversRestOperations _dnsResolverRestClient; + private readonly ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; + private readonly DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; + private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected VirtualNetworkDnsResolverResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal VirtualNetworkDnsResolverResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverResource.ResourceType, out string dnsResolverApiVersion); + _dnsResolverRestClient = new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverApiVersion); + _dnsForwardingRulesetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsForwardingRulesetResource.ResourceType, out string dnsForwardingRulesetApiVersion); + _dnsForwardingRulesetRestClient = new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsForwardingRulesetApiVersion); + _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); + _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Network/virtualNetworks"; + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolversAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolvers(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsForwardingRulesetsAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsForwardingRulesets(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs index bc5c5ae40b8c..d9568447f6fe 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs @@ -224,7 +224,7 @@ public static DnsResolverDomainListResource GetDnsResolverDomainListResource(thi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs index fe7c724bb0fd..940f12487c41 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs @@ -156,7 +156,7 @@ public virtual DnsResolverDomainListResource GetDnsResolverDomainListResource(Re /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs index d75455ae48f3..d9b49d754d32 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs @@ -23,238 +23,5 @@ namespace Azure.ResourceManager.DnsResolver /// public partial class VirtualNetworkDnsResolverResource : ArmResource { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The virtualNetworkName. - internal static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dnsResolverClientDiagnostics; - private readonly DnsResolversRestOperations _dnsResolverRestClient; - private readonly ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; - private readonly DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; - private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; - private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; - - /// Initializes a new instance of the class for mocking. - protected VirtualNetworkDnsResolverResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal VirtualNetworkDnsResolverResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dnsResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsResolverResource.ResourceType, out string dnsResolverApiVersion); - _dnsResolverRestClient = new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverApiVersion); - _dnsForwardingRulesetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsForwardingRulesetResource.ResourceType, out string dnsForwardingRulesetApiVersion); - _dnsForwardingRulesetRestClient = new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsForwardingRulesetApiVersion); - _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); - _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Network/virtualNetworks"; - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolversAsync(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolvers(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsForwardingRulesetsAsync(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsForwardingRulesets(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } } } From c5f39e4a154f8408049766b45f01839022819852 Mon Sep 17 00:00:00 2001 From: James Voong Date: Wed, 14 May 2025 14:39:40 -0700 Subject: [PATCH 20/27] Add code owners back for dnsresolver --- .github/CODEOWNERS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ea7cc9035abc..04c1c54afe71 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -753,6 +753,12 @@ # ServiceLabel: %Notification Hub # ServiceOwners: @tjsomasundaram +# PRLabel: %Network - DNS Private Resolver +/sdk/dnsresolver/ @jamesvoong @jotrivet + +# ServiceLabel: %Network - DNS Private Resolver +# ServiceOwners: @jamesvoong @jotrivet + # PRLabel: %OpenAI /sdk/openai/ @jpalvarezl @trrwilson @joseharriaga @m-nash @ralph-msft From 8a89880b96010c012049f25c24b20431b01cb101 Mon Sep 17 00:00:00 2001 From: jamesvoongms <104241521+jamesvoongms@users.noreply.github.com> Date: Wed, 14 May 2025 14:48:47 -0700 Subject: [PATCH 21/27] Update .github/CODEOWNERS Moving down the dnsresolver sections Co-authored-by: Jesse Squire --- .github/CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 04c1c54afe71..b9a0821712de 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -754,10 +754,10 @@ # ServiceOwners: @tjsomasundaram # PRLabel: %Network - DNS Private Resolver -/sdk/dnsresolver/ @jamesvoong @jotrivet +/sdk/dnsresolver/Azure.ResourceManager.*/ @jamesvoongms @jotrivet -# ServiceLabel: %Network - DNS Private Resolver -# ServiceOwners: @jamesvoong @jotrivet +# ServiceLabel: %Network - DNS Private Resolver %Mgmt +# ServiceOwners: @jamesvoongms @jotrivet # PRLabel: %OpenAI /sdk/openai/ @jpalvarezl @trrwilson @joseharriaga @m-nash @ralph-msft From c0617f110bc189b60cd2300940e3b57c25ceddd8 Mon Sep 17 00:00:00 2001 From: James Voong Date: Wed, 14 May 2025 14:52:54 -0700 Subject: [PATCH 22/27] Move codeowner changes down to proper ordering --- .github/CODEOWNERS | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b9a0821712de..a118847893d4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -753,12 +753,6 @@ # ServiceLabel: %Notification Hub # ServiceOwners: @tjsomasundaram -# PRLabel: %Network - DNS Private Resolver -/sdk/dnsresolver/Azure.ResourceManager.*/ @jamesvoongms @jotrivet - -# ServiceLabel: %Network - DNS Private Resolver %Mgmt -# ServiceOwners: @jamesvoongms @jotrivet - # PRLabel: %OpenAI /sdk/openai/ @jpalvarezl @trrwilson @joseharriaga @m-nash @ralph-msft @@ -1058,6 +1052,12 @@ # PRLabel: %Network - CDN /sdk/cdn/Azure.ResourceManager.*/ @ArcturusZhang @ArthurMa1978 +# PRLabel: %Network - DNS Private Resolver +/sdk/dnsresolver/Azure.ResourceManager.*/ @jamesvoongms @jotrivet + +# ServiceLabel: %Network - DNS Private Resolver %Mgmt +# ServiceOwners: @jamesvoongms @jotrivet + # PRLabel: %Network - Front Door /sdk/frontdoor/Azure.ResourceManager.*/ @ArcturusZhang @ArthurMa1978 From d957a5353b0c4288321910d2543cfc84fb3e5ec1 Mon Sep 17 00:00:00 2001 From: James Voong Date: Thu, 15 May 2025 22:16:44 -0700 Subject: [PATCH 23/27] Revert to version 1.2 and remove sample generation due to bug --- .../CHANGELOG.md | 2 +- .../Sample_DnsForwardingRuleCollection.cs | 215 ----------- .../Sample_DnsForwardingRuleResource.cs | 116 ------ .../Sample_DnsForwardingRulesetCollection.cs | 209 ----------- .../Sample_DnsForwardingRulesetResource.cs | 113 ------ ...dingRulesetVirtualNetworkLinkCollection.cs | 206 ----------- ...ardingRulesetVirtualNetworkLinkResource.cs | 116 ------ .../Samples/Sample_DnsResolverCollection.cs | 202 ----------- .../Sample_DnsResolverDomainListCollection.cs | 343 ------------------ .../Sample_DnsResolverDomainListResource.cs | 208 ----------- ...le_DnsResolverInboundEndpointCollection.cs | 213 ----------- ...mple_DnsResolverInboundEndpointResource.cs | 116 ------ ...e_DnsResolverOutboundEndpointCollection.cs | 206 ----------- ...ple_DnsResolverOutboundEndpointResource.cs | 116 ------ .../Sample_DnsResolverPolicyCollection.cs | 198 ---------- .../Sample_DnsResolverPolicyResource.cs | 113 ------ ...olverPolicyVirtualNetworkLinkCollection.cs | 206 ----------- ...esolverPolicyVirtualNetworkLinkResource.cs | 116 ------ .../Samples/Sample_DnsResolverResource.cs | 113 ------ .../Sample_DnsSecurityRuleCollection.cs | 214 ----------- .../Samples/Sample_DnsSecurityRuleResource.cs | 117 ------ .../Sample_SubscriptionResourceExtensions.cs | 143 -------- ...ample_VirtualNetworkDnsResolverResource.cs | 107 ------ .../Azure.ResourceManager.DnsResolver.csproj | 2 +- .../src/autorest.md | 2 +- 25 files changed, 3 insertions(+), 3709 deletions(-) delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md index c8d340ecf4d1..a99952880045 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 2.0.0 (2025-06-06) +## 1.2.0 (2025-06-06) ### Features Added - Upgraded api-version tag from 'package-preview-2023-07' to 'package-2025-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/b26a190235f162b15d77dad889d104d06871fb4f/specification/dnsresolver/resource-manager/readme.md. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs deleted file mode 100644 index 72fe3d12d4e2..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleCollection.cs +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Net; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsForwardingRuleCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertForwardingRuleInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Put.json - // this example is just showing the usage of "ForwardingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRuleResource - DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); - - // invoke the operation - string forwardingRuleName = "sampleForwardingRule"; - DnsForwardingRuleData data = new DnsForwardingRuleData("contoso.com.", new TargetDnsServer[] - { -new TargetDnsServer(IPAddress.Parse("10.0.0.1")) -{ -Port = 53, -}, -new TargetDnsServer(IPAddress.Parse("10.0.0.2")) -{ -Port = 53, -} - }) - { - Metadata = -{ -["additionalProp1"] = "value1" -}, - DnsForwardingRuleState = DnsForwardingRuleState.Enabled, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, forwardingRuleName, data); - DnsForwardingRuleResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveForwardingRuleInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json - // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRuleResource - DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); - - // invoke the operation - string forwardingRuleName = "sampleForwardingRule"; - DnsForwardingRuleResource result = await collection.GetAsync(forwardingRuleName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListForwardingRulesInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_List.json - // this example is just showing the usage of "ForwardingRules_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRuleResource - DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); - - // invoke the operation and iterate over the result - await foreach (DnsForwardingRuleResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRuleData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveForwardingRuleInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json - // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRuleResource - DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); - - // invoke the operation - string forwardingRuleName = "sampleForwardingRule"; - bool result = await collection.ExistsAsync(forwardingRuleName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveForwardingRuleInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json - // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRuleResource - DnsForwardingRuleCollection collection = dnsForwardingRuleset.GetDnsForwardingRules(); - - // invoke the operation - string forwardingRuleName = "sampleForwardingRule"; - NullableResponse response = await collection.GetIfExistsAsync(forwardingRuleName); - DnsForwardingRuleResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs deleted file mode 100644 index fdec1a224d92..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRuleResource.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsForwardingRuleResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveForwardingRuleInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Get.json - // this example is just showing the usage of "ForwardingRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRuleResource created on azure - // for more information of creating DnsForwardingRuleResource, please refer to the document of DnsForwardingRuleResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - string forwardingRuleName = "sampleForwardingRule"; - ResourceIdentifier dnsForwardingRuleResourceId = DnsForwardingRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, forwardingRuleName); - DnsForwardingRuleResource dnsForwardingRule = client.GetDnsForwardingRuleResource(dnsForwardingRuleResourceId); - - // invoke the operation - DnsForwardingRuleResource result = await dnsForwardingRule.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteForwardingRuleInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Delete.json - // this example is just showing the usage of "ForwardingRules_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRuleResource created on azure - // for more information of creating DnsForwardingRuleResource, please refer to the document of DnsForwardingRuleResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - string forwardingRuleName = "sampleForwardingRule"; - ResourceIdentifier dnsForwardingRuleResourceId = DnsForwardingRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, forwardingRuleName); - DnsForwardingRuleResource dnsForwardingRule = client.GetDnsForwardingRuleResource(dnsForwardingRuleResourceId); - - // invoke the operation - await dnsForwardingRule.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateForwardingRuleInADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/ForwardingRule_Patch.json - // this example is just showing the usage of "ForwardingRules_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRuleResource created on azure - // for more information of creating DnsForwardingRuleResource, please refer to the document of DnsForwardingRuleResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - string forwardingRuleName = "sampleForwardingRule"; - ResourceIdentifier dnsForwardingRuleResourceId = DnsForwardingRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, forwardingRuleName); - DnsForwardingRuleResource dnsForwardingRule = client.GetDnsForwardingRuleResource(dnsForwardingRuleResourceId); - - // invoke the operation - DnsForwardingRulePatch patch = new DnsForwardingRulePatch - { - Metadata = -{ -["additionalProp2"] = "value2" -}, - DnsForwardingRuleState = DnsForwardingRuleState.Disabled, - }; - DnsForwardingRuleResource result = await dnsForwardingRule.UpdateAsync(patch); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs deleted file mode 100644 index 3fbdbe0c2b26..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetCollection.cs +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsForwardingRulesetCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertDNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Put.json - // this example is just showing the usage of "DnsForwardingRulesets_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsForwardingRulesetResource - DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); - - // invoke the operation - string rulesetName = "samplednsForwardingRuleset"; - DnsForwardingRulesetData data = new DnsForwardingRulesetData(new AzureLocation("westus2"), new WritableSubResource[] - { -new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"), -}, -new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"), -} - }) - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, rulesetName, data); - DnsForwardingRulesetResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json - // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsForwardingRulesetResource - DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); - - // invoke the operation - string rulesetName = "sampleDnsForwardingRuleset"; - DnsForwardingRulesetResource result = await collection.GetAsync(rulesetName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListDNSForwardingRulesetsByResourceGroup() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByResourceGroup.json - // this example is just showing the usage of "DnsForwardingRulesets_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsForwardingRulesetResource - DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); - - // invoke the operation and iterate over the result - await foreach (DnsForwardingRulesetResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveDNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json - // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsForwardingRulesetResource - DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); - - // invoke the operation - string rulesetName = "sampleDnsForwardingRuleset"; - bool result = await collection.ExistsAsync(rulesetName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveDNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json - // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsForwardingRulesetResource - DnsForwardingRulesetCollection collection = resourceGroupResource.GetDnsForwardingRulesets(); - - // invoke the operation - string rulesetName = "sampleDnsForwardingRuleset"; - NullableResponse response = await collection.GetIfExistsAsync(rulesetName); - DnsForwardingRulesetResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs deleted file mode 100644 index 5d928ab995b2..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetResource.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsForwardingRulesetResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Get.json - // this example is just showing the usage of "DnsForwardingRulesets_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // invoke the operation - DnsForwardingRulesetResource result = await dnsForwardingRuleset.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteDNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Delete.json - // this example is just showing the usage of "DnsForwardingRulesets_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "samplednsForwardingRulesetName"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // invoke the operation - await dnsForwardingRuleset.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateDNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_Patch.json - // this example is just showing the usage of "DnsForwardingRulesets_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // invoke the operation - DnsForwardingRulesetPatch patch = new DnsForwardingRulesetPatch - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await dnsForwardingRuleset.UpdateAsync(WaitUntil.Completed, patch); - DnsForwardingRulesetResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs deleted file mode 100644 index 2350dfeeb3c7..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkCollection.cs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsForwardingRulesetVirtualNetworkLinkCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertVirtualNetworkLinkToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Put.json - // this example is just showing the usage of "VirtualNetworkLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource - DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); - - // invoke the operation - string virtualNetworkLinkName = "sampleVirtualNetworkLink"; - DnsForwardingRulesetVirtualNetworkLinkData data = new DnsForwardingRulesetVirtualNetworkLinkData(new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), - }) - { - Metadata = -{ -["additionalProp1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, virtualNetworkLinkName, data); - DnsForwardingRulesetVirtualNetworkLinkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json - // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource - DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); - - // invoke the operation - string virtualNetworkLinkName = "sampleVirtualNetworkLink"; - DnsForwardingRulesetVirtualNetworkLinkResource result = await collection.GetAsync(virtualNetworkLinkName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListVirtualNetworkLinksToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_List.json - // this example is just showing the usage of "VirtualNetworkLinks_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource - DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); - - // invoke the operation and iterate over the result - await foreach (DnsForwardingRulesetVirtualNetworkLinkResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetVirtualNetworkLinkData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json - // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource - DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); - - // invoke the operation - string virtualNetworkLinkName = "sampleVirtualNetworkLink"; - bool result = await collection.ExistsAsync(virtualNetworkLinkName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json - // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetResource created on azure - // for more information of creating DnsForwardingRulesetResource, please refer to the document of DnsForwardingRulesetResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - ResourceIdentifier dnsForwardingRulesetResourceId = DnsForwardingRulesetResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName); - DnsForwardingRulesetResource dnsForwardingRuleset = client.GetDnsForwardingRulesetResource(dnsForwardingRulesetResourceId); - - // get the collection of this DnsForwardingRulesetVirtualNetworkLinkResource - DnsForwardingRulesetVirtualNetworkLinkCollection collection = dnsForwardingRuleset.GetDnsForwardingRulesetVirtualNetworkLinks(); - - // invoke the operation - string virtualNetworkLinkName = "sampleVirtualNetworkLink"; - NullableResponse response = await collection.GetIfExistsAsync(virtualNetworkLinkName); - DnsForwardingRulesetVirtualNetworkLinkResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs deleted file mode 100644 index 23f3d39a0c0b..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsForwardingRulesetVirtualNetworkLinkResource.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsForwardingRulesetVirtualNetworkLinkResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveVirtualNetworkLinkToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Get.json - // this example is just showing the usage of "VirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetVirtualNetworkLinkResource created on azure - // for more information of creating DnsForwardingRulesetVirtualNetworkLinkResource, please refer to the document of DnsForwardingRulesetVirtualNetworkLinkResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - string virtualNetworkLinkName = "sampleVirtualNetworkLink"; - ResourceIdentifier dnsForwardingRulesetVirtualNetworkLinkResourceId = DnsForwardingRulesetVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, virtualNetworkLinkName); - DnsForwardingRulesetVirtualNetworkLinkResource dnsForwardingRulesetVirtualNetworkLink = client.GetDnsForwardingRulesetVirtualNetworkLinkResource(dnsForwardingRulesetVirtualNetworkLinkResourceId); - - // invoke the operation - DnsForwardingRulesetVirtualNetworkLinkResource result = await dnsForwardingRulesetVirtualNetworkLink.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteVirtualNetworkLinkToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Delete.json - // this example is just showing the usage of "VirtualNetworkLinks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetVirtualNetworkLinkResource created on azure - // for more information of creating DnsForwardingRulesetVirtualNetworkLinkResource, please refer to the document of DnsForwardingRulesetVirtualNetworkLinkResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - string virtualNetworkLinkName = "sampleVirtualNetworkLink"; - ResourceIdentifier dnsForwardingRulesetVirtualNetworkLinkResourceId = DnsForwardingRulesetVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, virtualNetworkLinkName); - DnsForwardingRulesetVirtualNetworkLinkResource dnsForwardingRulesetVirtualNetworkLink = client.GetDnsForwardingRulesetVirtualNetworkLinkResource(dnsForwardingRulesetVirtualNetworkLinkResourceId); - - // invoke the operation - await dnsForwardingRulesetVirtualNetworkLink.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateVirtualNetworkLinkToADNSForwardingRuleset() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/VirtualNetworkLink_Patch.json - // this example is just showing the usage of "VirtualNetworkLinks_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsForwardingRulesetVirtualNetworkLinkResource created on azure - // for more information of creating DnsForwardingRulesetVirtualNetworkLinkResource, please refer to the document of DnsForwardingRulesetVirtualNetworkLinkResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string rulesetName = "sampleDnsForwardingRuleset"; - string virtualNetworkLinkName = "sampleVirtualNetworkLink"; - ResourceIdentifier dnsForwardingRulesetVirtualNetworkLinkResourceId = DnsForwardingRulesetVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, rulesetName, virtualNetworkLinkName); - DnsForwardingRulesetVirtualNetworkLinkResource dnsForwardingRulesetVirtualNetworkLink = client.GetDnsForwardingRulesetVirtualNetworkLinkResource(dnsForwardingRulesetVirtualNetworkLinkResourceId); - - // invoke the operation - DnsForwardingRulesetVirtualNetworkLinkPatch patch = new DnsForwardingRulesetVirtualNetworkLinkPatch - { - Metadata = -{ -["additionalProp1"] = "value1" -}, - }; - ArmOperation lro = await dnsForwardingRulesetVirtualNetworkLink.UpdateAsync(WaitUntil.Completed, patch); - DnsForwardingRulesetVirtualNetworkLinkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs deleted file mode 100644 index 6be63b37c291..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverCollection.cs +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Put.json - // this example is just showing the usage of "DnsResolvers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverResource - DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); - - // invoke the operation - string dnsResolverName = "sampleDnsResolver"; - DnsResolverData data = new DnsResolverData(new AzureLocation("westus2"), new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), - }) - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverName, data); - DnsResolverResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json - // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverResource - DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); - - // invoke the operation - string dnsResolverName = "sampleDnsResolver"; - DnsResolverResource result = await collection.GetAsync(dnsResolverName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListDNSResolversByResourceGroup() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByResourceGroup.json - // this example is just showing the usage of "DnsResolvers_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverResource - DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); - - // invoke the operation and iterate over the result - await foreach (DnsResolverResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json - // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverResource - DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); - - // invoke the operation - string dnsResolverName = "sampleDnsResolver"; - bool result = await collection.ExistsAsync(dnsResolverName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json - // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverResource - DnsResolverCollection collection = resourceGroupResource.GetDnsResolvers(); - - // invoke the operation - string dnsResolverName = "sampleDnsResolver"; - NullableResponse response = await collection.GetIfExistsAsync(dnsResolverName); - DnsResolverResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs deleted file mode 100644 index 78d4673aa44a..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListCollection.cs +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverDomainListCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertDNSResolverDomainListWithBulkNumberOfDomains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Put.json - // this example is just showing the usage of "DnsResolverDomainLists_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - DnsResolverDomainListData data = new DnsResolverDomainListData(new AzureLocation("westus2")) - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, data); - DnsResolverDomainListResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertDNSResolverDomainListWithLessThan1000Domains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Put.json - // this example is just showing the usage of "DnsResolverDomainLists_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - DnsResolverDomainListData data = new DnsResolverDomainListData(new AzureLocation("westus2")) - { - Domains = { "contoso.com" }, - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverDomainListName, data); - DnsResolverDomainListResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - DnsResolverDomainListResource result = await collection.GetAsync(dnsResolverDomainListName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverDomainListWithLessThan1000Domains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - DnsResolverDomainListResource result = await collection.GetAsync(dnsResolverDomainListName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListDNSResolverDomainListsByResourceGroup() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_ListByResourceGroup.json - // this example is just showing the usage of "DnsResolverDomainLists_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation and iterate over the result - await foreach (DnsResolverDomainListResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - bool result = await collection.ExistsAsync(dnsResolverDomainListName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveDNSResolverDomainListWithLessThan1000Domains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - bool result = await collection.ExistsAsync(dnsResolverDomainListName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - NullableResponse response = await collection.GetIfExistsAsync(dnsResolverDomainListName); - DnsResolverDomainListResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveDNSResolverDomainListWithLessThan1000Domains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverDomainListResource - DnsResolverDomainListCollection collection = resourceGroupResource.GetDnsResolverDomainLists(); - - // invoke the operation - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - NullableResponse response = await collection.GetIfExistsAsync(dnsResolverDomainListName); - DnsResolverDomainListResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs deleted file mode 100644 index dba81bfc03de..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverDomainListResource.cs +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverDomainListResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverDomainListWithBulkNumberOfDomains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDomains_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverDomainListResource created on azure - // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); - DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); - - // invoke the operation - DnsResolverDomainListResource result = await dnsResolverDomainList.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverDomainListWithLessThan1000Domains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Get.json - // this example is just showing the usage of "DnsResolverDomainLists_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverDomainListResource created on azure - // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); - DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); - - // invoke the operation - DnsResolverDomainListResource result = await dnsResolverDomainList.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteDNSResolverDomainList() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Delete.json - // this example is just showing the usage of "DnsResolverDomainLists_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverDomainListResource created on azure - // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); - DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); - - // invoke the operation - await dnsResolverDomainList.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateDNSResolverDomainList() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_Patch.json - // this example is just showing the usage of "DnsResolverDomainLists_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverDomainListResource created on azure - // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); - DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); - - // invoke the operation - DnsResolverDomainListPatch patch = new DnsResolverDomainListPatch - { - Tags = -{ -["key1"] = "value1" -}, - Domains = { "contoso.com" }, - }; - ArmOperation lro = await dnsResolverDomainList.UpdateAsync(WaitUntil.Completed, patch); - DnsResolverDomainListResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Bulk_DownloadDNSResolverDomainListDomains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkDownload.json - // this example is just showing the usage of "DnsResolverDomainLists_Bulk" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverDomainListResource created on azure - // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); - DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); - - // invoke the operation - DnsResolverDomainListBulk dnsResolverDomainListBulk = new DnsResolverDomainListBulk(new Uri("https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw"), DnsResolverDomainListBulkAction.Download); - ArmOperation lro = await dnsResolverDomainList.BulkAsync(WaitUntil.Completed, dnsResolverDomainListBulk); - DnsResolverDomainListResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Bulk_UploadDNSResolverDomainListDomains() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_BulkUpload.json - // this example is just showing the usage of "DnsResolverDomainLists_Bulk" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverDomainListResource created on azure - // for more information of creating DnsResolverDomainListResource, please refer to the document of DnsResolverDomainListResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverDomainListName = "sampleDnsResolverDomainList"; - ResourceIdentifier dnsResolverDomainListResourceId = DnsResolverDomainListResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverDomainListName); - DnsResolverDomainListResource dnsResolverDomainList = client.GetDnsResolverDomainListResource(dnsResolverDomainListResourceId); - - // invoke the operation - DnsResolverDomainListBulk dnsResolverDomainListBulk = new DnsResolverDomainListBulk(new Uri("https://sampleStorageAccount.blob.core.windows.net/sample-container/sampleBlob.txt?sv=2022-11-02&sr=b&sig=39Up9jzHkxhUIhFEjEh9594DJxe7w6cIRCgOV6ICGS0%3A377&sp=rcw"), DnsResolverDomainListBulkAction.Upload); - ArmOperation lro = await dnsResolverDomainList.BulkAsync(WaitUntil.Completed, dnsResolverDomainListBulk); - DnsResolverDomainListResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs deleted file mode 100644 index 4c0c200219e6..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointCollection.cs +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverInboundEndpointCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertInboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Put.json - // this example is just showing the usage of "InboundEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverInboundEndpointResource - DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); - - // invoke the operation - string inboundEndpointName = "sampleInboundEndpoint"; - DnsResolverInboundEndpointData data = new DnsResolverInboundEndpointData(new AzureLocation("westus2"), new InboundEndpointIPConfiguration[] - { -new InboundEndpointIPConfiguration(new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"), -}) -{ -PrivateIPAllocationMethod = InboundEndpointIPAllocationMethod.Dynamic, -} - }) - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, inboundEndpointName, data); - DnsResolverInboundEndpointResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverInboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveInboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json - // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverInboundEndpointResource - DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); - - // invoke the operation - string inboundEndpointName = "sampleInboundEndpoint"; - DnsResolverInboundEndpointResource result = await collection.GetAsync(inboundEndpointName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverInboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListInboundEndpointsByDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_List.json - // this example is just showing the usage of "InboundEndpoints_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverInboundEndpointResource - DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); - - // invoke the operation and iterate over the result - await foreach (DnsResolverInboundEndpointResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverInboundEndpointData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveInboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json - // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverInboundEndpointResource - DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); - - // invoke the operation - string inboundEndpointName = "sampleInboundEndpoint"; - bool result = await collection.ExistsAsync(inboundEndpointName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveInboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json - // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverInboundEndpointResource - DnsResolverInboundEndpointCollection collection = dnsResolver.GetDnsResolverInboundEndpoints(); - - // invoke the operation - string inboundEndpointName = "sampleInboundEndpoint"; - NullableResponse response = await collection.GetIfExistsAsync(inboundEndpointName); - DnsResolverInboundEndpointResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverInboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs deleted file mode 100644 index 38690863a8c1..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverInboundEndpointResource.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverInboundEndpointResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveInboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Get.json - // this example is just showing the usage of "InboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverInboundEndpointResource created on azure - // for more information of creating DnsResolverInboundEndpointResource, please refer to the document of DnsResolverInboundEndpointResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - string inboundEndpointName = "sampleInboundEndpoint"; - ResourceIdentifier dnsResolverInboundEndpointResourceId = DnsResolverInboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, inboundEndpointName); - DnsResolverInboundEndpointResource dnsResolverInboundEndpoint = client.GetDnsResolverInboundEndpointResource(dnsResolverInboundEndpointResourceId); - - // invoke the operation - DnsResolverInboundEndpointResource result = await dnsResolverInboundEndpoint.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverInboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteInboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Delete.json - // this example is just showing the usage of "InboundEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverInboundEndpointResource created on azure - // for more information of creating DnsResolverInboundEndpointResource, please refer to the document of DnsResolverInboundEndpointResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - string inboundEndpointName = "sampleInboundEndpoint"; - ResourceIdentifier dnsResolverInboundEndpointResourceId = DnsResolverInboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, inboundEndpointName); - DnsResolverInboundEndpointResource dnsResolverInboundEndpoint = client.GetDnsResolverInboundEndpointResource(dnsResolverInboundEndpointResourceId); - - // invoke the operation - await dnsResolverInboundEndpoint.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateInboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/InboundEndpoint_Patch.json - // this example is just showing the usage of "InboundEndpoints_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverInboundEndpointResource created on azure - // for more information of creating DnsResolverInboundEndpointResource, please refer to the document of DnsResolverInboundEndpointResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - string inboundEndpointName = "sampleInboundEndpoint"; - ResourceIdentifier dnsResolverInboundEndpointResourceId = DnsResolverInboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, inboundEndpointName); - DnsResolverInboundEndpointResource dnsResolverInboundEndpoint = client.GetDnsResolverInboundEndpointResource(dnsResolverInboundEndpointResourceId); - - // invoke the operation - DnsResolverInboundEndpointPatch patch = new DnsResolverInboundEndpointPatch - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await dnsResolverInboundEndpoint.UpdateAsync(WaitUntil.Completed, patch); - DnsResolverInboundEndpointResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverInboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs deleted file mode 100644 index 51d9bfaab2dc..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointCollection.cs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverOutboundEndpointCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertOutboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Put.json - // this example is just showing the usage of "OutboundEndpoints_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverOutboundEndpointResource - DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); - - // invoke the operation - string outboundEndpointName = "sampleOutboundEndpoint"; - DnsResolverOutboundEndpointData data = new DnsResolverOutboundEndpointData(new AzureLocation("westus2"), new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"), - }) - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, outboundEndpointName, data); - DnsResolverOutboundEndpointResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverOutboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveOutboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json - // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverOutboundEndpointResource - DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); - - // invoke the operation - string outboundEndpointName = "sampleOutboundEndpoint"; - DnsResolverOutboundEndpointResource result = await collection.GetAsync(outboundEndpointName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverOutboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListOutboundEndpointsByDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_List.json - // this example is just showing the usage of "OutboundEndpoints_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverOutboundEndpointResource - DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); - - // invoke the operation and iterate over the result - await foreach (DnsResolverOutboundEndpointResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverOutboundEndpointData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveOutboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json - // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverOutboundEndpointResource - DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); - - // invoke the operation - string outboundEndpointName = "sampleOutboundEndpoint"; - bool result = await collection.ExistsAsync(outboundEndpointName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveOutboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json - // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // get the collection of this DnsResolverOutboundEndpointResource - DnsResolverOutboundEndpointCollection collection = dnsResolver.GetDnsResolverOutboundEndpoints(); - - // invoke the operation - string outboundEndpointName = "sampleOutboundEndpoint"; - NullableResponse response = await collection.GetIfExistsAsync(outboundEndpointName); - DnsResolverOutboundEndpointResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverOutboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs deleted file mode 100644 index 4bbf6c135955..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverOutboundEndpointResource.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverOutboundEndpointResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveOutboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Get.json - // this example is just showing the usage of "OutboundEndpoints_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverOutboundEndpointResource created on azure - // for more information of creating DnsResolverOutboundEndpointResource, please refer to the document of DnsResolverOutboundEndpointResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - string outboundEndpointName = "sampleOutboundEndpoint"; - ResourceIdentifier dnsResolverOutboundEndpointResourceId = DnsResolverOutboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, outboundEndpointName); - DnsResolverOutboundEndpointResource dnsResolverOutboundEndpoint = client.GetDnsResolverOutboundEndpointResource(dnsResolverOutboundEndpointResourceId); - - // invoke the operation - DnsResolverOutboundEndpointResource result = await dnsResolverOutboundEndpoint.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverOutboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteOutboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Delete.json - // this example is just showing the usage of "OutboundEndpoints_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverOutboundEndpointResource created on azure - // for more information of creating DnsResolverOutboundEndpointResource, please refer to the document of DnsResolverOutboundEndpointResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - string outboundEndpointName = "sampleOutboundEndpoint"; - ResourceIdentifier dnsResolverOutboundEndpointResourceId = DnsResolverOutboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, outboundEndpointName); - DnsResolverOutboundEndpointResource dnsResolverOutboundEndpoint = client.GetDnsResolverOutboundEndpointResource(dnsResolverOutboundEndpointResourceId); - - // invoke the operation - await dnsResolverOutboundEndpoint.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateOutboundEndpointForDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/OutboundEndpoint_Patch.json - // this example is just showing the usage of "OutboundEndpoints_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverOutboundEndpointResource created on azure - // for more information of creating DnsResolverOutboundEndpointResource, please refer to the document of DnsResolverOutboundEndpointResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - string outboundEndpointName = "sampleOutboundEndpoint"; - ResourceIdentifier dnsResolverOutboundEndpointResourceId = DnsResolverOutboundEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName, outboundEndpointName); - DnsResolverOutboundEndpointResource dnsResolverOutboundEndpoint = client.GetDnsResolverOutboundEndpointResource(dnsResolverOutboundEndpointResourceId); - - // invoke the operation - DnsResolverOutboundEndpointPatch patch = new DnsResolverOutboundEndpointPatch - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await dnsResolverOutboundEndpoint.UpdateAsync(WaitUntil.Completed, patch); - DnsResolverOutboundEndpointResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverOutboundEndpointData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs deleted file mode 100644 index 8700dd62b865..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyCollection.cs +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverPolicyCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Put.json - // this example is just showing the usage of "DnsResolverPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverPolicyResource - DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); - - // invoke the operation - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - DnsResolverPolicyData data = new DnsResolverPolicyData(new AzureLocation("westus2")) - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyName, data); - DnsResolverPolicyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json - // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverPolicyResource - DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); - - // invoke the operation - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - DnsResolverPolicyResource result = await collection.GetAsync(dnsResolverPolicyName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListDNSResolverPoliciesByResourceGroup() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByResourceGroup.json - // this example is just showing the usage of "DnsResolverPolicies_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverPolicyResource - DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); - - // invoke the operation and iterate over the result - await foreach (DnsResolverPolicyResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json - // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverPolicyResource - DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); - - // invoke the operation - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - bool result = await collection.ExistsAsync(dnsResolverPolicyName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json - // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this DnsResolverPolicyResource - DnsResolverPolicyCollection collection = resourceGroupResource.GetDnsResolverPolicies(); - - // invoke the operation - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - NullableResponse response = await collection.GetIfExistsAsync(dnsResolverPolicyName); - DnsResolverPolicyResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs deleted file mode 100644 index d56eb5b3d3aa..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyResource.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverPolicyResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Get.json - // this example is just showing the usage of "DnsResolverPolicies_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // invoke the operation - DnsResolverPolicyResource result = await dnsResolverPolicy.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Delete.json - // this example is just showing the usage of "DnsResolverPolicies_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // invoke the operation - await dnsResolverPolicy.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_Patch.json - // this example is just showing the usage of "DnsResolverPolicies_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // invoke the operation - DnsResolverPolicyPatch patch = new DnsResolverPolicyPatch - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await dnsResolverPolicy.UpdateAsync(WaitUntil.Completed, patch); - DnsResolverPolicyResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs deleted file mode 100644 index b329e2078527..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkCollection.cs +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverPolicyVirtualNetworkLinkCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertDNSResolverPolicyVirtualNetworkLink() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Put.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource - DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); - - // invoke the operation - string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; - DnsResolverPolicyVirtualNetworkLinkData data = new DnsResolverPolicyVirtualNetworkLinkData(new AzureLocation("westus2"), new WritableSubResource - { - Id = new ResourceIdentifier("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"), - }) - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsResolverPolicyVirtualNetworkLinkName, data); - DnsResolverPolicyVirtualNetworkLinkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverPolicyVirtualNetworkLink() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource - DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); - - // invoke the operation - string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; - DnsResolverPolicyVirtualNetworkLinkResource result = await collection.GetAsync(dnsResolverPolicyVirtualNetworkLinkName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListDNSResolverPolicyVirtualNetworkLinksByDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_List.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource - DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); - - // invoke the operation and iterate over the result - await foreach (DnsResolverPolicyVirtualNetworkLinkResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyVirtualNetworkLinkData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveDNSResolverPolicyVirtualNetworkLink() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource - DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); - - // invoke the operation - string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; - bool result = await collection.ExistsAsync(dnsResolverPolicyVirtualNetworkLinkName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveDNSResolverPolicyVirtualNetworkLink() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsResolverPolicyVirtualNetworkLinkResource - DnsResolverPolicyVirtualNetworkLinkCollection collection = dnsResolverPolicy.GetDnsResolverPolicyVirtualNetworkLinks(); - - // invoke the operation - string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; - NullableResponse response = await collection.GetIfExistsAsync(dnsResolverPolicyVirtualNetworkLinkName); - DnsResolverPolicyVirtualNetworkLinkResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs deleted file mode 100644 index 89a849b54c46..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverPolicyVirtualNetworkLinkResource.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverPolicyVirtualNetworkLinkResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolverPolicyVirtualNetworkLink() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Get.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyVirtualNetworkLinkResource created on azure - // for more information of creating DnsResolverPolicyVirtualNetworkLinkResource, please refer to the document of DnsResolverPolicyVirtualNetworkLinkResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; - ResourceIdentifier dnsResolverPolicyVirtualNetworkLinkResourceId = DnsResolverPolicyVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); - DnsResolverPolicyVirtualNetworkLinkResource dnsResolverPolicyVirtualNetworkLink = client.GetDnsResolverPolicyVirtualNetworkLinkResource(dnsResolverPolicyVirtualNetworkLinkResourceId); - - // invoke the operation - DnsResolverPolicyVirtualNetworkLinkResource result = await dnsResolverPolicyVirtualNetworkLink.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteDNSResolverPolicyVirtualNetworkLink() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Delete.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyVirtualNetworkLinkResource created on azure - // for more information of creating DnsResolverPolicyVirtualNetworkLinkResource, please refer to the document of DnsResolverPolicyVirtualNetworkLinkResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; - ResourceIdentifier dnsResolverPolicyVirtualNetworkLinkResourceId = DnsResolverPolicyVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); - DnsResolverPolicyVirtualNetworkLinkResource dnsResolverPolicyVirtualNetworkLink = client.GetDnsResolverPolicyVirtualNetworkLinkResource(dnsResolverPolicyVirtualNetworkLinkResourceId); - - // invoke the operation - await dnsResolverPolicyVirtualNetworkLink.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateDNSResolverPolicyVirtualNetworkLink() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicyVirtualNetworkLink_Patch.json - // this example is just showing the usage of "DnsResolverPolicyVirtualNetworkLinks_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyVirtualNetworkLinkResource created on azure - // for more information of creating DnsResolverPolicyVirtualNetworkLinkResource, please refer to the document of DnsResolverPolicyVirtualNetworkLinkResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - string dnsResolverPolicyVirtualNetworkLinkName = "sampleVirtualNetworkLink"; - ResourceIdentifier dnsResolverPolicyVirtualNetworkLinkResourceId = DnsResolverPolicyVirtualNetworkLinkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsResolverPolicyVirtualNetworkLinkName); - DnsResolverPolicyVirtualNetworkLinkResource dnsResolverPolicyVirtualNetworkLink = client.GetDnsResolverPolicyVirtualNetworkLinkResource(dnsResolverPolicyVirtualNetworkLinkResourceId); - - // invoke the operation - DnsResolverPolicyVirtualNetworkLinkPatch patch = new DnsResolverPolicyVirtualNetworkLinkPatch - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await dnsResolverPolicyVirtualNetworkLink.UpdateAsync(WaitUntil.Completed, patch); - DnsResolverPolicyVirtualNetworkLinkResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyVirtualNetworkLinkData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs deleted file mode 100644 index 0fc951c6281e..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsResolverResource.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsResolverResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Get.json - // this example is just showing the usage of "DnsResolvers_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // invoke the operation - DnsResolverResource result = await dnsResolver.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Delete.json - // this example is just showing the usage of "DnsResolvers_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // invoke the operation - await dnsResolver.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateDNSResolver() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_Patch.json - // this example is just showing the usage of "DnsResolvers_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverResource created on azure - // for more information of creating DnsResolverResource, please refer to the document of DnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverName = "sampleDnsResolver"; - ResourceIdentifier dnsResolverResourceId = DnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverName); - DnsResolverResource dnsResolver = client.GetDnsResolverResource(dnsResolverResourceId); - - // invoke the operation - DnsResolverPatch patch = new DnsResolverPatch - { - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await dnsResolver.UpdateAsync(WaitUntil.Completed, patch); - DnsResolverResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs deleted file mode 100644 index 845b3e4435db..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleCollection.cs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsSecurityRuleCollection - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_UpsertDNSSecurityRule() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Put.json - // this example is just showing the usage of "DnsSecurityRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsSecurityRuleResource - DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); - - // invoke the operation - string dnsSecurityRuleName = "sampleDnsSecurityRule"; - DnsSecurityRuleData data = new DnsSecurityRuleData(new AzureLocation("westus2"), 100, new DnsSecurityRuleAction - { - ActionType = DnsSecurityRuleActionType.Block, - }, new WritableSubResource[] - { -new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"), -} - }) - { - DnsSecurityRuleState = DnsSecurityRuleState.Enabled, - Tags = -{ -["key1"] = "value1" -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dnsSecurityRuleName, data); - DnsSecurityRuleResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsSecurityRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSSecurityRuleForDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json - // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsSecurityRuleResource - DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); - - // invoke the operation - string dnsSecurityRuleName = "sampleDnsSecurityRule"; - DnsSecurityRuleResource result = await collection.GetAsync(dnsSecurityRuleName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsSecurityRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListDNSSecurityRulesByDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_List.json - // this example is just showing the usage of "DnsSecurityRules_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsSecurityRuleResource - DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); - - // invoke the operation and iterate over the result - await foreach (DnsSecurityRuleResource item in collection.GetAllAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsSecurityRuleData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Exists_RetrieveDNSSecurityRuleForDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json - // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsSecurityRuleResource - DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); - - // invoke the operation - string dnsSecurityRuleName = "sampleDnsSecurityRule"; - bool result = await collection.ExistsAsync(dnsSecurityRuleName); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetIfExists_RetrieveDNSSecurityRuleForDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json - // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsResolverPolicyResource created on azure - // for more information of creating DnsResolverPolicyResource, please refer to the document of DnsResolverPolicyResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - ResourceIdentifier dnsResolverPolicyResourceId = DnsResolverPolicyResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName); - DnsResolverPolicyResource dnsResolverPolicy = client.GetDnsResolverPolicyResource(dnsResolverPolicyResourceId); - - // get the collection of this DnsSecurityRuleResource - DnsSecurityRuleCollection collection = dnsResolverPolicy.GetDnsSecurityRules(); - - // invoke the operation - string dnsSecurityRuleName = "sampleDnsSecurityRule"; - NullableResponse response = await collection.GetIfExistsAsync(dnsSecurityRuleName); - DnsSecurityRuleResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine("Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsSecurityRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs deleted file mode 100644 index 45d05ed44073..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_DnsSecurityRuleResource.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_DnsSecurityRuleResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Get_RetrieveDNSSecurityRuleForDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Get.json - // this example is just showing the usage of "DnsSecurityRules_Get" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsSecurityRuleResource created on azure - // for more information of creating DnsSecurityRuleResource, please refer to the document of DnsSecurityRuleResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - string dnsSecurityRuleName = "sampleDnsSecurityRule"; - ResourceIdentifier dnsSecurityRuleResourceId = DnsSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); - DnsSecurityRuleResource dnsSecurityRule = client.GetDnsSecurityRuleResource(dnsSecurityRuleResourceId); - - // invoke the operation - DnsSecurityRuleResource result = await dnsSecurityRule.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsSecurityRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Delete_DeleteDNSSecurityRuleForDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Delete.json - // this example is just showing the usage of "DnsSecurityRules_Delete" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsSecurityRuleResource created on azure - // for more information of creating DnsSecurityRuleResource, please refer to the document of DnsSecurityRuleResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsDnsResolverPolicy"; - string dnsSecurityRuleName = "sampleDnsSecurityRule"; - ResourceIdentifier dnsSecurityRuleResourceId = DnsSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); - DnsSecurityRuleResource dnsSecurityRule = client.GetDnsSecurityRuleResource(dnsSecurityRuleResourceId); - - // invoke the operation - await dnsSecurityRule.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Update_UpdateDNSSecurityRuleForDNSResolverPolicy() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsSecurityRule_Patch.json - // this example is just showing the usage of "DnsSecurityRules_Update" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this DnsSecurityRuleResource created on azure - // for more information of creating DnsSecurityRuleResource, please refer to the document of DnsSecurityRuleResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string dnsResolverPolicyName = "sampleDnsResolverPolicy"; - string dnsSecurityRuleName = "sampleDnsSecurityRule"; - ResourceIdentifier dnsSecurityRuleResourceId = DnsSecurityRuleResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, dnsResolverPolicyName, dnsSecurityRuleName); - DnsSecurityRuleResource dnsSecurityRule = client.GetDnsSecurityRuleResource(dnsSecurityRuleResourceId); - - // invoke the operation - DnsSecurityRulePatch patch = new DnsSecurityRulePatch - { - Tags = -{ -["key1"] = "value1" -}, - DnsSecurityRuleState = DnsSecurityRuleState.Disabled, - }; - ArmOperation lro = await dnsSecurityRule.UpdateAsync(WaitUntil.Completed, patch); - DnsSecurityRuleResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsSecurityRuleData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs deleted file mode 100644 index b110f07ef72d..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_SubscriptionResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolvers_ListDNSResolversBySubscription() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListBySubscription.json - // this example is just showing the usage of "DnsResolvers_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (DnsResolverResource item in subscriptionResource.GetDnsResolversAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsBySubscription() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListBySubscription.json - // this example is just showing the usage of "DnsForwardingRulesets_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (DnsForwardingRulesetResource item in subscriptionResource.GetDnsForwardingRulesetsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsForwardingRulesetData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolverPolicies_ListDNSResolverPoliciesBySubscription() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListBySubscription.json - // this example is just showing the usage of "DnsResolverPolicies_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (DnsResolverPolicyResource item in subscriptionResource.GetDnsResolverPoliciesAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverPolicyData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolverDomainLists_ListDNSResolverDomainListsBySubscription() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverDomainList_ListBySubscription.json - // this example is just showing the usage of "DnsResolverDomainLists_List" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this SubscriptionResource created on azure - // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (DnsResolverDomainListResource item in subscriptionResource.GetDnsResolverDomainListsAsync()) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - DnsResolverDomainListData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs deleted file mode 100644 index 8444655507d9..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/samples/Generated/Samples/Sample_VirtualNetworkDnsResolverResource.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; -using NUnit.Framework; - -namespace Azure.ResourceManager.DnsResolver.Samples -{ - public partial class Sample_VirtualNetworkDnsResolverResource - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolvers_ListDNSResolversByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolver_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolvers_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolversAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsForwardingRulesets_ListDNSForwardingRulesetsByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsForwardingRuleset_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsForwardingRulesets_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (VirtualNetworkDnsForwardingRuleset item in virtualNetworkDnsResolver.GetDnsForwardingRulesetsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetDnsResolverPoliciesByVirtualNetwork_ListDNSResolverPoliciesByVirtualNetwork() - { - // Generated from example definition: specification/dnsresolver/resource-manager/Microsoft.Network/stable/2025-05-01/examples/DnsResolverPolicy_ListByVirtualNetwork.json - // this example is just showing the usage of "DnsResolverPolicies_ListByVirtualNetwork" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this VirtualNetworkDnsResolverResource created on azure - // for more information of creating VirtualNetworkDnsResolverResource, please refer to the document of VirtualNetworkDnsResolverResource - string subscriptionId = "abdd4249-9f34-4cc6-8e42-c2e32110603e"; - string resourceGroupName = "sampleResourceGroup"; - string virtualNetworkName = "sampleVirtualNetwork"; - ResourceIdentifier virtualNetworkDnsResolverResourceId = VirtualNetworkDnsResolverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, virtualNetworkName); - VirtualNetworkDnsResolverResource virtualNetworkDnsResolver = client.GetVirtualNetworkDnsResolverResource(virtualNetworkDnsResolverResourceId); - - // invoke the operation and iterate over the result - await foreach (WritableSubResource item in virtualNetworkDnsResolver.GetDnsResolverPoliciesByVirtualNetworkAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj index 621d5a65fff8..053aee5fcc24 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Azure.ResourceManager.DnsResolver.csproj @@ -1,6 +1,6 @@ - 2.0.0 + 1.2.0 1.1.0 Azure.ResourceManager.DnsResolver diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index 7ba5e48efe80..bb2910ee0d6e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -11,7 +11,7 @@ namespace: Azure.ResourceManager.DnsResolver output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: - sample: true + sample: false # Current issue with virtual network dns resolver resouce autogen that is being addressed in autorest repo https://github.com/Azure/autorest.csharp/issues/5134 output-folder: $(this-folder)/../samples/Generated clear-output-folder: true skip-csproj: true From 44a7cf125cd272c87bf4949fd1a4299788c2410f Mon Sep 17 00:00:00 2001 From: James Voong Date: Tue, 20 May 2025 23:58:27 -0700 Subject: [PATCH 24/27] Remove rename-mappings for actions --- .../VirtualNetworkDnsResolverResource.cs | 260 ------------------ .../Generated/ArmDnsResolverModelFactory.cs | 232 ++++++++++++---- .../src/Generated/DnsForwardingRuleData.cs | 71 ++++- .../src/Generated/DnsForwardingRulesetData.cs | 46 +++- ...ForwardingRulesetVirtualNetworkLinkData.cs | 46 +++- .../src/Generated/DnsResolverData.cs | 56 +++- .../Generated/DnsResolverDomainListData.cs | 51 +++- .../DnsResolverInboundEndpointData.cs | 46 +++- .../DnsResolverOutboundEndpointData.cs | 46 +++- .../src/Generated/DnsResolverPolicyData.cs | 31 ++- ...DnsResolverPolicyVirtualNetworkLinkData.cs | 36 ++- .../src/Generated/DnsSecurityRuleData.cs | 83 ++++-- .../Extensions/DnsResolverExtensions.cs | 2 +- .../MockableDnsResolverArmClient.cs | 2 +- .../src/Generated/Models/Action.cs | 60 ++++ .../src/Generated/Models/ActionType.cs | 66 +++++ .../Models/DnsForwardingRulePatch.cs | 35 ++- .../Models/DnsForwardingRuleState.cs | 15 +- .../Models/DnsForwardingRulesetListResult.cs | 25 +- .../Models/DnsForwardingRulesetPatch.cs | 25 +- ...orwardingRulesetVirtualNetworkLinkPatch.cs | 15 +- ...DnsResolverDomainListBulk.Serialization.cs | 4 +- .../Models/DnsResolverDomainListBulk.cs | 41 ++- .../Models/DnsResolverDomainListBulkAction.cs | 51 ---- .../Models/DnsResolverDomainListPatch.cs | 25 +- .../Models/DnsResolverDomainListResult.cs | 25 +- .../Models/DnsResolverInboundEndpointPatch.cs | 15 +- .../Generated/Models/DnsResolverListResult.cs | 25 +- .../DnsResolverOutboundEndpointPatch.cs | 15 +- .../src/Generated/Models/DnsResolverPatch.cs | 15 +- .../Models/DnsResolverPolicyListResult.cs | 25 +- .../Models/DnsResolverPolicyPatch.cs | 15 +- ...olverPolicyVirtualNetworkLinkListResult.cs | 25 +- ...nsResolverPolicyVirtualNetworkLinkPatch.cs | 15 +- .../Models/DnsResolverProvisioningState.cs | 35 ++- .../src/Generated/Models/DnsResolverState.cs | 15 +- .../DnsSecurityRuleAction.Serialization.cs | 4 +- .../Generated/Models/DnsSecurityRuleAction.cs | 19 +- .../Models/DnsSecurityRuleActionType.cs | 54 ---- .../Models/DnsSecurityRuleListResult.cs | 25 +- .../Generated/Models/DnsSecurityRulePatch.cs | 62 ++++- .../Generated/Models/DnsSecurityRuleState.cs | 15 +- .../Models/ForwardingRuleListResult.cs | 25 +- .../InboundEndpointIPAllocationMethod.cs | 15 +- .../Models/InboundEndpointIPConfiguration.cs | 40 ++- .../Models/InboundEndpointListResult.cs | 25 +- .../Models/OutboundEndpointListResult.cs | 25 +- .../Generated/Models/SubResourceListResult.cs | 25 +- .../src/Generated/Models/TargetDnsServer.cs | 30 +- .../VirtualNetworkDnsForwardingRuleset.cs | 25 +- ...alNetworkDnsForwardingRulesetListResult.cs | 25 +- .../Models/VirtualNetworkLinkListResult.cs | 25 +- .../VirtualNetworkDnsResolverResource.cs | 233 ++++++++++++++++ .../src/autorest.md | 5 +- 54 files changed, 1590 insertions(+), 682 deletions(-) delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ActionType.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs deleted file mode 100644 index 1aefeca77a50..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customized/VirtualNetworkDnsResolverResource.cs +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Text.Json; -using System.Threading; -using Autorest.CSharp.Core; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.DnsResolver.Models; -using Azure.ResourceManager.Resources.Models; - -namespace Azure.ResourceManager.DnsResolver -{ - /// - /// A class extending from the VirtualNetworkResource in Azure.ResourceManager.DnsResolver along with the instance operations that can be performed on it. - /// You can only construct a from a with a resource type of Microsoft.Network/virtualNetworks. - /// - public partial class VirtualNetworkDnsResolverResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The virtualNetworkName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dnsResolverClientDiagnostics; - private readonly DnsResolversRestOperations _dnsResolverRestClient; - private readonly ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; - private readonly DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; - private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; - private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; - - /// Initializes a new instance of the class for mocking. - protected VirtualNetworkDnsResolverResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal VirtualNetworkDnsResolverResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dnsResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsResolverResource.ResourceType, out string dnsResolverApiVersion); - _dnsResolverRestClient = new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverApiVersion); - _dnsForwardingRulesetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsForwardingRulesetResource.ResourceType, out string dnsForwardingRulesetApiVersion); - _dnsForwardingRulesetRestClient = new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsForwardingRulesetApiVersion); - _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); - _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Network/virtualNetworks"; - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolversAsync(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers - /// - /// - /// Operation Id - /// DnsResolvers_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolvers(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsForwardingRulesetsAsync(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets - /// - /// - /// Operation Id - /// DnsForwardingRulesets_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The maximum number of results to return. If not specified, returns up to 100 results. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsForwardingRulesets(int? top = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } - - /// - /// Lists DNS resolver policy resource IDs linked to a virtual network. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies - /// - /// - /// Operation Id - /// DnsResolverPolicies_ListByVirtualNetwork - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); - } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs index 75b289ee2122..7292c0d16ee3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs @@ -24,11 +24,26 @@ public static partial class ArmDnsResolverModelFactory /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver. - /// The reference to the virtual network. This cannot be changed after creation. - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the DNS resolver resource. + /// + /// ETag of the DNS resolver. + /// Serialized Name: DnsResolver.etag + /// + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolver.properties.virtualNetwork + /// + /// + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolver.properties.dnsResolverState + /// + /// + /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolver.properties.provisioningState + /// + /// + /// The resourceGuid property of the DNS resolver resource. + /// Serialized Name: DnsResolver.properties.resourceGuid + /// /// A new instance for mocking. public static DnsResolverData DnsResolverData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, DnsResolverState? dnsResolverState = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -56,10 +71,22 @@ public static DnsResolverData DnsResolverData(ResourceIdentifier id = null, stri /// The systemData. /// The tags. /// The location. - /// ETag of the inbound endpoint. - /// IP configurations for the inbound endpoint. - /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the inbound endpoint resource. + /// + /// ETag of the inbound endpoint. + /// Serialized Name: InboundEndpoint.etag + /// + /// + /// IP configurations for the inbound endpoint. + /// Serialized Name: InboundEndpoint.properties.ipConfigurations + /// + /// + /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: InboundEndpoint.properties.provisioningState + /// + /// + /// The resourceGuid property of the inbound endpoint resource. + /// Serialized Name: InboundEndpoint.properties.resourceGuid + /// /// A new instance for mocking. public static DnsResolverInboundEndpointData DnsResolverInboundEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable ipConfigurations = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -87,10 +114,22 @@ public static DnsResolverInboundEndpointData DnsResolverInboundEndpointData(Reso /// The systemData. /// The tags. /// The location. - /// ETag of the outbound endpoint. - /// The reference to the subnet used for the outbound endpoint. - /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the outbound endpoint resource. + /// + /// ETag of the outbound endpoint. + /// Serialized Name: OutboundEndpoint.etag + /// + /// + /// The reference to the subnet used for the outbound endpoint. + /// Serialized Name: OutboundEndpoint.properties.subnet + /// + /// + /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: OutboundEndpoint.properties.provisioningState + /// + /// + /// The resourceGuid property of the outbound endpoint resource. + /// Serialized Name: OutboundEndpoint.properties.resourceGuid + /// /// A new instance for mocking. public static DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier subnetId = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -117,10 +156,22 @@ public static DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(Re /// The systemData. /// The tags. /// The location. - /// ETag of the DNS forwarding ruleset. - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid for the DNS forwarding ruleset. + /// + /// ETag of the DNS forwarding ruleset. + /// Serialized Name: DnsForwardingRuleset.etag + /// + /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints + /// + /// + /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsForwardingRuleset.properties.provisioningState + /// + /// + /// The resourceGuid for the DNS forwarding ruleset. + /// Serialized Name: DnsForwardingRuleset.properties.resourceGuid + /// /// A new instance for mocking. public static DnsForwardingRulesetData DnsForwardingRulesetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable dnsResolverOutboundEndpoints = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -146,12 +197,30 @@ public static DnsForwardingRulesetData DnsForwardingRulesetData(ResourceIdentifi /// The name. /// The resourceType. /// The systemData. - /// ETag of the forwarding rule. - /// The domain name for the forwarding rule. - /// DNS servers to forward the DNS query to. - /// Metadata attached to the forwarding rule. - /// The state of forwarding rule. - /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the forwarding rule. + /// Serialized Name: ForwardingRule.etag + /// + /// + /// The domain name for the forwarding rule. + /// Serialized Name: ForwardingRule.properties.domainName + /// + /// + /// DNS servers to forward the DNS query to. + /// Serialized Name: ForwardingRule.properties.targetDnsServers + /// + /// + /// Metadata attached to the forwarding rule. + /// Serialized Name: ForwardingRule.properties.metadata + /// + /// + /// The state of forwarding rule. + /// Serialized Name: ForwardingRule.properties.forwardingRuleState + /// + /// + /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: ForwardingRule.properties.provisioningState + /// /// A new instance for mocking. public static DnsForwardingRuleData DnsForwardingRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, string domainName = null, IEnumerable targetDnsServers = null, IDictionary metadata = null, DnsForwardingRuleState? dnsForwardingRuleState = null, DnsResolverProvisioningState? provisioningState = null) { @@ -177,10 +246,22 @@ public static DnsForwardingRuleData DnsForwardingRuleData(ResourceIdentifier id /// The name. /// The resourceType. /// The systemData. - /// ETag of the virtual network link. - /// The reference to the virtual network. This cannot be changed after creation. - /// Metadata attached to the virtual network link. - /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the virtual network link. + /// Serialized Name: VirtualNetworkLink.etag + /// + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork + /// + /// + /// Metadata attached to the virtual network link. + /// Serialized Name: VirtualNetworkLink.properties.metadata + /// + /// + /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: VirtualNetworkLink.properties.provisioningState + /// /// A new instance for mocking. public static DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, IDictionary metadata = null, DnsResolverProvisioningState? provisioningState = null) { @@ -199,8 +280,14 @@ public static DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVir } /// Initializes a new instance of . - /// DNS Forwarding Ruleset Resource ID. - /// The reference to the virtual network link. + /// + /// DNS Forwarding Ruleset Resource ID. + /// Serialized Name: VirtualNetworkDnsForwardingRuleset.id + /// + /// + /// The reference to the virtual network link. + /// Serialized Name: VirtualNetworkDnsForwardingRuleset.properties.virtualNetworkLink + /// /// A new instance for mocking. public static VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(ResourceIdentifier id = null, ResourceIdentifier virtualNetworkLinkId = null) { @@ -214,9 +301,18 @@ public static VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRule /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver policy. - /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the DNS resolver policy resource. + /// + /// ETag of the DNS resolver policy. + /// Serialized Name: DnsResolverPolicy.etag + /// + /// + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverPolicy.properties.provisioningState + /// + /// + /// The resourceGuid property of the DNS resolver policy resource. + /// Serialized Name: DnsResolverPolicy.properties.resourceGuid + /// /// A new instance for mocking. public static DnsResolverPolicyData DnsResolverPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -242,14 +338,32 @@ public static DnsResolverPolicyData DnsResolverPolicyData(ResourceIdentifier id /// The systemData. /// The tags. /// The location. - /// ETag of the DNS security rule. - /// The priority of the DNS security rule. - /// The action to take on DNS requests that match the DNS security rule. - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// The state of DNS security rule. - /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the DNS security rule. + /// Serialized Name: DnsSecurityRule.etag + /// + /// + /// The priority of the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.priority + /// + /// + /// The action to take on DNS requests that match the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.action + /// + /// + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists + /// + /// + /// The state of DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.dnsSecurityRuleState + /// + /// + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsSecurityRule.properties.provisioningState + /// /// A new instance for mocking. - public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, DnsSecurityRuleActionType? actionType = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) + public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, ActionType? actionType = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) { tags ??= new Dictionary(); dnsResolverDomainLists ??= new List(); @@ -277,9 +391,18 @@ public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = nu /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver policy virtual network link. - /// The reference to the virtual network. This cannot be changed after creation. - /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the DNS resolver policy virtual network link. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.etag + /// + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork + /// + /// + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.provisioningState + /// /// A new instance for mocking. public static DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, DnsResolverProvisioningState? provisioningState = null) { @@ -305,11 +428,26 @@ public static DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNe /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver domain list. - /// The domains in the domain list. - /// The URL for bulk upload or download for domain lists containing larger set of domains. - /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the DNS resolver domain list resource. + /// + /// ETag of the DNS resolver domain list. + /// Serialized Name: DnsResolverDomainList.etag + /// + /// + /// The domains in the domain list. + /// Serialized Name: DnsResolverDomainList.properties.domains + /// + /// + /// The URL for bulk upload or download for domain lists containing larger set of domains. + /// Serialized Name: DnsResolverDomainList.properties.domainsUrl + /// + /// + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverDomainList.properties.provisioningState + /// + /// + /// The resourceGuid property of the DNS resolver domain list resource. + /// Serialized Name: DnsResolverDomainList.properties.resourceGuid + /// /// A new instance for mocking. public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable domains = null, Uri domainsUri = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs index 148716f6d56d..665639618f4e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsForwardingRule data model. /// Describes a forwarding rule within a DNS forwarding ruleset. + /// Serialized Name: ForwardingRule /// public partial class DnsForwardingRuleData : ResourceData { @@ -53,8 +54,14 @@ public partial class DnsForwardingRuleData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The domain name for the forwarding rule. - /// DNS servers to forward the DNS query to. + /// + /// The domain name for the forwarding rule. + /// Serialized Name: ForwardingRule.properties.domainName + /// + /// + /// DNS servers to forward the DNS query to. + /// Serialized Name: ForwardingRule.properties.targetDnsServers + /// /// or is null. public DnsForwardingRuleData(string domainName, IEnumerable targetDnsServers) { @@ -71,12 +78,30 @@ public DnsForwardingRuleData(string domainName, IEnumerable tar /// The name. /// The resourceType. /// The systemData. - /// ETag of the forwarding rule. - /// The domain name for the forwarding rule. - /// DNS servers to forward the DNS query to. - /// Metadata attached to the forwarding rule. - /// The state of forwarding rule. - /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the forwarding rule. + /// Serialized Name: ForwardingRule.etag + /// + /// + /// The domain name for the forwarding rule. + /// Serialized Name: ForwardingRule.properties.domainName + /// + /// + /// DNS servers to forward the DNS query to. + /// Serialized Name: ForwardingRule.properties.targetDnsServers + /// + /// + /// Metadata attached to the forwarding rule. + /// Serialized Name: ForwardingRule.properties.metadata + /// + /// + /// The state of forwarding rule. + /// Serialized Name: ForwardingRule.properties.forwardingRuleState + /// + /// + /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: ForwardingRule.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal DnsForwardingRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, string domainName, IList targetDnsServers, IDictionary metadata, DnsForwardingRuleState? dnsForwardingRuleState, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -94,17 +119,35 @@ internal DnsForwardingRuleData() { } - /// ETag of the forwarding rule. + /// + /// ETag of the forwarding rule. + /// Serialized Name: ForwardingRule.etag + /// public ETag? ETag { get; } - /// The domain name for the forwarding rule. + /// + /// The domain name for the forwarding rule. + /// Serialized Name: ForwardingRule.properties.domainName + /// public string DomainName { get; set; } - /// DNS servers to forward the DNS query to. + /// + /// DNS servers to forward the DNS query to. + /// Serialized Name: ForwardingRule.properties.targetDnsServers + /// public IList TargetDnsServers { get; } - /// Metadata attached to the forwarding rule. + /// + /// Metadata attached to the forwarding rule. + /// Serialized Name: ForwardingRule.properties.metadata + /// public IDictionary Metadata { get; } - /// The state of forwarding rule. + /// + /// The state of forwarding rule. + /// Serialized Name: ForwardingRule.properties.forwardingRuleState + /// public DnsForwardingRuleState? DnsForwardingRuleState { get; set; } - /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: ForwardingRule.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs index 9a61a7a0477a..4f4001bc45af 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs @@ -18,6 +18,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsForwardingRuleset data model. /// Describes a DNS forwarding ruleset. + /// Serialized Name: DnsForwardingRuleset /// public partial class DnsForwardingRulesetData : TrackedResourceData { @@ -55,7 +56,10 @@ public partial class DnsForwardingRulesetData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints + /// /// is null. public DnsForwardingRulesetData(AzureLocation location, IEnumerable dnsResolverOutboundEndpoints) : base(location) { @@ -71,10 +75,22 @@ public DnsForwardingRulesetData(AzureLocation location, IEnumerable The systemData. /// The tags. /// The location. - /// ETag of the DNS forwarding ruleset. - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid for the DNS forwarding ruleset. + /// + /// ETag of the DNS forwarding ruleset. + /// Serialized Name: DnsForwardingRuleset.etag + /// + /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints + /// + /// + /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsForwardingRuleset.properties.provisioningState + /// + /// + /// The resourceGuid for the DNS forwarding ruleset. + /// Serialized Name: DnsForwardingRuleset.properties.resourceGuid + /// /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList dnsResolverOutboundEndpoints, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -90,13 +106,25 @@ internal DnsForwardingRulesetData() { } - /// ETag of the DNS forwarding ruleset. + /// + /// ETag of the DNS forwarding ruleset. + /// Serialized Name: DnsForwardingRuleset.etag + /// public ETag? ETag { get; } - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints + /// public IList DnsResolverOutboundEndpoints { get; } - /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsForwardingRuleset.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } - /// The resourceGuid for the DNS forwarding ruleset. + /// + /// The resourceGuid for the DNS forwarding ruleset. + /// Serialized Name: DnsForwardingRuleset.properties.resourceGuid + /// public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs index fea2607e9de0..6fb66d249561 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsForwardingRulesetVirtualNetworkLink data model. /// Describes a virtual network link. + /// Serialized Name: VirtualNetworkLink /// public partial class DnsForwardingRulesetVirtualNetworkLinkData : ResourceData { @@ -53,7 +54,10 @@ public partial class DnsForwardingRulesetVirtualNetworkLinkData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The reference to the virtual network. This cannot be changed after creation. + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork + /// /// is null. public DnsForwardingRulesetVirtualNetworkLinkData(WritableSubResource virtualNetwork) { @@ -68,10 +72,22 @@ public DnsForwardingRulesetVirtualNetworkLinkData(WritableSubResource virtualNet /// The name. /// The resourceType. /// The systemData. - /// ETag of the virtual network link. - /// The reference to the virtual network. This cannot be changed after creation. - /// Metadata attached to the virtual network link. - /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the virtual network link. + /// Serialized Name: VirtualNetworkLink.etag + /// + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork + /// + /// + /// Metadata attached to the virtual network link. + /// Serialized Name: VirtualNetworkLink.properties.metadata + /// + /// + /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: VirtualNetworkLink.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetVirtualNetworkLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, WritableSubResource virtualNetwork, IDictionary metadata, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -87,9 +103,15 @@ internal DnsForwardingRulesetVirtualNetworkLinkData() { } - /// ETag of the virtual network link. + /// + /// ETag of the virtual network link. + /// Serialized Name: VirtualNetworkLink.etag + /// public ETag? ETag { get; } - /// The reference to the virtual network. This cannot be changed after creation. + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork + /// internal WritableSubResource VirtualNetwork { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkId @@ -103,9 +125,15 @@ public ResourceIdentifier VirtualNetworkId } } - /// Metadata attached to the virtual network link. + /// + /// Metadata attached to the virtual network link. + /// Serialized Name: VirtualNetworkLink.properties.metadata + /// public IDictionary Metadata { get; } - /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: VirtualNetworkLink.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs index 78ede75b873c..6eb0a9389399 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolver data model. /// Describes a DNS resolver. + /// Serialized Name: DnsResolver /// public partial class DnsResolverData : TrackedResourceData { @@ -54,7 +55,10 @@ public partial class DnsResolverData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The reference to the virtual network. This cannot be changed after creation. + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolver.properties.virtualNetwork + /// /// is null. public DnsResolverData(AzureLocation location, WritableSubResource virtualNetwork) : base(location) { @@ -70,11 +74,26 @@ public DnsResolverData(AzureLocation location, WritableSubResource virtualNetwor /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver. - /// The reference to the virtual network. This cannot be changed after creation. - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the DNS resolver resource. + /// + /// ETag of the DNS resolver. + /// Serialized Name: DnsResolver.etag + /// + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolver.properties.virtualNetwork + /// + /// + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolver.properties.dnsResolverState + /// + /// + /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolver.properties.provisioningState + /// + /// + /// The resourceGuid property of the DNS resolver resource. + /// Serialized Name: DnsResolver.properties.resourceGuid + /// /// Keeps track of any properties unknown to the library. internal DnsResolverData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, WritableSubResource virtualNetwork, DnsResolverState? dnsResolverState, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -91,9 +110,15 @@ internal DnsResolverData() { } - /// ETag of the DNS resolver. + /// + /// ETag of the DNS resolver. + /// Serialized Name: DnsResolver.etag + /// public ETag? ETag { get; } - /// The reference to the virtual network. This cannot be changed after creation. + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolver.properties.virtualNetwork + /// internal WritableSubResource VirtualNetwork { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkId @@ -107,11 +132,20 @@ public ResourceIdentifier VirtualNetworkId } } - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolver.properties.dnsResolverState + /// public DnsResolverState? DnsResolverState { get; } - /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolver.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } - /// The resourceGuid property of the DNS resolver resource. + /// + /// The resourceGuid property of the DNS resolver resource. + /// Serialized Name: DnsResolver.properties.resourceGuid + /// public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs index fdfe279729b3..edb29061b63b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverDomainList data model. /// Describes a DNS resolver domain list. + /// Serialized Name: DnsResolverDomainList /// public partial class DnsResolverDomainListData : TrackedResourceData { @@ -65,11 +66,26 @@ public DnsResolverDomainListData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver domain list. - /// The domains in the domain list. - /// The URL for bulk upload or download for domain lists containing larger set of domains. - /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the DNS resolver domain list resource. + /// + /// ETag of the DNS resolver domain list. + /// Serialized Name: DnsResolverDomainList.etag + /// + /// + /// The domains in the domain list. + /// Serialized Name: DnsResolverDomainList.properties.domains + /// + /// + /// The URL for bulk upload or download for domain lists containing larger set of domains. + /// Serialized Name: DnsResolverDomainList.properties.domainsUrl + /// + /// + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverDomainList.properties.provisioningState + /// + /// + /// The resourceGuid property of the DNS resolver domain list resource. + /// Serialized Name: DnsResolverDomainList.properties.resourceGuid + /// /// Keeps track of any properties unknown to the library. internal DnsResolverDomainListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList domains, Uri domainsUri, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -86,15 +102,30 @@ internal DnsResolverDomainListData() { } - /// ETag of the DNS resolver domain list. + /// + /// ETag of the DNS resolver domain list. + /// Serialized Name: DnsResolverDomainList.etag + /// public ETag? ETag { get; } - /// The domains in the domain list. + /// + /// The domains in the domain list. + /// Serialized Name: DnsResolverDomainList.properties.domains + /// public IList Domains { get; } - /// The URL for bulk upload or download for domain lists containing larger set of domains. + /// + /// The URL for bulk upload or download for domain lists containing larger set of domains. + /// Serialized Name: DnsResolverDomainList.properties.domainsUrl + /// public Uri DomainsUri { get; } - /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverDomainList.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } - /// The resourceGuid property of the DNS resolver domain list resource. + /// + /// The resourceGuid property of the DNS resolver domain list resource. + /// Serialized Name: DnsResolverDomainList.properties.resourceGuid + /// public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs index 417e365f1eec..5dabe1345780 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverInboundEndpoint data model. /// Describes an inbound endpoint for a DNS resolver. + /// Serialized Name: InboundEndpoint /// public partial class DnsResolverInboundEndpointData : TrackedResourceData { @@ -54,7 +55,10 @@ public partial class DnsResolverInboundEndpointData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// IP configurations for the inbound endpoint. + /// + /// IP configurations for the inbound endpoint. + /// Serialized Name: InboundEndpoint.properties.ipConfigurations + /// /// is null. public DnsResolverInboundEndpointData(AzureLocation location, IEnumerable ipConfigurations) : base(location) { @@ -70,10 +74,22 @@ public DnsResolverInboundEndpointData(AzureLocation location, IEnumerable The systemData. /// The tags. /// The location. - /// ETag of the inbound endpoint. - /// IP configurations for the inbound endpoint. - /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the inbound endpoint resource. + /// + /// ETag of the inbound endpoint. + /// Serialized Name: InboundEndpoint.etag + /// + /// + /// IP configurations for the inbound endpoint. + /// Serialized Name: InboundEndpoint.properties.ipConfigurations + /// + /// + /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: InboundEndpoint.properties.provisioningState + /// + /// + /// The resourceGuid property of the inbound endpoint resource. + /// Serialized Name: InboundEndpoint.properties.resourceGuid + /// /// Keeps track of any properties unknown to the library. internal DnsResolverInboundEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList ipConfigurations, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -89,13 +105,25 @@ internal DnsResolverInboundEndpointData() { } - /// ETag of the inbound endpoint. + /// + /// ETag of the inbound endpoint. + /// Serialized Name: InboundEndpoint.etag + /// public ETag? ETag { get; } - /// IP configurations for the inbound endpoint. + /// + /// IP configurations for the inbound endpoint. + /// Serialized Name: InboundEndpoint.properties.ipConfigurations + /// public IList IPConfigurations { get; } - /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: InboundEndpoint.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } - /// The resourceGuid property of the inbound endpoint resource. + /// + /// The resourceGuid property of the inbound endpoint resource. + /// Serialized Name: InboundEndpoint.properties.resourceGuid + /// public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs index 276578b0a477..8ff2e4803a5c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverOutboundEndpoint data model. /// Describes an outbound endpoint for a DNS resolver. + /// Serialized Name: OutboundEndpoint /// public partial class DnsResolverOutboundEndpointData : TrackedResourceData { @@ -54,7 +55,10 @@ public partial class DnsResolverOutboundEndpointData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The reference to the subnet used for the outbound endpoint. + /// + /// The reference to the subnet used for the outbound endpoint. + /// Serialized Name: OutboundEndpoint.properties.subnet + /// /// is null. public DnsResolverOutboundEndpointData(AzureLocation location, WritableSubResource subnet) : base(location) { @@ -70,10 +74,22 @@ public DnsResolverOutboundEndpointData(AzureLocation location, WritableSubResour /// The systemData. /// The tags. /// The location. - /// ETag of the outbound endpoint. - /// The reference to the subnet used for the outbound endpoint. - /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the outbound endpoint resource. + /// + /// ETag of the outbound endpoint. + /// Serialized Name: OutboundEndpoint.etag + /// + /// + /// The reference to the subnet used for the outbound endpoint. + /// Serialized Name: OutboundEndpoint.properties.subnet + /// + /// + /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: OutboundEndpoint.properties.provisioningState + /// + /// + /// The resourceGuid property of the outbound endpoint resource. + /// Serialized Name: OutboundEndpoint.properties.resourceGuid + /// /// Keeps track of any properties unknown to the library. internal DnsResolverOutboundEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, WritableSubResource subnet, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -89,9 +105,15 @@ internal DnsResolverOutboundEndpointData() { } - /// ETag of the outbound endpoint. + /// + /// ETag of the outbound endpoint. + /// Serialized Name: OutboundEndpoint.etag + /// public ETag? ETag { get; } - /// The reference to the subnet used for the outbound endpoint. + /// + /// The reference to the subnet used for the outbound endpoint. + /// Serialized Name: OutboundEndpoint.properties.subnet + /// internal WritableSubResource Subnet { get; set; } /// Gets or sets Id. public ResourceIdentifier SubnetId @@ -105,9 +127,15 @@ public ResourceIdentifier SubnetId } } - /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: OutboundEndpoint.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } - /// The resourceGuid property of the outbound endpoint resource. + /// + /// The resourceGuid property of the outbound endpoint resource. + /// Serialized Name: OutboundEndpoint.properties.resourceGuid + /// public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs index c8c4f9e9923f..6e0340c3c39f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverPolicy data model. /// Describes a DNS resolver policy. + /// Serialized Name: DnsResolverPolicy /// public partial class DnsResolverPolicyData : TrackedResourceData { @@ -64,9 +65,18 @@ public DnsResolverPolicyData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver policy. - /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. - /// The resourceGuid property of the DNS resolver policy resource. + /// + /// ETag of the DNS resolver policy. + /// Serialized Name: DnsResolverPolicy.etag + /// + /// + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverPolicy.properties.provisioningState + /// + /// + /// The resourceGuid property of the DNS resolver policy resource. + /// Serialized Name: DnsResolverPolicy.properties.resourceGuid + /// /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -81,11 +91,20 @@ internal DnsResolverPolicyData() { } - /// ETag of the DNS resolver policy. + /// + /// ETag of the DNS resolver policy. + /// Serialized Name: DnsResolverPolicy.etag + /// public ETag? ETag { get; } - /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverPolicy.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } - /// The resourceGuid property of the DNS resolver policy resource. + /// + /// The resourceGuid property of the DNS resolver policy resource. + /// Serialized Name: DnsResolverPolicy.properties.resourceGuid + /// public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs index be6cc28f570c..ff546cf96075 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverPolicyVirtualNetworkLink data model. /// Describes a DNS resolver policy virtual network link. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink /// public partial class DnsResolverPolicyVirtualNetworkLinkData : TrackedResourceData { @@ -54,7 +55,10 @@ public partial class DnsResolverPolicyVirtualNetworkLinkData : TrackedResourceDa /// Initializes a new instance of . /// The location. - /// The reference to the virtual network. This cannot be changed after creation. + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork + /// /// is null. public DnsResolverPolicyVirtualNetworkLinkData(AzureLocation location, WritableSubResource virtualNetwork) : base(location) { @@ -70,9 +74,18 @@ public DnsResolverPolicyVirtualNetworkLinkData(AzureLocation location, WritableS /// The systemData. /// The tags. /// The location. - /// ETag of the DNS resolver policy virtual network link. - /// The reference to the virtual network. This cannot be changed after creation. - /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the DNS resolver policy virtual network link. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.etag + /// + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork + /// + /// + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyVirtualNetworkLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, WritableSubResource virtualNetwork, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -87,9 +100,15 @@ internal DnsResolverPolicyVirtualNetworkLinkData() { } - /// ETag of the DNS resolver policy virtual network link. + /// + /// ETag of the DNS resolver policy virtual network link. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.etag + /// public ETag? ETag { get; } - /// The reference to the virtual network. This cannot be changed after creation. + /// + /// The reference to the virtual network. This cannot be changed after creation. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork + /// internal WritableSubResource VirtualNetwork { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkId @@ -103,7 +122,10 @@ public ResourceIdentifier VirtualNetworkId } } - /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs index ac53fb3884d1..a9fb1108a4e8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs @@ -18,6 +18,7 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsSecurityRule data model. /// Describes a DNS security rule. + /// Serialized Name: DnsSecurityRule /// public partial class DnsSecurityRuleData : TrackedResourceData { @@ -55,9 +56,18 @@ public partial class DnsSecurityRuleData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The priority of the DNS security rule. - /// The action to take on DNS requests that match the DNS security rule. - /// DNS resolver policy domains lists that the DNS security rule applies to. + /// + /// The priority of the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.priority + /// + /// + /// The action to take on DNS requests that match the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.action + /// + /// + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists + /// /// or is null. public DnsSecurityRuleData(AzureLocation location, int priority, DnsSecurityRuleAction action, IEnumerable dnsResolverDomainLists) : base(location) { @@ -76,12 +86,30 @@ public DnsSecurityRuleData(AzureLocation location, int priority, DnsSecurityRule /// The systemData. /// The tags. /// The location. - /// ETag of the DNS security rule. - /// The priority of the DNS security rule. - /// The action to take on DNS requests that match the DNS security rule. - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// The state of DNS security rule. - /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// + /// ETag of the DNS security rule. + /// Serialized Name: DnsSecurityRule.etag + /// + /// + /// The priority of the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.priority + /// + /// + /// The action to take on DNS requests that match the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.action + /// + /// + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists + /// + /// + /// The state of DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.dnsSecurityRuleState + /// + /// + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsSecurityRule.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal DnsSecurityRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, int priority, DnsSecurityRuleAction action, IList dnsResolverDomainLists, DnsSecurityRuleState? dnsSecurityRuleState, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -99,14 +127,26 @@ internal DnsSecurityRuleData() { } - /// ETag of the DNS security rule. + /// + /// ETag of the DNS security rule. + /// Serialized Name: DnsSecurityRule.etag + /// public ETag? ETag { get; } - /// The priority of the DNS security rule. + /// + /// The priority of the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.priority + /// public int Priority { get; set; } - /// The action to take on DNS requests that match the DNS security rule. + /// + /// The action to take on DNS requests that match the DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.action + /// internal DnsSecurityRuleAction Action { get; set; } - /// The type of action to take. - public DnsSecurityRuleActionType? ActionType + /// + /// The type of action to take. + /// Serialized Name: DnsSecurityRuleAction.actionType + /// + public ActionType? ActionType { get => Action is null ? default : Action.ActionType; set @@ -117,11 +157,20 @@ public DnsSecurityRuleActionType? ActionType } } - /// DNS resolver policy domains lists that the DNS security rule applies to. + /// + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists + /// public IList DnsResolverDomainLists { get; } - /// The state of DNS security rule. + /// + /// The state of DNS security rule. + /// Serialized Name: DnsSecurityRule.properties.dnsSecurityRuleState + /// public DnsSecurityRuleState? DnsSecurityRuleState { get; set; } - /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsSecurityRule.properties.provisioningState + /// public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs index d9568447f6fe..bc5c5ae40b8c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs @@ -224,7 +224,7 @@ public static DnsResolverDomainListResource GetDnsResolverDomainListResource(thi /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// Mocking /// To mock this method, please mock instead. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs index 940f12487c41..fe7c724bb0fd 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverArmClient.cs @@ -156,7 +156,7 @@ public virtual DnsResolverDomainListResource GetDnsResolverDomainListResource(Re /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. /// Returns a object. diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs new file mode 100644 index 000000000000..9c4ffe11fd99 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// + /// The action type in requests for bulk upload or download of a DNS resolver domain list. + /// Serialized Name: Action + /// + public readonly partial struct Action : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Action(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UploadValue = "Upload"; + private const string DownloadValue = "Download"; + + /// + /// Upload + /// Serialized Name: Action.Upload + /// + public static Action Upload { get; } = new Action(UploadValue); + /// + /// Download + /// Serialized Name: Action.Download + /// + public static Action Download { get; } = new Action(DownloadValue); + /// Determines if two values are the same. + public static bool operator ==(Action left, Action right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Action left, Action right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Action(string value) => new Action(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Action other && Equals(other); + /// + public bool Equals(Action other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ActionType.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ActionType.cs new file mode 100644 index 000000000000..de5d8017d6eb --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ActionType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// + /// The type of action to take. + /// Serialized Name: ActionType + /// + public readonly partial struct ActionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ActionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllowValue = "Allow"; + private const string AlertValue = "Alert"; + private const string BlockValue = "Block"; + + /// + /// Allow + /// Serialized Name: ActionType.Allow + /// + public static ActionType Allow { get; } = new ActionType(AllowValue); + /// + /// Alert + /// Serialized Name: ActionType.Alert + /// + public static ActionType Alert { get; } = new ActionType(AlertValue); + /// + /// Block + /// Serialized Name: ActionType.Block + /// + public static ActionType Block { get; } = new ActionType(BlockValue); + /// Determines if two values are the same. + public static bool operator ==(ActionType left, ActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ActionType left, ActionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ActionType(string value) => new ActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ActionType other && Equals(other); + /// + public bool Equals(ActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs index 38c44a2f77fc..0d65a37538d6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a forwarding rule for PATCH operation. + /// + /// Describes a forwarding rule for PATCH operation. + /// Serialized Name: ForwardingRulePatch + /// public partial class DnsForwardingRulePatch { /// @@ -53,9 +56,18 @@ public DnsForwardingRulePatch() } /// Initializes a new instance of . - /// DNS servers to forward the DNS query to. - /// Metadata attached to the forwarding rule. - /// The state of forwarding rule. + /// + /// DNS servers to forward the DNS query to. + /// Serialized Name: ForwardingRulePatch.properties.targetDnsServers + /// + /// + /// Metadata attached to the forwarding rule. + /// Serialized Name: ForwardingRulePatch.properties.metadata + /// + /// + /// The state of forwarding rule. + /// Serialized Name: ForwardingRulePatch.properties.forwardingRuleState + /// /// Keeps track of any properties unknown to the library. internal DnsForwardingRulePatch(IList targetDnsServers, IDictionary metadata, DnsForwardingRuleState? dnsForwardingRuleState, IDictionary serializedAdditionalRawData) { @@ -65,11 +77,20 @@ internal DnsForwardingRulePatch(IList targetDnsServers, IDictio _serializedAdditionalRawData = serializedAdditionalRawData; } - /// DNS servers to forward the DNS query to. + /// + /// DNS servers to forward the DNS query to. + /// Serialized Name: ForwardingRulePatch.properties.targetDnsServers + /// public IList TargetDnsServers { get; } - /// Metadata attached to the forwarding rule. + /// + /// Metadata attached to the forwarding rule. + /// Serialized Name: ForwardingRulePatch.properties.metadata + /// public IDictionary Metadata { get; } - /// The state of forwarding rule. + /// + /// The state of forwarding rule. + /// Serialized Name: ForwardingRulePatch.properties.forwardingRuleState + /// public DnsForwardingRuleState? DnsForwardingRuleState { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs index 6511e6ac7399..07cc3ae95f71 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The state of forwarding rule. + /// + /// The state of forwarding rule. + /// Serialized Name: ForwardingRuleState + /// public readonly partial struct DnsForwardingRuleState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public DnsForwardingRuleState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: ForwardingRuleState.Enabled + /// public static DnsForwardingRuleState Enabled { get; } = new DnsForwardingRuleState(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: ForwardingRuleState.Disabled + /// public static DnsForwardingRuleState Disabled { get; } = new DnsForwardingRuleState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(DnsForwardingRuleState left, DnsForwardingRuleState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs index 68571c1de8c8..ab3d340e7cd3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on DNS forwarding rulesets. + /// + /// The response to an enumeration operation on DNS forwarding rulesets. + /// Serialized Name: DnsForwardingRulesetListResult + /// internal partial class DnsForwardingRulesetListResult { /// @@ -52,8 +55,14 @@ internal DnsForwardingRulesetListResult() } /// Initializes a new instance of . - /// Enumeration of the DNS forwarding rulesets. - /// The continuation token for the next page of results. + /// + /// Enumeration of the DNS forwarding rulesets. + /// Serialized Name: DnsForwardingRulesetListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsForwardingRulesetListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal DnsForwardingRulesetListResult(IReadOnlyList _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the DNS forwarding rulesets. + /// + /// Enumeration of the DNS forwarding rulesets. + /// Serialized Name: DnsForwardingRulesetListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsForwardingRulesetListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs index 0293b47a3e37..26a8c5f2830a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a DNS forwarding ruleset PATCH operation. + /// + /// Describes a DNS forwarding ruleset PATCH operation. + /// Serialized Name: DnsForwardingRulesetPatch + /// public partial class DnsForwardingRulesetPatch { /// @@ -54,8 +57,14 @@ public DnsForwardingRulesetPatch() } /// Initializes a new instance of . - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// Tags for DNS Resolver. + /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// Serialized Name: DnsForwardingRulesetPatch.dnsResolverOutboundEndpoints + /// + /// + /// Tags for DNS Resolver. + /// Serialized Name: DnsForwardingRulesetPatch.tags + /// /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetPatch(IList dnsResolverOutboundEndpoints, IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -64,9 +73,15 @@ internal DnsForwardingRulesetPatch(IList dnsResolverOutboun _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// Serialized Name: DnsForwardingRulesetPatch.dnsResolverOutboundEndpoints + /// public IList DnsResolverOutboundEndpoints { get; } - /// Tags for DNS Resolver. + /// + /// Tags for DNS Resolver. + /// Serialized Name: DnsForwardingRulesetPatch.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs index 9f3862c216dc..4e6e4630bf5e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a virtual network link for PATCH operation. + /// + /// Describes a virtual network link for PATCH operation. + /// Serialized Name: VirtualNetworkLinkPatch + /// public partial class DnsForwardingRulesetVirtualNetworkLinkPatch { /// @@ -52,7 +55,10 @@ public DnsForwardingRulesetVirtualNetworkLinkPatch() } /// Initializes a new instance of . - /// Metadata attached to the virtual network link. + /// + /// Metadata attached to the virtual network link. + /// Serialized Name: VirtualNetworkLinkPatch.properties.metadata + /// /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetVirtualNetworkLinkPatch(IDictionary metadata, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal DnsForwardingRulesetVirtualNetworkLinkPatch(IDictionary _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Metadata attached to the virtual network link. + /// + /// Metadata attached to the virtual network link. + /// Serialized Name: VirtualNetworkLinkPatch.properties.metadata + /// public IDictionary Metadata { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs index 02e1bb7512f6..e3ea76e79b91 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs @@ -79,7 +79,7 @@ internal static DnsResolverDomainListBulk DeserializeDnsResolverDomainListBulk(J return null; } Uri storageUrl = default; - DnsResolverDomainListBulkAction action = default; + Action action = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -100,7 +100,7 @@ internal static DnsResolverDomainListBulk DeserializeDnsResolverDomainListBulk(J } if (property0.NameEquals("action"u8)) { - action = new DnsResolverDomainListBulkAction(property0.Value.GetString()); + action = new Action(property0.Value.GetString()); continue; } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs index e55031a540b4..354c1e871cce 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a DNS resolver domain list for bulk UPLOAD or DOWNLOAD operations. + /// + /// Describes a DNS resolver domain list for bulk UPLOAD or DOWNLOAD operations. + /// Serialized Name: DnsResolverDomainListBulk + /// public partial class DnsResolverDomainListBulk { /// @@ -46,10 +49,16 @@ public partial class DnsResolverDomainListBulk private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. - /// The action to take in the request, Upload or Download. + /// + /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. + /// Serialized Name: DnsResolverDomainListBulk.properties.storageUrl + /// + /// + /// The action to take in the request, Upload or Download. + /// Serialized Name: DnsResolverDomainListBulk.properties.action + /// /// is null. - public DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action) + public DnsResolverDomainListBulk(Uri storageUri, Action action) { Argument.AssertNotNull(storageUri, nameof(storageUri)); @@ -58,10 +67,16 @@ public DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction } /// Initializes a new instance of . - /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. - /// The action to take in the request, Upload or Download. + /// + /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. + /// Serialized Name: DnsResolverDomainListBulk.properties.storageUrl + /// + /// + /// The action to take in the request, Upload or Download. + /// Serialized Name: DnsResolverDomainListBulk.properties.action + /// /// Keeps track of any properties unknown to the library. - internal DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action, IDictionary serializedAdditionalRawData) + internal DnsResolverDomainListBulk(Uri storageUri, Action action, IDictionary serializedAdditionalRawData) { StorageUri = storageUri; Action = action; @@ -73,9 +88,15 @@ internal DnsResolverDomainListBulk() { } - /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. + /// + /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. + /// Serialized Name: DnsResolverDomainListBulk.properties.storageUrl + /// public Uri StorageUri { get; } - /// The action to take in the request, Upload or Download. - public DnsResolverDomainListBulkAction Action { get; } + /// + /// The action to take in the request, Upload or Download. + /// Serialized Name: DnsResolverDomainListBulk.properties.action + /// + public Action Action { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs deleted file mode 100644 index 1814196f43bd..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DnsResolver.Models -{ - /// The action type in requests for bulk upload or download of a DNS resolver domain list. - public readonly partial struct DnsResolverDomainListBulkAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DnsResolverDomainListBulkAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UploadValue = "Upload"; - private const string DownloadValue = "Download"; - - /// Upload. - public static DnsResolverDomainListBulkAction Upload { get; } = new DnsResolverDomainListBulkAction(UploadValue); - /// Download. - public static DnsResolverDomainListBulkAction Download { get; } = new DnsResolverDomainListBulkAction(DownloadValue); - /// Determines if two values are the same. - public static bool operator ==(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator DnsResolverDomainListBulkAction(string value) => new DnsResolverDomainListBulkAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DnsResolverDomainListBulkAction other && Equals(other); - /// - public bool Equals(DnsResolverDomainListBulkAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs index 85f570486d94..fee02ea466b1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a DNS resolver domain list for PATCH operation. + /// + /// Describes a DNS resolver domain list for PATCH operation. + /// Serialized Name: DnsResolverDomainListPatch + /// public partial class DnsResolverDomainListPatch { /// @@ -53,8 +56,14 @@ public DnsResolverDomainListPatch() } /// Initializes a new instance of . - /// Tags for DNS resolver domain list. - /// The domains in the domain list. + /// + /// Tags for DNS resolver domain list. + /// Serialized Name: DnsResolverDomainListPatch.tags + /// + /// + /// The domains in the domain list. + /// Serialized Name: DnsResolverDomainListPatch.properties.domains + /// /// Keeps track of any properties unknown to the library. internal DnsResolverDomainListPatch(IDictionary tags, IList domains, IDictionary serializedAdditionalRawData) { @@ -63,9 +72,15 @@ internal DnsResolverDomainListPatch(IDictionary tags, IList Tags for DNS resolver domain list. + /// + /// Tags for DNS resolver domain list. + /// Serialized Name: DnsResolverDomainListPatch.tags + /// public IDictionary Tags { get; } - /// The domains in the domain list. + /// + /// The domains in the domain list. + /// Serialized Name: DnsResolverDomainListPatch.properties.domains + /// public IList Domains { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs index 154da1abd511..6953aee324e1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on DNS resolver domain lists. + /// + /// The response to an enumeration operation on DNS resolver domain lists. + /// Serialized Name: DnsResolverDomainListResult + /// internal partial class DnsResolverDomainListResult { /// @@ -52,8 +55,14 @@ internal DnsResolverDomainListResult() } /// Initializes a new instance of . - /// Enumeration of the DNS resolver domain lists. - /// The continuation token for the next page of results. + /// + /// Enumeration of the DNS resolver domain lists. + /// Serialized Name: DnsResolverDomainListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverDomainListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal DnsResolverDomainListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal DnsResolverDomainListResult(IReadOnlyList va _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the DNS resolver domain lists. + /// + /// Enumeration of the DNS resolver domain lists. + /// Serialized Name: DnsResolverDomainListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverDomainListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs index e9c44413edb6..b1c71fe4dd77 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes an inbound endpoint for a DNS resolver for PATCH operation. + /// + /// Describes an inbound endpoint for a DNS resolver for PATCH operation. + /// Serialized Name: InboundEndpointPatch + /// public partial class DnsResolverInboundEndpointPatch { /// @@ -52,7 +55,10 @@ public DnsResolverInboundEndpointPatch() } /// Initializes a new instance of . - /// Tags for inbound endpoint. + /// + /// Tags for inbound endpoint. + /// Serialized Name: InboundEndpointPatch.tags + /// /// Keeps track of any properties unknown to the library. internal DnsResolverInboundEndpointPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal DnsResolverInboundEndpointPatch(IDictionary tags, IDict _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Tags for inbound endpoint. + /// + /// Tags for inbound endpoint. + /// Serialized Name: InboundEndpointPatch.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs index b7de5f884977..700f7e6d1753 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on DNS resolvers. + /// + /// The response to an enumeration operation on DNS resolvers. + /// Serialized Name: DnsResolverListResult + /// internal partial class DnsResolverListResult { /// @@ -52,8 +55,14 @@ internal DnsResolverListResult() } /// Initializes a new instance of . - /// Enumeration of the DNS resolvers. - /// The continuation token for the next page of results. + /// + /// Enumeration of the DNS resolvers. + /// Serialized Name: DnsResolverListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal DnsResolverListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal DnsResolverListResult(IReadOnlyList value, string next _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the DNS resolvers. + /// + /// Enumeration of the DNS resolvers. + /// Serialized Name: DnsResolverListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs index a913600e9af9..881419fb0f4b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes an outbound endpoint for a DNS resolver for PATCH operation. + /// + /// Describes an outbound endpoint for a DNS resolver for PATCH operation. + /// Serialized Name: OutboundEndpointPatch + /// public partial class DnsResolverOutboundEndpointPatch { /// @@ -52,7 +55,10 @@ public DnsResolverOutboundEndpointPatch() } /// Initializes a new instance of . - /// Tags for outbound endpoint. + /// + /// Tags for outbound endpoint. + /// Serialized Name: OutboundEndpointPatch.tags + /// /// Keeps track of any properties unknown to the library. internal DnsResolverOutboundEndpointPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal DnsResolverOutboundEndpointPatch(IDictionary tags, IDic _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Tags for outbound endpoint. + /// + /// Tags for outbound endpoint. + /// Serialized Name: OutboundEndpointPatch.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs index 456d3a87a390..40b5dffc19f6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a DNS resolver for PATCH operation. + /// + /// Describes a DNS resolver for PATCH operation. + /// Serialized Name: DnsResolverPatch + /// public partial class DnsResolverPatch { /// @@ -52,7 +55,10 @@ public DnsResolverPatch() } /// Initializes a new instance of . - /// Tags for DNS Resolver. + /// + /// Tags for DNS Resolver. + /// Serialized Name: DnsResolverPatch.tags + /// /// Keeps track of any properties unknown to the library. internal DnsResolverPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal DnsResolverPatch(IDictionary tags, IDictionary Tags for DNS Resolver. + /// + /// Tags for DNS Resolver. + /// Serialized Name: DnsResolverPatch.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs index 8ff57fca8d6e..5bc21b971711 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on DNS resolver policies. + /// + /// The response to an enumeration operation on DNS resolver policies. + /// Serialized Name: DnsResolverPolicyListResult + /// internal partial class DnsResolverPolicyListResult { /// @@ -52,8 +55,14 @@ internal DnsResolverPolicyListResult() } /// Initializes a new instance of . - /// Enumeration of the DNS resolver policies. - /// The continuation token for the next page of results. + /// + /// Enumeration of the DNS resolver policies. + /// Serialized Name: DnsResolverPolicyListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverPolicyListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal DnsResolverPolicyListResult(IReadOnlyList value, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the DNS resolver policies. + /// + /// Enumeration of the DNS resolver policies. + /// Serialized Name: DnsResolverPolicyListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverPolicyListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs index 69a87aaa5be6..f347ca9b5a58 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a DNS resolver policy for PATCH operation. + /// + /// Describes a DNS resolver policy for PATCH operation. + /// Serialized Name: DnsResolverPolicyPatch + /// public partial class DnsResolverPolicyPatch { /// @@ -52,7 +55,10 @@ public DnsResolverPolicyPatch() } /// Initializes a new instance of . - /// Tags for DNS resolver policy. + /// + /// Tags for DNS resolver policy. + /// Serialized Name: DnsResolverPolicyPatch.tags + /// /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal DnsResolverPolicyPatch(IDictionary tags, IDictionary Tags for DNS resolver policy. + /// + /// Tags for DNS resolver policy. + /// Serialized Name: DnsResolverPolicyPatch.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs index c97e63e8e665..42d059ab1c1a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on DNS resolver policy virtual network links. + /// + /// The response to an enumeration operation on DNS resolver policy virtual network links. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult + /// internal partial class DnsResolverPolicyVirtualNetworkLinkListResult { /// @@ -52,8 +55,14 @@ internal DnsResolverPolicyVirtualNetworkLinkListResult() } /// Initializes a new instance of . - /// Enumeration of the DNS resolver policy virtual network links. - /// The continuation token for the next page of results. + /// + /// Enumeration of the DNS resolver policy virtual network links. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyVirtualNetworkLinkListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal DnsResolverPolicyVirtualNetworkLinkListResult(IReadOnlyList Enumeration of the DNS resolver policy virtual network links. + /// + /// Enumeration of the DNS resolver policy virtual network links. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs index 8d84dc39849b..acff16b081c3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a DNS resolver policy virtual network link for PATCH operation. + /// + /// Describes a DNS resolver policy virtual network link for PATCH operation. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkPatch + /// public partial class DnsResolverPolicyVirtualNetworkLinkPatch { /// @@ -52,7 +55,10 @@ public DnsResolverPolicyVirtualNetworkLinkPatch() } /// Initializes a new instance of . - /// Tags for the DNS resolver policy virtual network link. + /// + /// Tags for the DNS resolver policy virtual network link. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkPatch.tags + /// /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyVirtualNetworkLinkPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal DnsResolverPolicyVirtualNetworkLinkPatch(IDictionary ta _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Tags for the DNS resolver policy virtual network link. + /// + /// Tags for the DNS resolver policy virtual network link. + /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkPatch.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs index d61a62d936ce..e3bcfb070896 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The current provisioning state of the resource. + /// + /// The current provisioning state of the resource. + /// Serialized Name: ProvisioningState + /// public readonly partial struct DnsResolverProvisioningState : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public DnsResolverProvisioningState(string value) private const string FailedValue = "Failed"; private const string CanceledValue = "Canceled"; - /// Creating. + /// + /// Creating + /// Serialized Name: ProvisioningState.Creating + /// public static DnsResolverProvisioningState Creating { get; } = new DnsResolverProvisioningState(CreatingValue); - /// Updating. + /// + /// Updating + /// Serialized Name: ProvisioningState.Updating + /// public static DnsResolverProvisioningState Updating { get; } = new DnsResolverProvisioningState(UpdatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: ProvisioningState.Deleting + /// public static DnsResolverProvisioningState Deleting { get; } = new DnsResolverProvisioningState(DeletingValue); - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: ProvisioningState.Succeeded + /// public static DnsResolverProvisioningState Succeeded { get; } = new DnsResolverProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: ProvisioningState.Failed + /// public static DnsResolverProvisioningState Failed { get; } = new DnsResolverProvisioningState(FailedValue); - /// Canceled. + /// + /// Canceled + /// Serialized Name: ProvisioningState.Canceled + /// public static DnsResolverProvisioningState Canceled { get; } = new DnsResolverProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(DnsResolverProvisioningState left, DnsResolverProvisioningState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs index d7f76f849992..ab7d852705e2 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// Serialized Name: DnsResolverState + /// public readonly partial struct DnsResolverState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public DnsResolverState(string value) private const string ConnectedValue = "Connected"; private const string DisconnectedValue = "Disconnected"; - /// Connected. + /// + /// Connected + /// Serialized Name: DnsResolverState.Connected + /// public static DnsResolverState Connected { get; } = new DnsResolverState(ConnectedValue); - /// Disconnected. + /// + /// Disconnected + /// Serialized Name: DnsResolverState.Disconnected + /// public static DnsResolverState Disconnected { get; } = new DnsResolverState(DisconnectedValue); /// Determines if two values are the same. public static bool operator ==(DnsResolverState left, DnsResolverState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs index e9e4b6d310e7..722d7122dcce 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs @@ -76,7 +76,7 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme { return null; } - DnsSecurityRuleActionType? actionType = default; + ActionType? actionType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -87,7 +87,7 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme { continue; } - actionType = new DnsSecurityRuleActionType(property.Value.GetString()); + actionType = new ActionType(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs index f975419c0e52..67cb89a6b7ea 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The action to take on DNS requests that match the DNS security rule. + /// + /// The action to take on DNS requests that match the DNS security rule. + /// Serialized Name: DnsSecurityRuleAction + /// public partial class DnsSecurityRuleAction { /// @@ -51,15 +54,21 @@ public DnsSecurityRuleAction() } /// Initializes a new instance of . - /// The type of action to take. + /// + /// The type of action to take. + /// Serialized Name: DnsSecurityRuleAction.actionType + /// /// Keeps track of any properties unknown to the library. - internal DnsSecurityRuleAction(DnsSecurityRuleActionType? actionType, IDictionary serializedAdditionalRawData) + internal DnsSecurityRuleAction(ActionType? actionType, IDictionary serializedAdditionalRawData) { ActionType = actionType; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of action to take. - public DnsSecurityRuleActionType? ActionType { get; set; } + /// + /// The type of action to take. + /// Serialized Name: DnsSecurityRuleAction.actionType + /// + public ActionType? ActionType { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs deleted file mode 100644 index 3202ee2bcfb6..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DnsResolver.Models -{ - /// The type of action to take. - public readonly partial struct DnsSecurityRuleActionType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DnsSecurityRuleActionType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AllowValue = "Allow"; - private const string AlertValue = "Alert"; - private const string BlockValue = "Block"; - - /// Allow. - public static DnsSecurityRuleActionType Allow { get; } = new DnsSecurityRuleActionType(AllowValue); - /// Alert. - public static DnsSecurityRuleActionType Alert { get; } = new DnsSecurityRuleActionType(AlertValue); - /// Block. - public static DnsSecurityRuleActionType Block { get; } = new DnsSecurityRuleActionType(BlockValue); - /// Determines if two values are the same. - public static bool operator ==(DnsSecurityRuleActionType left, DnsSecurityRuleActionType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DnsSecurityRuleActionType left, DnsSecurityRuleActionType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator DnsSecurityRuleActionType(string value) => new DnsSecurityRuleActionType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DnsSecurityRuleActionType other && Equals(other); - /// - public bool Equals(DnsSecurityRuleActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs index 2caf0fa7bd27..59454932cf41 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on DNS security rules within a DNS resolver policy. + /// + /// The response to an enumeration operation on DNS security rules within a DNS resolver policy. + /// Serialized Name: DnsSecurityRuleListResult + /// internal partial class DnsSecurityRuleListResult { /// @@ -52,8 +55,14 @@ internal DnsSecurityRuleListResult() } /// Initializes a new instance of . - /// Enumeration of the DNS security rules. - /// The continuation token for the next page of results. + /// + /// Enumeration of the DNS security rules. + /// Serialized Name: DnsSecurityRuleListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsSecurityRuleListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal DnsSecurityRuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal DnsSecurityRuleListResult(IReadOnlyList value, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the DNS security rules. + /// + /// Enumeration of the DNS security rules. + /// Serialized Name: DnsSecurityRuleListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: DnsSecurityRuleListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs index 462329a7736a..4ad576050b87 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a DNS security rule for PATCH operation. + /// + /// Describes a DNS security rule for PATCH operation. + /// Serialized Name: DnsSecurityRulePatch + /// public partial class DnsSecurityRulePatch { /// @@ -54,11 +57,26 @@ public DnsSecurityRulePatch() } /// Initializes a new instance of . - /// Tags for DNS security rule. - /// The action to take on DNS requests that match the DNS security rule. - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// The state of DNS security rule. - /// The priority of the DNS security rule. + /// + /// Tags for DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.tags + /// + /// + /// The action to take on DNS requests that match the DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.properties.action + /// + /// + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// Serialized Name: DnsSecurityRulePatch.properties.dnsResolverDomainLists + /// + /// + /// The state of DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.properties.dnsSecurityRuleState + /// + /// + /// The priority of the DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.properties.priority + /// /// Keeps track of any properties unknown to the library. internal DnsSecurityRulePatch(IDictionary tags, DnsSecurityRuleAction action, IList dnsResolverDomainLists, DnsSecurityRuleState? dnsSecurityRuleState, int? priority, IDictionary serializedAdditionalRawData) { @@ -70,12 +88,21 @@ internal DnsSecurityRulePatch(IDictionary tags, DnsSecurityRuleA _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Tags for DNS security rule. + /// + /// Tags for DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.tags + /// public IDictionary Tags { get; } - /// The action to take on DNS requests that match the DNS security rule. + /// + /// The action to take on DNS requests that match the DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.properties.action + /// internal DnsSecurityRuleAction Action { get; set; } - /// The type of action to take. - public DnsSecurityRuleActionType? ActionType + /// + /// The type of action to take. + /// Serialized Name: DnsSecurityRuleAction.actionType + /// + public ActionType? ActionType { get => Action is null ? default : Action.ActionType; set @@ -86,11 +113,20 @@ public DnsSecurityRuleActionType? ActionType } } - /// DNS resolver policy domains lists that the DNS security rule applies to. + /// + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// Serialized Name: DnsSecurityRulePatch.properties.dnsResolverDomainLists + /// public IList DnsResolverDomainLists { get; } - /// The state of DNS security rule. + /// + /// The state of DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.properties.dnsSecurityRuleState + /// public DnsSecurityRuleState? DnsSecurityRuleState { get; set; } - /// The priority of the DNS security rule. + /// + /// The priority of the DNS security rule. + /// Serialized Name: DnsSecurityRulePatch.properties.priority + /// public int? Priority { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs index 8b22ea325780..8bbcb045dccc 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The state of DNS security rule. + /// + /// The state of DNS security rule. + /// Serialized Name: DnsSecurityRuleState + /// public readonly partial struct DnsSecurityRuleState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public DnsSecurityRuleState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: DnsSecurityRuleState.Enabled + /// public static DnsSecurityRuleState Enabled { get; } = new DnsSecurityRuleState(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: DnsSecurityRuleState.Disabled + /// public static DnsSecurityRuleState Disabled { get; } = new DnsSecurityRuleState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(DnsSecurityRuleState left, DnsSecurityRuleState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs index 5b2955a2317b..f6124758e7ab 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset. + /// + /// The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset. + /// Serialized Name: ForwardingRuleListResult + /// internal partial class ForwardingRuleListResult { /// @@ -52,8 +55,14 @@ internal ForwardingRuleListResult() } /// Initializes a new instance of . - /// Enumeration of the forwarding rules. - /// The continuation token for the next page of results. + /// + /// Enumeration of the forwarding rules. + /// Serialized Name: ForwardingRuleListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: ForwardingRuleListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal ForwardingRuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal ForwardingRuleListResult(IReadOnlyList value, st _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the forwarding rules. + /// + /// Enumeration of the forwarding rules. + /// Serialized Name: ForwardingRuleListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: ForwardingRuleListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs index df2d938d861e..491d55f0cca8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Private IP address allocation method. + /// + /// Private IP address allocation method. + /// Serialized Name: IpAllocationMethod + /// public readonly partial struct InboundEndpointIPAllocationMethod : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public InboundEndpointIPAllocationMethod(string value) private const string StaticValue = "Static"; private const string DynamicValue = "Dynamic"; - /// Static. + /// + /// Static + /// Serialized Name: IpAllocationMethod.Static + /// public static InboundEndpointIPAllocationMethod Static { get; } = new InboundEndpointIPAllocationMethod(StaticValue); - /// Dynamic. + /// + /// Dynamic + /// Serialized Name: IpAllocationMethod.Dynamic + /// public static InboundEndpointIPAllocationMethod Dynamic { get; } = new InboundEndpointIPAllocationMethod(DynamicValue); /// Determines if two values are the same. public static bool operator ==(InboundEndpointIPAllocationMethod left, InboundEndpointIPAllocationMethod right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs index 63d93265ea9a..410c1365677b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs @@ -13,7 +13,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// IP configuration. + /// + /// IP configuration. + /// Serialized Name: IpConfiguration + /// public partial class InboundEndpointIPConfiguration { /// @@ -49,7 +52,10 @@ public partial class InboundEndpointIPConfiguration private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The reference to the subnet bound to the IP configuration. + /// + /// The reference to the subnet bound to the IP configuration. + /// Serialized Name: IpConfiguration.subnet + /// /// is null. public InboundEndpointIPConfiguration(WritableSubResource subnet) { @@ -59,9 +65,18 @@ public InboundEndpointIPConfiguration(WritableSubResource subnet) } /// Initializes a new instance of . - /// The reference to the subnet bound to the IP configuration. - /// Private IP address of the IP configuration. - /// Private IP address allocation method. + /// + /// The reference to the subnet bound to the IP configuration. + /// Serialized Name: IpConfiguration.subnet + /// + /// + /// Private IP address of the IP configuration. + /// Serialized Name: IpConfiguration.privateIpAddress + /// + /// + /// Private IP address allocation method. + /// Serialized Name: IpConfiguration.privateIpAllocationMethod + /// /// Keeps track of any properties unknown to the library. internal InboundEndpointIPConfiguration(WritableSubResource subnet, IPAddress privateIPAddress, InboundEndpointIPAllocationMethod? privateIPAllocationMethod, IDictionary serializedAdditionalRawData) { @@ -76,7 +91,10 @@ internal InboundEndpointIPConfiguration() { } - /// The reference to the subnet bound to the IP configuration. + /// + /// The reference to the subnet bound to the IP configuration. + /// Serialized Name: IpConfiguration.subnet + /// internal WritableSubResource Subnet { get; set; } /// Gets or sets Id. public ResourceIdentifier SubnetId @@ -90,9 +108,15 @@ public ResourceIdentifier SubnetId } } - /// Private IP address of the IP configuration. + /// + /// Private IP address of the IP configuration. + /// Serialized Name: IpConfiguration.privateIpAddress + /// public IPAddress PrivateIPAddress { get; set; } - /// Private IP address allocation method. + /// + /// Private IP address allocation method. + /// Serialized Name: IpConfiguration.privateIpAllocationMethod + /// public InboundEndpointIPAllocationMethod? PrivateIPAllocationMethod { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs index 57302c62d43a..c0f59a763c7d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on inbound endpoints for a DNS resolver. + /// + /// The response to an enumeration operation on inbound endpoints for a DNS resolver. + /// Serialized Name: InboundEndpointListResult + /// internal partial class InboundEndpointListResult { /// @@ -52,8 +55,14 @@ internal InboundEndpointListResult() } /// Initializes a new instance of . - /// Enumeration of the inbound endpoints for a DNS resolver. - /// The continuation token for the next page of results. + /// + /// Enumeration of the inbound endpoints for a DNS resolver. + /// Serialized Name: InboundEndpointListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: InboundEndpointListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal InboundEndpointListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal InboundEndpointListResult(IReadOnlyList _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the inbound endpoints for a DNS resolver. + /// + /// Enumeration of the inbound endpoints for a DNS resolver. + /// Serialized Name: InboundEndpointListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: InboundEndpointListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs index cd7f6b3f4022..ef84cb308403 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on outbound endpoints for a DNS resolver. + /// + /// The response to an enumeration operation on outbound endpoints for a DNS resolver. + /// Serialized Name: OutboundEndpointListResult + /// internal partial class OutboundEndpointListResult { /// @@ -52,8 +55,14 @@ internal OutboundEndpointListResult() } /// Initializes a new instance of . - /// Enumeration of the outbound endpoints for a DNS resolver. - /// The continuation token for the next page of results. + /// + /// Enumeration of the outbound endpoints for a DNS resolver. + /// Serialized Name: OutboundEndpointListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: OutboundEndpointListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal OutboundEndpointListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal OutboundEndpointListResult(IReadOnlyList Enumeration of the outbound endpoints for a DNS resolver. + /// + /// Enumeration of the outbound endpoints for a DNS resolver. + /// Serialized Name: OutboundEndpointListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: OutboundEndpointListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs index a92a9ebe550f..c67c82883c41 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on sub-resources. + /// + /// The response to an enumeration operation on sub-resources. + /// Serialized Name: SubResourceListResult + /// internal partial class SubResourceListResult { /// @@ -53,8 +56,14 @@ internal SubResourceListResult() } /// Initializes a new instance of . - /// Enumeration of the sub-resources. - /// The continuation token for the next page of results. + /// + /// Enumeration of the sub-resources. + /// Serialized Name: SubResourceListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: SubResourceListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal SubResourceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -63,9 +72,15 @@ internal SubResourceListResult(IReadOnlyList value, string _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enumeration of the sub-resources. + /// + /// Enumeration of the sub-resources. + /// Serialized Name: SubResourceListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: SubResourceListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs index 813cde601ad4..f17ac849d722 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Describes a server to forward the DNS queries to. + /// + /// Describes a server to forward the DNS queries to. + /// Serialized Name: TargetDnsServer + /// public partial class TargetDnsServer { /// @@ -47,7 +50,10 @@ public partial class TargetDnsServer private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// DNS server IP address. + /// + /// DNS server IP address. + /// Serialized Name: TargetDnsServer.ipAddress + /// /// is null. public TargetDnsServer(IPAddress ipAddress) { @@ -57,8 +63,14 @@ public TargetDnsServer(IPAddress ipAddress) } /// Initializes a new instance of . - /// DNS server IP address. - /// DNS server port. + /// + /// DNS server IP address. + /// Serialized Name: TargetDnsServer.ipAddress + /// + /// + /// DNS server port. + /// Serialized Name: TargetDnsServer.port + /// /// Keeps track of any properties unknown to the library. internal TargetDnsServer(IPAddress ipAddress, int? port, IDictionary serializedAdditionalRawData) { @@ -72,9 +84,15 @@ internal TargetDnsServer() { } - /// DNS server IP address. + /// + /// DNS server IP address. + /// Serialized Name: TargetDnsServer.ipAddress + /// public IPAddress IPAddress { get; set; } - /// DNS server port. + /// + /// DNS server port. + /// Serialized Name: TargetDnsServer.port + /// public int? Port { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs index 1fcf7bcf7a6a..4a6d3e30b315 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// Reference to DNS forwarding ruleset and associated virtual network link. + /// + /// Reference to DNS forwarding ruleset and associated virtual network link. + /// Serialized Name: VirtualNetworkDnsForwardingRuleset + /// public partial class VirtualNetworkDnsForwardingRuleset { /// @@ -53,8 +56,14 @@ internal VirtualNetworkDnsForwardingRuleset() } /// Initializes a new instance of . - /// DNS Forwarding Ruleset Resource ID. - /// The reference to the virtual network link. + /// + /// DNS Forwarding Ruleset Resource ID. + /// Serialized Name: VirtualNetworkDnsForwardingRuleset.id + /// + /// + /// The reference to the virtual network link. + /// Serialized Name: VirtualNetworkDnsForwardingRuleset.properties.virtualNetworkLink + /// /// Keeps track of any properties unknown to the library. internal VirtualNetworkDnsForwardingRuleset(ResourceIdentifier id, WritableSubResource virtualNetworkLink, IDictionary serializedAdditionalRawData) { @@ -63,9 +72,15 @@ internal VirtualNetworkDnsForwardingRuleset(ResourceIdentifier id, WritableSubRe _serializedAdditionalRawData = serializedAdditionalRawData; } - /// DNS Forwarding Ruleset Resource ID. + /// + /// DNS Forwarding Ruleset Resource ID. + /// Serialized Name: VirtualNetworkDnsForwardingRuleset.id + /// public ResourceIdentifier Id { get; } - /// The reference to the virtual network link. + /// + /// The reference to the virtual network link. + /// Serialized Name: VirtualNetworkDnsForwardingRuleset.properties.virtualNetworkLink + /// internal WritableSubResource VirtualNetworkLink { get; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkLinkId diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs index e53d4e045a49..c28d95188c4f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset. + /// + /// The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset. + /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult + /// internal partial class VirtualNetworkDnsForwardingRulesetListResult { /// @@ -52,8 +55,14 @@ internal VirtualNetworkDnsForwardingRulesetListResult() } /// Initializes a new instance of . - /// Enumeration of the Virtual Network DNS Forwarding Ruleset. - /// The continuation token for the next page of results. + /// + /// Enumeration of the Virtual Network DNS Forwarding Ruleset. + /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal VirtualNetworkDnsForwardingRulesetListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal VirtualNetworkDnsForwardingRulesetListResult(IReadOnlyList Enumeration of the Virtual Network DNS Forwarding Ruleset. + /// + /// Enumeration of the Virtual Network DNS Forwarding Ruleset. + /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs index 8b06f0a13682..1f5a764adfce 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// The response to an enumeration operation on virtual network links. + /// + /// The response to an enumeration operation on virtual network links. + /// Serialized Name: VirtualNetworkLinkListResult + /// internal partial class VirtualNetworkLinkListResult { /// @@ -52,8 +55,14 @@ internal VirtualNetworkLinkListResult() } /// Initializes a new instance of . - /// Enumeration of the virtual network links. - /// The continuation token for the next page of results. + /// + /// Enumeration of the virtual network links. + /// Serialized Name: VirtualNetworkLinkListResult.value + /// + /// + /// The continuation token for the next page of results. + /// Serialized Name: VirtualNetworkLinkListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal VirtualNetworkLinkListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal VirtualNetworkLinkListResult(IReadOnlyList Enumeration of the virtual network links. + /// + /// Enumeration of the virtual network links. + /// Serialized Name: VirtualNetworkLinkListResult.value + /// public IReadOnlyList Value { get; } - /// The continuation token for the next page of results. + /// + /// The continuation token for the next page of results. + /// Serialized Name: VirtualNetworkLinkListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs index d9b49d754d32..d75455ae48f3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs @@ -23,5 +23,238 @@ namespace Azure.ResourceManager.DnsResolver /// public partial class VirtualNetworkDnsResolverResource : ArmResource { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The virtualNetworkName. + internal static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dnsResolverClientDiagnostics; + private readonly DnsResolversRestOperations _dnsResolverRestClient; + private readonly ClientDiagnostics _dnsForwardingRulesetClientDiagnostics; + private readonly DnsForwardingRulesetsRestOperations _dnsForwardingRulesetRestClient; + private readonly ClientDiagnostics _dnsResolverPolicyClientDiagnostics; + private readonly DnsResolverPoliciesRestOperations _dnsResolverPolicyRestClient; + + /// Initializes a new instance of the class for mocking. + protected VirtualNetworkDnsResolverResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal VirtualNetworkDnsResolverResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dnsResolverClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverResource.ResourceType, out string dnsResolverApiVersion); + _dnsResolverRestClient = new DnsResolversRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverApiVersion); + _dnsForwardingRulesetClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsForwardingRulesetResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsForwardingRulesetResource.ResourceType, out string dnsForwardingRulesetApiVersion); + _dnsForwardingRulesetRestClient = new DnsForwardingRulesetsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsForwardingRulesetApiVersion); + _dnsResolverPolicyClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.DnsResolver", DnsResolverPolicyResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DnsResolverPolicyResource.ResourceType, out string dnsResolverPolicyApiVersion); + _dnsResolverPolicyRestClient = new DnsResolverPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dnsResolverPolicyApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Network/virtualNetworks"; + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolversAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolvers + /// + /// + /// Operation Id + /// DnsResolvers_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolvers(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolvers", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsForwardingRulesetsAsync(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS forwarding ruleset resource IDs attached to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsForwardingRulesets + /// + /// + /// Operation Id + /// DnsForwardingRulesets_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The maximum number of results to return. If not specified, returns up to 100 results. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsForwardingRulesets(int? top = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsForwardingRulesetRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, top); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => VirtualNetworkDnsForwardingRuleset.DeserializeVirtualNetworkDnsForwardingRuleset(e), _dnsForwardingRulesetClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsForwardingRulesets", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDnsResolverPoliciesByVirtualNetworkAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } + + /// + /// Lists DNS resolver policy resource IDs linked to a virtual network. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listDnsResolverPolicies + /// + /// + /// Operation Id + /// DnsResolverPolicies_ListByVirtualNetwork + /// + /// + /// Default Api Version + /// 2025-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDnsResolverPoliciesByVirtualNetwork(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dnsResolverPolicyRestClient.CreateListByVirtualNetworkNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => JsonSerializer.Deserialize(e.GetRawText()), _dnsResolverPolicyClientDiagnostics, Pipeline, "VirtualNetworkDnsResolverResource.GetDnsResolverPoliciesByVirtualNetwork", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index bb2910ee0d6e..d5421762e708 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -59,6 +59,9 @@ acronym-mapping: Etag: ETag|etag DnsForwardingRulesetName: rulesetName +mgmt-debug: + show-serialized-names: true + rename-mapping: ProvisioningState: DnsResolverProvisioningState ForwardingRule: DnsForwardingRule @@ -70,8 +73,6 @@ rename-mapping: IpAllocationMethod: InboundEndpointIPAllocationMethod OutboundEndpoint: DnsResolverOutboundEndpoint VirtualNetworkLink: DnsForwardingRulesetVirtualNetworkLink - ActionType: DnsSecurityRuleActionType - Action: DnsResolverDomainListBulkAction directive: - from: dnsresolver.json From 662afb065fb6722fdfd966bb50df49733bb88b76 Mon Sep 17 00:00:00 2001 From: James Voong Date: Wed, 21 May 2025 00:25:30 -0700 Subject: [PATCH 25/27] Add requested files into customization --- ...zure.ResourceManager.DnsResolver.net8.0.cs | 1 - ...ourceManager.DnsResolver.netstandard2.0.cs | 1 - .../src/Customization/BlockResponseCode.cs | 48 +++++++++++++++ .../Customization/DnsSecurityRuleAction.cs | 18 ++++++ .../Generated/ArmDnsResolverModelFactory.cs | 2 +- .../src/Generated/DnsSecurityRuleData.cs | 2 +- .../src/Generated/Models/Action.cs | 60 ------------------- ...DnsResolverDomainListBulk.Serialization.cs | 4 +- .../Models/DnsResolverDomainListBulk.cs | 6 +- .../Models/DnsResolverDomainListBulkAction.cs | 60 +++++++++++++++++++ .../DnsSecurityRuleAction.Serialization.cs | 4 +- .../Generated/Models/DnsSecurityRuleAction.cs | 4 +- ...onType.cs => DnsSecurityRuleActionType.cs} | 28 ++++----- .../Generated/Models/DnsSecurityRulePatch.cs | 2 +- .../src/autorest.md | 3 + 15 files changed, 155 insertions(+), 88 deletions(-) create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs rename sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/{ActionType.cs => DnsSecurityRuleActionType.cs} (50%) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs index 1593cae2a6c4..55b5bbf0a94b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs @@ -616,7 +616,6 @@ public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.A { public static readonly Azure.Core.ResourceType ResourceType; protected VirtualNetworkDnsResolverResource() { } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) { throw null; } public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index 1593cae2a6c4..55b5bbf0a94b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -616,7 +616,6 @@ public partial class VirtualNetworkDnsResolverResource : Azure.ResourceManager.A { public static readonly Azure.Core.ResourceType ResourceType; protected VirtualNetworkDnsResolverResource() { } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string virtualNetworkName) { throw null; } public virtual Azure.Pageable GetDnsForwardingRulesets(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetDnsForwardingRulesetsAsync(int? top = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetDnsResolverPoliciesByVirtualNetwork(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs new file mode 100644 index 000000000000..b9cdd856d874 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The response code for block actions. + public readonly partial struct BlockResponseCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BlockResponseCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServfailValue = "SERVFAIL"; + + /// SERVFAIL. + public static BlockResponseCode Servfail { get; } = new BlockResponseCode(ServfailValue); + /// Determines if two values are the same. + public static bool operator ==(BlockResponseCode left, BlockResponseCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BlockResponseCode left, BlockResponseCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BlockResponseCode(string value) => new BlockResponseCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BlockResponseCode other && Equals(other); + /// + public bool Equals(BlockResponseCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} \ No newline at end of file diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs new file mode 100644 index 000000000000..c08f1f06b02a --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + [CodeGenSerialization(nameof(BlockResponseCode), "blockResponseCode")] + public partial class DnsSecurityRuleAction + { + /// + /// The response code for block actions. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public BlockResponseCode? BlockResponseCode { get; set; } + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs index 7292c0d16ee3..8d63c094f9d4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs @@ -363,7 +363,7 @@ public static DnsResolverPolicyData DnsResolverPolicyData(ResourceIdentifier id /// Serialized Name: DnsSecurityRule.properties.provisioningState /// /// A new instance for mocking. - public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, ActionType? actionType = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) + public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, DnsSecurityRuleActionType? actionType = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) { tags ??= new Dictionary(); dnsResolverDomainLists ??= new List(); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs index a9fb1108a4e8..7dc756d42245 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs @@ -146,7 +146,7 @@ internal DnsSecurityRuleData() /// The type of action to take. /// Serialized Name: DnsSecurityRuleAction.actionType /// - public ActionType? ActionType + public DnsSecurityRuleActionType? ActionType { get => Action is null ? default : Action.ActionType; set diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs deleted file mode 100644 index 9c4ffe11fd99..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/Action.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DnsResolver.Models -{ - /// - /// The action type in requests for bulk upload or download of a DNS resolver domain list. - /// Serialized Name: Action - /// - public readonly partial struct Action : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Action(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UploadValue = "Upload"; - private const string DownloadValue = "Download"; - - /// - /// Upload - /// Serialized Name: Action.Upload - /// - public static Action Upload { get; } = new Action(UploadValue); - /// - /// Download - /// Serialized Name: Action.Download - /// - public static Action Download { get; } = new Action(DownloadValue); - /// Determines if two values are the same. - public static bool operator ==(Action left, Action right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Action left, Action right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator Action(string value) => new Action(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Action other && Equals(other); - /// - public bool Equals(Action other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs index e3ea76e79b91..02e1bb7512f6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs @@ -79,7 +79,7 @@ internal static DnsResolverDomainListBulk DeserializeDnsResolverDomainListBulk(J return null; } Uri storageUrl = default; - Action action = default; + DnsResolverDomainListBulkAction action = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -100,7 +100,7 @@ internal static DnsResolverDomainListBulk DeserializeDnsResolverDomainListBulk(J } if (property0.NameEquals("action"u8)) { - action = new Action(property0.Value.GetString()); + action = new DnsResolverDomainListBulkAction(property0.Value.GetString()); continue; } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs index 354c1e871cce..a7f6cde30491 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs @@ -58,7 +58,7 @@ public partial class DnsResolverDomainListBulk /// Serialized Name: DnsResolverDomainListBulk.properties.action /// /// is null. - public DnsResolverDomainListBulk(Uri storageUri, Action action) + public DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action) { Argument.AssertNotNull(storageUri, nameof(storageUri)); @@ -76,7 +76,7 @@ public DnsResolverDomainListBulk(Uri storageUri, Action action) /// Serialized Name: DnsResolverDomainListBulk.properties.action /// /// Keeps track of any properties unknown to the library. - internal DnsResolverDomainListBulk(Uri storageUri, Action action, IDictionary serializedAdditionalRawData) + internal DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action, IDictionary serializedAdditionalRawData) { StorageUri = storageUri; Action = action; @@ -97,6 +97,6 @@ internal DnsResolverDomainListBulk() /// The action to take in the request, Upload or Download. /// Serialized Name: DnsResolverDomainListBulk.properties.action /// - public Action Action { get; } + public DnsResolverDomainListBulkAction Action { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs new file mode 100644 index 000000000000..853a20956b09 --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// + /// The action type in requests for bulk upload or download of a DNS resolver domain list. + /// Serialized Name: Action + /// + public readonly partial struct DnsResolverDomainListBulkAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DnsResolverDomainListBulkAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UploadValue = "Upload"; + private const string DownloadValue = "Download"; + + /// + /// Upload + /// Serialized Name: Action.Upload + /// + public static DnsResolverDomainListBulkAction Upload { get; } = new DnsResolverDomainListBulkAction(UploadValue); + /// + /// Download + /// Serialized Name: Action.Download + /// + public static DnsResolverDomainListBulkAction Download { get; } = new DnsResolverDomainListBulkAction(DownloadValue); + /// Determines if two values are the same. + public static bool operator ==(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DnsResolverDomainListBulkAction(string value) => new DnsResolverDomainListBulkAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DnsResolverDomainListBulkAction other && Equals(other); + /// + public bool Equals(DnsResolverDomainListBulkAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs index 722d7122dcce..e9e4b6d310e7 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs @@ -76,7 +76,7 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme { return null; } - ActionType? actionType = default; + DnsSecurityRuleActionType? actionType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -87,7 +87,7 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme { continue; } - actionType = new ActionType(property.Value.GetString()); + actionType = new DnsSecurityRuleActionType(property.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs index 67cb89a6b7ea..a9db16e3a54f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs @@ -59,7 +59,7 @@ public DnsSecurityRuleAction() /// Serialized Name: DnsSecurityRuleAction.actionType /// /// Keeps track of any properties unknown to the library. - internal DnsSecurityRuleAction(ActionType? actionType, IDictionary serializedAdditionalRawData) + internal DnsSecurityRuleAction(DnsSecurityRuleActionType? actionType, IDictionary serializedAdditionalRawData) { ActionType = actionType; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -69,6 +69,6 @@ internal DnsSecurityRuleAction(ActionType? actionType, IDictionary - public ActionType? ActionType { get; set; } + public DnsSecurityRuleActionType? ActionType { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ActionType.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs similarity index 50% rename from sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ActionType.cs rename to sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs index de5d8017d6eb..9fbee76e0301 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ActionType.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs @@ -14,13 +14,13 @@ namespace Azure.ResourceManager.DnsResolver.Models /// The type of action to take. /// Serialized Name: ActionType /// - public readonly partial struct ActionType : IEquatable + public readonly partial struct DnsSecurityRuleActionType : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public ActionType(string value) + public DnsSecurityRuleActionType(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -33,29 +33,29 @@ public ActionType(string value) /// Allow /// Serialized Name: ActionType.Allow /// - public static ActionType Allow { get; } = new ActionType(AllowValue); + public static DnsSecurityRuleActionType Allow { get; } = new DnsSecurityRuleActionType(AllowValue); /// /// Alert /// Serialized Name: ActionType.Alert /// - public static ActionType Alert { get; } = new ActionType(AlertValue); + public static DnsSecurityRuleActionType Alert { get; } = new DnsSecurityRuleActionType(AlertValue); /// /// Block /// Serialized Name: ActionType.Block /// - public static ActionType Block { get; } = new ActionType(BlockValue); - /// Determines if two values are the same. - public static bool operator ==(ActionType left, ActionType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ActionType left, ActionType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ActionType(string value) => new ActionType(value); + public static DnsSecurityRuleActionType Block { get; } = new DnsSecurityRuleActionType(BlockValue); + /// Determines if two values are the same. + public static bool operator ==(DnsSecurityRuleActionType left, DnsSecurityRuleActionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DnsSecurityRuleActionType left, DnsSecurityRuleActionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DnsSecurityRuleActionType(string value) => new DnsSecurityRuleActionType(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ActionType other && Equals(other); + public override bool Equals(object obj) => obj is DnsSecurityRuleActionType other && Equals(other); /// - public bool Equals(ActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(DnsSecurityRuleActionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs index 4ad576050b87..a1250eec3372 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs @@ -102,7 +102,7 @@ internal DnsSecurityRulePatch(IDictionary tags, DnsSecurityRuleA /// The type of action to take. /// Serialized Name: DnsSecurityRuleAction.actionType /// - public ActionType? ActionType + public DnsSecurityRuleActionType? ActionType { get => Action is null ? default : Action.ActionType; set diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index d5421762e708..9d3e73dfd165 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -73,6 +73,9 @@ rename-mapping: IpAllocationMethod: InboundEndpointIPAllocationMethod OutboundEndpoint: DnsResolverOutboundEndpoint VirtualNetworkLink: DnsForwardingRulesetVirtualNetworkLink + ActionType: DnsSecurityRuleActionType + Action: DnsResolverDomainListBulkAction + directive: - from: dnsresolver.json From 765c2f4b01a28d31c8ee5adf845745578b51c2f0 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 21 May 2025 16:32:53 +0800 Subject: [PATCH 26/27] update to fix the issue --- .../src/Customization/BlockResponseCode.cs | 40 ++----------------- .../Customization/DnsSecurityRuleAction.cs | 1 - .../src/autorest.md | 24 +++++++---- 3 files changed, 20 insertions(+), 45 deletions(-) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs index b9cdd856d874..74f255e2ef66 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/BlockResponseCode.cs @@ -1,48 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable -using System; using System.ComponentModel; namespace Azure.ResourceManager.DnsResolver.Models { - /// The response code for block actions. - public readonly partial struct BlockResponseCode : IEquatable + [EditorBrowsable(EditorBrowsableState.Never)] + public readonly partial struct BlockResponseCode { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BlockResponseCode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServfailValue = "SERVFAIL"; - - /// SERVFAIL. - public static BlockResponseCode Servfail { get; } = new BlockResponseCode(ServfailValue); - /// Determines if two values are the same. - public static bool operator ==(BlockResponseCode left, BlockResponseCode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BlockResponseCode left, BlockResponseCode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator BlockResponseCode(string value) => new BlockResponseCode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BlockResponseCode other && Equals(other); - /// - public bool Equals(BlockResponseCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; } -} \ No newline at end of file +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs index c08f1f06b02a..bcf44c76fe80 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Customization/DnsSecurityRuleAction.cs @@ -6,7 +6,6 @@ namespace Azure.ResourceManager.DnsResolver.Models { - [CodeGenSerialization(nameof(BlockResponseCode), "blockResponseCode")] public partial class DnsSecurityRuleAction { /// diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md index 9d3e73dfd165..952c1a71e889 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/autorest.md @@ -4,8 +4,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/blob/16c277599f69e854b89e4ca7658eded7507e98f3/specification/dnsresolver/resource-manager/readme.md -tag: package-2025-01 +require: https://github.com/jamesvoongms/jamesvoong-azure-rest-api-specs/blob/7f70fea824775502f92a3a51f342c77ddc0325c4/specification/dnsresolver/resource-manager/readme.md +#tag: package-2025-01 library-name: dnsresolver namespace: Azure.ResourceManager.DnsResolver output-folder: $(this-folder)/Generated @@ -59,8 +59,8 @@ acronym-mapping: Etag: ETag|etag DnsForwardingRulesetName: rulesetName -mgmt-debug: - show-serialized-names: true +# mgmt-debug: +# show-serialized-names: true rename-mapping: ProvisioningState: DnsResolverProvisioningState @@ -75,11 +75,21 @@ rename-mapping: VirtualNetworkLink: DnsForwardingRulesetVirtualNetworkLink ActionType: DnsSecurityRuleActionType Action: DnsResolverDomainListBulkAction - + VirtualNetworkDnsForwardingRuleset.id: -|arm-id directive: - from: dnsresolver.json - where: $.definitions + where: $.definitions.DnsSecurityRuleAction transform: > - $.VirtualNetworkDnsForwardingRuleset.properties.id['x-ms-format'] = 'arm-id'; + $.properties["blockResponseCode"] = { + "type": "string", + "description": "The response code for block actions.", + "enum": [ + "SERVFAIL" + ], + "x-ms-enum": { + "name": "BlockResponseCode", + "modelAsString": true + } + }; ``` From 28f2d03c5232b69a8573d3ab4416367934f63d41 Mon Sep 17 00:00:00 2001 From: James Voong Date: Wed, 21 May 2025 17:11:31 -0700 Subject: [PATCH 27/27] Add new generation after Arthurs fixes --- ...zure.ResourceManager.DnsResolver.net8.0.cs | 63 ++--- ...ourceManager.DnsResolver.netstandard2.0.cs | 63 ++--- .../Generated/ArmDnsResolverModelFactory.cs | 236 ++++-------------- .../Generated/DnsForwardingRuleCollection.cs | 20 +- .../src/Generated/DnsForwardingRuleData.cs | 71 ++---- .../Generated/DnsForwardingRuleResource.cs | 12 +- .../DnsForwardingRulesetCollection.cs | 20 +- .../src/Generated/DnsForwardingRulesetData.cs | 46 +--- .../Generated/DnsForwardingRulesetResource.cs | 32 +-- ...dingRulesetVirtualNetworkLinkCollection.cs | 20 +- ...ForwardingRulesetVirtualNetworkLinkData.cs | 46 +--- ...ardingRulesetVirtualNetworkLinkResource.cs | 12 +- .../src/Generated/DnsResolverCollection.cs | 20 +- .../src/Generated/DnsResolverData.cs | 56 +---- .../DnsResolverDomainListCollection.cs | 20 +- ...DnsResolverDomainListData.Serialization.cs | 35 +-- .../Generated/DnsResolverDomainListData.cs | 62 ++--- .../DnsResolverDomainListResource.cs | 120 +-------- .../DnsResolverInboundEndpointCollection.cs | 20 +- .../DnsResolverInboundEndpointData.cs | 46 +--- .../DnsResolverInboundEndpointResource.cs | 24 +- .../DnsResolverOutboundEndpointCollection.cs | 20 +- .../DnsResolverOutboundEndpointData.cs | 46 +--- .../DnsResolverOutboundEndpointResource.cs | 24 +- .../Generated/DnsResolverPolicyCollection.cs | 20 +- .../src/Generated/DnsResolverPolicyData.cs | 31 +-- .../Generated/DnsResolverPolicyResource.cs | 32 +-- ...olverPolicyVirtualNetworkLinkCollection.cs | 20 +- ...DnsResolverPolicyVirtualNetworkLinkData.cs | 36 +-- ...esolverPolicyVirtualNetworkLinkResource.cs | 24 +- .../src/Generated/DnsResolverResource.cs | 32 +-- .../Generated/DnsSecurityRuleCollection.cs | 20 +- .../src/Generated/DnsSecurityRuleData.cs | 93 ++----- .../src/Generated/DnsSecurityRuleResource.cs | 24 +- .../Extensions/DnsResolverExtensions.cs | 32 +-- ...ockableDnsResolverResourceGroupResource.cs | 16 +- ...MockableDnsResolverSubscriptionResource.cs | 16 +- .../src/Generated/Models/BlockResponseCode.cs | 48 ++++ .../Models/DnsForwardingRulePatch.cs | 35 +-- .../Models/DnsForwardingRuleState.cs | 15 +- .../Models/DnsForwardingRulesetListResult.cs | 25 +- .../Models/DnsForwardingRulesetPatch.cs | 25 +- ...orwardingRulesetVirtualNetworkLinkPatch.cs | 15 +- ...DnsResolverDomainListBulk.Serialization.cs | 149 ----------- .../Models/DnsResolverDomainListBulk.cs | 102 -------- .../Models/DnsResolverDomainListBulkAction.cs | 60 ----- .../Models/DnsResolverDomainListPatch.cs | 25 +- .../Models/DnsResolverDomainListResult.cs | 25 +- .../Models/DnsResolverInboundEndpointPatch.cs | 15 +- .../Generated/Models/DnsResolverListResult.cs | 25 +- .../DnsResolverOutboundEndpointPatch.cs | 15 +- .../src/Generated/Models/DnsResolverPatch.cs | 15 +- .../Models/DnsResolverPolicyListResult.cs | 25 +- .../Models/DnsResolverPolicyPatch.cs | 15 +- ...olverPolicyVirtualNetworkLinkListResult.cs | 25 +- ...nsResolverPolicyVirtualNetworkLinkPatch.cs | 15 +- .../Models/DnsResolverProvisioningState.cs | 35 +-- .../src/Generated/Models/DnsResolverState.cs | 15 +- .../DnsSecurityRuleAction.Serialization.cs | 17 +- .../Generated/Models/DnsSecurityRuleAction.cs | 19 +- .../Models/DnsSecurityRuleActionType.cs | 20 +- .../Models/DnsSecurityRuleListResult.cs | 25 +- .../Generated/Models/DnsSecurityRulePatch.cs | 72 +----- .../Generated/Models/DnsSecurityRuleState.cs | 15 +- .../Models/ForwardingRuleListResult.cs | 25 +- .../InboundEndpointIPAllocationMethod.cs | 15 +- .../Models/InboundEndpointIPConfiguration.cs | 40 +-- .../Models/InboundEndpointListResult.cs | 25 +- .../Models/OutboundEndpointListResult.cs | 25 +- .../Generated/Models/SubResourceListResult.cs | 25 +- .../src/Generated/Models/TargetDnsServer.cs | 30 +-- .../VirtualNetworkDnsForwardingRuleset.cs | 25 +- ...alNetworkDnsForwardingRulesetListResult.cs | 25 +- .../Models/VirtualNetworkLinkListResult.cs | 25 +- .../DnsForwardingRulesetsRestOperations.cs | 2 +- .../DnsResolverDomainListsRestOperations.cs | 108 +------- .../DnsResolverPoliciesRestOperations.cs | 2 +- ...PolicyVirtualNetworkLinksRestOperations.cs | 2 +- .../DnsResolversRestOperations.cs | 2 +- .../DnsSecurityRulesRestOperations.cs | 2 +- .../ForwardingRulesRestOperations.cs | 2 +- .../InboundEndpointsRestOperations.cs | 2 +- .../OutboundEndpointsRestOperations.cs | 2 +- .../VirtualNetworkLinksRestOperations.cs | 2 +- .../VirtualNetworkDnsResolverResource.cs | 12 +- 85 files changed, 697 insertions(+), 2123 deletions(-) create mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs delete mode 100644 sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs index 55b5bbf0a94b..a398c793286f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.net8.0.cs @@ -221,9 +221,8 @@ protected DnsResolverDomainListCollection() { } } public partial class DnsResolverDomainListData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DnsResolverDomainListData(Azure.Core.AzureLocation location) { } + public DnsResolverDomainListData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable domains) { } public System.Collections.Generic.IList Domains { get { throw null; } } - public System.Uri DomainsUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } @@ -242,8 +241,6 @@ protected DnsResolverDomainListResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Bulk(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> BulkAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -574,7 +571,7 @@ protected DnsSecurityRuleCollection() { } public partial class DnsSecurityRuleData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRuleData(Azure.Core.AzureLocation location, int priority, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action, System.Collections.Generic.IEnumerable dnsResolverDomainLists) { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } @@ -678,14 +675,32 @@ public static partial class ArmDnsResolverModelFactory public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetData DnsForwardingRulesetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable dnsResolverOutboundEndpoints = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverData DnsResolverData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverState? dnsResolverState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, System.Uri domainsUri = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointData DnsResolverInboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyData DnsResolverPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? actionType = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType?), System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action = null, System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.Models.VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier virtualNetworkLinkId = null) { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BlockResponseCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BlockResponseCode(string value) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.BlockResponseCode Servfail { get { throw null; } } + public bool Equals(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } + public static implicit operator Azure.ResourceManager.DnsResolver.Models.BlockResponseCode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } + public override string ToString() { throw null; } + } public partial class DnsForwardingRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsForwardingRulePatch() { } @@ -740,36 +755,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState left, Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState right) { throw null; } public override string ToString() { throw null; } } - public partial class DnsResolverDomainListBulk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DnsResolverDomainListBulk(System.Uri storageUri, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction action) { } - public Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Action { get { throw null; } } - public System.Uri StorageUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DnsResolverDomainListBulkAction : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DnsResolverDomainListBulkAction(string value) { throw null; } - public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Download { get { throw null; } } - public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Upload { get { throw null; } } - public bool Equals(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } - public static implicit operator Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } - public override string ToString() { throw null; } - } public partial class DnsResolverDomainListPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsResolverDomainListPatch() { } @@ -881,6 +866,8 @@ public partial class DnsSecurityRuleAction : System.ClientModel.Primitives.IJson { public DnsSecurityRuleAction() { } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Azure.ResourceManager.DnsResolver.Models.BlockResponseCode? BlockResponseCode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -910,7 +897,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DnsSecurityRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRulePatch() { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs index 55b5bbf0a94b..a398c793286f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/api/Azure.ResourceManager.DnsResolver.netstandard2.0.cs @@ -221,9 +221,8 @@ protected DnsResolverDomainListCollection() { } } public partial class DnsResolverDomainListData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public DnsResolverDomainListData(Azure.Core.AzureLocation location) { } + public DnsResolverDomainListData(Azure.Core.AzureLocation location, System.Collections.Generic.IEnumerable domains) { } public System.Collections.Generic.IList Domains { get { throw null; } } - public System.Uri DomainsUri { get { throw null; } } public Azure.ETag? ETag { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? ProvisioningState { get { throw null; } } public System.Guid? ResourceGuid { get { throw null; } } @@ -242,8 +241,6 @@ protected DnsResolverDomainListResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Bulk(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> BulkAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, string ifMatch = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -574,7 +571,7 @@ protected DnsSecurityRuleCollection() { } public partial class DnsSecurityRuleData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRuleData(Azure.Core.AzureLocation location, int priority, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action, System.Collections.Generic.IEnumerable dnsResolverDomainLists) { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } } @@ -678,14 +675,32 @@ public static partial class ArmDnsResolverModelFactory public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetData DnsForwardingRulesetData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable dnsResolverOutboundEndpoints = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, System.Collections.Generic.IDictionary metadata = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverData DnsResolverData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverState? dnsResolverState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, System.Uri domainsUri = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsResolverDomainListData DnsResolverDomainListData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable domains = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverInboundEndpointData DnsResolverInboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable ipConfigurations = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier subnetId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyData DnsResolverPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?), System.Guid? resourceGuid = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.DnsResolver.DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier virtualNetworkId = null, Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } - public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? actionType = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType?), System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } + public static Azure.ResourceManager.DnsResolver.DnsSecurityRuleData DnsSecurityRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), int priority = 0, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction action = null, System.Collections.Generic.IEnumerable dnsResolverDomainLists = null, Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? dnsSecurityRuleState = default(Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState?), Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState? provisioningState = default(Azure.ResourceManager.DnsResolver.Models.DnsResolverProvisioningState?)) { throw null; } public static Azure.ResourceManager.DnsResolver.Models.VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier virtualNetworkLinkId = null) { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BlockResponseCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BlockResponseCode(string value) { throw null; } + public static Azure.ResourceManager.DnsResolver.Models.BlockResponseCode Servfail { get { throw null; } } + public bool Equals(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } + public static implicit operator Azure.ResourceManager.DnsResolver.Models.BlockResponseCode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.BlockResponseCode left, Azure.ResourceManager.DnsResolver.Models.BlockResponseCode right) { throw null; } + public override string ToString() { throw null; } + } public partial class DnsForwardingRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsForwardingRulePatch() { } @@ -740,36 +755,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState left, Azure.ResourceManager.DnsResolver.Models.DnsForwardingRuleState right) { throw null; } public override string ToString() { throw null; } } - public partial class DnsResolverDomainListBulk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DnsResolverDomainListBulk(System.Uri storageUri, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction action) { } - public Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Action { get { throw null; } } - public System.Uri StorageUri { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DnsResolverDomainListBulkAction : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DnsResolverDomainListBulkAction(string value) { throw null; } - public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Download { get { throw null; } } - public static Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction Upload { get { throw null; } } - public bool Equals(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } - public static implicit operator Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction left, Azure.ResourceManager.DnsResolver.Models.DnsResolverDomainListBulkAction right) { throw null; } - public override string ToString() { throw null; } - } public partial class DnsResolverDomainListPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsResolverDomainListPatch() { } @@ -881,6 +866,8 @@ public partial class DnsSecurityRuleAction : System.ClientModel.Primitives.IJson { public DnsSecurityRuleAction() { } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public Azure.ResourceManager.DnsResolver.Models.BlockResponseCode? BlockResponseCode { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -910,7 +897,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class DnsSecurityRulePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DnsSecurityRulePatch() { } - public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleActionType? ActionType { get { throw null; } set { } } + public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleAction Action { get { throw null; } set { } } public System.Collections.Generic.IList DnsResolverDomainLists { get { throw null; } } public Azure.ResourceManager.DnsResolver.Models.DnsSecurityRuleState? DnsSecurityRuleState { get { throw null; } set { } } public int? Priority { get { throw null; } set { } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs index 8d63c094f9d4..36d2fc4a724d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/ArmDnsResolverModelFactory.cs @@ -24,26 +24,11 @@ public static partial class ArmDnsResolverModelFactory /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver. - /// Serialized Name: DnsResolver.etag - /// - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolver.properties.virtualNetwork - /// - /// - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolver.properties.dnsResolverState - /// - /// - /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolver.properties.provisioningState - /// - /// - /// The resourceGuid property of the DNS resolver resource. - /// Serialized Name: DnsResolver.properties.resourceGuid - /// + /// ETag of the DNS resolver. + /// The reference to the virtual network. This cannot be changed after creation. + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver resource. /// A new instance for mocking. public static DnsResolverData DnsResolverData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, DnsResolverState? dnsResolverState = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -71,22 +56,10 @@ public static DnsResolverData DnsResolverData(ResourceIdentifier id = null, stri /// The systemData. /// The tags. /// The location. - /// - /// ETag of the inbound endpoint. - /// Serialized Name: InboundEndpoint.etag - /// - /// - /// IP configurations for the inbound endpoint. - /// Serialized Name: InboundEndpoint.properties.ipConfigurations - /// - /// - /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: InboundEndpoint.properties.provisioningState - /// - /// - /// The resourceGuid property of the inbound endpoint resource. - /// Serialized Name: InboundEndpoint.properties.resourceGuid - /// + /// ETag of the inbound endpoint. + /// IP configurations for the inbound endpoint. + /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the inbound endpoint resource. /// A new instance for mocking. public static DnsResolverInboundEndpointData DnsResolverInboundEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable ipConfigurations = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -114,22 +87,10 @@ public static DnsResolverInboundEndpointData DnsResolverInboundEndpointData(Reso /// The systemData. /// The tags. /// The location. - /// - /// ETag of the outbound endpoint. - /// Serialized Name: OutboundEndpoint.etag - /// - /// - /// The reference to the subnet used for the outbound endpoint. - /// Serialized Name: OutboundEndpoint.properties.subnet - /// - /// - /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: OutboundEndpoint.properties.provisioningState - /// - /// - /// The resourceGuid property of the outbound endpoint resource. - /// Serialized Name: OutboundEndpoint.properties.resourceGuid - /// + /// ETag of the outbound endpoint. + /// The reference to the subnet used for the outbound endpoint. + /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the outbound endpoint resource. /// A new instance for mocking. public static DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier subnetId = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -156,22 +117,10 @@ public static DnsResolverOutboundEndpointData DnsResolverOutboundEndpointData(Re /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS forwarding ruleset. - /// Serialized Name: DnsForwardingRuleset.etag - /// - /// - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints - /// - /// - /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsForwardingRuleset.properties.provisioningState - /// - /// - /// The resourceGuid for the DNS forwarding ruleset. - /// Serialized Name: DnsForwardingRuleset.properties.resourceGuid - /// + /// ETag of the DNS forwarding ruleset. + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid for the DNS forwarding ruleset. /// A new instance for mocking. public static DnsForwardingRulesetData DnsForwardingRulesetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable dnsResolverOutboundEndpoints = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -197,30 +146,12 @@ public static DnsForwardingRulesetData DnsForwardingRulesetData(ResourceIdentifi /// The name. /// The resourceType. /// The systemData. - /// - /// ETag of the forwarding rule. - /// Serialized Name: ForwardingRule.etag - /// - /// - /// The domain name for the forwarding rule. - /// Serialized Name: ForwardingRule.properties.domainName - /// - /// - /// DNS servers to forward the DNS query to. - /// Serialized Name: ForwardingRule.properties.targetDnsServers - /// - /// - /// Metadata attached to the forwarding rule. - /// Serialized Name: ForwardingRule.properties.metadata - /// - /// - /// The state of forwarding rule. - /// Serialized Name: ForwardingRule.properties.forwardingRuleState - /// - /// - /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: ForwardingRule.properties.provisioningState - /// + /// ETag of the forwarding rule. + /// The domain name for the forwarding rule. + /// DNS servers to forward the DNS query to. + /// Metadata attached to the forwarding rule. + /// The state of forwarding rule. + /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. /// A new instance for mocking. public static DnsForwardingRuleData DnsForwardingRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, string domainName = null, IEnumerable targetDnsServers = null, IDictionary metadata = null, DnsForwardingRuleState? dnsForwardingRuleState = null, DnsResolverProvisioningState? provisioningState = null) { @@ -246,22 +177,10 @@ public static DnsForwardingRuleData DnsForwardingRuleData(ResourceIdentifier id /// The name. /// The resourceType. /// The systemData. - /// - /// ETag of the virtual network link. - /// Serialized Name: VirtualNetworkLink.etag - /// - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork - /// - /// - /// Metadata attached to the virtual network link. - /// Serialized Name: VirtualNetworkLink.properties.metadata - /// - /// - /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: VirtualNetworkLink.properties.provisioningState - /// + /// ETag of the virtual network link. + /// The reference to the virtual network. This cannot be changed after creation. + /// Metadata attached to the virtual network link. + /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. /// A new instance for mocking. public static DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVirtualNetworkLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, IDictionary metadata = null, DnsResolverProvisioningState? provisioningState = null) { @@ -280,14 +199,8 @@ public static DnsForwardingRulesetVirtualNetworkLinkData DnsForwardingRulesetVir } /// Initializes a new instance of . - /// - /// DNS Forwarding Ruleset Resource ID. - /// Serialized Name: VirtualNetworkDnsForwardingRuleset.id - /// - /// - /// The reference to the virtual network link. - /// Serialized Name: VirtualNetworkDnsForwardingRuleset.properties.virtualNetworkLink - /// + /// DNS Forwarding Ruleset Resource ID. + /// The reference to the virtual network link. /// A new instance for mocking. public static VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRuleset(ResourceIdentifier id = null, ResourceIdentifier virtualNetworkLinkId = null) { @@ -301,18 +214,9 @@ public static VirtualNetworkDnsForwardingRuleset VirtualNetworkDnsForwardingRule /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver policy. - /// Serialized Name: DnsResolverPolicy.etag - /// - /// - /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverPolicy.properties.provisioningState - /// - /// - /// The resourceGuid property of the DNS resolver policy resource. - /// Serialized Name: DnsResolverPolicy.properties.resourceGuid - /// + /// ETag of the DNS resolver policy. + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver policy resource. /// A new instance for mocking. public static DnsResolverPolicyData DnsResolverPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { @@ -338,32 +242,14 @@ public static DnsResolverPolicyData DnsResolverPolicyData(ResourceIdentifier id /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS security rule. - /// Serialized Name: DnsSecurityRule.etag - /// - /// - /// The priority of the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.priority - /// - /// - /// The action to take on DNS requests that match the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.action - /// - /// - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists - /// - /// - /// The state of DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.dnsSecurityRuleState - /// - /// - /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsSecurityRule.properties.provisioningState - /// + /// ETag of the DNS security rule. + /// The priority of the DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// The state of DNS security rule. + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. /// A new instance for mocking. - public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, DnsSecurityRuleActionType? actionType = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) + public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, int priority = default, DnsSecurityRuleAction action = null, IEnumerable dnsResolverDomainLists = null, DnsSecurityRuleState? dnsSecurityRuleState = null, DnsResolverProvisioningState? provisioningState = null) { tags ??= new Dictionary(); dnsResolverDomainLists ??= new List(); @@ -377,7 +263,7 @@ public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = nu location, etag, priority, - actionType != null ? new DnsSecurityRuleAction(actionType, serializedAdditionalRawData: null) : null, + action, dnsResolverDomainLists?.ToList(), dnsSecurityRuleState, provisioningState, @@ -391,18 +277,9 @@ public static DnsSecurityRuleData DnsSecurityRuleData(ResourceIdentifier id = nu /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver policy virtual network link. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.etag - /// - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork - /// - /// - /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.provisioningState - /// + /// ETag of the DNS resolver policy virtual network link. + /// The reference to the virtual network. This cannot be changed after creation. + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. /// A new instance for mocking. public static DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNetworkLinkData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ResourceIdentifier virtualNetworkId = null, DnsResolverProvisioningState? provisioningState = null) { @@ -428,28 +305,12 @@ public static DnsResolverPolicyVirtualNetworkLinkData DnsResolverPolicyVirtualNe /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver domain list. - /// Serialized Name: DnsResolverDomainList.etag - /// - /// - /// The domains in the domain list. - /// Serialized Name: DnsResolverDomainList.properties.domains - /// - /// - /// The URL for bulk upload or download for domain lists containing larger set of domains. - /// Serialized Name: DnsResolverDomainList.properties.domainsUrl - /// - /// - /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverDomainList.properties.provisioningState - /// - /// - /// The resourceGuid property of the DNS resolver domain list resource. - /// Serialized Name: DnsResolverDomainList.properties.resourceGuid - /// + /// ETag of the DNS resolver domain list. + /// The domains in the domain list. + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver domain list resource. /// A new instance for mocking. - public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable domains = null, Uri domainsUri = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) + public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, IEnumerable domains = null, DnsResolverProvisioningState? provisioningState = null, Guid? resourceGuid = null) { tags ??= new Dictionary(); domains ??= new List(); @@ -463,7 +324,6 @@ public static DnsResolverDomainListData DnsResolverDomainListData(ResourceIdenti location, etag, domains?.ToList(), - domainsUri, provisioningState, resourceGuid, serializedAdditionalRawData: null); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs index 9c3e8ceafcea..266f58828707 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -170,7 +170,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(string f /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Get(string forwardingRuleName /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(int? top = n /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, Cance /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string forwardingRuleName, /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string forwardingRuleName, CancellationToke /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs index 665639618f4e..148716f6d56d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsForwardingRule data model. /// Describes a forwarding rule within a DNS forwarding ruleset. - /// Serialized Name: ForwardingRule /// public partial class DnsForwardingRuleData : ResourceData { @@ -54,14 +53,8 @@ public partial class DnsForwardingRuleData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// The domain name for the forwarding rule. - /// Serialized Name: ForwardingRule.properties.domainName - /// - /// - /// DNS servers to forward the DNS query to. - /// Serialized Name: ForwardingRule.properties.targetDnsServers - /// + /// The domain name for the forwarding rule. + /// DNS servers to forward the DNS query to. /// or is null. public DnsForwardingRuleData(string domainName, IEnumerable targetDnsServers) { @@ -78,30 +71,12 @@ public DnsForwardingRuleData(string domainName, IEnumerable tar /// The name. /// The resourceType. /// The systemData. - /// - /// ETag of the forwarding rule. - /// Serialized Name: ForwardingRule.etag - /// - /// - /// The domain name for the forwarding rule. - /// Serialized Name: ForwardingRule.properties.domainName - /// - /// - /// DNS servers to forward the DNS query to. - /// Serialized Name: ForwardingRule.properties.targetDnsServers - /// - /// - /// Metadata attached to the forwarding rule. - /// Serialized Name: ForwardingRule.properties.metadata - /// - /// - /// The state of forwarding rule. - /// Serialized Name: ForwardingRule.properties.forwardingRuleState - /// - /// - /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: ForwardingRule.properties.provisioningState - /// + /// ETag of the forwarding rule. + /// The domain name for the forwarding rule. + /// DNS servers to forward the DNS query to. + /// Metadata attached to the forwarding rule. + /// The state of forwarding rule. + /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. /// Keeps track of any properties unknown to the library. internal DnsForwardingRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, string domainName, IList targetDnsServers, IDictionary metadata, DnsForwardingRuleState? dnsForwardingRuleState, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -119,35 +94,17 @@ internal DnsForwardingRuleData() { } - /// - /// ETag of the forwarding rule. - /// Serialized Name: ForwardingRule.etag - /// + /// ETag of the forwarding rule. public ETag? ETag { get; } - /// - /// The domain name for the forwarding rule. - /// Serialized Name: ForwardingRule.properties.domainName - /// + /// The domain name for the forwarding rule. public string DomainName { get; set; } - /// - /// DNS servers to forward the DNS query to. - /// Serialized Name: ForwardingRule.properties.targetDnsServers - /// + /// DNS servers to forward the DNS query to. public IList TargetDnsServers { get; } - /// - /// Metadata attached to the forwarding rule. - /// Serialized Name: ForwardingRule.properties.metadata - /// + /// Metadata attached to the forwarding rule. public IDictionary Metadata { get; } - /// - /// The state of forwarding rule. - /// Serialized Name: ForwardingRule.properties.forwardingRuleState - /// + /// The state of forwarding rule. public DnsForwardingRuleState? DnsForwardingRuleState { get; set; } - /// - /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: ForwardingRule.properties.provisioningState - /// + /// The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs index 88ba28f49390..ffb498cb8c03 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(DnsFo /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs index d9b73e141efe..3d9789adba84 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string rulesetName, Ca /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Ca /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string rulesetName, Cancel /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string rulesetName, CancellationToken cance /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs index 4f4001bc45af..9a61a7a0477a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetData.cs @@ -18,7 +18,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsForwardingRuleset data model. /// Describes a DNS forwarding ruleset. - /// Serialized Name: DnsForwardingRuleset /// public partial class DnsForwardingRulesetData : TrackedResourceData { @@ -56,10 +55,7 @@ public partial class DnsForwardingRulesetData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints - /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. /// is null. public DnsForwardingRulesetData(AzureLocation location, IEnumerable dnsResolverOutboundEndpoints) : base(location) { @@ -75,22 +71,10 @@ public DnsForwardingRulesetData(AzureLocation location, IEnumerable The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS forwarding ruleset. - /// Serialized Name: DnsForwardingRuleset.etag - /// - /// - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints - /// - /// - /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsForwardingRuleset.properties.provisioningState - /// - /// - /// The resourceGuid for the DNS forwarding ruleset. - /// Serialized Name: DnsForwardingRuleset.properties.resourceGuid - /// + /// ETag of the DNS forwarding ruleset. + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid for the DNS forwarding ruleset. /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList dnsResolverOutboundEndpoints, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -106,25 +90,13 @@ internal DnsForwardingRulesetData() { } - /// - /// ETag of the DNS forwarding ruleset. - /// Serialized Name: DnsForwardingRuleset.etag - /// + /// ETag of the DNS forwarding ruleset. public ETag? ETag { get; } - /// - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// Serialized Name: DnsForwardingRuleset.properties.dnsResolverOutboundEndpoints - /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. public IList DnsResolverOutboundEndpoints { get; } - /// - /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsForwardingRuleset.properties.provisioningState - /// + /// The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } - /// - /// The resourceGuid for the DNS forwarding ruleset. - /// Serialized Name: DnsForwardingRuleset.properties.resourceGuid - /// + /// The resourceGuid for the DNS forwarding ruleset. public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs index 324a8791e037..d0dbc6c3e84d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.cs @@ -110,7 +110,7 @@ public virtual DnsForwardingRuleCollection GetDnsForwardingRules() /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsForwardingR /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsForwardingRulesetVirtualNetworkLinkCollection GetDnsForwarding /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsFo /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs index 13d629de1e6c..0c410059b1e1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(i /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkLinkN /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string virtualNetworkLinkName, Cancellation /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs index 6fb66d249561..fea2607e9de0 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsForwardingRulesetVirtualNetworkLink data model. /// Describes a virtual network link. - /// Serialized Name: VirtualNetworkLink /// public partial class DnsForwardingRulesetVirtualNetworkLinkData : ResourceData { @@ -54,10 +53,7 @@ public partial class DnsForwardingRulesetVirtualNetworkLinkData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork - /// + /// The reference to the virtual network. This cannot be changed after creation. /// is null. public DnsForwardingRulesetVirtualNetworkLinkData(WritableSubResource virtualNetwork) { @@ -72,22 +68,10 @@ public DnsForwardingRulesetVirtualNetworkLinkData(WritableSubResource virtualNet /// The name. /// The resourceType. /// The systemData. - /// - /// ETag of the virtual network link. - /// Serialized Name: VirtualNetworkLink.etag - /// - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork - /// - /// - /// Metadata attached to the virtual network link. - /// Serialized Name: VirtualNetworkLink.properties.metadata - /// - /// - /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: VirtualNetworkLink.properties.provisioningState - /// + /// ETag of the virtual network link. + /// The reference to the virtual network. This cannot be changed after creation. + /// Metadata attached to the virtual network link. + /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetVirtualNetworkLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, WritableSubResource virtualNetwork, IDictionary metadata, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -103,15 +87,9 @@ internal DnsForwardingRulesetVirtualNetworkLinkData() { } - /// - /// ETag of the virtual network link. - /// Serialized Name: VirtualNetworkLink.etag - /// + /// ETag of the virtual network link. public ETag? ETag { get; } - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: VirtualNetworkLink.properties.virtualNetwork - /// + /// The reference to the virtual network. This cannot be changed after creation. internal WritableSubResource VirtualNetwork { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkId @@ -125,15 +103,9 @@ public ResourceIdentifier VirtualNetworkId } } - /// - /// Metadata attached to the virtual network link. - /// Serialized Name: VirtualNetworkLink.properties.metadata - /// + /// Metadata attached to the virtual network link. public IDictionary Metadata { get; } - /// - /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: VirtualNetworkLink.properties.provisioningState - /// + /// The current provisioning state of the virtual network link. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs index aef45c8ce23c..8fb7d95eea61 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs index 10d56e5ececc..9e47260b6d33 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string dnsReso /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string dnsResolverName, Cancell /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Cancellatio /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string dnsResolverName, Ca /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string dnsResolverName, CancellationToken c /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs index 6eb0a9389399..78ede75b873c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolver data model. /// Describes a DNS resolver. - /// Serialized Name: DnsResolver /// public partial class DnsResolverData : TrackedResourceData { @@ -55,10 +54,7 @@ public partial class DnsResolverData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolver.properties.virtualNetwork - /// + /// The reference to the virtual network. This cannot be changed after creation. /// is null. public DnsResolverData(AzureLocation location, WritableSubResource virtualNetwork) : base(location) { @@ -74,26 +70,11 @@ public DnsResolverData(AzureLocation location, WritableSubResource virtualNetwor /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver. - /// Serialized Name: DnsResolver.etag - /// - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolver.properties.virtualNetwork - /// - /// - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolver.properties.dnsResolverState - /// - /// - /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolver.properties.provisioningState - /// - /// - /// The resourceGuid property of the DNS resolver resource. - /// Serialized Name: DnsResolver.properties.resourceGuid - /// + /// ETag of the DNS resolver. + /// The reference to the virtual network. This cannot be changed after creation. + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver resource. /// Keeps track of any properties unknown to the library. internal DnsResolverData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, WritableSubResource virtualNetwork, DnsResolverState? dnsResolverState, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -110,15 +91,9 @@ internal DnsResolverData() { } - /// - /// ETag of the DNS resolver. - /// Serialized Name: DnsResolver.etag - /// + /// ETag of the DNS resolver. public ETag? ETag { get; } - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolver.properties.virtualNetwork - /// + /// The reference to the virtual network. This cannot be changed after creation. internal WritableSubResource VirtualNetwork { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkId @@ -132,20 +107,11 @@ public ResourceIdentifier VirtualNetworkId } } - /// - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolver.properties.dnsResolverState - /// + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverState? DnsResolverState { get; } - /// - /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolver.properties.provisioningState - /// + /// The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } - /// - /// The resourceGuid property of the DNS resolver resource. - /// Serialized Name: DnsResolver.properties.resourceGuid - /// + /// The resourceGuid property of the DNS resolver resource. public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs index 5ad7018aa942..6bd5bc5f2eea 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string dnsResolverDom /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string dnsResolverDomainLi /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string dnsResolverDomainListName, Cancellat /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs index d47f4a42c805..dfeaa29a32eb 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.Serialization.cs @@ -44,21 +44,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Domains)) + writer.WritePropertyName("domains"u8); + writer.WriteStartArray(); + foreach (var item in Domains) { - writer.WritePropertyName("domains"u8); - writer.WriteStartArray(); - foreach (var item in Domains) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(DomainsUri)) - { - writer.WritePropertyName("domainsUrl"u8); - writer.WriteStringValue(DomainsUri.AbsoluteUri); + writer.WriteStringValue(item); } + writer.WriteEndArray(); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -100,7 +92,6 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J ResourceType type = default; SystemData systemData = default; IList domains = default; - Uri domainsUrl = default; DnsResolverProvisioningState? provisioningState = default; Guid? resourceGuid = default; IDictionary serializedAdditionalRawData = default; @@ -170,10 +161,6 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J { if (property0.NameEquals("domains"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { @@ -182,15 +169,6 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J domains = array; continue; } - if (property0.NameEquals("domainsUrl"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - domainsUrl = new Uri(property0.Value.GetString()); - continue; - } if (property0.NameEquals("provisioningState"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -226,8 +204,7 @@ internal static DnsResolverDomainListData DeserializeDnsResolverDomainListData(J tags ?? new ChangeTrackingDictionary(), location, etag, - domains ?? new ChangeTrackingList(), - domainsUrl, + domains, provisioningState, resourceGuid, serializedAdditionalRawData); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs index edb29061b63b..b911f6de43a2 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Azure.Core; using Azure.ResourceManager.DnsResolver.Models; using Azure.ResourceManager.Models; @@ -16,7 +17,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverDomainList data model. /// Describes a DNS resolver domain list. - /// Serialized Name: DnsResolverDomainList /// public partial class DnsResolverDomainListData : TrackedResourceData { @@ -54,9 +54,13 @@ public partial class DnsResolverDomainListData : TrackedResourceData /// Initializes a new instance of . /// The location. - public DnsResolverDomainListData(AzureLocation location) : base(location) + /// The domains in the domain list. + /// is null. + public DnsResolverDomainListData(AzureLocation location, IEnumerable domains) : base(location) { - Domains = new ChangeTrackingList(); + Argument.AssertNotNull(domains, nameof(domains)); + + Domains = domains.ToList(); } /// Initializes a new instance of . @@ -66,32 +70,15 @@ public DnsResolverDomainListData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver domain list. - /// Serialized Name: DnsResolverDomainList.etag - /// - /// - /// The domains in the domain list. - /// Serialized Name: DnsResolverDomainList.properties.domains - /// - /// - /// The URL for bulk upload or download for domain lists containing larger set of domains. - /// Serialized Name: DnsResolverDomainList.properties.domainsUrl - /// - /// - /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverDomainList.properties.provisioningState - /// - /// - /// The resourceGuid property of the DNS resolver domain list resource. - /// Serialized Name: DnsResolverDomainList.properties.resourceGuid - /// + /// ETag of the DNS resolver domain list. + /// The domains in the domain list. + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver domain list resource. /// Keeps track of any properties unknown to the library. - internal DnsResolverDomainListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList domains, Uri domainsUri, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal DnsResolverDomainListData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList domains, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ETag = etag; Domains = domains; - DomainsUri = domainsUri; ProvisioningState = provisioningState; ResourceGuid = resourceGuid; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -102,30 +89,13 @@ internal DnsResolverDomainListData() { } - /// - /// ETag of the DNS resolver domain list. - /// Serialized Name: DnsResolverDomainList.etag - /// + /// ETag of the DNS resolver domain list. public ETag? ETag { get; } - /// - /// The domains in the domain list. - /// Serialized Name: DnsResolverDomainList.properties.domains - /// + /// The domains in the domain list. public IList Domains { get; } - /// - /// The URL for bulk upload or download for domain lists containing larger set of domains. - /// Serialized Name: DnsResolverDomainList.properties.domainsUrl - /// - public Uri DomainsUri { get; } - /// - /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverDomainList.properties.provisioningState - /// + /// The current provisioning state of the DNS resolver domain list. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } - /// - /// The resourceGuid property of the DNS resolver domain list resource. - /// Serialized Name: DnsResolverDomainList.properties.resourceGuid - /// + /// The resourceGuid property of the DNS resolver domain list resource. public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs index b0298f839677..6861574160d1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -350,102 +350,6 @@ public virtual ArmOperation Update(WaitUntil wait } } - /// - /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}/bulk - /// - /// - /// Operation Id - /// DnsResolverDomainLists_Bulk - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Parameters supplied to the bulk domain list operation. - /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. - /// The cancellation token to use. - /// is null. - public virtual async Task> BulkAsync(WaitUntil waitUntil, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); - - using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Bulk"); - scope.Start(); - try - { - var response = await _dnsResolverDomainListRestClient.BulkAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false); - var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsResolverDomainLists/{dnsResolverDomainListName}/bulk - /// - /// - /// Operation Id - /// DnsResolverDomainLists_Bulk - /// - /// - /// Default Api Version - /// 2025-05-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Parameters supplied to the bulk domain list operation. - /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Bulk(WaitUntil waitUntil, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); - - using var scope = _dnsResolverDomainListClientDiagnostics.CreateScope("DnsResolverDomainListResource.Bulk"); - scope.Start(); - try - { - var response = _dnsResolverDomainListRestClient.Bulk(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch, cancellationToken); - var operation = new DnsResolverArmOperation(new DnsResolverDomainListOperationSource(Client), _dnsResolverDomainListClientDiagnostics, Pipeline, _dnsResolverDomainListRestClient.CreateBulkRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, dnsResolverDomainListBulk, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// @@ -459,7 +363,7 @@ public virtual ArmOperation Bulk(WaitUntil waitUn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -521,7 +425,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -583,7 +487,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -640,7 +544,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -697,7 +601,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -757,7 +661,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs index 1f6fc43dc1e8..f8c3a4eb5aab 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string inboundEn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string inboundEndpointName /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string inboundEndpointName, CancellationTok /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs index 5dabe1345780..417e365f1eec 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverInboundEndpoint data model. /// Describes an inbound endpoint for a DNS resolver. - /// Serialized Name: InboundEndpoint /// public partial class DnsResolverInboundEndpointData : TrackedResourceData { @@ -55,10 +54,7 @@ public partial class DnsResolverInboundEndpointData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// - /// IP configurations for the inbound endpoint. - /// Serialized Name: InboundEndpoint.properties.ipConfigurations - /// + /// IP configurations for the inbound endpoint. /// is null. public DnsResolverInboundEndpointData(AzureLocation location, IEnumerable ipConfigurations) : base(location) { @@ -74,22 +70,10 @@ public DnsResolverInboundEndpointData(AzureLocation location, IEnumerable The systemData. /// The tags. /// The location. - /// - /// ETag of the inbound endpoint. - /// Serialized Name: InboundEndpoint.etag - /// - /// - /// IP configurations for the inbound endpoint. - /// Serialized Name: InboundEndpoint.properties.ipConfigurations - /// - /// - /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: InboundEndpoint.properties.provisioningState - /// - /// - /// The resourceGuid property of the inbound endpoint resource. - /// Serialized Name: InboundEndpoint.properties.resourceGuid - /// + /// ETag of the inbound endpoint. + /// IP configurations for the inbound endpoint. + /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the inbound endpoint resource. /// Keeps track of any properties unknown to the library. internal DnsResolverInboundEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, IList ipConfigurations, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -105,25 +89,13 @@ internal DnsResolverInboundEndpointData() { } - /// - /// ETag of the inbound endpoint. - /// Serialized Name: InboundEndpoint.etag - /// + /// ETag of the inbound endpoint. public ETag? ETag { get; } - /// - /// IP configurations for the inbound endpoint. - /// Serialized Name: InboundEndpoint.properties.ipConfigurations - /// + /// IP configurations for the inbound endpoint. public IList IPConfigurations { get; } - /// - /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: InboundEndpoint.properties.provisioningState - /// + /// The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } - /// - /// The resourceGuid property of the inbound endpoint resource. - /// Serialized Name: InboundEndpoint.properties.resourceGuid - /// + /// The resourceGuid property of the inbound endpoint resource. public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs index 3523d11a41ef..c5756885bdb6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs index 9e7b09a6bd70..035d84c40b95 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string outbound /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(in /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = n /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string outboundEndpointNam /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string outboundEndpointName, CancellationTo /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs index 8ff2e4803a5c..276578b0a477 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverOutboundEndpoint data model. /// Describes an outbound endpoint for a DNS resolver. - /// Serialized Name: OutboundEndpoint /// public partial class DnsResolverOutboundEndpointData : TrackedResourceData { @@ -55,10 +54,7 @@ public partial class DnsResolverOutboundEndpointData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// - /// The reference to the subnet used for the outbound endpoint. - /// Serialized Name: OutboundEndpoint.properties.subnet - /// + /// The reference to the subnet used for the outbound endpoint. /// is null. public DnsResolverOutboundEndpointData(AzureLocation location, WritableSubResource subnet) : base(location) { @@ -74,22 +70,10 @@ public DnsResolverOutboundEndpointData(AzureLocation location, WritableSubResour /// The systemData. /// The tags. /// The location. - /// - /// ETag of the outbound endpoint. - /// Serialized Name: OutboundEndpoint.etag - /// - /// - /// The reference to the subnet used for the outbound endpoint. - /// Serialized Name: OutboundEndpoint.properties.subnet - /// - /// - /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: OutboundEndpoint.properties.provisioningState - /// - /// - /// The resourceGuid property of the outbound endpoint resource. - /// Serialized Name: OutboundEndpoint.properties.resourceGuid - /// + /// ETag of the outbound endpoint. + /// The reference to the subnet used for the outbound endpoint. + /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the outbound endpoint resource. /// Keeps track of any properties unknown to the library. internal DnsResolverOutboundEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, WritableSubResource subnet, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -105,15 +89,9 @@ internal DnsResolverOutboundEndpointData() { } - /// - /// ETag of the outbound endpoint. - /// Serialized Name: OutboundEndpoint.etag - /// + /// ETag of the outbound endpoint. public ETag? ETag { get; } - /// - /// The reference to the subnet used for the outbound endpoint. - /// Serialized Name: OutboundEndpoint.properties.subnet - /// + /// The reference to the subnet used for the outbound endpoint. internal WritableSubResource Subnet { get; set; } /// Gets or sets Id. public ResourceIdentifier SubnetId @@ -127,15 +105,9 @@ public ResourceIdentifier SubnetId } } - /// - /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: OutboundEndpoint.properties.provisioningState - /// + /// The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } - /// - /// The resourceGuid property of the outbound endpoint resource. - /// Serialized Name: OutboundEndpoint.properties.resourceGuid - /// + /// The resourceGuid property of the outbound endpoint resource. public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs index 4f3300411904..fc91a12b44a2 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagA /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTags /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveT /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs index c6173c42081a..42bf813d68c1 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string d /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string dnsResolverPolicyN /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(int? top = n /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Pageable GetAll(int? top = null, Cance /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string dnsResolverPolicyNa /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string dnsResolverPolicyName, CancellationT /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs index 6e0340c3c39f..c8c4f9e9923f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyData.cs @@ -16,7 +16,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverPolicy data model. /// Describes a DNS resolver policy. - /// Serialized Name: DnsResolverPolicy /// public partial class DnsResolverPolicyData : TrackedResourceData { @@ -65,18 +64,9 @@ public DnsResolverPolicyData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver policy. - /// Serialized Name: DnsResolverPolicy.etag - /// - /// - /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverPolicy.properties.provisioningState - /// - /// - /// The resourceGuid property of the DNS resolver policy resource. - /// Serialized Name: DnsResolverPolicy.properties.resourceGuid - /// + /// ETag of the DNS resolver policy. + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. + /// The resourceGuid property of the DNS resolver policy resource. /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, DnsResolverProvisioningState? provisioningState, Guid? resourceGuid, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -91,20 +81,11 @@ internal DnsResolverPolicyData() { } - /// - /// ETag of the DNS resolver policy. - /// Serialized Name: DnsResolverPolicy.etag - /// + /// ETag of the DNS resolver policy. public ETag? ETag { get; } - /// - /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverPolicy.properties.provisioningState - /// + /// The current provisioning state of the DNS resolver policy. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } - /// - /// The resourceGuid property of the DNS resolver policy resource. - /// Serialized Name: DnsResolverPolicy.properties.resourceGuid - /// + /// The resourceGuid property of the DNS resolver policy resource. public Guid? ResourceGuid { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs index 2786f2aa3146..143ac6b4ff7a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.cs @@ -110,7 +110,7 @@ public virtual DnsSecurityRuleCollection GetDnsSecurityRules() /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsSecurityRuleA /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsResolverPolicyVirtualNetworkLinkCollection GetDnsResolverPolic /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsResol /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs index 38e276033711..02f37e6b3614 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string dnsResolverPolicyVi /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string dnsResolverPolicyVirtualNetworkLinkN /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs index ff546cf96075..be6cc28f570c 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsResolverPolicyVirtualNetworkLink data model. /// Describes a DNS resolver policy virtual network link. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink /// public partial class DnsResolverPolicyVirtualNetworkLinkData : TrackedResourceData { @@ -55,10 +54,7 @@ public partial class DnsResolverPolicyVirtualNetworkLinkData : TrackedResourceDa /// Initializes a new instance of . /// The location. - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork - /// + /// The reference to the virtual network. This cannot be changed after creation. /// is null. public DnsResolverPolicyVirtualNetworkLinkData(AzureLocation location, WritableSubResource virtualNetwork) : base(location) { @@ -74,18 +70,9 @@ public DnsResolverPolicyVirtualNetworkLinkData(AzureLocation location, WritableS /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS resolver policy virtual network link. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.etag - /// - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork - /// - /// - /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.provisioningState - /// + /// ETag of the DNS resolver policy virtual network link. + /// The reference to the virtual network. This cannot be changed after creation. + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyVirtualNetworkLinkData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, WritableSubResource virtualNetwork, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -100,15 +87,9 @@ internal DnsResolverPolicyVirtualNetworkLinkData() { } - /// - /// ETag of the DNS resolver policy virtual network link. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.etag - /// + /// ETag of the DNS resolver policy virtual network link. public ETag? ETag { get; } - /// - /// The reference to the virtual network. This cannot be changed after creation. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.virtualNetwork - /// + /// The reference to the virtual network. This cannot be changed after creation. internal WritableSubResource VirtualNetwork { get; set; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkId @@ -122,10 +103,7 @@ public ResourceIdentifier VirtualNetworkId } } - /// - /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLink.properties.provisioningState - /// + /// The current provisioning state of the DNS resolver policy virtual network link. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs index a752883d1de1..6c297f0cd695 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update( /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(stri /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDi /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs index 5ff209490565..2cc180b5eb02 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.cs @@ -110,7 +110,7 @@ public virtual DnsResolverInboundEndpointCollection GetDnsResolverInboundEndpoin /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetDnsRe /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual DnsResolverOutboundEndpointCollection GetDnsResolverOutboundEndpo /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetDnsR /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetDnsResolverOutbo /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -501,7 +501,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Dns /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -563,7 +563,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -625,7 +625,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -739,7 +739,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -799,7 +799,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs index 713e10041c94..3af6c0c5919d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string dns /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string dnsSecurityRuleName, /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(int? top = nul /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(int? top = null, Cancell /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string dnsSecurityRuleName /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string dnsSecurityRuleName, CancellationTok /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs index 7dc756d42245..12f1d9cbd105 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleData.cs @@ -18,7 +18,6 @@ namespace Azure.ResourceManager.DnsResolver /// /// A class representing the DnsSecurityRule data model. /// Describes a DNS security rule. - /// Serialized Name: DnsSecurityRule /// public partial class DnsSecurityRuleData : TrackedResourceData { @@ -56,18 +55,9 @@ public partial class DnsSecurityRuleData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// - /// The priority of the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.priority - /// - /// - /// The action to take on DNS requests that match the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.action - /// - /// - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists - /// + /// The priority of the DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. /// or is null. public DnsSecurityRuleData(AzureLocation location, int priority, DnsSecurityRuleAction action, IEnumerable dnsResolverDomainLists) : base(location) { @@ -86,30 +76,12 @@ public DnsSecurityRuleData(AzureLocation location, int priority, DnsSecurityRule /// The systemData. /// The tags. /// The location. - /// - /// ETag of the DNS security rule. - /// Serialized Name: DnsSecurityRule.etag - /// - /// - /// The priority of the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.priority - /// - /// - /// The action to take on DNS requests that match the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.action - /// - /// - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists - /// - /// - /// The state of DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.dnsSecurityRuleState - /// - /// - /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsSecurityRule.properties.provisioningState - /// + /// ETag of the DNS security rule. + /// The priority of the DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// The state of DNS security rule. + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. /// Keeps track of any properties unknown to the library. internal DnsSecurityRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, int priority, DnsSecurityRuleAction action, IList dnsResolverDomainLists, DnsSecurityRuleState? dnsSecurityRuleState, DnsResolverProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -127,50 +99,17 @@ internal DnsSecurityRuleData() { } - /// - /// ETag of the DNS security rule. - /// Serialized Name: DnsSecurityRule.etag - /// + /// ETag of the DNS security rule. public ETag? ETag { get; } - /// - /// The priority of the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.priority - /// + /// The priority of the DNS security rule. public int Priority { get; set; } - /// - /// The action to take on DNS requests that match the DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.action - /// - internal DnsSecurityRuleAction Action { get; set; } - /// - /// The type of action to take. - /// Serialized Name: DnsSecurityRuleAction.actionType - /// - public DnsSecurityRuleActionType? ActionType - { - get => Action is null ? default : Action.ActionType; - set - { - if (Action is null) - Action = new DnsSecurityRuleAction(); - Action.ActionType = value; - } - } - - /// - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// Serialized Name: DnsSecurityRule.properties.dnsResolverDomainLists - /// + /// The action to take on DNS requests that match the DNS security rule. + public DnsSecurityRuleAction Action { get; set; } + /// DNS resolver policy domains lists that the DNS security rule applies to. public IList DnsResolverDomainLists { get; } - /// - /// The state of DNS security rule. - /// Serialized Name: DnsSecurityRule.properties.dnsSecurityRuleState - /// + /// The state of DNS security rule. public DnsSecurityRuleState? DnsSecurityRuleState { get; set; } - /// - /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsSecurityRule.properties.provisioningState - /// + /// The current provisioning state of the DNS security rule. This is a read-only property and any attempt to set this value will be ignored. public DnsResolverProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs index 0bebd8c2f50a..39a55cc73c5a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, string ifMatch = null, C /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs index bc5c5ae40b8c..0a8644e11603 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/DnsResolverExtensions.cs @@ -271,7 +271,7 @@ public static DnsResolverCollection GetDnsResolvers(this ResourceGroupResource r /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -309,7 +309,7 @@ public static async Task> GetDnsResolverAsync(this /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -364,7 +364,7 @@ public static DnsForwardingRulesetCollection GetDnsForwardingRulesets(this Resou /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public static async Task> GetDnsForwardin /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -457,7 +457,7 @@ public static DnsResolverPolicyCollection GetDnsResolverPolicies(this ResourceGr /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -495,7 +495,7 @@ public static async Task> GetDnsResolverPoli /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -550,7 +550,7 @@ public static DnsResolverDomainListCollection GetDnsResolverDomainLists(this Res /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -588,7 +588,7 @@ public static async Task> GetDnsResolver /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -626,7 +626,7 @@ public static Response GetDnsResolverDomainList(t /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -663,7 +663,7 @@ public static AsyncPageable GetDnsResolversAsync(this Subsc /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -700,7 +700,7 @@ public static Pageable GetDnsResolvers(this SubscriptionRes /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -737,7 +737,7 @@ public static AsyncPageable GetDnsForwardingRulese /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -774,7 +774,7 @@ public static Pageable GetDnsForwardingRulesets(th /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -811,7 +811,7 @@ public static AsyncPageable GetDnsResolverPoliciesAsy /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -848,7 +848,7 @@ public static Pageable GetDnsResolverPolicies(this Su /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -885,7 +885,7 @@ public static AsyncPageable GetDnsResolverDomainL /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs index 1def3d6766ce..5bd8723fdc94 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual DnsResolverCollection GetDnsResolvers() /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetDnsResolverAsync(str /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual DnsForwardingRulesetCollection GetDnsForwardingRulesets() /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetDnsForwardi /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -191,7 +191,7 @@ public virtual DnsResolverPolicyCollection GetDnsResolverPolicies() /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetDnsResolverPol /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -260,7 +260,7 @@ public virtual DnsResolverDomainListCollection GetDnsResolverDomainLists() /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -291,7 +291,7 @@ public virtual async Task> GetDnsResolve /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs index 091df0281a8f..3d6400b09296 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Extensions/MockableDnsResolverSubscriptionResource.cs @@ -64,7 +64,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -95,7 +95,7 @@ public virtual AsyncPageable GetDnsResolversAsync(int? top /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -126,7 +126,7 @@ public virtual Pageable GetDnsResolvers(int? top = null, Ca /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -157,7 +157,7 @@ public virtual AsyncPageable GetDnsForwardingRules /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Pageable GetDnsForwardingRulesets(i /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual AsyncPageable GetDnsResolverPoliciesAs /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Pageable GetDnsResolverPolicies(int? t /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual AsyncPageable GetDnsResolverDomain /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs new file mode 100644 index 000000000000..d90e68da243e --- /dev/null +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/BlockResponseCode.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.DnsResolver.Models +{ + /// The response code for block actions. + public readonly partial struct BlockResponseCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BlockResponseCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServfailValue = "SERVFAIL"; + + /// SERVFAIL. + public static BlockResponseCode Servfail { get; } = new BlockResponseCode(ServfailValue); + /// Determines if two values are the same. + public static bool operator ==(BlockResponseCode left, BlockResponseCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BlockResponseCode left, BlockResponseCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BlockResponseCode(string value) => new BlockResponseCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BlockResponseCode other && Equals(other); + /// + public bool Equals(BlockResponseCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs index 0d65a37538d6..38c44a2f77fc 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulePatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a forwarding rule for PATCH operation. - /// Serialized Name: ForwardingRulePatch - /// + /// Describes a forwarding rule for PATCH operation. public partial class DnsForwardingRulePatch { /// @@ -56,18 +53,9 @@ public DnsForwardingRulePatch() } /// Initializes a new instance of . - /// - /// DNS servers to forward the DNS query to. - /// Serialized Name: ForwardingRulePatch.properties.targetDnsServers - /// - /// - /// Metadata attached to the forwarding rule. - /// Serialized Name: ForwardingRulePatch.properties.metadata - /// - /// - /// The state of forwarding rule. - /// Serialized Name: ForwardingRulePatch.properties.forwardingRuleState - /// + /// DNS servers to forward the DNS query to. + /// Metadata attached to the forwarding rule. + /// The state of forwarding rule. /// Keeps track of any properties unknown to the library. internal DnsForwardingRulePatch(IList targetDnsServers, IDictionary metadata, DnsForwardingRuleState? dnsForwardingRuleState, IDictionary serializedAdditionalRawData) { @@ -77,20 +65,11 @@ internal DnsForwardingRulePatch(IList targetDnsServers, IDictio _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// DNS servers to forward the DNS query to. - /// Serialized Name: ForwardingRulePatch.properties.targetDnsServers - /// + /// DNS servers to forward the DNS query to. public IList TargetDnsServers { get; } - /// - /// Metadata attached to the forwarding rule. - /// Serialized Name: ForwardingRulePatch.properties.metadata - /// + /// Metadata attached to the forwarding rule. public IDictionary Metadata { get; } - /// - /// The state of forwarding rule. - /// Serialized Name: ForwardingRulePatch.properties.forwardingRuleState - /// + /// The state of forwarding rule. public DnsForwardingRuleState? DnsForwardingRuleState { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs index 07cc3ae95f71..6511e6ac7399 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRuleState.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The state of forwarding rule. - /// Serialized Name: ForwardingRuleState - /// + /// The state of forwarding rule. public readonly partial struct DnsForwardingRuleState : IEquatable { private readonly string _value; @@ -28,15 +25,9 @@ public DnsForwardingRuleState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// - /// Enabled - /// Serialized Name: ForwardingRuleState.Enabled - /// + /// Enabled. public static DnsForwardingRuleState Enabled { get; } = new DnsForwardingRuleState(EnabledValue); - /// - /// Disabled - /// Serialized Name: ForwardingRuleState.Disabled - /// + /// Disabled. public static DnsForwardingRuleState Disabled { get; } = new DnsForwardingRuleState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(DnsForwardingRuleState left, DnsForwardingRuleState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs index ab3d340e7cd3..68571c1de8c8 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on DNS forwarding rulesets. - /// Serialized Name: DnsForwardingRulesetListResult - /// + /// The response to an enumeration operation on DNS forwarding rulesets. internal partial class DnsForwardingRulesetListResult { /// @@ -55,14 +52,8 @@ internal DnsForwardingRulesetListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the DNS forwarding rulesets. - /// Serialized Name: DnsForwardingRulesetListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsForwardingRulesetListResult.nextLink - /// + /// Enumeration of the DNS forwarding rulesets. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal DnsForwardingRulesetListResult(IReadOnlyList _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the DNS forwarding rulesets. - /// Serialized Name: DnsForwardingRulesetListResult.value - /// + /// Enumeration of the DNS forwarding rulesets. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsForwardingRulesetListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs index 26a8c5f2830a..0293b47a3e37 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetPatch.cs @@ -11,10 +11,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a DNS forwarding ruleset PATCH operation. - /// Serialized Name: DnsForwardingRulesetPatch - /// + /// Describes a DNS forwarding ruleset PATCH operation. public partial class DnsForwardingRulesetPatch { /// @@ -57,14 +54,8 @@ public DnsForwardingRulesetPatch() } /// Initializes a new instance of . - /// - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// Serialized Name: DnsForwardingRulesetPatch.dnsResolverOutboundEndpoints - /// - /// - /// Tags for DNS Resolver. - /// Serialized Name: DnsForwardingRulesetPatch.tags - /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. + /// Tags for DNS Resolver. /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetPatch(IList dnsResolverOutboundEndpoints, IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -73,15 +64,9 @@ internal DnsForwardingRulesetPatch(IList dnsResolverOutboun _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. - /// Serialized Name: DnsForwardingRulesetPatch.dnsResolverOutboundEndpoints - /// + /// The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. public IList DnsResolverOutboundEndpoints { get; } - /// - /// Tags for DNS Resolver. - /// Serialized Name: DnsForwardingRulesetPatch.tags - /// + /// Tags for DNS Resolver. public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs index 4e6e4630bf5e..9f3862c216dc 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsForwardingRulesetVirtualNetworkLinkPatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a virtual network link for PATCH operation. - /// Serialized Name: VirtualNetworkLinkPatch - /// + /// Describes a virtual network link for PATCH operation. public partial class DnsForwardingRulesetVirtualNetworkLinkPatch { /// @@ -55,10 +52,7 @@ public DnsForwardingRulesetVirtualNetworkLinkPatch() } /// Initializes a new instance of . - /// - /// Metadata attached to the virtual network link. - /// Serialized Name: VirtualNetworkLinkPatch.properties.metadata - /// + /// Metadata attached to the virtual network link. /// Keeps track of any properties unknown to the library. internal DnsForwardingRulesetVirtualNetworkLinkPatch(IDictionary metadata, IDictionary serializedAdditionalRawData) { @@ -66,10 +60,7 @@ internal DnsForwardingRulesetVirtualNetworkLinkPatch(IDictionary _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Metadata attached to the virtual network link. - /// Serialized Name: VirtualNetworkLinkPatch.properties.metadata - /// + /// Metadata attached to the virtual network link. public IDictionary Metadata { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs deleted file mode 100644 index 02e1bb7512f6..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.Serialization.cs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.DnsResolver.Models -{ - public partial class DnsResolverDomainListBulk : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - writer.WritePropertyName("storageUrl"u8); - writer.WriteStringValue(StorageUri.AbsoluteUri); - writer.WritePropertyName("action"u8); - writer.WriteStringValue(Action.ToString()); - writer.WriteEndObject(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - DnsResolverDomainListBulk IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDnsResolverDomainListBulk(document.RootElement, options); - } - - internal static DnsResolverDomainListBulk DeserializeDnsResolverDomainListBulk(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Uri storageUrl = default; - DnsResolverDomainListBulkAction action = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("storageUrl"u8)) - { - storageUrl = new Uri(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("action"u8)) - { - action = new DnsResolverDomainListBulkAction(property0.Value.GetString()); - continue; - } - } - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new DnsResolverDomainListBulk(storageUrl, action, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerDnsResolverContext.Default); - default: - throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support writing '{options.Format}' format."); - } - } - - DnsResolverDomainListBulk IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeDnsResolverDomainListBulk(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(DnsResolverDomainListBulk)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs deleted file mode 100644 index a7f6cde30491..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulk.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.DnsResolver.Models -{ - /// - /// Describes a DNS resolver domain list for bulk UPLOAD or DOWNLOAD operations. - /// Serialized Name: DnsResolverDomainListBulk - /// - public partial class DnsResolverDomainListBulk - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// - /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. - /// Serialized Name: DnsResolverDomainListBulk.properties.storageUrl - /// - /// - /// The action to take in the request, Upload or Download. - /// Serialized Name: DnsResolverDomainListBulk.properties.action - /// - /// is null. - public DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action) - { - Argument.AssertNotNull(storageUri, nameof(storageUri)); - - StorageUri = storageUri; - Action = action; - } - - /// Initializes a new instance of . - /// - /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. - /// Serialized Name: DnsResolverDomainListBulk.properties.storageUrl - /// - /// - /// The action to take in the request, Upload or Download. - /// Serialized Name: DnsResolverDomainListBulk.properties.action - /// - /// Keeps track of any properties unknown to the library. - internal DnsResolverDomainListBulk(Uri storageUri, DnsResolverDomainListBulkAction action, IDictionary serializedAdditionalRawData) - { - StorageUri = storageUri; - Action = action; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal DnsResolverDomainListBulk() - { - } - - /// - /// The storage account blob file URL to be used in the bulk upload or download request of DNS resolver domain list. - /// Serialized Name: DnsResolverDomainListBulk.properties.storageUrl - /// - public Uri StorageUri { get; } - /// - /// The action to take in the request, Upload or Download. - /// Serialized Name: DnsResolverDomainListBulk.properties.action - /// - public DnsResolverDomainListBulkAction Action { get; } - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs deleted file mode 100644 index 853a20956b09..000000000000 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListBulkAction.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.DnsResolver.Models -{ - /// - /// The action type in requests for bulk upload or download of a DNS resolver domain list. - /// Serialized Name: Action - /// - public readonly partial struct DnsResolverDomainListBulkAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DnsResolverDomainListBulkAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UploadValue = "Upload"; - private const string DownloadValue = "Download"; - - /// - /// Upload - /// Serialized Name: Action.Upload - /// - public static DnsResolverDomainListBulkAction Upload { get; } = new DnsResolverDomainListBulkAction(UploadValue); - /// - /// Download - /// Serialized Name: Action.Download - /// - public static DnsResolverDomainListBulkAction Download { get; } = new DnsResolverDomainListBulkAction(DownloadValue); - /// Determines if two values are the same. - public static bool operator ==(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DnsResolverDomainListBulkAction left, DnsResolverDomainListBulkAction right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator DnsResolverDomainListBulkAction(string value) => new DnsResolverDomainListBulkAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DnsResolverDomainListBulkAction other && Equals(other); - /// - public bool Equals(DnsResolverDomainListBulkAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs index fee02ea466b1..85f570486d94 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListPatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a DNS resolver domain list for PATCH operation. - /// Serialized Name: DnsResolverDomainListPatch - /// + /// Describes a DNS resolver domain list for PATCH operation. public partial class DnsResolverDomainListPatch { /// @@ -56,14 +53,8 @@ public DnsResolverDomainListPatch() } /// Initializes a new instance of . - /// - /// Tags for DNS resolver domain list. - /// Serialized Name: DnsResolverDomainListPatch.tags - /// - /// - /// The domains in the domain list. - /// Serialized Name: DnsResolverDomainListPatch.properties.domains - /// + /// Tags for DNS resolver domain list. + /// The domains in the domain list. /// Keeps track of any properties unknown to the library. internal DnsResolverDomainListPatch(IDictionary tags, IList domains, IDictionary serializedAdditionalRawData) { @@ -72,15 +63,9 @@ internal DnsResolverDomainListPatch(IDictionary tags, IList - /// Tags for DNS resolver domain list. - /// Serialized Name: DnsResolverDomainListPatch.tags - /// + /// Tags for DNS resolver domain list. public IDictionary Tags { get; } - /// - /// The domains in the domain list. - /// Serialized Name: DnsResolverDomainListPatch.properties.domains - /// + /// The domains in the domain list. public IList Domains { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs index 6953aee324e1..154da1abd511 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverDomainListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on DNS resolver domain lists. - /// Serialized Name: DnsResolverDomainListResult - /// + /// The response to an enumeration operation on DNS resolver domain lists. internal partial class DnsResolverDomainListResult { /// @@ -55,14 +52,8 @@ internal DnsResolverDomainListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the DNS resolver domain lists. - /// Serialized Name: DnsResolverDomainListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverDomainListResult.nextLink - /// + /// Enumeration of the DNS resolver domain lists. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal DnsResolverDomainListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal DnsResolverDomainListResult(IReadOnlyList va _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the DNS resolver domain lists. - /// Serialized Name: DnsResolverDomainListResult.value - /// + /// Enumeration of the DNS resolver domain lists. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverDomainListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs index b1c71fe4dd77..e9c44413edb6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverInboundEndpointPatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes an inbound endpoint for a DNS resolver for PATCH operation. - /// Serialized Name: InboundEndpointPatch - /// + /// Describes an inbound endpoint for a DNS resolver for PATCH operation. public partial class DnsResolverInboundEndpointPatch { /// @@ -55,10 +52,7 @@ public DnsResolverInboundEndpointPatch() } /// Initializes a new instance of . - /// - /// Tags for inbound endpoint. - /// Serialized Name: InboundEndpointPatch.tags - /// + /// Tags for inbound endpoint. /// Keeps track of any properties unknown to the library. internal DnsResolverInboundEndpointPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -66,10 +60,7 @@ internal DnsResolverInboundEndpointPatch(IDictionary tags, IDict _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Tags for inbound endpoint. - /// Serialized Name: InboundEndpointPatch.tags - /// + /// Tags for inbound endpoint. public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs index 700f7e6d1753..b7de5f884977 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on DNS resolvers. - /// Serialized Name: DnsResolverListResult - /// + /// The response to an enumeration operation on DNS resolvers. internal partial class DnsResolverListResult { /// @@ -55,14 +52,8 @@ internal DnsResolverListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the DNS resolvers. - /// Serialized Name: DnsResolverListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverListResult.nextLink - /// + /// Enumeration of the DNS resolvers. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal DnsResolverListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal DnsResolverListResult(IReadOnlyList value, string next _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the DNS resolvers. - /// Serialized Name: DnsResolverListResult.value - /// + /// Enumeration of the DNS resolvers. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs index 881419fb0f4b..a913600e9af9 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverOutboundEndpointPatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes an outbound endpoint for a DNS resolver for PATCH operation. - /// Serialized Name: OutboundEndpointPatch - /// + /// Describes an outbound endpoint for a DNS resolver for PATCH operation. public partial class DnsResolverOutboundEndpointPatch { /// @@ -55,10 +52,7 @@ public DnsResolverOutboundEndpointPatch() } /// Initializes a new instance of . - /// - /// Tags for outbound endpoint. - /// Serialized Name: OutboundEndpointPatch.tags - /// + /// Tags for outbound endpoint. /// Keeps track of any properties unknown to the library. internal DnsResolverOutboundEndpointPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -66,10 +60,7 @@ internal DnsResolverOutboundEndpointPatch(IDictionary tags, IDic _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Tags for outbound endpoint. - /// Serialized Name: OutboundEndpointPatch.tags - /// + /// Tags for outbound endpoint. public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs index 40b5dffc19f6..456d3a87a390 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a DNS resolver for PATCH operation. - /// Serialized Name: DnsResolverPatch - /// + /// Describes a DNS resolver for PATCH operation. public partial class DnsResolverPatch { /// @@ -55,10 +52,7 @@ public DnsResolverPatch() } /// Initializes a new instance of . - /// - /// Tags for DNS Resolver. - /// Serialized Name: DnsResolverPatch.tags - /// + /// Tags for DNS Resolver. /// Keeps track of any properties unknown to the library. internal DnsResolverPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -66,10 +60,7 @@ internal DnsResolverPatch(IDictionary tags, IDictionary - /// Tags for DNS Resolver. - /// Serialized Name: DnsResolverPatch.tags - /// + /// Tags for DNS Resolver. public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs index 5bc21b971711..8ff57fca8d6e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on DNS resolver policies. - /// Serialized Name: DnsResolverPolicyListResult - /// + /// The response to an enumeration operation on DNS resolver policies. internal partial class DnsResolverPolicyListResult { /// @@ -55,14 +52,8 @@ internal DnsResolverPolicyListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the DNS resolver policies. - /// Serialized Name: DnsResolverPolicyListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverPolicyListResult.nextLink - /// + /// Enumeration of the DNS resolver policies. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal DnsResolverPolicyListResult(IReadOnlyList value, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the DNS resolver policies. - /// Serialized Name: DnsResolverPolicyListResult.value - /// + /// Enumeration of the DNS resolver policies. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverPolicyListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs index f347ca9b5a58..69a87aaa5be6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyPatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a DNS resolver policy for PATCH operation. - /// Serialized Name: DnsResolverPolicyPatch - /// + /// Describes a DNS resolver policy for PATCH operation. public partial class DnsResolverPolicyPatch { /// @@ -55,10 +52,7 @@ public DnsResolverPolicyPatch() } /// Initializes a new instance of . - /// - /// Tags for DNS resolver policy. - /// Serialized Name: DnsResolverPolicyPatch.tags - /// + /// Tags for DNS resolver policy. /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -66,10 +60,7 @@ internal DnsResolverPolicyPatch(IDictionary tags, IDictionary - /// Tags for DNS resolver policy. - /// Serialized Name: DnsResolverPolicyPatch.tags - /// + /// Tags for DNS resolver policy. public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs index 42d059ab1c1a..c97e63e8e665 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on DNS resolver policy virtual network links. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult - /// + /// The response to an enumeration operation on DNS resolver policy virtual network links. internal partial class DnsResolverPolicyVirtualNetworkLinkListResult { /// @@ -55,14 +52,8 @@ internal DnsResolverPolicyVirtualNetworkLinkListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the DNS resolver policy virtual network links. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.nextLink - /// + /// Enumeration of the DNS resolver policy virtual network links. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyVirtualNetworkLinkListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal DnsResolverPolicyVirtualNetworkLinkListResult(IReadOnlyList - /// Enumeration of the DNS resolver policy virtual network links. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.value - /// + /// Enumeration of the DNS resolver policy virtual network links. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs index acff16b081c3..8d84dc39849b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverPolicyVirtualNetworkLinkPatch.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a DNS resolver policy virtual network link for PATCH operation. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkPatch - /// + /// Describes a DNS resolver policy virtual network link for PATCH operation. public partial class DnsResolverPolicyVirtualNetworkLinkPatch { /// @@ -55,10 +52,7 @@ public DnsResolverPolicyVirtualNetworkLinkPatch() } /// Initializes a new instance of . - /// - /// Tags for the DNS resolver policy virtual network link. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkPatch.tags - /// + /// Tags for the DNS resolver policy virtual network link. /// Keeps track of any properties unknown to the library. internal DnsResolverPolicyVirtualNetworkLinkPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -66,10 +60,7 @@ internal DnsResolverPolicyVirtualNetworkLinkPatch(IDictionary ta _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Tags for the DNS resolver policy virtual network link. - /// Serialized Name: DnsResolverPolicyVirtualNetworkLinkPatch.tags - /// + /// Tags for the DNS resolver policy virtual network link. public IDictionary Tags { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs index e3bcfb070896..d61a62d936ce 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverProvisioningState.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The current provisioning state of the resource. - /// Serialized Name: ProvisioningState - /// + /// The current provisioning state of the resource. public readonly partial struct DnsResolverProvisioningState : IEquatable { private readonly string _value; @@ -32,35 +29,17 @@ public DnsResolverProvisioningState(string value) private const string FailedValue = "Failed"; private const string CanceledValue = "Canceled"; - /// - /// Creating - /// Serialized Name: ProvisioningState.Creating - /// + /// Creating. public static DnsResolverProvisioningState Creating { get; } = new DnsResolverProvisioningState(CreatingValue); - /// - /// Updating - /// Serialized Name: ProvisioningState.Updating - /// + /// Updating. public static DnsResolverProvisioningState Updating { get; } = new DnsResolverProvisioningState(UpdatingValue); - /// - /// Deleting - /// Serialized Name: ProvisioningState.Deleting - /// + /// Deleting. public static DnsResolverProvisioningState Deleting { get; } = new DnsResolverProvisioningState(DeletingValue); - /// - /// Succeeded - /// Serialized Name: ProvisioningState.Succeeded - /// + /// Succeeded. public static DnsResolverProvisioningState Succeeded { get; } = new DnsResolverProvisioningState(SucceededValue); - /// - /// Failed - /// Serialized Name: ProvisioningState.Failed - /// + /// Failed. public static DnsResolverProvisioningState Failed { get; } = new DnsResolverProvisioningState(FailedValue); - /// - /// Canceled - /// Serialized Name: ProvisioningState.Canceled - /// + /// Canceled. public static DnsResolverProvisioningState Canceled { get; } = new DnsResolverProvisioningState(CanceledValue); /// Determines if two values are the same. public static bool operator ==(DnsResolverProvisioningState left, DnsResolverProvisioningState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs index ab7d852705e2..d7f76f849992 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsResolverState.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. - /// Serialized Name: DnsResolverState - /// + /// The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored. public readonly partial struct DnsResolverState : IEquatable { private readonly string _value; @@ -28,15 +25,9 @@ public DnsResolverState(string value) private const string ConnectedValue = "Connected"; private const string DisconnectedValue = "Disconnected"; - /// - /// Connected - /// Serialized Name: DnsResolverState.Connected - /// + /// Connected. public static DnsResolverState Connected { get; } = new DnsResolverState(ConnectedValue); - /// - /// Disconnected - /// Serialized Name: DnsResolverState.Disconnected - /// + /// Disconnected. public static DnsResolverState Disconnected { get; } = new DnsResolverState(DisconnectedValue); /// Determines if two values are the same. public static bool operator ==(DnsResolverState left, DnsResolverState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs index e9e4b6d310e7..e85287ae9283 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.Serialization.cs @@ -39,6 +39,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("actionType"u8); writer.WriteStringValue(ActionType.Value.ToString()); } + if (Optional.IsDefined(BlockResponseCode)) + { + writer.WritePropertyName("blockResponseCode"u8); + writer.WriteStringValue(BlockResponseCode.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +82,7 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme return null; } DnsSecurityRuleActionType? actionType = default; + BlockResponseCode? blockResponseCode = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -90,13 +96,22 @@ internal static DnsSecurityRuleAction DeserializeDnsSecurityRuleAction(JsonEleme actionType = new DnsSecurityRuleActionType(property.Value.GetString()); continue; } + if (property.NameEquals("blockResponseCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + blockResponseCode = new BlockResponseCode(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new DnsSecurityRuleAction(actionType, serializedAdditionalRawData); + return new DnsSecurityRuleAction(actionType, blockResponseCode, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs index a9db16e3a54f..cdd6ebe2c85a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleAction.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The action to take on DNS requests that match the DNS security rule. - /// Serialized Name: DnsSecurityRuleAction - /// + /// The action to take on DNS requests that match the DNS security rule. public partial class DnsSecurityRuleAction { /// @@ -54,21 +51,17 @@ public DnsSecurityRuleAction() } /// Initializes a new instance of . - /// - /// The type of action to take. - /// Serialized Name: DnsSecurityRuleAction.actionType - /// + /// The type of action to take. + /// The response code for block actions. /// Keeps track of any properties unknown to the library. - internal DnsSecurityRuleAction(DnsSecurityRuleActionType? actionType, IDictionary serializedAdditionalRawData) + internal DnsSecurityRuleAction(DnsSecurityRuleActionType? actionType, BlockResponseCode? blockResponseCode, IDictionary serializedAdditionalRawData) { ActionType = actionType; + BlockResponseCode = blockResponseCode; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// The type of action to take. - /// Serialized Name: DnsSecurityRuleAction.actionType - /// + /// The type of action to take. public DnsSecurityRuleActionType? ActionType { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs index 9fbee76e0301..3202ee2bcfb6 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleActionType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The type of action to take. - /// Serialized Name: ActionType - /// + /// The type of action to take. public readonly partial struct DnsSecurityRuleActionType : IEquatable { private readonly string _value; @@ -29,20 +26,11 @@ public DnsSecurityRuleActionType(string value) private const string AlertValue = "Alert"; private const string BlockValue = "Block"; - /// - /// Allow - /// Serialized Name: ActionType.Allow - /// + /// Allow. public static DnsSecurityRuleActionType Allow { get; } = new DnsSecurityRuleActionType(AllowValue); - /// - /// Alert - /// Serialized Name: ActionType.Alert - /// + /// Alert. public static DnsSecurityRuleActionType Alert { get; } = new DnsSecurityRuleActionType(AlertValue); - /// - /// Block - /// Serialized Name: ActionType.Block - /// + /// Block. public static DnsSecurityRuleActionType Block { get; } = new DnsSecurityRuleActionType(BlockValue); /// Determines if two values are the same. public static bool operator ==(DnsSecurityRuleActionType left, DnsSecurityRuleActionType right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs index 59454932cf41..2caf0fa7bd27 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on DNS security rules within a DNS resolver policy. - /// Serialized Name: DnsSecurityRuleListResult - /// + /// The response to an enumeration operation on DNS security rules within a DNS resolver policy. internal partial class DnsSecurityRuleListResult { /// @@ -55,14 +52,8 @@ internal DnsSecurityRuleListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the DNS security rules. - /// Serialized Name: DnsSecurityRuleListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsSecurityRuleListResult.nextLink - /// + /// Enumeration of the DNS security rules. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal DnsSecurityRuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal DnsSecurityRuleListResult(IReadOnlyList value, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the DNS security rules. - /// Serialized Name: DnsSecurityRuleListResult.value - /// + /// Enumeration of the DNS security rules. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: DnsSecurityRuleListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs index a1250eec3372..14ff31677085 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRulePatch.cs @@ -11,10 +11,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a DNS security rule for PATCH operation. - /// Serialized Name: DnsSecurityRulePatch - /// + /// Describes a DNS security rule for PATCH operation. public partial class DnsSecurityRulePatch { /// @@ -57,26 +54,11 @@ public DnsSecurityRulePatch() } /// Initializes a new instance of . - /// - /// Tags for DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.tags - /// - /// - /// The action to take on DNS requests that match the DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.properties.action - /// - /// - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// Serialized Name: DnsSecurityRulePatch.properties.dnsResolverDomainLists - /// - /// - /// The state of DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.properties.dnsSecurityRuleState - /// - /// - /// The priority of the DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.properties.priority - /// + /// Tags for DNS security rule. + /// The action to take on DNS requests that match the DNS security rule. + /// DNS resolver policy domains lists that the DNS security rule applies to. + /// The state of DNS security rule. + /// The priority of the DNS security rule. /// Keeps track of any properties unknown to the library. internal DnsSecurityRulePatch(IDictionary tags, DnsSecurityRuleAction action, IList dnsResolverDomainLists, DnsSecurityRuleState? dnsSecurityRuleState, int? priority, IDictionary serializedAdditionalRawData) { @@ -88,45 +70,15 @@ internal DnsSecurityRulePatch(IDictionary tags, DnsSecurityRuleA _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Tags for DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.tags - /// + /// Tags for DNS security rule. public IDictionary Tags { get; } - /// - /// The action to take on DNS requests that match the DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.properties.action - /// - internal DnsSecurityRuleAction Action { get; set; } - /// - /// The type of action to take. - /// Serialized Name: DnsSecurityRuleAction.actionType - /// - public DnsSecurityRuleActionType? ActionType - { - get => Action is null ? default : Action.ActionType; - set - { - if (Action is null) - Action = new DnsSecurityRuleAction(); - Action.ActionType = value; - } - } - - /// - /// DNS resolver policy domains lists that the DNS security rule applies to. - /// Serialized Name: DnsSecurityRulePatch.properties.dnsResolverDomainLists - /// + /// The action to take on DNS requests that match the DNS security rule. + public DnsSecurityRuleAction Action { get; set; } + /// DNS resolver policy domains lists that the DNS security rule applies to. public IList DnsResolverDomainLists { get; } - /// - /// The state of DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.properties.dnsSecurityRuleState - /// + /// The state of DNS security rule. public DnsSecurityRuleState? DnsSecurityRuleState { get; set; } - /// - /// The priority of the DNS security rule. - /// Serialized Name: DnsSecurityRulePatch.properties.priority - /// + /// The priority of the DNS security rule. public int? Priority { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs index 8bbcb045dccc..8b22ea325780 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/DnsSecurityRuleState.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The state of DNS security rule. - /// Serialized Name: DnsSecurityRuleState - /// + /// The state of DNS security rule. public readonly partial struct DnsSecurityRuleState : IEquatable { private readonly string _value; @@ -28,15 +25,9 @@ public DnsSecurityRuleState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// - /// Enabled - /// Serialized Name: DnsSecurityRuleState.Enabled - /// + /// Enabled. public static DnsSecurityRuleState Enabled { get; } = new DnsSecurityRuleState(EnabledValue); - /// - /// Disabled - /// Serialized Name: DnsSecurityRuleState.Disabled - /// + /// Disabled. public static DnsSecurityRuleState Disabled { get; } = new DnsSecurityRuleState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(DnsSecurityRuleState left, DnsSecurityRuleState right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs index f6124758e7ab..5b2955a2317b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/ForwardingRuleListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset. - /// Serialized Name: ForwardingRuleListResult - /// + /// The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset. internal partial class ForwardingRuleListResult { /// @@ -55,14 +52,8 @@ internal ForwardingRuleListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the forwarding rules. - /// Serialized Name: ForwardingRuleListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: ForwardingRuleListResult.nextLink - /// + /// Enumeration of the forwarding rules. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal ForwardingRuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal ForwardingRuleListResult(IReadOnlyList value, st _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the forwarding rules. - /// Serialized Name: ForwardingRuleListResult.value - /// + /// Enumeration of the forwarding rules. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: ForwardingRuleListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs index 491d55f0cca8..df2d938d861e 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPAllocationMethod.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Private IP address allocation method. - /// Serialized Name: IpAllocationMethod - /// + /// Private IP address allocation method. public readonly partial struct InboundEndpointIPAllocationMethod : IEquatable { private readonly string _value; @@ -28,15 +25,9 @@ public InboundEndpointIPAllocationMethod(string value) private const string StaticValue = "Static"; private const string DynamicValue = "Dynamic"; - /// - /// Static - /// Serialized Name: IpAllocationMethod.Static - /// + /// Static. public static InboundEndpointIPAllocationMethod Static { get; } = new InboundEndpointIPAllocationMethod(StaticValue); - /// - /// Dynamic - /// Serialized Name: IpAllocationMethod.Dynamic - /// + /// Dynamic. public static InboundEndpointIPAllocationMethod Dynamic { get; } = new InboundEndpointIPAllocationMethod(DynamicValue); /// Determines if two values are the same. public static bool operator ==(InboundEndpointIPAllocationMethod left, InboundEndpointIPAllocationMethod right) => left.Equals(right); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs index 410c1365677b..63d93265ea9a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointIPConfiguration.cs @@ -13,10 +13,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// IP configuration. - /// Serialized Name: IpConfiguration - /// + /// IP configuration. public partial class InboundEndpointIPConfiguration { /// @@ -52,10 +49,7 @@ public partial class InboundEndpointIPConfiguration private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// The reference to the subnet bound to the IP configuration. - /// Serialized Name: IpConfiguration.subnet - /// + /// The reference to the subnet bound to the IP configuration. /// is null. public InboundEndpointIPConfiguration(WritableSubResource subnet) { @@ -65,18 +59,9 @@ public InboundEndpointIPConfiguration(WritableSubResource subnet) } /// Initializes a new instance of . - /// - /// The reference to the subnet bound to the IP configuration. - /// Serialized Name: IpConfiguration.subnet - /// - /// - /// Private IP address of the IP configuration. - /// Serialized Name: IpConfiguration.privateIpAddress - /// - /// - /// Private IP address allocation method. - /// Serialized Name: IpConfiguration.privateIpAllocationMethod - /// + /// The reference to the subnet bound to the IP configuration. + /// Private IP address of the IP configuration. + /// Private IP address allocation method. /// Keeps track of any properties unknown to the library. internal InboundEndpointIPConfiguration(WritableSubResource subnet, IPAddress privateIPAddress, InboundEndpointIPAllocationMethod? privateIPAllocationMethod, IDictionary serializedAdditionalRawData) { @@ -91,10 +76,7 @@ internal InboundEndpointIPConfiguration() { } - /// - /// The reference to the subnet bound to the IP configuration. - /// Serialized Name: IpConfiguration.subnet - /// + /// The reference to the subnet bound to the IP configuration. internal WritableSubResource Subnet { get; set; } /// Gets or sets Id. public ResourceIdentifier SubnetId @@ -108,15 +90,9 @@ public ResourceIdentifier SubnetId } } - /// - /// Private IP address of the IP configuration. - /// Serialized Name: IpConfiguration.privateIpAddress - /// + /// Private IP address of the IP configuration. public IPAddress PrivateIPAddress { get; set; } - /// - /// Private IP address allocation method. - /// Serialized Name: IpConfiguration.privateIpAllocationMethod - /// + /// Private IP address allocation method. public InboundEndpointIPAllocationMethod? PrivateIPAllocationMethod { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs index c0f59a763c7d..57302c62d43a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/InboundEndpointListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on inbound endpoints for a DNS resolver. - /// Serialized Name: InboundEndpointListResult - /// + /// The response to an enumeration operation on inbound endpoints for a DNS resolver. internal partial class InboundEndpointListResult { /// @@ -55,14 +52,8 @@ internal InboundEndpointListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the inbound endpoints for a DNS resolver. - /// Serialized Name: InboundEndpointListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: InboundEndpointListResult.nextLink - /// + /// Enumeration of the inbound endpoints for a DNS resolver. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal InboundEndpointListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal InboundEndpointListResult(IReadOnlyList _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the inbound endpoints for a DNS resolver. - /// Serialized Name: InboundEndpointListResult.value - /// + /// Enumeration of the inbound endpoints for a DNS resolver. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: InboundEndpointListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs index ef84cb308403..cd7f6b3f4022 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/OutboundEndpointListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on outbound endpoints for a DNS resolver. - /// Serialized Name: OutboundEndpointListResult - /// + /// The response to an enumeration operation on outbound endpoints for a DNS resolver. internal partial class OutboundEndpointListResult { /// @@ -55,14 +52,8 @@ internal OutboundEndpointListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the outbound endpoints for a DNS resolver. - /// Serialized Name: OutboundEndpointListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: OutboundEndpointListResult.nextLink - /// + /// Enumeration of the outbound endpoints for a DNS resolver. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal OutboundEndpointListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal OutboundEndpointListResult(IReadOnlyList - /// Enumeration of the outbound endpoints for a DNS resolver. - /// Serialized Name: OutboundEndpointListResult.value - /// + /// Enumeration of the outbound endpoints for a DNS resolver. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: OutboundEndpointListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs index c67c82883c41..a92a9ebe550f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/SubResourceListResult.cs @@ -11,10 +11,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on sub-resources. - /// Serialized Name: SubResourceListResult - /// + /// The response to an enumeration operation on sub-resources. internal partial class SubResourceListResult { /// @@ -56,14 +53,8 @@ internal SubResourceListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the sub-resources. - /// Serialized Name: SubResourceListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: SubResourceListResult.nextLink - /// + /// Enumeration of the sub-resources. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal SubResourceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -72,15 +63,9 @@ internal SubResourceListResult(IReadOnlyList value, string _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Enumeration of the sub-resources. - /// Serialized Name: SubResourceListResult.value - /// + /// Enumeration of the sub-resources. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: SubResourceListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs index f17ac849d722..813cde601ad4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/TargetDnsServer.cs @@ -11,10 +11,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Describes a server to forward the DNS queries to. - /// Serialized Name: TargetDnsServer - /// + /// Describes a server to forward the DNS queries to. public partial class TargetDnsServer { /// @@ -50,10 +47,7 @@ public partial class TargetDnsServer private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// DNS server IP address. - /// Serialized Name: TargetDnsServer.ipAddress - /// + /// DNS server IP address. /// is null. public TargetDnsServer(IPAddress ipAddress) { @@ -63,14 +57,8 @@ public TargetDnsServer(IPAddress ipAddress) } /// Initializes a new instance of . - /// - /// DNS server IP address. - /// Serialized Name: TargetDnsServer.ipAddress - /// - /// - /// DNS server port. - /// Serialized Name: TargetDnsServer.port - /// + /// DNS server IP address. + /// DNS server port. /// Keeps track of any properties unknown to the library. internal TargetDnsServer(IPAddress ipAddress, int? port, IDictionary serializedAdditionalRawData) { @@ -84,15 +72,9 @@ internal TargetDnsServer() { } - /// - /// DNS server IP address. - /// Serialized Name: TargetDnsServer.ipAddress - /// + /// DNS server IP address. public IPAddress IPAddress { get; set; } - /// - /// DNS server port. - /// Serialized Name: TargetDnsServer.port - /// + /// DNS server port. public int? Port { get; set; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs index 4a6d3e30b315..1fcf7bcf7a6a 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRuleset.cs @@ -12,10 +12,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// Reference to DNS forwarding ruleset and associated virtual network link. - /// Serialized Name: VirtualNetworkDnsForwardingRuleset - /// + /// Reference to DNS forwarding ruleset and associated virtual network link. public partial class VirtualNetworkDnsForwardingRuleset { /// @@ -56,14 +53,8 @@ internal VirtualNetworkDnsForwardingRuleset() } /// Initializes a new instance of . - /// - /// DNS Forwarding Ruleset Resource ID. - /// Serialized Name: VirtualNetworkDnsForwardingRuleset.id - /// - /// - /// The reference to the virtual network link. - /// Serialized Name: VirtualNetworkDnsForwardingRuleset.properties.virtualNetworkLink - /// + /// DNS Forwarding Ruleset Resource ID. + /// The reference to the virtual network link. /// Keeps track of any properties unknown to the library. internal VirtualNetworkDnsForwardingRuleset(ResourceIdentifier id, WritableSubResource virtualNetworkLink, IDictionary serializedAdditionalRawData) { @@ -72,15 +63,9 @@ internal VirtualNetworkDnsForwardingRuleset(ResourceIdentifier id, WritableSubRe _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// DNS Forwarding Ruleset Resource ID. - /// Serialized Name: VirtualNetworkDnsForwardingRuleset.id - /// + /// DNS Forwarding Ruleset Resource ID. public ResourceIdentifier Id { get; } - /// - /// The reference to the virtual network link. - /// Serialized Name: VirtualNetworkDnsForwardingRuleset.properties.virtualNetworkLink - /// + /// The reference to the virtual network link. internal WritableSubResource VirtualNetworkLink { get; } /// Gets or sets Id. public ResourceIdentifier VirtualNetworkLinkId diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs index c28d95188c4f..e53d4e045a49 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkDnsForwardingRulesetListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset. - /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult - /// + /// The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset. internal partial class VirtualNetworkDnsForwardingRulesetListResult { /// @@ -55,14 +52,8 @@ internal VirtualNetworkDnsForwardingRulesetListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the Virtual Network DNS Forwarding Ruleset. - /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.nextLink - /// + /// Enumeration of the Virtual Network DNS Forwarding Ruleset. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal VirtualNetworkDnsForwardingRulesetListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal VirtualNetworkDnsForwardingRulesetListResult(IReadOnlyList - /// Enumeration of the Virtual Network DNS Forwarding Ruleset. - /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.value - /// + /// Enumeration of the Virtual Network DNS Forwarding Ruleset. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: VirtualNetworkDnsForwardingRulesetListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs index 1f5a764adfce..8b06f0a13682 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/Models/VirtualNetworkLinkListResult.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.DnsResolver.Models { - /// - /// The response to an enumeration operation on virtual network links. - /// Serialized Name: VirtualNetworkLinkListResult - /// + /// The response to an enumeration operation on virtual network links. internal partial class VirtualNetworkLinkListResult { /// @@ -55,14 +52,8 @@ internal VirtualNetworkLinkListResult() } /// Initializes a new instance of . - /// - /// Enumeration of the virtual network links. - /// Serialized Name: VirtualNetworkLinkListResult.value - /// - /// - /// The continuation token for the next page of results. - /// Serialized Name: VirtualNetworkLinkListResult.nextLink - /// + /// Enumeration of the virtual network links. + /// The continuation token for the next page of results. /// Keeps track of any properties unknown to the library. internal VirtualNetworkLinkListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -71,15 +62,9 @@ internal VirtualNetworkLinkListResult(IReadOnlyList - /// Enumeration of the virtual network links. - /// Serialized Name: VirtualNetworkLinkListResult.value - /// + /// Enumeration of the virtual network links. public IReadOnlyList Value { get; } - /// - /// The continuation token for the next page of results. - /// Serialized Name: VirtualNetworkLinkListResult.nextLink - /// + /// The continuation token for the next page of results. public string NextLink { get; } } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs index acd09b7f9e39..f1730e0be3b3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsForwardingRulesetsRestOperations.cs @@ -32,7 +32,7 @@ public DnsForwardingRulesetsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs index cc1ddd9c9df4..d0c8b760b2b7 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverDomainListsRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolverDomainListsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -608,112 +608,6 @@ public Response List(string subscriptionId, int? to } } - internal RequestUriBuilder CreateBulkRequestUri(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch, string ifNoneMatch) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); - uri.AppendPath(dnsResolverDomainListName, true); - uri.AppendPath("/bulk", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateBulkRequest(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch, string ifNoneMatch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Network/dnsResolverDomainLists/", false); - uri.AppendPath(dnsResolverDomainListName, true); - uri.AppendPath("/bulk", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(dnsResolverDomainListBulk, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the DNS resolver domain list. - /// Parameters supplied to the bulk domain list operation. - /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task BulkAsync(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); - Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); - - using var message = CreateBulkRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, dnsResolverDomainListBulk, ifMatch, ifNoneMatch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Uploads or downloads the list of domains for a DNS Resolver Domain List from a storage link. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the DNS resolver domain list. - /// Parameters supplied to the bulk domain list operation. - /// ETag of the resource. Omit this value to always overwrite the current resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. - /// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Bulk(string subscriptionId, string resourceGroupName, string dnsResolverDomainListName, DnsResolverDomainListBulk dnsResolverDomainListBulk, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(dnsResolverDomainListName, nameof(dnsResolverDomainListName)); - Argument.AssertNotNull(dnsResolverDomainListBulk, nameof(dnsResolverDomainListBulk)); - - using var message = CreateBulkRequest(subscriptionId, resourceGroupName, dnsResolverDomainListName, dnsResolverDomainListBulk, ifMatch, ifNoneMatch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, int? top) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs index 431b30544e3e..b190191b2f65 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolverPoliciesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs index c0bd4eeb76e4..61ff283456a7 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolverPolicyVirtualNetworkLinksRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolverPolicyVirtualNetworkLinksRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs index 380bfd2f01fe..0df9499ab9e3 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsResolversRestOperations.cs @@ -32,7 +32,7 @@ public DnsResolversRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs index dce055c7e042..7d12053d8694 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/DnsSecurityRulesRestOperations.cs @@ -32,7 +32,7 @@ public DnsSecurityRulesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs index 7a04d564385e..d49dbc898f82 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/ForwardingRulesRestOperations.cs @@ -32,7 +32,7 @@ public ForwardingRulesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs index c98b6be4d31d..cdec5dc65596 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/InboundEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public InboundEndpointsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs index bbbc7114b08d..63d3d747b4d7 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/OutboundEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public OutboundEndpointsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs index 8a3ed609c477..bf33cb72d447 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/RestOperations/VirtualNetworkLinksRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkLinksRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2025-05-01"; + _apiVersion = apiVersion ?? "2023-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs index d75455ae48f3..22ac369eb7f4 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/VirtualNetworkDnsResolverResource.cs @@ -86,7 +86,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual AsyncPageable GetDnsResolversAsync(int? top /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -148,7 +148,7 @@ public virtual Pageable GetDnsResolvers(int? top = null, Ca /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual AsyncPageable GetDnsForwardin /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual Pageable GetDnsForwardingRule /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource @@ -240,7 +240,7 @@ public virtual AsyncPageable GetDnsResolverPoliciesByVirtua /// /// /// Default Api Version - /// 2025-05-01 + /// 2023-07-01-preview /// /// /// Resource