armdnsresolver

package module
v0.0.0-...-45adee8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 15 Imported by: 0

README

Azure DNS Private Resolver Module for Go

The armdnsresolver module provides operations for working with Azure DNS Private Resolver.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure DNS Private Resolver module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure DNS Private Resolver. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure DNS Private Resolver module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armdnsresolver.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armdnsresolver.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewDNSForwardingRulesetsClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the DNS Private Resolver label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionType

type ActionType string

ActionType - The type of action to take.

const (
	ActionTypeAlert ActionType = "Alert"
	ActionTypeAllow ActionType = "Allow"
	ActionTypeBlock ActionType = "Block"
)

func PossibleActionTypeValues

func PossibleActionTypeValues() []ActionType

PossibleActionTypeValues returns the possible values for the ActionType const type.

type BlockResponseCode

type BlockResponseCode string

BlockResponseCode - The response code for block actions.

const (
	BlockResponseCodeSERVFAIL BlockResponseCode = "SERVFAIL"
)

func PossibleBlockResponseCodeValues

func PossibleBlockResponseCodeValues() []BlockResponseCode

PossibleBlockResponseCodeValues returns the possible values for the BlockResponseCode const type.

type ClientFactory

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewDNSForwardingRulesetsClient

func (c *ClientFactory) NewDNSForwardingRulesetsClient() *DNSForwardingRulesetsClient

NewDNSForwardingRulesetsClient creates a new instance of DNSForwardingRulesetsClient.

func (*ClientFactory) NewDNSResolversClient

func (c *ClientFactory) NewDNSResolversClient() *DNSResolversClient

NewDNSResolversClient creates a new instance of DNSResolversClient.

func (*ClientFactory) NewDNSSecurityRulesClient

func (c *ClientFactory) NewDNSSecurityRulesClient() *DNSSecurityRulesClient

NewDNSSecurityRulesClient creates a new instance of DNSSecurityRulesClient.

func (*ClientFactory) NewDomainListsClient

func (c *ClientFactory) NewDomainListsClient() *DomainListsClient

NewDomainListsClient creates a new instance of DomainListsClient.

func (*ClientFactory) NewForwardingRulesClient

func (c *ClientFactory) NewForwardingRulesClient() *ForwardingRulesClient

NewForwardingRulesClient creates a new instance of ForwardingRulesClient.

func (*ClientFactory) NewInboundEndpointsClient

func (c *ClientFactory) NewInboundEndpointsClient() *InboundEndpointsClient

NewInboundEndpointsClient creates a new instance of InboundEndpointsClient.

func (*ClientFactory) NewOutboundEndpointsClient

func (c *ClientFactory) NewOutboundEndpointsClient() *OutboundEndpointsClient

NewOutboundEndpointsClient creates a new instance of OutboundEndpointsClient.

func (*ClientFactory) NewPoliciesClient

func (c *ClientFactory) NewPoliciesClient() *PoliciesClient

NewPoliciesClient creates a new instance of PoliciesClient.

func (*ClientFactory) NewPolicyVirtualNetworkLinksClient

func (c *ClientFactory) NewPolicyVirtualNetworkLinksClient() *PolicyVirtualNetworkLinksClient

NewPolicyVirtualNetworkLinksClient creates a new instance of PolicyVirtualNetworkLinksClient.

func (*ClientFactory) NewVirtualNetworkLinksClient

func (c *ClientFactory) NewVirtualNetworkLinksClient() *VirtualNetworkLinksClient

NewVirtualNetworkLinksClient creates a new instance of VirtualNetworkLinksClient.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type DNSForwardingRuleset

type DNSForwardingRuleset struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of the DNS forwarding ruleset.
	Properties *DNSForwardingRulesetProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the DNS forwarding ruleset.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DNSForwardingRuleset - Describes a DNS forwarding ruleset.

func (DNSForwardingRuleset) MarshalJSON

func (d DNSForwardingRuleset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSForwardingRuleset.

func (*DNSForwardingRuleset) UnmarshalJSON

func (d *DNSForwardingRuleset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSForwardingRuleset.

type DNSForwardingRulesetListResult

type DNSForwardingRulesetListResult struct {
	// Enumeration of the DNS forwarding rulesets.
	Value []*DNSForwardingRuleset

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

DNSForwardingRulesetListResult - The response to an enumeration operation on DNS forwarding rulesets.

func (DNSForwardingRulesetListResult) MarshalJSON

func (d DNSForwardingRulesetListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSForwardingRulesetListResult.

func (*DNSForwardingRulesetListResult) UnmarshalJSON

func (d *DNSForwardingRulesetListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSForwardingRulesetListResult.

type DNSForwardingRulesetPatch

type DNSForwardingRulesetPatch struct {
	// 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.
	DNSResolverOutboundEndpoints []*SubResource

	// Tags for DNS Resolver.
	Tags map[string]*string
}

DNSForwardingRulesetPatch - Describes a DNS forwarding ruleset PATCH operation.

func (DNSForwardingRulesetPatch) MarshalJSON

func (d DNSForwardingRulesetPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSForwardingRulesetPatch.

func (*DNSForwardingRulesetPatch) UnmarshalJSON

func (d *DNSForwardingRulesetPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSForwardingRulesetPatch.

type DNSForwardingRulesetProperties

type DNSForwardingRulesetProperties struct {
	// REQUIRED; 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.
	DNSResolverOutboundEndpoints []*SubResource

	// READ-ONLY; 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.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resourceGuid for the DNS forwarding ruleset.
	ResourceGUID *string
}

DNSForwardingRulesetProperties - Represents the properties of a DNS forwarding ruleset.

func (DNSForwardingRulesetProperties) MarshalJSON

func (d DNSForwardingRulesetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSForwardingRulesetProperties.

func (*DNSForwardingRulesetProperties) UnmarshalJSON

func (d *DNSForwardingRulesetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSForwardingRulesetProperties.

type DNSForwardingRulesetsClient

type DNSForwardingRulesetsClient struct {
	// contains filtered or unexported fields
}

DNSForwardingRulesetsClient contains the methods for the DNSForwardingRulesets group. Don't use this type directly, use NewDNSForwardingRulesetsClient() instead.

func NewDNSForwardingRulesetsClient

func NewDNSForwardingRulesetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DNSForwardingRulesetsClient, error)

NewDNSForwardingRulesetsClient creates a new instance of DNSForwardingRulesetsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DNSForwardingRulesetsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Creates or updates a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - DNSForwardingRulesetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsForwardingRuleset_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSForwardingRulesetsClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "samplednsForwardingRuleset", armdnsresolver.DNSForwardingRuleset{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armdnsresolver.DNSForwardingRulesetProperties{
			DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
				{
					ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"),
				},
				{
					ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"),
				}},
		},
	}, &armdnsresolver.DNSForwardingRulesetsClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSForwardingRuleset = armdnsresolver.DNSForwardingRuleset{
	// 	Name: to.Ptr("sampleDnsForwardingRuleset"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DNSForwardingRulesetProperties{
	// 		DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"),
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
	// 	},
	// }
}

func (*DNSForwardingRulesetsClient) BeginDelete

BeginDelete - Deletes a DNS forwarding ruleset. WARNING: This operation cannot be undone. All forwarding rules within the ruleset will be deleted. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • options - DNSForwardingRulesetsClientBeginDeleteOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsForwardingRuleset_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSForwardingRulesetsClient().BeginDelete(ctx, "sampleResourceGroup", "samplednsForwardingRulesetName", &armdnsresolver.DNSForwardingRulesetsClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*DNSForwardingRulesetsClient) BeginUpdate

BeginUpdate - Updates a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • parameters - Parameters supplied to the Update operation.
  • options - DNSForwardingRulesetsClientBeginUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsForwardingRuleset_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSForwardingRulesetsClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", armdnsresolver.DNSForwardingRulesetPatch{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.DNSForwardingRulesetsClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSForwardingRuleset = armdnsresolver.DNSForwardingRuleset{
	// 	Name: to.Ptr("sampleDnsForwardingRuleset"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DNSForwardingRulesetProperties{
	// 		DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"),
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
	// 	},
	// }
}

func (*DNSForwardingRulesetsClient) Get

func (client *DNSForwardingRulesetsClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, options *DNSForwardingRulesetsClientGetOptions) (DNSForwardingRulesetsClientGetResponse, error)

Get - Gets a DNS forwarding ruleset properties. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • options - DNSForwardingRulesetsClientGetOptions contains the optional parameters for the DNSForwardingRulesetsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsForwardingRuleset_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDNSForwardingRulesetsClient().Get(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSForwardingRuleset = armdnsresolver.DNSForwardingRuleset{
	// 	Name: to.Ptr("sampleDnsForwardingRuleset"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DNSForwardingRulesetProperties{
	// 		DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"),
	// 			},
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"),
	// 		}},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
	// 	},
	// }
}

func (*DNSForwardingRulesetsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Lists DNS forwarding rulesets within a resource group.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DNSForwardingRulesetsClientListByResourceGroupOptions contains the optional parameters for the DNSForwardingRulesetsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsForwardingRuleset_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDNSForwardingRulesetsClient().NewListByResourceGroupPager("sampleResourceGroup", &armdnsresolver.DNSForwardingRulesetsClientListByResourceGroupOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DNSForwardingRulesetListResult = armdnsresolver.DNSForwardingRulesetListResult{
		// 	Value: []*armdnsresolver.DNSForwardingRuleset{
		// 		{
		// 			Name: to.Ptr("sampleDnsForwardingRuleset"),
		// 			Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DNSForwardingRulesetProperties{
		// 				DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleDnsForwardingRuleset"),
		// 			Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-05T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DNSForwardingRulesetProperties{
		// 				DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint2"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint3"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("c2aed17a-708d-48d1-89c3-d6a9b648d222"),
		// 			},
		// 	}},
		// }
	}
}

func (*DNSForwardingRulesetsClient) NewListByVirtualNetworkPager

NewListByVirtualNetworkPager - Lists DNS forwarding ruleset resource IDs attached to a virtual network.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • virtualNetworkName - The name of the virtual network.
  • options - DNSForwardingRulesetsClientListByVirtualNetworkOptions contains the optional parameters for the DNSForwardingRulesetsClient.NewListByVirtualNetworkPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsForwardingRuleset_ListByVirtualNetwork.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDNSForwardingRulesetsClient().NewListByVirtualNetworkPager("sampleResourceGroup", "sampleVirtualNetwork", &armdnsresolver.DNSForwardingRulesetsClientListByVirtualNetworkOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VirtualNetworkDNSForwardingRulesetListResult = armdnsresolver.VirtualNetworkDNSForwardingRulesetListResult{
		// 	Value: []*armdnsresolver.VirtualNetworkDNSForwardingRuleset{
		// 		{
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset"),
		// 			Properties: &armdnsresolver.VirtualNetworkLinkSubResourceProperties{
		// 				VirtualNetworkLink: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRuleset/sampleDnsForwardingRuleset/virtualNetworkLinks/sampleVirtualNetworkLink"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}

func (*DNSForwardingRulesetsClient) NewListPager

NewListPager - Lists DNS forwarding rulesets in all resource groups of a subscription.

Generated from API version 2023-07-01-preview

  • options - DNSForwardingRulesetsClientListOptions contains the optional parameters for the DNSForwardingRulesetsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsForwardingRuleset_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDNSForwardingRulesetsClient().NewListPager(&armdnsresolver.DNSForwardingRulesetsClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DNSForwardingRulesetListResult = armdnsresolver.DNSForwardingRulesetListResult{
		// 	Value: []*armdnsresolver.DNSForwardingRuleset{
		// 		{
		// 			Name: to.Ptr("sampleDnsForwardingRuleset"),
		// 			Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DNSForwardingRulesetProperties{
		// 				DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleDnsForwardingRuleset"),
		// 			Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-05T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DNSForwardingRulesetProperties{
		// 				DNSResolverOutboundEndpoints: []*armdnsresolver.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint2"),
		// 					},
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint3"),
		// 				}},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
		// 			},
		// 	}},
		// }
	}
}

type DNSForwardingRulesetsClientBeginCreateOrUpdateOptions

type DNSForwardingRulesetsClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSForwardingRulesetsClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginCreateOrUpdate method.

type DNSForwardingRulesetsClientBeginDeleteOptions

type DNSForwardingRulesetsClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSForwardingRulesetsClientBeginDeleteOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginDelete method.

type DNSForwardingRulesetsClientBeginUpdateOptions

type DNSForwardingRulesetsClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSForwardingRulesetsClientBeginUpdateOptions contains the optional parameters for the DNSForwardingRulesetsClient.BeginUpdate method.

type DNSForwardingRulesetsClientCreateOrUpdateResponse

type DNSForwardingRulesetsClientCreateOrUpdateResponse struct {
	// Describes a DNS forwarding ruleset.
	DNSForwardingRuleset
}

DNSForwardingRulesetsClientCreateOrUpdateResponse contains the response from method DNSForwardingRulesetsClient.BeginCreateOrUpdate.

type DNSForwardingRulesetsClientDeleteResponse

type DNSForwardingRulesetsClientDeleteResponse struct {
}

DNSForwardingRulesetsClientDeleteResponse contains the response from method DNSForwardingRulesetsClient.BeginDelete.

type DNSForwardingRulesetsClientGetOptions

type DNSForwardingRulesetsClientGetOptions struct {
}

DNSForwardingRulesetsClientGetOptions contains the optional parameters for the DNSForwardingRulesetsClient.Get method.

type DNSForwardingRulesetsClientGetResponse

type DNSForwardingRulesetsClientGetResponse struct {
	// Describes a DNS forwarding ruleset.
	DNSForwardingRuleset
}

DNSForwardingRulesetsClientGetResponse contains the response from method DNSForwardingRulesetsClient.Get.

type DNSForwardingRulesetsClientListByResourceGroupOptions

type DNSForwardingRulesetsClientListByResourceGroupOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DNSForwardingRulesetsClientListByResourceGroupOptions contains the optional parameters for the DNSForwardingRulesetsClient.NewListByResourceGroupPager method.

type DNSForwardingRulesetsClientListByResourceGroupResponse

type DNSForwardingRulesetsClientListByResourceGroupResponse struct {
	// The response to an enumeration operation on DNS forwarding rulesets.
	DNSForwardingRulesetListResult
}

DNSForwardingRulesetsClientListByResourceGroupResponse contains the response from method DNSForwardingRulesetsClient.NewListByResourceGroupPager.

type DNSForwardingRulesetsClientListByVirtualNetworkOptions

type DNSForwardingRulesetsClientListByVirtualNetworkOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DNSForwardingRulesetsClientListByVirtualNetworkOptions contains the optional parameters for the DNSForwardingRulesetsClient.NewListByVirtualNetworkPager method.

type DNSForwardingRulesetsClientListByVirtualNetworkResponse

type DNSForwardingRulesetsClientListByVirtualNetworkResponse struct {
	// The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset.
	VirtualNetworkDNSForwardingRulesetListResult
}

DNSForwardingRulesetsClientListByVirtualNetworkResponse contains the response from method DNSForwardingRulesetsClient.NewListByVirtualNetworkPager.

type DNSForwardingRulesetsClientListOptions

type DNSForwardingRulesetsClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DNSForwardingRulesetsClientListOptions contains the optional parameters for the DNSForwardingRulesetsClient.NewListPager method.

type DNSForwardingRulesetsClientListResponse

type DNSForwardingRulesetsClientListResponse struct {
	// The response to an enumeration operation on DNS forwarding rulesets.
	DNSForwardingRulesetListResult
}

DNSForwardingRulesetsClientListResponse contains the response from method DNSForwardingRulesetsClient.NewListPager.

type DNSForwardingRulesetsClientUpdateResponse

type DNSForwardingRulesetsClientUpdateResponse struct {
	// Describes a DNS forwarding ruleset.
	DNSForwardingRuleset
}

DNSForwardingRulesetsClientUpdateResponse contains the response from method DNSForwardingRulesetsClient.BeginUpdate.

type DNSResolver

type DNSResolver struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of the DNS resolver.
	Properties *Properties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the DNS resolver.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DNSResolver - Describes a DNS resolver.

func (DNSResolver) MarshalJSON

func (d DNSResolver) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSResolver.

func (*DNSResolver) UnmarshalJSON

func (d *DNSResolver) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSResolver.

type DNSResolverState

type DNSResolverState string

DNSResolverState - The current status of the DNS resolver. This is a read-only property and any attempt to set this value will be ignored.

const (
	DNSResolverStateConnected    DNSResolverState = "Connected"
	DNSResolverStateDisconnected DNSResolverState = "Disconnected"
)

func PossibleDNSResolverStateValues

func PossibleDNSResolverStateValues() []DNSResolverState

PossibleDNSResolverStateValues returns the possible values for the DNSResolverState const type.

type DNSResolversClient

type DNSResolversClient struct {
	// contains filtered or unexported fields
}

DNSResolversClient contains the methods for the DNSResolvers group. Don't use this type directly, use NewDNSResolversClient() instead.

func NewDNSResolversClient

func NewDNSResolversClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DNSResolversClient, error)

NewDNSResolversClient creates a new instance of DNSResolversClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DNSResolversClient) BeginCreateOrUpdate

func (client *DNSResolversClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, parameters DNSResolver, options *DNSResolversClientBeginCreateOrUpdateOptions) (*runtime.Poller[DNSResolversClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - DNSResolversClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSResolversClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSResolversClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", armdnsresolver.DNSResolver{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armdnsresolver.Properties{
			VirtualNetwork: &armdnsresolver.SubResource{
				ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
			},
		},
	}, &armdnsresolver.DNSResolversClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSResolver = armdnsresolver.DNSResolver{
	// 	Name: to.Ptr("sampleDnsResolver"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.Properties{
	// 		DNSResolverState: to.Ptr(armdnsresolver.DNSResolverStateConnected),
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*DNSResolversClient) BeginDelete

func (client *DNSResolversClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, options *DNSResolversClientBeginDeleteOptions) (*runtime.Poller[DNSResolversClientDeleteResponse], error)

BeginDelete - Deletes a DNS resolver. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • options - DNSResolversClientBeginDeleteOptions contains the optional parameters for the DNSResolversClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSResolversClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolver", &armdnsresolver.DNSResolversClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*DNSResolversClient) BeginUpdate

func (client *DNSResolversClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, parameters Patch, options *DNSResolversClientBeginUpdateOptions) (*runtime.Poller[DNSResolversClientUpdateResponse], error)

BeginUpdate - Updates a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • parameters - Parameters supplied to the Update operation.
  • options - DNSResolversClientBeginUpdateOptions contains the optional parameters for the DNSResolversClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSResolversClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", armdnsresolver.Patch{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.DNSResolversClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSResolver = armdnsresolver.DNSResolver{
	// 	Name: to.Ptr("sampleDnsResolver"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.Properties{
	// 		DNSResolverState: to.Ptr(armdnsresolver.DNSResolverStateConnected),
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*DNSResolversClient) Get

func (client *DNSResolversClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, options *DNSResolversClientGetOptions) (DNSResolversClientGetResponse, error)

Get - Gets properties of a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • options - DNSResolversClientGetOptions contains the optional parameters for the DNSResolversClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDNSResolversClient().Get(ctx, "sampleResourceGroup", "sampleDnsResolver", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSResolver = armdnsresolver.DNSResolver{
	// 	Name: to.Ptr("sampleDnsResolver"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.Properties{
	// 		DNSResolverState: to.Ptr(armdnsresolver.DNSResolverStateConnected),
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*DNSResolversClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Lists DNS resolvers within a resource group.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DNSResolversClientListByResourceGroupOptions contains the optional parameters for the DNSResolversClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDNSResolversClient().NewListByResourceGroupPager("sampleResourceGroup", &armdnsresolver.DNSResolversClientListByResourceGroupOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ListResult = armdnsresolver.ListResult{
		// 	Value: []*armdnsresolver.DNSResolver{
		// 		{
		// 			Name: to.Ptr("sampleDnsResolver1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.Properties{
		// 				DNSResolverState: to.Ptr(armdnsresolver.DNSResolverStateConnected),
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("ad9c8da4-3bb2-4821-a878-c2cb07b01fb6"),
		// 				VirtualNetwork: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork1"),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleDnsResolver2"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver2"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.Properties{
		// 				DNSResolverState: to.Ptr(armdnsresolver.DNSResolverStateConnected),
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
		// 				VirtualNetwork: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork2"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}

func (*DNSResolversClient) NewListByVirtualNetworkPager

func (client *DNSResolversClient) NewListByVirtualNetworkPager(resourceGroupName string, virtualNetworkName string, options *DNSResolversClientListByVirtualNetworkOptions) *runtime.Pager[DNSResolversClientListByVirtualNetworkResponse]

NewListByVirtualNetworkPager - Lists DNS resolver resource IDs linked to a virtual network.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • virtualNetworkName - The name of the virtual network.
  • options - DNSResolversClientListByVirtualNetworkOptions contains the optional parameters for the DNSResolversClient.NewListByVirtualNetworkPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_ListByVirtualNetwork.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDNSResolversClient().NewListByVirtualNetworkPager("sampleResourceGroup", "sampleVirtualNetwork", &armdnsresolver.DNSResolversClientListByVirtualNetworkOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SubResourceListResult = armdnsresolver.SubResourceListResult{
		// 	Value: []*armdnsresolver.SubResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver1"),
		// 	}},
		// }
	}
}

func (*DNSResolversClient) NewListPager

NewListPager - Lists DNS resolvers in all resource groups of a subscription.

Generated from API version 2023-07-01-preview

  • options - DNSResolversClientListOptions contains the optional parameters for the DNSResolversClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolver_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDNSResolversClient().NewListPager(&armdnsresolver.DNSResolversClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ListResult = armdnsresolver.ListResult{
		// 	Value: []*armdnsresolver.DNSResolver{
		// 		{
		// 			Name: to.Ptr("sampleDnsResolver1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.Properties{
		// 				DNSResolverState: to.Ptr(armdnsresolver.DNSResolverStateConnected),
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("ad9c8da4-3bb2-4821-a878-c2cb07b01fb6"),
		// 				VirtualNetwork: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork1"),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleDnsResolver2"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver2"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.Properties{
		// 				DNSResolverState: to.Ptr(armdnsresolver.DNSResolverStateConnected),
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
		// 				VirtualNetwork: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/cbb1387e-4b03-44f2-ad41-58d4677b9873/resourceGroups/virtualNetworkResourceGroup/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork2"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}

type DNSResolversClientBeginCreateOrUpdateOptions

type DNSResolversClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSResolversClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSResolversClient.BeginCreateOrUpdate method.

type DNSResolversClientBeginDeleteOptions

type DNSResolversClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSResolversClientBeginDeleteOptions contains the optional parameters for the DNSResolversClient.BeginDelete method.

type DNSResolversClientBeginUpdateOptions

type DNSResolversClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSResolversClientBeginUpdateOptions contains the optional parameters for the DNSResolversClient.BeginUpdate method.

type DNSResolversClientCreateOrUpdateResponse

type DNSResolversClientCreateOrUpdateResponse struct {
	// Describes a DNS resolver.
	DNSResolver
}

DNSResolversClientCreateOrUpdateResponse contains the response from method DNSResolversClient.BeginCreateOrUpdate.

type DNSResolversClientDeleteResponse

type DNSResolversClientDeleteResponse struct {
}

DNSResolversClientDeleteResponse contains the response from method DNSResolversClient.BeginDelete.

type DNSResolversClientGetOptions

type DNSResolversClientGetOptions struct {
}

DNSResolversClientGetOptions contains the optional parameters for the DNSResolversClient.Get method.

type DNSResolversClientGetResponse

type DNSResolversClientGetResponse struct {
	// Describes a DNS resolver.
	DNSResolver
}

DNSResolversClientGetResponse contains the response from method DNSResolversClient.Get.

type DNSResolversClientListByResourceGroupOptions

type DNSResolversClientListByResourceGroupOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DNSResolversClientListByResourceGroupOptions contains the optional parameters for the DNSResolversClient.NewListByResourceGroupPager method.

type DNSResolversClientListByResourceGroupResponse

type DNSResolversClientListByResourceGroupResponse struct {
	// The response to an enumeration operation on DNS resolvers.
	ListResult
}

DNSResolversClientListByResourceGroupResponse contains the response from method DNSResolversClient.NewListByResourceGroupPager.

type DNSResolversClientListByVirtualNetworkOptions

type DNSResolversClientListByVirtualNetworkOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DNSResolversClientListByVirtualNetworkOptions contains the optional parameters for the DNSResolversClient.NewListByVirtualNetworkPager method.

type DNSResolversClientListByVirtualNetworkResponse

type DNSResolversClientListByVirtualNetworkResponse struct {
	// The response to an enumeration operation on sub-resources.
	SubResourceListResult
}

DNSResolversClientListByVirtualNetworkResponse contains the response from method DNSResolversClient.NewListByVirtualNetworkPager.

type DNSResolversClientListOptions

type DNSResolversClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DNSResolversClientListOptions contains the optional parameters for the DNSResolversClient.NewListPager method.

type DNSResolversClientListResponse

type DNSResolversClientListResponse struct {
	// The response to an enumeration operation on DNS resolvers.
	ListResult
}

DNSResolversClientListResponse contains the response from method DNSResolversClient.NewListPager.

type DNSResolversClientUpdateResponse

type DNSResolversClientUpdateResponse struct {
	// Describes a DNS resolver.
	DNSResolver
}

DNSResolversClientUpdateResponse contains the response from method DNSResolversClient.BeginUpdate.

type DNSSecurityRule

type DNSSecurityRule struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of the DNS security rule.
	Properties *DNSSecurityRuleProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the DNS security rule.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DNSSecurityRule - Describes a DNS security rule.

func (DNSSecurityRule) MarshalJSON

func (d DNSSecurityRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSSecurityRule.

func (*DNSSecurityRule) UnmarshalJSON

func (d *DNSSecurityRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSSecurityRule.

type DNSSecurityRuleAction

type DNSSecurityRuleAction struct {
	// The type of action to take.
	ActionType *ActionType

	// The response code for block actions.
	BlockResponseCode *BlockResponseCode
}

DNSSecurityRuleAction - The action to take on DNS requests that match the DNS security rule.

func (DNSSecurityRuleAction) MarshalJSON

func (d DNSSecurityRuleAction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSSecurityRuleAction.

func (*DNSSecurityRuleAction) UnmarshalJSON

func (d *DNSSecurityRuleAction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSSecurityRuleAction.

type DNSSecurityRuleListResult

type DNSSecurityRuleListResult struct {
	// Enumeration of the DNS security rules.
	Value []*DNSSecurityRule

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

DNSSecurityRuleListResult - The response to an enumeration operation on DNS security rules within a DNS resolver policy.

func (DNSSecurityRuleListResult) MarshalJSON

func (d DNSSecurityRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSSecurityRuleListResult.

func (*DNSSecurityRuleListResult) UnmarshalJSON

func (d *DNSSecurityRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSSecurityRuleListResult.

type DNSSecurityRulePatch

type DNSSecurityRulePatch struct {
	// Updatable properties of the DNS security rule.
	Properties *DNSSecurityRulePatchProperties

	// Tags for DNS security rule.
	Tags map[string]*string
}

DNSSecurityRulePatch - Describes a DNS security rule for PATCH operation.

func (DNSSecurityRulePatch) MarshalJSON

func (d DNSSecurityRulePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSSecurityRulePatch.

func (*DNSSecurityRulePatch) UnmarshalJSON

func (d *DNSSecurityRulePatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSSecurityRulePatch.

type DNSSecurityRulePatchProperties

type DNSSecurityRulePatchProperties struct {
	// The action to take on DNS requests that match the DNS security rule.
	Action *DNSSecurityRuleAction

	// DNS resolver policy domains lists that the DNS security rule applies to.
	DNSResolverDomainLists []*SubResource

	// The state of DNS security rule.
	DNSSecurityRuleState *DNSSecurityRuleState

	// The priority of the DNS security rule.
	Priority *int32
}

DNSSecurityRulePatchProperties - Represents the updatable properties of a DNS security rule.

func (DNSSecurityRulePatchProperties) MarshalJSON

func (d DNSSecurityRulePatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSSecurityRulePatchProperties.

func (*DNSSecurityRulePatchProperties) UnmarshalJSON

func (d *DNSSecurityRulePatchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSSecurityRulePatchProperties.

type DNSSecurityRuleProperties

type DNSSecurityRuleProperties struct {
	// REQUIRED; The action to take on DNS requests that match the DNS security rule.
	Action *DNSSecurityRuleAction

	// REQUIRED; DNS resolver policy domains lists that the DNS security rule applies to.
	DNSResolverDomainLists []*SubResource

	// REQUIRED; The priority of the DNS security rule.
	Priority *int32

	// The state of DNS security rule.
	DNSSecurityRuleState *DNSSecurityRuleState

	// READ-ONLY; 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.
	ProvisioningState *ProvisioningState
}

DNSSecurityRuleProperties - Represents the properties of a DNS security rule.

func (DNSSecurityRuleProperties) MarshalJSON

func (d DNSSecurityRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DNSSecurityRuleProperties.

func (*DNSSecurityRuleProperties) UnmarshalJSON

func (d *DNSSecurityRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DNSSecurityRuleProperties.

type DNSSecurityRuleState

type DNSSecurityRuleState string

DNSSecurityRuleState - The state of DNS security rule.

const (
	DNSSecurityRuleStateDisabled DNSSecurityRuleState = "Disabled"
	DNSSecurityRuleStateEnabled  DNSSecurityRuleState = "Enabled"
)

func PossibleDNSSecurityRuleStateValues

func PossibleDNSSecurityRuleStateValues() []DNSSecurityRuleState

PossibleDNSSecurityRuleStateValues returns the possible values for the DNSSecurityRuleState const type.

type DNSSecurityRulesClient

type DNSSecurityRulesClient struct {
	// contains filtered or unexported fields
}

DNSSecurityRulesClient contains the methods for the DNSSecurityRules group. Don't use this type directly, use NewDNSSecurityRulesClient() instead.

func NewDNSSecurityRulesClient

func NewDNSSecurityRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DNSSecurityRulesClient, error)

NewDNSSecurityRulesClient creates a new instance of DNSSecurityRulesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DNSSecurityRulesClient) BeginCreateOrUpdate

func (client *DNSSecurityRulesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsSecurityRuleName string, parameters DNSSecurityRule, options *DNSSecurityRulesClientBeginCreateOrUpdateOptions) (*runtime.Poller[DNSSecurityRulesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a DNS security rule for a DNS resolver policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsSecurityRuleName - The name of the DNS security rule.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - DNSSecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSSecurityRulesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsSecurityRule_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSSecurityRulesClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", armdnsresolver.DNSSecurityRule{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armdnsresolver.DNSSecurityRuleProperties{
			Action: &armdnsresolver.DNSSecurityRuleAction{
				ActionType:        to.Ptr(armdnsresolver.ActionTypeBlock),
				BlockResponseCode: to.Ptr(armdnsresolver.BlockResponseCodeSERVFAIL),
			},
			DNSResolverDomainLists: []*armdnsresolver.SubResource{
				{
					ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"),
				}},
			DNSSecurityRuleState: to.Ptr(armdnsresolver.DNSSecurityRuleStateEnabled),
			Priority:             to.Ptr[int32](100),
		},
	}, &armdnsresolver.DNSSecurityRulesClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSSecurityRule = armdnsresolver.DNSSecurityRule{
	// 	Name: to.Ptr("sampleDnsSecurityRule"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/dnsSecurityRules"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/dnsSecurityRules/sampleDnsSecurityRule"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DNSSecurityRuleProperties{
	// 		Action: &armdnsresolver.DNSSecurityRuleAction{
	// 			ActionType: to.Ptr(armdnsresolver.ActionTypeBlock),
	// 			BlockResponseCode: to.Ptr(armdnsresolver.BlockResponseCodeSERVFAIL),
	// 		},
	// 		DNSResolverDomainLists: []*armdnsresolver.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"),
	// 		}},
	// 		DNSSecurityRuleState: to.Ptr(armdnsresolver.DNSSecurityRuleStateEnabled),
	// 		Priority: to.Ptr[int32](100),
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 	},
	// }
}

func (*DNSSecurityRulesClient) BeginDelete

func (client *DNSSecurityRulesClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsSecurityRuleName string, options *DNSSecurityRulesClientBeginDeleteOptions) (*runtime.Poller[DNSSecurityRulesClientDeleteResponse], error)

BeginDelete - Deletes a DNS security rule for a DNS resolver policy. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsSecurityRuleName - The name of the DNS security rule.
  • options - DNSSecurityRulesClientBeginDeleteOptions contains the optional parameters for the DNSSecurityRulesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsSecurityRule_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSSecurityRulesClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsDnsResolverPolicy", "sampleDnsSecurityRule", &armdnsresolver.DNSSecurityRulesClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*DNSSecurityRulesClient) BeginUpdate

func (client *DNSSecurityRulesClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsSecurityRuleName string, parameters DNSSecurityRulePatch, options *DNSSecurityRulesClientBeginUpdateOptions) (*runtime.Poller[DNSSecurityRulesClientUpdateResponse], error)

BeginUpdate - Updates a DNS security rule. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsSecurityRuleName - The name of the DNS security rule.
  • parameters - Parameters supplied to the Update operation.
  • options - DNSSecurityRulesClientBeginUpdateOptions contains the optional parameters for the DNSSecurityRulesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsSecurityRule_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDNSSecurityRulesClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", armdnsresolver.DNSSecurityRulePatch{
		Properties: &armdnsresolver.DNSSecurityRulePatchProperties{
			DNSSecurityRuleState: to.Ptr(armdnsresolver.DNSSecurityRuleStateDisabled),
		},
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.DNSSecurityRulesClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSSecurityRule = armdnsresolver.DNSSecurityRule{
	// 	Name: to.Ptr("sampleDnsSecurityRule"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/dnsSecurityRules"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/dnsSecurityRules/sampleDnsSecurityRule"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DNSSecurityRuleProperties{
	// 		Action: &armdnsresolver.DNSSecurityRuleAction{
	// 			ActionType: to.Ptr(armdnsresolver.ActionTypeAllow),
	// 		},
	// 		DNSResolverDomainLists: []*armdnsresolver.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList2"),
	// 		}},
	// 		DNSSecurityRuleState: to.Ptr(armdnsresolver.DNSSecurityRuleStateDisabled),
	// 		Priority: to.Ptr[int32](100),
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 	},
	// }
}

func (*DNSSecurityRulesClient) Get

func (client *DNSSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsSecurityRuleName string, options *DNSSecurityRulesClientGetOptions) (DNSSecurityRulesClientGetResponse, error)

Get - Gets properties of a DNS security rule for a DNS resolver policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsSecurityRuleName - The name of the DNS security rule.
  • options - DNSSecurityRulesClientGetOptions contains the optional parameters for the DNSSecurityRulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsSecurityRule_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDNSSecurityRulesClient().Get(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", "sampleDnsSecurityRule", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DNSSecurityRule = armdnsresolver.DNSSecurityRule{
	// 	Name: to.Ptr("sampleDnsSecurityRule"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/dnsSecurityRules"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/dnsSecurityRules/sampleDnsSecurityRule"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DNSSecurityRuleProperties{
	// 		Action: &armdnsresolver.DNSSecurityRuleAction{
	// 			ActionType: to.Ptr(armdnsresolver.ActionTypeBlock),
	// 			BlockResponseCode: to.Ptr(armdnsresolver.BlockResponseCodeSERVFAIL),
	// 		},
	// 		DNSResolverDomainLists: []*armdnsresolver.SubResource{
	// 			{
	// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"),
	// 		}},
	// 		DNSSecurityRuleState: to.Ptr(armdnsresolver.DNSSecurityRuleStateEnabled),
	// 		Priority: to.Ptr[int32](100),
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 	},
	// }
}

func (*DNSSecurityRulesClient) NewListPager

func (client *DNSSecurityRulesClient) NewListPager(resourceGroupName string, dnsResolverPolicyName string, options *DNSSecurityRulesClientListOptions) *runtime.Pager[DNSSecurityRulesClientListResponse]

NewListPager - Lists DNS security rules for a DNS resolver policy.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • options - DNSSecurityRulesClientListOptions contains the optional parameters for the DNSSecurityRulesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsSecurityRule_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDNSSecurityRulesClient().NewListPager("sampleResourceGroup", "sampleDnsResolverPolicy", &armdnsresolver.DNSSecurityRulesClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DNSSecurityRuleListResult = armdnsresolver.DNSSecurityRuleListResult{
		// 	Value: []*armdnsresolver.DNSSecurityRule{
		// 		{
		// 			Name: to.Ptr("sampleDnsSecurityRule"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/dnsSecurityRules"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/dnsSecurityRules/sampleDnsSecurityRule"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DNSSecurityRuleProperties{
		// 				Action: &armdnsresolver.DNSSecurityRuleAction{
		// 					ActionType: to.Ptr(armdnsresolver.ActionTypeBlock),
		// 					BlockResponseCode: to.Ptr(armdnsresolver.BlockResponseCodeSERVFAIL),
		// 				},
		// 				DNSResolverDomainLists: []*armdnsresolver.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"),
		// 				}},
		// 				DNSSecurityRuleState: to.Ptr(armdnsresolver.DNSSecurityRuleStateEnabled),
		// 				Priority: to.Ptr[int32](100),
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleDnsSecurityRule1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/dnsSecurityRules"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/dnsSecurityRules/sampleDnsSecurityRule1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DNSSecurityRuleProperties{
		// 				Action: &armdnsresolver.DNSSecurityRuleAction{
		// 					ActionType: to.Ptr(armdnsresolver.ActionTypeBlock),
		// 					BlockResponseCode: to.Ptr(armdnsresolver.BlockResponseCodeSERVFAIL),
		// 				},
		// 				DNSResolverDomainLists: []*armdnsresolver.SubResource{
		// 					{
		// 						ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList1"),
		// 				}},
		// 				DNSSecurityRuleState: to.Ptr(armdnsresolver.DNSSecurityRuleStateEnabled),
		// 				Priority: to.Ptr[int32](101),
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 			},
		// 	}},
		// }
	}
}

type DNSSecurityRulesClientBeginCreateOrUpdateOptions

type DNSSecurityRulesClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSSecurityRulesClientBeginCreateOrUpdateOptions contains the optional parameters for the DNSSecurityRulesClient.BeginCreateOrUpdate method.

type DNSSecurityRulesClientBeginDeleteOptions

type DNSSecurityRulesClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSSecurityRulesClientBeginDeleteOptions contains the optional parameters for the DNSSecurityRulesClient.BeginDelete method.

type DNSSecurityRulesClientBeginUpdateOptions

type DNSSecurityRulesClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DNSSecurityRulesClientBeginUpdateOptions contains the optional parameters for the DNSSecurityRulesClient.BeginUpdate method.

type DNSSecurityRulesClientCreateOrUpdateResponse

type DNSSecurityRulesClientCreateOrUpdateResponse struct {
	// Describes a DNS security rule.
	DNSSecurityRule
}

DNSSecurityRulesClientCreateOrUpdateResponse contains the response from method DNSSecurityRulesClient.BeginCreateOrUpdate.

type DNSSecurityRulesClientDeleteResponse

type DNSSecurityRulesClientDeleteResponse struct {
}

DNSSecurityRulesClientDeleteResponse contains the response from method DNSSecurityRulesClient.BeginDelete.

type DNSSecurityRulesClientGetOptions

type DNSSecurityRulesClientGetOptions struct {
}

DNSSecurityRulesClientGetOptions contains the optional parameters for the DNSSecurityRulesClient.Get method.

type DNSSecurityRulesClientGetResponse

type DNSSecurityRulesClientGetResponse struct {
	// Describes a DNS security rule.
	DNSSecurityRule
}

DNSSecurityRulesClientGetResponse contains the response from method DNSSecurityRulesClient.Get.

type DNSSecurityRulesClientListOptions

type DNSSecurityRulesClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DNSSecurityRulesClientListOptions contains the optional parameters for the DNSSecurityRulesClient.NewListPager method.

type DNSSecurityRulesClientListResponse

type DNSSecurityRulesClientListResponse struct {
	// The response to an enumeration operation on DNS security rules within a DNS resolver policy.
	DNSSecurityRuleListResult
}

DNSSecurityRulesClientListResponse contains the response from method DNSSecurityRulesClient.NewListPager.

type DNSSecurityRulesClientUpdateResponse

type DNSSecurityRulesClientUpdateResponse struct {
	// Describes a DNS security rule.
	DNSSecurityRule
}

DNSSecurityRulesClientUpdateResponse contains the response from method DNSSecurityRulesClient.BeginUpdate.

type DomainList

type DomainList struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of the DNS resolver domain list.
	Properties *DomainListProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the DNS resolver domain list.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

DomainList - Describes a DNS resolver domain list.

func (DomainList) MarshalJSON

func (d DomainList) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DomainList.

func (*DomainList) UnmarshalJSON

func (d *DomainList) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DomainList.

type DomainListPatch

type DomainListPatch struct {
	// Updatable properties of the DNS resolver policy virtual network link.
	Properties *DomainListPatchProperties

	// Tags for DNS resolver domain list.
	Tags map[string]*string
}

DomainListPatch - Describes a DNS resolver domain list for PATCH operation.

func (DomainListPatch) MarshalJSON

func (d DomainListPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DomainListPatch.

func (*DomainListPatch) UnmarshalJSON

func (d *DomainListPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DomainListPatch.

type DomainListPatchProperties

type DomainListPatchProperties struct {
	// The domains in the domain list.
	Domains []*string
}

DomainListPatchProperties - Represents the updatable properties of a DNS resolver domain list.

func (DomainListPatchProperties) MarshalJSON

func (d DomainListPatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DomainListPatchProperties.

func (*DomainListPatchProperties) UnmarshalJSON

func (d *DomainListPatchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DomainListPatchProperties.

type DomainListProperties

type DomainListProperties struct {
	// REQUIRED; The domains in the domain list.
	Domains []*string

	// READ-ONLY; 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.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resourceGuid property of the DNS resolver domain list resource.
	ResourceGUID *string
}

DomainListProperties - Represents the properties of a DNS resolver domain list.

func (DomainListProperties) MarshalJSON

func (d DomainListProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DomainListProperties.

func (*DomainListProperties) UnmarshalJSON

func (d *DomainListProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DomainListProperties.

type DomainListResult

type DomainListResult struct {
	// Enumeration of the DNS resolver domain lists.
	Value []*DomainList

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

DomainListResult - The response to an enumeration operation on DNS resolver domain lists.

func (DomainListResult) MarshalJSON

func (d DomainListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type DomainListResult.

func (*DomainListResult) UnmarshalJSON

func (d *DomainListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type DomainListResult.

type DomainListsClient

type DomainListsClient struct {
	// contains filtered or unexported fields
}

DomainListsClient contains the methods for the DNSResolverDomainLists group. Don't use this type directly, use NewDomainListsClient() instead.

func NewDomainListsClient

func NewDomainListsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*DomainListsClient, error)

NewDomainListsClient creates a new instance of DomainListsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*DomainListsClient) BeginCreateOrUpdate

func (client *DomainListsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverDomainListName string, parameters DomainList, options *DomainListsClientBeginCreateOrUpdateOptions) (*runtime.Poller[DomainListsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a DNS resolver domain list. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverDomainListName - The name of the DNS resolver domain list.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - DomainListsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainListsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverDomainList_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDomainListsClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverDomainList", armdnsresolver.DomainList{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armdnsresolver.DomainListProperties{
			Domains: []*string{
				to.Ptr("contoso.com")},
		},
	}, &armdnsresolver.DomainListsClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DomainList = armdnsresolver.DomainList{
	// 	Name: to.Ptr("sampleDnsResolverDomainList"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverDomainLists"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DomainListProperties{
	// 		Domains: []*string{
	// 			to.Ptr("contoso.com")},
	// 			ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 			ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
	// 		},
	// 	}
}

func (*DomainListsClient) BeginDelete

func (client *DomainListsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverDomainListName string, options *DomainListsClientBeginDeleteOptions) (*runtime.Poller[DomainListsClientDeleteResponse], error)

BeginDelete - Deletes a DNS resolver domain list. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverDomainListName - The name of the DNS resolver domain list.
  • options - DomainListsClientBeginDeleteOptions contains the optional parameters for the DomainListsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverDomainList_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDomainListsClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolverDomainList", &armdnsresolver.DomainListsClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*DomainListsClient) BeginUpdate

func (client *DomainListsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverDomainListName string, parameters DomainListPatch, options *DomainListsClientBeginUpdateOptions) (*runtime.Poller[DomainListsClientUpdateResponse], error)

BeginUpdate - Updates a DNS resolver domain list. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverDomainListName - The name of the DNS resolver domain list.
  • parameters - Parameters supplied to the Update operation.
  • options - DomainListsClientBeginUpdateOptions contains the optional parameters for the DomainListsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverDomainList_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewDomainListsClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverDomainList", armdnsresolver.DomainListPatch{
		Properties: &armdnsresolver.DomainListPatchProperties{
			Domains: []*string{
				to.Ptr("contoso.com")},
		},
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.DomainListsClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DomainList = armdnsresolver.DomainList{
	// 	Name: to.Ptr("sampleDnsResolverDomainList"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverDomainLists"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DomainListProperties{
	// 		Domains: []*string{
	// 			to.Ptr("contoso.com")},
	// 			ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 			ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
	// 		},
	// 	}
}

func (*DomainListsClient) Get

func (client *DomainListsClient) Get(ctx context.Context, resourceGroupName string, dnsResolverDomainListName string, options *DomainListsClientGetOptions) (DomainListsClientGetResponse, error)

Get - Gets properties of a DNS resolver domain list. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverDomainListName - The name of the DNS resolver domain list.
  • options - DomainListsClientGetOptions contains the optional parameters for the DomainListsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverDomainList_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewDomainListsClient().Get(ctx, "sampleResourceGroup", "sampleDnsResolverDomainList", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.DomainList = armdnsresolver.DomainList{
	// 	Name: to.Ptr("sampleDnsResolverDomainList"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverDomainLists"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.DomainListProperties{
	// 		Domains: []*string{
	// 			to.Ptr("contoso.com")},
	// 			ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 			ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
	// 		},
	// 	}
}

func (*DomainListsClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Lists DNS resolver domain lists within a resource group.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - DomainListsClientListByResourceGroupOptions contains the optional parameters for the DomainListsClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverDomainList_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDomainListsClient().NewListByResourceGroupPager("sampleResourceGroup", &armdnsresolver.DomainListsClientListByResourceGroupOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DomainListResult = armdnsresolver.DomainListResult{
		// 	Value: []*armdnsresolver.DomainList{
		// 		{
		// 			Name: to.Ptr("sampleDnsResolverDomainList1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverDomainLists"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DomainListProperties{
		// 				Domains: []*string{
		// 					to.Ptr("contoso.com")},
		// 					ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 					ResourceGUID: to.Ptr("ad9c8da4-3bb2-4821-a878-c2cb07b01fb6"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("sampleDnsResolverDomainList2"),
		// 				Type: to.Ptr("Microsoft.Network/dnsResolverDomainLists"),
		// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList2"),
		// 				SystemData: &armdnsresolver.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
		// 					CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
		// 					LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				},
		// 				Location: to.Ptr("westus2"),
		// 				Tags: map[string]*string{
		// 					"key1": to.Ptr("value1"),
		// 				},
		// 				Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				Properties: &armdnsresolver.DomainListProperties{
		// 					Domains: []*string{
		// 						to.Ptr("contoso.com")},
		// 						ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 						ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
		// 					},
		// 			}},
		// 		}
	}
}

func (*DomainListsClient) NewListPager

NewListPager - Lists DNS resolver domain lists in all resource groups of a subscription.

Generated from API version 2023-07-01-preview

  • options - DomainListsClientListOptions contains the optional parameters for the DomainListsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverDomainList_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewDomainListsClient().NewListPager(&armdnsresolver.DomainListsClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.DomainListResult = armdnsresolver.DomainListResult{
		// 	Value: []*armdnsresolver.DomainList{
		// 		{
		// 			Name: to.Ptr("sampleDnsResolverDomainList1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverDomainLists"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.DomainListProperties{
		// 				Domains: []*string{
		// 					to.Ptr("contoso.com")},
		// 					ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 					ResourceGUID: to.Ptr("ad9c8da4-3bb2-4821-a878-c2cb07b01fb6"),
		// 				},
		// 			},
		// 			{
		// 				Name: to.Ptr("sampleDnsResolverDomainList2"),
		// 				Type: to.Ptr("Microsoft.Network/dnsResolverDomainLists"),
		// 				ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverDomainLists/sampleDnsResolverDomainList2"),
		// 				SystemData: &armdnsresolver.SystemData{
		// 					CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 					CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 					LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 					LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				},
		// 				Location: to.Ptr("westus2"),
		// 				Tags: map[string]*string{
		// 					"key1": to.Ptr("value1"),
		// 				},
		// 				Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 				Properties: &armdnsresolver.DomainListProperties{
		// 					Domains: []*string{
		// 						to.Ptr("contoso.com")},
		// 						ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 						ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
		// 					},
		// 			}},
		// 		}
	}
}

type DomainListsClientBeginCreateOrUpdateOptions

type DomainListsClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DomainListsClientBeginCreateOrUpdateOptions contains the optional parameters for the DomainListsClient.BeginCreateOrUpdate method.

type DomainListsClientBeginDeleteOptions

type DomainListsClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DomainListsClientBeginDeleteOptions contains the optional parameters for the DomainListsClient.BeginDelete method.

type DomainListsClientBeginUpdateOptions

type DomainListsClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

DomainListsClientBeginUpdateOptions contains the optional parameters for the DomainListsClient.BeginUpdate method.

type DomainListsClientCreateOrUpdateResponse

type DomainListsClientCreateOrUpdateResponse struct {
	// Describes a DNS resolver domain list.
	DomainList
}

DomainListsClientCreateOrUpdateResponse contains the response from method DomainListsClient.BeginCreateOrUpdate.

type DomainListsClientDeleteResponse

type DomainListsClientDeleteResponse struct {
}

DomainListsClientDeleteResponse contains the response from method DomainListsClient.BeginDelete.

type DomainListsClientGetOptions

type DomainListsClientGetOptions struct {
}

DomainListsClientGetOptions contains the optional parameters for the DomainListsClient.Get method.

type DomainListsClientGetResponse

type DomainListsClientGetResponse struct {
	// Describes a DNS resolver domain list.
	DomainList
}

DomainListsClientGetResponse contains the response from method DomainListsClient.Get.

type DomainListsClientListByResourceGroupOptions

type DomainListsClientListByResourceGroupOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DomainListsClientListByResourceGroupOptions contains the optional parameters for the DomainListsClient.NewListByResourceGroupPager method.

type DomainListsClientListByResourceGroupResponse

type DomainListsClientListByResourceGroupResponse struct {
	// The response to an enumeration operation on DNS resolver domain lists.
	DomainListResult
}

DomainListsClientListByResourceGroupResponse contains the response from method DomainListsClient.NewListByResourceGroupPager.

type DomainListsClientListOptions

type DomainListsClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

DomainListsClientListOptions contains the optional parameters for the DomainListsClient.NewListPager method.

type DomainListsClientListResponse

type DomainListsClientListResponse struct {
	// The response to an enumeration operation on DNS resolver domain lists.
	DomainListResult
}

DomainListsClientListResponse contains the response from method DomainListsClient.NewListPager.

type DomainListsClientUpdateResponse

type DomainListsClientUpdateResponse struct {
	// Describes a DNS resolver domain list.
	DomainList
}

DomainListsClientUpdateResponse contains the response from method DomainListsClient.BeginUpdate.

type ForwardingRule

type ForwardingRule struct {
	// REQUIRED; Properties of the forwarding rule.
	Properties *ForwardingRuleProperties

	// READ-ONLY; ETag of the forwarding rule.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ForwardingRule - Describes a forwarding rule within a DNS forwarding ruleset.

func (ForwardingRule) MarshalJSON

func (f ForwardingRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ForwardingRule.

func (*ForwardingRule) UnmarshalJSON

func (f *ForwardingRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ForwardingRule.

type ForwardingRuleListResult

type ForwardingRuleListResult struct {
	// Enumeration of the forwarding rules.
	Value []*ForwardingRule

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

ForwardingRuleListResult - The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset.

func (ForwardingRuleListResult) MarshalJSON

func (f ForwardingRuleListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ForwardingRuleListResult.

func (*ForwardingRuleListResult) UnmarshalJSON

func (f *ForwardingRuleListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ForwardingRuleListResult.

type ForwardingRulePatch

type ForwardingRulePatch struct {
	// Updatable properties of the forwarding rule.
	Properties *ForwardingRulePatchProperties
}

ForwardingRulePatch - Describes a forwarding rule for PATCH operation.

func (ForwardingRulePatch) MarshalJSON

func (f ForwardingRulePatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ForwardingRulePatch.

func (*ForwardingRulePatch) UnmarshalJSON

func (f *ForwardingRulePatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ForwardingRulePatch.

type ForwardingRulePatchProperties

type ForwardingRulePatchProperties struct {
	// The state of forwarding rule.
	ForwardingRuleState *ForwardingRuleState

	// Metadata attached to the forwarding rule.
	Metadata map[string]*string

	// DNS servers to forward the DNS query to.
	TargetDNSServers []*TargetDNSServer
}

ForwardingRulePatchProperties - Represents the updatable properties of a forwarding rule within a DNS forwarding ruleset.

func (ForwardingRulePatchProperties) MarshalJSON

func (f ForwardingRulePatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ForwardingRulePatchProperties.

func (*ForwardingRulePatchProperties) UnmarshalJSON

func (f *ForwardingRulePatchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ForwardingRulePatchProperties.

type ForwardingRuleProperties

type ForwardingRuleProperties struct {
	// REQUIRED; The domain name for the forwarding rule.
	DomainName *string

	// REQUIRED; DNS servers to forward the DNS query to.
	TargetDNSServers []*TargetDNSServer

	// The state of forwarding rule.
	ForwardingRuleState *ForwardingRuleState

	// Metadata attached to the forwarding rule.
	Metadata map[string]*string

	// READ-ONLY; The current provisioning state of the forwarding rule. This is a read-only property and any attempt to set this
	// value will be ignored.
	ProvisioningState *ProvisioningState
}

ForwardingRuleProperties - Represents the properties of a forwarding rule within a DNS forwarding ruleset.

func (ForwardingRuleProperties) MarshalJSON

func (f ForwardingRuleProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ForwardingRuleProperties.

func (*ForwardingRuleProperties) UnmarshalJSON

func (f *ForwardingRuleProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ForwardingRuleProperties.

type ForwardingRuleState

type ForwardingRuleState string

ForwardingRuleState - The state of forwarding rule.

const (
	ForwardingRuleStateDisabled ForwardingRuleState = "Disabled"
	ForwardingRuleStateEnabled  ForwardingRuleState = "Enabled"
)

func PossibleForwardingRuleStateValues

func PossibleForwardingRuleStateValues() []ForwardingRuleState

PossibleForwardingRuleStateValues returns the possible values for the ForwardingRuleState const type.

type ForwardingRulesClient

type ForwardingRulesClient struct {
	// contains filtered or unexported fields
}

ForwardingRulesClient contains the methods for the ForwardingRules group. Don't use this type directly, use NewForwardingRulesClient() instead.

func NewForwardingRulesClient

func NewForwardingRulesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ForwardingRulesClient, error)

NewForwardingRulesClient creates a new instance of ForwardingRulesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ForwardingRulesClient) CreateOrUpdate

func (client *ForwardingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, parameters ForwardingRule, options *ForwardingRulesClientCreateOrUpdateOptions) (ForwardingRulesClientCreateOrUpdateResponse, error)

CreateOrUpdate - Creates or updates a forwarding rule in a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • forwardingRuleName - The name of the forwarding rule.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - ForwardingRulesClientCreateOrUpdateOptions contains the optional parameters for the ForwardingRulesClient.CreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ForwardingRule_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewForwardingRulesClient().CreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", armdnsresolver.ForwardingRule{
		Properties: &armdnsresolver.ForwardingRuleProperties{
			DomainName:          to.Ptr("contoso.com."),
			ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateEnabled),
			Metadata: map[string]*string{
				"additionalProp1": to.Ptr("value1"),
			},
			TargetDNSServers: []*armdnsresolver.TargetDNSServer{
				{
					IPAddress: to.Ptr("10.0.0.1"),
					Port:      to.Ptr[int32](53),
				},
				{
					IPAddress: to.Ptr("10.0.0.2"),
					Port:      to.Ptr[int32](53),
				}},
		},
	}, &armdnsresolver.ForwardingRulesClientCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ForwardingRule = armdnsresolver.ForwardingRule{
	// 	Name: to.Ptr("sampleForwardingRule"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/forwardingRules"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset/forwardingRules/sampleForwardingRule"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.ForwardingRuleProperties{
	// 		DomainName: to.Ptr("contoso.com."),
	// 		ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateEnabled),
	// 		Metadata: map[string]*string{
	// 			"additionalProp1": to.Ptr("value1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		TargetDNSServers: []*armdnsresolver.TargetDNSServer{
	// 			{
	// 				IPAddress: to.Ptr("10.0.0.1"),
	// 				Port: to.Ptr[int32](53),
	// 			},
	// 			{
	// 				IPAddress: to.Ptr("10.0.0.2"),
	// 				Port: to.Ptr[int32](53),
	// 		}},
	// 	},
	// }
}

func (*ForwardingRulesClient) Delete

func (client *ForwardingRulesClient) Delete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, options *ForwardingRulesClientDeleteOptions) (ForwardingRulesClientDeleteResponse, error)

Delete - Deletes a forwarding rule in a DNS forwarding ruleset. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • forwardingRuleName - The name of the forwarding rule.
  • options - ForwardingRulesClientDeleteOptions contains the optional parameters for the ForwardingRulesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ForwardingRule_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	_, err = clientFactory.NewForwardingRulesClient().Delete(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", &armdnsresolver.ForwardingRulesClientDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
}

func (*ForwardingRulesClient) Get

func (client *ForwardingRulesClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, options *ForwardingRulesClientGetOptions) (ForwardingRulesClientGetResponse, error)

Get - Gets properties of a forwarding rule in a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • forwardingRuleName - The name of the forwarding rule.
  • options - ForwardingRulesClientGetOptions contains the optional parameters for the ForwardingRulesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ForwardingRule_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewForwardingRulesClient().Get(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ForwardingRule = armdnsresolver.ForwardingRule{
	// 	Name: to.Ptr("sampleForwardingRule"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/forwardingRules"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset/forwardingRules/sampleForwardingRule"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.ForwardingRuleProperties{
	// 		DomainName: to.Ptr("contoso.com."),
	// 		ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateEnabled),
	// 		Metadata: map[string]*string{
	// 			"additionalProp1": to.Ptr("value1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		TargetDNSServers: []*armdnsresolver.TargetDNSServer{
	// 			{
	// 				IPAddress: to.Ptr("10.0.0.1"),
	// 				Port: to.Ptr[int32](53),
	// 			},
	// 			{
	// 				IPAddress: to.Ptr("10.0.0.2"),
	// 				Port: to.Ptr[int32](53),
	// 		}},
	// 	},
	// }
}

func (*ForwardingRulesClient) NewListPager

func (client *ForwardingRulesClient) NewListPager(resourceGroupName string, dnsForwardingRulesetName string, options *ForwardingRulesClientListOptions) *runtime.Pager[ForwardingRulesClientListResponse]

NewListPager - Lists forwarding rules in a DNS forwarding ruleset.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • options - ForwardingRulesClientListOptions contains the optional parameters for the ForwardingRulesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ForwardingRule_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewForwardingRulesClient().NewListPager("sampleResourceGroup", "sampleDnsForwardingRuleset", &armdnsresolver.ForwardingRulesClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.ForwardingRuleListResult = armdnsresolver.ForwardingRuleListResult{
		// 	Value: []*armdnsresolver.ForwardingRule{
		// 		{
		// 			Name: to.Ptr("sampleForwardingRule"),
		// 			Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/forwardingRules"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset/forwardingRules/sampleForwardingRule"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.ForwardingRuleProperties{
		// 				DomainName: to.Ptr("contoso.com."),
		// 				ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateEnabled),
		// 				Metadata: map[string]*string{
		// 					"additionalProp1": to.Ptr("value1"),
		// 				},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				TargetDNSServers: []*armdnsresolver.TargetDNSServer{
		// 					{
		// 						IPAddress: to.Ptr("10.0.0.1"),
		// 						Port: to.Ptr[int32](53),
		// 					},
		// 					{
		// 						IPAddress: to.Ptr("10.0.0.2"),
		// 						Port: to.Ptr[int32](53),
		// 				}},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleForwardingRule1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/forwardingRules"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset/forwardingRules/sampleForwardingRule1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.ForwardingRuleProperties{
		// 				DomainName: to.Ptr("foobar.com."),
		// 				ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateEnabled),
		// 				Metadata: map[string]*string{
		// 					"additionalProp1": to.Ptr("value1"),
		// 				},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				TargetDNSServers: []*armdnsresolver.TargetDNSServer{
		// 					{
		// 						IPAddress: to.Ptr("10.0.0.3"),
		// 						Port: to.Ptr[int32](53),
		// 					},
		// 					{
		// 						IPAddress: to.Ptr("10.0.0.4"),
		// 						Port: to.Ptr[int32](53),
		// 				}},
		// 			},
		// 	}},
		// }
	}
}

func (*ForwardingRulesClient) Update

func (client *ForwardingRulesClient) Update(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, forwardingRuleName string, parameters ForwardingRulePatch, options *ForwardingRulesClientUpdateOptions) (ForwardingRulesClientUpdateResponse, error)

Update - Updates a forwarding rule in a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • forwardingRuleName - The name of the forwarding rule.
  • parameters - Parameters supplied to the Update operation.
  • options - ForwardingRulesClientUpdateOptions contains the optional parameters for the ForwardingRulesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/ForwardingRule_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewForwardingRulesClient().Update(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleForwardingRule", armdnsresolver.ForwardingRulePatch{
		Properties: &armdnsresolver.ForwardingRulePatchProperties{
			ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateDisabled),
			Metadata: map[string]*string{
				"additionalProp2": to.Ptr("value2"),
			},
		},
	}, &armdnsresolver.ForwardingRulesClientUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.ForwardingRule = armdnsresolver.ForwardingRule{
	// 	Name: to.Ptr("sampleForwardingRule"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/forwardingRules"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRulesets/sampleDnsForwardingRuleset/forwardingRules/sampleForwardingRule"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.ForwardingRuleProperties{
	// 		DomainName: to.Ptr("contoso.com."),
	// 		ForwardingRuleState: to.Ptr(armdnsresolver.ForwardingRuleStateDisabled),
	// 		Metadata: map[string]*string{
	// 			"additionalProp2": to.Ptr("value2"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		TargetDNSServers: []*armdnsresolver.TargetDNSServer{
	// 			{
	// 				IPAddress: to.Ptr("10.0.0.1"),
	// 				Port: to.Ptr[int32](53),
	// 			},
	// 			{
	// 				IPAddress: to.Ptr("10.0.0.2"),
	// 				Port: to.Ptr[int32](53),
	// 		}},
	// 	},
	// }
}

type ForwardingRulesClientCreateOrUpdateOptions

type ForwardingRulesClientCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string
}

ForwardingRulesClientCreateOrUpdateOptions contains the optional parameters for the ForwardingRulesClient.CreateOrUpdate method.

type ForwardingRulesClientCreateOrUpdateResponse

type ForwardingRulesClientCreateOrUpdateResponse struct {
	// Describes a forwarding rule within a DNS forwarding ruleset.
	ForwardingRule
}

ForwardingRulesClientCreateOrUpdateResponse contains the response from method ForwardingRulesClient.CreateOrUpdate.

type ForwardingRulesClientDeleteOptions

type ForwardingRulesClientDeleteOptions struct {
	// 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.
	IfMatch *string
}

ForwardingRulesClientDeleteOptions contains the optional parameters for the ForwardingRulesClient.Delete method.

type ForwardingRulesClientDeleteResponse

type ForwardingRulesClientDeleteResponse struct {
}

ForwardingRulesClientDeleteResponse contains the response from method ForwardingRulesClient.Delete.

type ForwardingRulesClientGetOptions

type ForwardingRulesClientGetOptions struct {
}

ForwardingRulesClientGetOptions contains the optional parameters for the ForwardingRulesClient.Get method.

type ForwardingRulesClientGetResponse

type ForwardingRulesClientGetResponse struct {
	// Describes a forwarding rule within a DNS forwarding ruleset.
	ForwardingRule
}

ForwardingRulesClientGetResponse contains the response from method ForwardingRulesClient.Get.

type ForwardingRulesClientListOptions

type ForwardingRulesClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

ForwardingRulesClientListOptions contains the optional parameters for the ForwardingRulesClient.NewListPager method.

type ForwardingRulesClientListResponse

type ForwardingRulesClientListResponse struct {
	// The response to an enumeration operation on forwarding rules within a DNS forwarding ruleset.
	ForwardingRuleListResult
}

ForwardingRulesClientListResponse contains the response from method ForwardingRulesClient.NewListPager.

type ForwardingRulesClientUpdateOptions

type ForwardingRulesClientUpdateOptions struct {
	// 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.
	IfMatch *string
}

ForwardingRulesClientUpdateOptions contains the optional parameters for the ForwardingRulesClient.Update method.

type ForwardingRulesClientUpdateResponse

type ForwardingRulesClientUpdateResponse struct {
	// Describes a forwarding rule within a DNS forwarding ruleset.
	ForwardingRule
}

ForwardingRulesClientUpdateResponse contains the response from method ForwardingRulesClient.Update.

type IPAllocationMethod

type IPAllocationMethod string

IPAllocationMethod - Private IP address allocation method.

const (
	IPAllocationMethodDynamic IPAllocationMethod = "Dynamic"
	IPAllocationMethodStatic  IPAllocationMethod = "Static"
)

func PossibleIPAllocationMethodValues

func PossibleIPAllocationMethodValues() []IPAllocationMethod

PossibleIPAllocationMethodValues returns the possible values for the IPAllocationMethod const type.

type IPConfiguration

type IPConfiguration struct {
	// REQUIRED; The reference to the subnet bound to the IP configuration.
	Subnet *SubResource

	// Private IP address of the IP configuration.
	PrivateIPAddress *string

	// Private IP address allocation method.
	PrivateIPAllocationMethod *IPAllocationMethod
}

IPConfiguration - IP configuration.

func (IPConfiguration) MarshalJSON

func (i IPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPConfiguration.

func (*IPConfiguration) UnmarshalJSON

func (i *IPConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IPConfiguration.

type InboundEndpoint

type InboundEndpoint struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of the inbound endpoint.
	Properties *InboundEndpointProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the inbound endpoint.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

InboundEndpoint - Describes an inbound endpoint for a DNS resolver.

func (InboundEndpoint) MarshalJSON

func (i InboundEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InboundEndpoint.

func (*InboundEndpoint) UnmarshalJSON

func (i *InboundEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InboundEndpoint.

type InboundEndpointListResult

type InboundEndpointListResult struct {
	// Enumeration of the inbound endpoints for a DNS resolver.
	Value []*InboundEndpoint

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

InboundEndpointListResult - The response to an enumeration operation on inbound endpoints for a DNS resolver.

func (InboundEndpointListResult) MarshalJSON

func (i InboundEndpointListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InboundEndpointListResult.

func (*InboundEndpointListResult) UnmarshalJSON

func (i *InboundEndpointListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InboundEndpointListResult.

type InboundEndpointPatch

type InboundEndpointPatch struct {
	// Tags for inbound endpoint.
	Tags map[string]*string
}

InboundEndpointPatch - Describes an inbound endpoint for a DNS resolver for PATCH operation.

func (InboundEndpointPatch) MarshalJSON

func (i InboundEndpointPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InboundEndpointPatch.

func (*InboundEndpointPatch) UnmarshalJSON

func (i *InboundEndpointPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InboundEndpointPatch.

type InboundEndpointProperties

type InboundEndpointProperties struct {
	// REQUIRED; IP configurations for the inbound endpoint.
	IPConfigurations []*IPConfiguration

	// READ-ONLY; The current provisioning state of the inbound endpoint. This is a read-only property and any attempt to set
	// this value will be ignored.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resourceGuid property of the inbound endpoint resource.
	ResourceGUID *string
}

InboundEndpointProperties - Represents the properties of an inbound endpoint for a DNS resolver.

func (InboundEndpointProperties) MarshalJSON

func (i InboundEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type InboundEndpointProperties.

func (*InboundEndpointProperties) UnmarshalJSON

func (i *InboundEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type InboundEndpointProperties.

type InboundEndpointsClient

type InboundEndpointsClient struct {
	// contains filtered or unexported fields
}

InboundEndpointsClient contains the methods for the InboundEndpoints group. Don't use this type directly, use NewInboundEndpointsClient() instead.

func NewInboundEndpointsClient

func NewInboundEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InboundEndpointsClient, error)

NewInboundEndpointsClient creates a new instance of InboundEndpointsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*InboundEndpointsClient) BeginCreateOrUpdate

func (client *InboundEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, parameters InboundEndpoint, options *InboundEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[InboundEndpointsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates an inbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • inboundEndpointName - The name of the inbound endpoint for the DNS resolver.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - InboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/InboundEndpoint_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewInboundEndpointsClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", armdnsresolver.InboundEndpoint{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armdnsresolver.InboundEndpointProperties{
			IPConfigurations: []*armdnsresolver.IPConfiguration{
				{
					PrivateIPAllocationMethod: to.Ptr(armdnsresolver.IPAllocationMethodDynamic),
					Subnet: &armdnsresolver.SubResource{
						ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
					},
				}},
		},
	}, &armdnsresolver.InboundEndpointsClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.InboundEndpoint = armdnsresolver.InboundEndpoint{
	// 	Name: to.Ptr("sampleInboundEndpoint"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers/inboundEndpoints"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/inboundEndpoints/sampleInboundEndpoint"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.InboundEndpointProperties{
	// 		IPConfigurations: []*armdnsresolver.IPConfiguration{
	// 			{
	// 				PrivateIPAddress: to.Ptr("255.255.255.255"),
	// 				PrivateIPAllocationMethod: to.Ptr(armdnsresolver.IPAllocationMethodDynamic),
	// 				Subnet: &armdnsresolver.SubResource{
	// 					ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("87b3e20a-5833-4c40-8ad7-c5160bb1c5bd"),
	// 	},
	// }
}

func (*InboundEndpointsClient) BeginDelete

func (client *InboundEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, options *InboundEndpointsClientBeginDeleteOptions) (*runtime.Poller[InboundEndpointsClientDeleteResponse], error)

BeginDelete - Deletes an inbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • inboundEndpointName - The name of the inbound endpoint for the DNS resolver.
  • options - InboundEndpointsClientBeginDeleteOptions contains the optional parameters for the InboundEndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/InboundEndpoint_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewInboundEndpointsClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", &armdnsresolver.InboundEndpointsClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*InboundEndpointsClient) BeginUpdate

func (client *InboundEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, parameters InboundEndpointPatch, options *InboundEndpointsClientBeginUpdateOptions) (*runtime.Poller[InboundEndpointsClientUpdateResponse], error)

BeginUpdate - Updates an inbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • inboundEndpointName - The name of the inbound endpoint for the DNS resolver.
  • parameters - Parameters supplied to the Update operation.
  • options - InboundEndpointsClientBeginUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/InboundEndpoint_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewInboundEndpointsClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", armdnsresolver.InboundEndpointPatch{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.InboundEndpointsClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.InboundEndpoint = armdnsresolver.InboundEndpoint{
	// 	Name: to.Ptr("sampleInboundEndpoint"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers/inboundEndpoints"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/inboundEndpoints/sampleInboundEndpoint"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.InboundEndpointProperties{
	// 		IPConfigurations: []*armdnsresolver.IPConfiguration{
	// 			{
	// 				PrivateIPAddress: to.Ptr("255.255.255.255"),
	// 				PrivateIPAllocationMethod: to.Ptr(armdnsresolver.IPAllocationMethodDynamic),
	// 				Subnet: &armdnsresolver.SubResource{
	// 					ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("87b3e20a-5833-4c40-8ad7-c5160bb1c5bd"),
	// 	},
	// }
}

func (*InboundEndpointsClient) Get

func (client *InboundEndpointsClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, inboundEndpointName string, options *InboundEndpointsClientGetOptions) (InboundEndpointsClientGetResponse, error)

Get - Gets properties of an inbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • inboundEndpointName - The name of the inbound endpoint for the DNS resolver.
  • options - InboundEndpointsClientGetOptions contains the optional parameters for the InboundEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/InboundEndpoint_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewInboundEndpointsClient().Get(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleInboundEndpoint", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.InboundEndpoint = armdnsresolver.InboundEndpoint{
	// 	Name: to.Ptr("sampleInboundEndpoint"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers/inboundEndpoints"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/inboundEndpoints/sampleInboundEndpoint"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.InboundEndpointProperties{
	// 		IPConfigurations: []*armdnsresolver.IPConfiguration{
	// 			{
	// 				PrivateIPAddress: to.Ptr("255.255.255.255"),
	// 				PrivateIPAllocationMethod: to.Ptr(armdnsresolver.IPAllocationMethodDynamic),
	// 				Subnet: &armdnsresolver.SubResource{
	// 					ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
	// 				},
	// 		}},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
	// 	},
	// }
}

func (*InboundEndpointsClient) NewListPager

func (client *InboundEndpointsClient) NewListPager(resourceGroupName string, dnsResolverName string, options *InboundEndpointsClientListOptions) *runtime.Pager[InboundEndpointsClientListResponse]

NewListPager - Lists inbound endpoints for a DNS resolver.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • options - InboundEndpointsClientListOptions contains the optional parameters for the InboundEndpointsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/InboundEndpoint_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewInboundEndpointsClient().NewListPager("sampleResourceGroup", "sampleDnsResolver", &armdnsresolver.InboundEndpointsClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.InboundEndpointListResult = armdnsresolver.InboundEndpointListResult{
		// 	Value: []*armdnsresolver.InboundEndpoint{
		// 		{
		// 			Name: to.Ptr("sampleInboundEndpoint1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers/inboundEndpoints"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/inboundEndpoints/sampleInboundEndpoint1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.InboundEndpointProperties{
		// 				IPConfigurations: []*armdnsresolver.IPConfiguration{
		// 					{
		// 						PrivateIPAddress: to.Ptr("255.1.255.1"),
		// 						PrivateIPAllocationMethod: to.Ptr(armdnsresolver.IPAllocationMethodDynamic),
		// 						Subnet: &armdnsresolver.SubResource{
		// 							ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet1"),
		// 						},
		// 				}},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleInboundEndpoint2"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers/inboundEndpoints"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/inboundEndpoints/sampleInboundEndpoint2"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.InboundEndpointProperties{
		// 				IPConfigurations: []*armdnsresolver.IPConfiguration{
		// 					{
		// 						PrivateIPAddress: to.Ptr("1.1.255.1"),
		// 						PrivateIPAllocationMethod: to.Ptr(armdnsresolver.IPAllocationMethodDynamic),
		// 						Subnet: &armdnsresolver.SubResource{
		// 							ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet1"),
		// 						},
		// 				}},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("87b3e20a-5833-4c40-8ad7-c5160bb1c5bd"),
		// 			},
		// 	}},
		// }
	}
}

type InboundEndpointsClientBeginCreateOrUpdateOptions

type InboundEndpointsClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

InboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginCreateOrUpdate method.

type InboundEndpointsClientBeginDeleteOptions

type InboundEndpointsClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

InboundEndpointsClientBeginDeleteOptions contains the optional parameters for the InboundEndpointsClient.BeginDelete method.

type InboundEndpointsClientBeginUpdateOptions

type InboundEndpointsClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

InboundEndpointsClientBeginUpdateOptions contains the optional parameters for the InboundEndpointsClient.BeginUpdate method.

type InboundEndpointsClientCreateOrUpdateResponse

type InboundEndpointsClientCreateOrUpdateResponse struct {
	// Describes an inbound endpoint for a DNS resolver.
	InboundEndpoint
}

InboundEndpointsClientCreateOrUpdateResponse contains the response from method InboundEndpointsClient.BeginCreateOrUpdate.

type InboundEndpointsClientDeleteResponse

type InboundEndpointsClientDeleteResponse struct {
}

InboundEndpointsClientDeleteResponse contains the response from method InboundEndpointsClient.BeginDelete.

type InboundEndpointsClientGetOptions

type InboundEndpointsClientGetOptions struct {
}

InboundEndpointsClientGetOptions contains the optional parameters for the InboundEndpointsClient.Get method.

type InboundEndpointsClientGetResponse

type InboundEndpointsClientGetResponse struct {
	// Describes an inbound endpoint for a DNS resolver.
	InboundEndpoint
}

InboundEndpointsClientGetResponse contains the response from method InboundEndpointsClient.Get.

type InboundEndpointsClientListOptions

type InboundEndpointsClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

InboundEndpointsClientListOptions contains the optional parameters for the InboundEndpointsClient.NewListPager method.

type InboundEndpointsClientListResponse

type InboundEndpointsClientListResponse struct {
	// The response to an enumeration operation on inbound endpoints for a DNS resolver.
	InboundEndpointListResult
}

InboundEndpointsClientListResponse contains the response from method InboundEndpointsClient.NewListPager.

type InboundEndpointsClientUpdateResponse

type InboundEndpointsClientUpdateResponse struct {
	// Describes an inbound endpoint for a DNS resolver.
	InboundEndpoint
}

InboundEndpointsClientUpdateResponse contains the response from method InboundEndpointsClient.BeginUpdate.

type ListResult

type ListResult struct {
	// Enumeration of the DNS resolvers.
	Value []*DNSResolver

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

ListResult - The response to an enumeration operation on DNS resolvers.

func (ListResult) MarshalJSON

func (l ListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ListResult.

func (*ListResult) UnmarshalJSON

func (l *ListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ListResult.

type OutboundEndpoint

type OutboundEndpoint struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of the outbound endpoint.
	Properties *OutboundEndpointProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the outbound endpoint.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

OutboundEndpoint - Describes an outbound endpoint for a DNS resolver.

func (OutboundEndpoint) MarshalJSON

func (o OutboundEndpoint) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutboundEndpoint.

func (*OutboundEndpoint) UnmarshalJSON

func (o *OutboundEndpoint) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEndpoint.

type OutboundEndpointListResult

type OutboundEndpointListResult struct {
	// Enumeration of the outbound endpoints for a DNS resolver.
	Value []*OutboundEndpoint

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

OutboundEndpointListResult - The response to an enumeration operation on outbound endpoints for a DNS resolver.

func (OutboundEndpointListResult) MarshalJSON

func (o OutboundEndpointListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutboundEndpointListResult.

func (*OutboundEndpointListResult) UnmarshalJSON

func (o *OutboundEndpointListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEndpointListResult.

type OutboundEndpointPatch

type OutboundEndpointPatch struct {
	// Tags for outbound endpoint.
	Tags map[string]*string
}

OutboundEndpointPatch - Describes an outbound endpoint for a DNS resolver for PATCH operation.

func (OutboundEndpointPatch) MarshalJSON

func (o OutboundEndpointPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutboundEndpointPatch.

func (*OutboundEndpointPatch) UnmarshalJSON

func (o *OutboundEndpointPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEndpointPatch.

type OutboundEndpointProperties

type OutboundEndpointProperties struct {
	// REQUIRED; The reference to the subnet used for the outbound endpoint.
	Subnet *SubResource

	// READ-ONLY; The current provisioning state of the outbound endpoint. This is a read-only property and any attempt to set
	// this value will be ignored.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resourceGuid property of the outbound endpoint resource.
	ResourceGUID *string
}

OutboundEndpointProperties - Represents the properties of an outbound endpoint for a DNS resolver.

func (OutboundEndpointProperties) MarshalJSON

func (o OutboundEndpointProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OutboundEndpointProperties.

func (*OutboundEndpointProperties) UnmarshalJSON

func (o *OutboundEndpointProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OutboundEndpointProperties.

type OutboundEndpointsClient

type OutboundEndpointsClient struct {
	// contains filtered or unexported fields
}

OutboundEndpointsClient contains the methods for the OutboundEndpoints group. Don't use this type directly, use NewOutboundEndpointsClient() instead.

func NewOutboundEndpointsClient

func NewOutboundEndpointsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*OutboundEndpointsClient, error)

NewOutboundEndpointsClient creates a new instance of OutboundEndpointsClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OutboundEndpointsClient) BeginCreateOrUpdate

func (client *OutboundEndpointsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, parameters OutboundEndpoint, options *OutboundEndpointsClientBeginCreateOrUpdateOptions) (*runtime.Poller[OutboundEndpointsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates an outbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • outboundEndpointName - The name of the outbound endpoint for the DNS resolver.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - OutboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/OutboundEndpoint_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOutboundEndpointsClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", armdnsresolver.OutboundEndpoint{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armdnsresolver.OutboundEndpointProperties{
			Subnet: &armdnsresolver.SubResource{
				ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
			},
		},
	}, &armdnsresolver.OutboundEndpointsClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OutboundEndpoint = armdnsresolver.OutboundEndpoint{
	// 	Name: to.Ptr("sampleOutboundEndpoint"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers/outboundEndpoints"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/outboundEndpoints/sampleOutboundEndpoint"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.OutboundEndpointProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("87b3e20a-5833-4c40-8ad7-c5160bb1c5bd"),
	// 		Subnet: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
	// 		},
	// 	},
	// }
}

func (*OutboundEndpointsClient) BeginDelete

func (client *OutboundEndpointsClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, options *OutboundEndpointsClientBeginDeleteOptions) (*runtime.Poller[OutboundEndpointsClientDeleteResponse], error)

BeginDelete - Deletes an outbound endpoint for a DNS resolver. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • outboundEndpointName - The name of the outbound endpoint for the DNS resolver.
  • options - OutboundEndpointsClientBeginDeleteOptions contains the optional parameters for the OutboundEndpointsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/OutboundEndpoint_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOutboundEndpointsClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", &armdnsresolver.OutboundEndpointsClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*OutboundEndpointsClient) BeginUpdate

func (client *OutboundEndpointsClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, parameters OutboundEndpointPatch, options *OutboundEndpointsClientBeginUpdateOptions) (*runtime.Poller[OutboundEndpointsClientUpdateResponse], error)

BeginUpdate - Updates an outbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • outboundEndpointName - The name of the outbound endpoint for the DNS resolver.
  • parameters - Parameters supplied to the Update operation.
  • options - OutboundEndpointsClientBeginUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/OutboundEndpoint_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewOutboundEndpointsClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", armdnsresolver.OutboundEndpointPatch{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.OutboundEndpointsClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OutboundEndpoint = armdnsresolver.OutboundEndpoint{
	// 	Name: to.Ptr("sampleOutboundEndpoint"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers/outboundEndpoints"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/outboundEndpoints/sampleOutboundEndpoint"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.OutboundEndpointProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("b4d35f41-0c70-4ec7-bb3e-0cd9f8b7e4be"),
	// 		Subnet: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
	// 		},
	// 	},
	// }
}

func (*OutboundEndpointsClient) Get

func (client *OutboundEndpointsClient) Get(ctx context.Context, resourceGroupName string, dnsResolverName string, outboundEndpointName string, options *OutboundEndpointsClientGetOptions) (OutboundEndpointsClientGetResponse, error)

Get - Gets properties of an outbound endpoint for a DNS resolver. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • outboundEndpointName - The name of the outbound endpoint for the DNS resolver.
  • options - OutboundEndpointsClientGetOptions contains the optional parameters for the OutboundEndpointsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/OutboundEndpoint_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewOutboundEndpointsClient().Get(ctx, "sampleResourceGroup", "sampleDnsResolver", "sampleOutboundEndpoint", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.OutboundEndpoint = armdnsresolver.OutboundEndpoint{
	// 	Name: to.Ptr("sampleOutboundEndpoint"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolvers/outboundEndpoints"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/outboundEndpoints/sampleOutboundEndpoint"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.OutboundEndpointProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("b4d35f41-0c70-4ec7-bb3e-0cd9f8b7e4be"),
	// 		Subnet: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
	// 		},
	// 	},
	// }
}

func (*OutboundEndpointsClient) NewListPager

func (client *OutboundEndpointsClient) NewListPager(resourceGroupName string, dnsResolverName string, options *OutboundEndpointsClientListOptions) *runtime.Pager[OutboundEndpointsClientListResponse]

NewListPager - Lists outbound endpoints for a DNS resolver.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverName - The name of the DNS resolver.
  • options - OutboundEndpointsClientListOptions contains the optional parameters for the OutboundEndpointsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/OutboundEndpoint_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewOutboundEndpointsClient().NewListPager("sampleResourceGroup", "sampleDnsResolver", &armdnsresolver.OutboundEndpointsClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.OutboundEndpointListResult = armdnsresolver.OutboundEndpointListResult{
		// 	Value: []*armdnsresolver.OutboundEndpoint{
		// 		{
		// 			Name: to.Ptr("sampleOutboundEndpoint"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers/outboundEndpoints"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/outboundEndpoints/sampleOutboundEndpoint"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.OutboundEndpointProperties{
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("b4d35f41-0c70-4ec7-bb3e-0cd9f8b7e4be"),
		// 				Subnet: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet"),
		// 				},
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleOutboundEndpoint1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolvers/outboundEndpoints"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/outboundEndpoints/sampleOutboundEndpoint1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.OutboundEndpointProperties{
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("b4d35f41-0c70-4ec7-bb3e-0cd9f8b7e4be"),
		// 				Subnet: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork/subnets/sampleSubnet1"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}

type OutboundEndpointsClientBeginCreateOrUpdateOptions

type OutboundEndpointsClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

OutboundEndpointsClientBeginCreateOrUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginCreateOrUpdate method.

type OutboundEndpointsClientBeginDeleteOptions

type OutboundEndpointsClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

OutboundEndpointsClientBeginDeleteOptions contains the optional parameters for the OutboundEndpointsClient.BeginDelete method.

type OutboundEndpointsClientBeginUpdateOptions

type OutboundEndpointsClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

OutboundEndpointsClientBeginUpdateOptions contains the optional parameters for the OutboundEndpointsClient.BeginUpdate method.

type OutboundEndpointsClientCreateOrUpdateResponse

type OutboundEndpointsClientCreateOrUpdateResponse struct {
	// Describes an outbound endpoint for a DNS resolver.
	OutboundEndpoint
}

OutboundEndpointsClientCreateOrUpdateResponse contains the response from method OutboundEndpointsClient.BeginCreateOrUpdate.

type OutboundEndpointsClientDeleteResponse

type OutboundEndpointsClientDeleteResponse struct {
}

OutboundEndpointsClientDeleteResponse contains the response from method OutboundEndpointsClient.BeginDelete.

type OutboundEndpointsClientGetOptions

type OutboundEndpointsClientGetOptions struct {
}

OutboundEndpointsClientGetOptions contains the optional parameters for the OutboundEndpointsClient.Get method.

type OutboundEndpointsClientGetResponse

type OutboundEndpointsClientGetResponse struct {
	// Describes an outbound endpoint for a DNS resolver.
	OutboundEndpoint
}

OutboundEndpointsClientGetResponse contains the response from method OutboundEndpointsClient.Get.

type OutboundEndpointsClientListOptions

type OutboundEndpointsClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

OutboundEndpointsClientListOptions contains the optional parameters for the OutboundEndpointsClient.NewListPager method.

type OutboundEndpointsClientListResponse

type OutboundEndpointsClientListResponse struct {
	// The response to an enumeration operation on outbound endpoints for a DNS resolver.
	OutboundEndpointListResult
}

OutboundEndpointsClientListResponse contains the response from method OutboundEndpointsClient.NewListPager.

type OutboundEndpointsClientUpdateResponse

type OutboundEndpointsClientUpdateResponse struct {
	// Describes an outbound endpoint for a DNS resolver.
	OutboundEndpoint
}

OutboundEndpointsClientUpdateResponse contains the response from method OutboundEndpointsClient.BeginUpdate.

type Patch

type Patch struct {
	// Tags for DNS Resolver.
	Tags map[string]*string
}

Patch - Describes a DNS resolver for PATCH operation.

func (Patch) MarshalJSON

func (p Patch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Patch.

func (*Patch) UnmarshalJSON

func (p *Patch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Patch.

type PoliciesClient

type PoliciesClient struct {
	// contains filtered or unexported fields
}

PoliciesClient contains the methods for the DNSResolverPolicies group. Don't use this type directly, use NewPoliciesClient() instead.

func NewPoliciesClient

func NewPoliciesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PoliciesClient, error)

NewPoliciesClient creates a new instance of PoliciesClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PoliciesClient) BeginCreateOrUpdate

func (client *PoliciesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, parameters Policy, options *PoliciesClientBeginCreateOrUpdateOptions) (*runtime.Poller[PoliciesClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a DNS resolver policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicy_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", armdnsresolver.Policy{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.PoliciesClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Policy = armdnsresolver.Policy{
	// 	Name: to.Ptr("sampleDnsResolverPolicy"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.PolicyProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
	// 	},
	// }
}

func (*PoliciesClient) BeginDelete

func (client *PoliciesClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, options *PoliciesClientBeginDeleteOptions) (*runtime.Poller[PoliciesClientDeleteResponse], error)

BeginDelete - Deletes a DNS resolver policy. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • options - PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicy_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", &armdnsresolver.PoliciesClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*PoliciesClient) BeginUpdate

func (client *PoliciesClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, parameters PolicyPatch, options *PoliciesClientBeginUpdateOptions) (*runtime.Poller[PoliciesClientUpdateResponse], error)

BeginUpdate - Updates a DNS resolver policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • parameters - Parameters supplied to the Update operation.
  • options - PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicy_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPoliciesClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", armdnsresolver.PolicyPatch{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.PoliciesClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Policy = armdnsresolver.Policy{
	// 	Name: to.Ptr("sampleDnsResolverPolicy"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.PolicyProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
	// 	},
	// }
}

func (*PoliciesClient) Get

func (client *PoliciesClient) Get(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, options *PoliciesClientGetOptions) (PoliciesClientGetResponse, error)

Get - Gets properties of a DNS resolver policy. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • options - PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicy_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPoliciesClient().Get(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.Policy = armdnsresolver.Policy{
	// 	Name: to.Ptr("sampleDnsResolverPolicy"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-03T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-07-04T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.PolicyProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		ResourceGUID: to.Ptr("a7e1a32c-498c-401c-a805-5bc3518257b8"),
	// 	},
	// }
}

func (*PoliciesClient) NewListByResourceGroupPager

func (client *PoliciesClient) NewListByResourceGroupPager(resourceGroupName string, options *PoliciesClientListByResourceGroupOptions) *runtime.Pager[PoliciesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists DNS resolver policies within a resource group.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - PoliciesClientListByResourceGroupOptions contains the optional parameters for the PoliciesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicy_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPoliciesClient().NewListByResourceGroupPager("sampleResourceGroup", &armdnsresolver.PoliciesClientListByResourceGroupOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PolicyListResult = armdnsresolver.PolicyListResult{
		// 	Value: []*armdnsresolver.Policy{
		// 		{
		// 			Name: to.Ptr("sampleDnsResolverPolicy1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverPolicies"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.PolicyProperties{
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("ad9c8da4-3bb2-4821-a878-c2cb07b01fb6"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleDnsResolverPolicy2"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverPolicies"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy2"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-03T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-04T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.PolicyProperties{
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
		// 			},
		// 	}},
		// }
	}
}

func (*PoliciesClient) NewListByVirtualNetworkPager

func (client *PoliciesClient) NewListByVirtualNetworkPager(resourceGroupName string, virtualNetworkName string, options *PoliciesClientListByVirtualNetworkOptions) *runtime.Pager[PoliciesClientListByVirtualNetworkResponse]

NewListByVirtualNetworkPager - Lists DNS resolver policy resource IDs linked to a virtual network.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • virtualNetworkName - The name of the virtual network.
  • options - PoliciesClientListByVirtualNetworkOptions contains the optional parameters for the PoliciesClient.NewListByVirtualNetworkPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicy_ListByVirtualNetwork.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPoliciesClient().NewListByVirtualNetworkPager("sampleResourceGroup", "sampleVirtualNetwork", nil)
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.SubResourceListResult = armdnsresolver.SubResourceListResult{
		// 	Value: []*armdnsresolver.SubResource{
		// 		{
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy1"),
		// 	}},
		// }
	}
}

func (*PoliciesClient) NewListPager

NewListPager - Lists DNS resolver policies in all resource groups of a subscription.

Generated from API version 2023-07-01-preview

  • options - PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicy_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPoliciesClient().NewListPager(&armdnsresolver.PoliciesClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PolicyListResult = armdnsresolver.PolicyListResult{
		// 	Value: []*armdnsresolver.Policy{
		// 		{
		// 			Name: to.Ptr("sampleDnsResolverPolicy1"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverPolicies"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy1"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.PolicyProperties{
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("ad9c8da4-3bb2-4821-a878-c2cb07b01fb6"),
		// 			},
		// 		},
		// 		{
		// 			Name: to.Ptr("sampleDnsResolverPolicy2"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverPolicies"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy2"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.PolicyProperties{
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				ResourceGUID: to.Ptr("b6b2d964-8588-4e3a-a7fe-8a5b7fe8eca5"),
		// 			},
		// 	}},
		// }
	}
}

type PoliciesClientBeginCreateOrUpdateOptions

type PoliciesClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

PoliciesClientBeginCreateOrUpdateOptions contains the optional parameters for the PoliciesClient.BeginCreateOrUpdate method.

type PoliciesClientBeginDeleteOptions

type PoliciesClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

PoliciesClientBeginDeleteOptions contains the optional parameters for the PoliciesClient.BeginDelete method.

type PoliciesClientBeginUpdateOptions

type PoliciesClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

PoliciesClientBeginUpdateOptions contains the optional parameters for the PoliciesClient.BeginUpdate method.

type PoliciesClientCreateOrUpdateResponse

type PoliciesClientCreateOrUpdateResponse struct {
	// Describes a DNS resolver policy.
	Policy
}

PoliciesClientCreateOrUpdateResponse contains the response from method PoliciesClient.BeginCreateOrUpdate.

type PoliciesClientDeleteResponse

type PoliciesClientDeleteResponse struct {
}

PoliciesClientDeleteResponse contains the response from method PoliciesClient.BeginDelete.

type PoliciesClientGetOptions

type PoliciesClientGetOptions struct {
}

PoliciesClientGetOptions contains the optional parameters for the PoliciesClient.Get method.

type PoliciesClientGetResponse

type PoliciesClientGetResponse struct {
	// Describes a DNS resolver policy.
	Policy
}

PoliciesClientGetResponse contains the response from method PoliciesClient.Get.

type PoliciesClientListByResourceGroupOptions

type PoliciesClientListByResourceGroupOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

PoliciesClientListByResourceGroupOptions contains the optional parameters for the PoliciesClient.NewListByResourceGroupPager method.

type PoliciesClientListByResourceGroupResponse

type PoliciesClientListByResourceGroupResponse struct {
	// The response to an enumeration operation on DNS resolver policies.
	PolicyListResult
}

PoliciesClientListByResourceGroupResponse contains the response from method PoliciesClient.NewListByResourceGroupPager.

type PoliciesClientListByVirtualNetworkOptions

type PoliciesClientListByVirtualNetworkOptions struct {
}

PoliciesClientListByVirtualNetworkOptions contains the optional parameters for the PoliciesClient.NewListByVirtualNetworkPager method.

type PoliciesClientListByVirtualNetworkResponse

type PoliciesClientListByVirtualNetworkResponse struct {
	// The response to an enumeration operation on sub-resources.
	SubResourceListResult
}

PoliciesClientListByVirtualNetworkResponse contains the response from method PoliciesClient.NewListByVirtualNetworkPager.

type PoliciesClientListOptions

type PoliciesClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

PoliciesClientListOptions contains the optional parameters for the PoliciesClient.NewListPager method.

type PoliciesClientListResponse

type PoliciesClientListResponse struct {
	// The response to an enumeration operation on DNS resolver policies.
	PolicyListResult
}

PoliciesClientListResponse contains the response from method PoliciesClient.NewListPager.

type PoliciesClientUpdateResponse

type PoliciesClientUpdateResponse struct {
	// Describes a DNS resolver policy.
	Policy
}

PoliciesClientUpdateResponse contains the response from method PoliciesClient.BeginUpdate.

type Policy

type Policy struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Properties of the DNS resolver policy.
	Properties *PolicyProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the DNS resolver policy.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Policy - Describes a DNS resolver policy.

func (Policy) MarshalJSON

func (p Policy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Policy.

func (*Policy) UnmarshalJSON

func (p *Policy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Policy.

type PolicyListResult

type PolicyListResult struct {
	// Enumeration of the DNS resolver policies.
	Value []*Policy

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

PolicyListResult - The response to an enumeration operation on DNS resolver policies.

func (PolicyListResult) MarshalJSON

func (p PolicyListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyListResult.

func (*PolicyListResult) UnmarshalJSON

func (p *PolicyListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyListResult.

type PolicyPatch

type PolicyPatch struct {
	// Tags for DNS resolver policy.
	Tags map[string]*string
}

PolicyPatch - Describes a DNS resolver policy for PATCH operation.

func (PolicyPatch) MarshalJSON

func (p PolicyPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyPatch.

func (*PolicyPatch) UnmarshalJSON

func (p *PolicyPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyPatch.

type PolicyProperties

type PolicyProperties struct {
	// READ-ONLY; 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.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resourceGuid property of the DNS resolver policy resource.
	ResourceGUID *string
}

PolicyProperties - Represents the properties of a DNS resolver policy.

func (PolicyProperties) MarshalJSON

func (p PolicyProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyProperties.

func (*PolicyProperties) UnmarshalJSON

func (p *PolicyProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyProperties.

type PolicyVirtualNetworkLink struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// REQUIRED; Properties of the DNS resolver policy virtual network link.
	Properties *PolicyVirtualNetworkLinkProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; ETag of the DNS resolver policy virtual network link.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PolicyVirtualNetworkLink - Describes a DNS resolver policy virtual network link.

func (PolicyVirtualNetworkLink) MarshalJSON

func (p PolicyVirtualNetworkLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyVirtualNetworkLink.

func (*PolicyVirtualNetworkLink) UnmarshalJSON

func (p *PolicyVirtualNetworkLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyVirtualNetworkLink.

type PolicyVirtualNetworkLinkListResult

type PolicyVirtualNetworkLinkListResult struct {
	// Enumeration of the DNS resolver policy virtual network links.
	Value []*PolicyVirtualNetworkLink

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

PolicyVirtualNetworkLinkListResult - The response to an enumeration operation on DNS resolver policy virtual network links.

func (PolicyVirtualNetworkLinkListResult) MarshalJSON

func (p PolicyVirtualNetworkLinkListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyVirtualNetworkLinkListResult.

func (*PolicyVirtualNetworkLinkListResult) UnmarshalJSON

func (p *PolicyVirtualNetworkLinkListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyVirtualNetworkLinkListResult.

type PolicyVirtualNetworkLinkPatch

type PolicyVirtualNetworkLinkPatch struct {
	// Tags for the DNS resolver policy virtual network link.
	Tags map[string]*string
}

PolicyVirtualNetworkLinkPatch - Describes a DNS resolver policy virtual network link for PATCH operation.

func (PolicyVirtualNetworkLinkPatch) MarshalJSON

func (p PolicyVirtualNetworkLinkPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyVirtualNetworkLinkPatch.

func (*PolicyVirtualNetworkLinkPatch) UnmarshalJSON

func (p *PolicyVirtualNetworkLinkPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyVirtualNetworkLinkPatch.

type PolicyVirtualNetworkLinkProperties

type PolicyVirtualNetworkLinkProperties struct {
	// REQUIRED; The reference to the virtual network. This cannot be changed after creation.
	VirtualNetwork *SubResource

	// READ-ONLY; 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.
	ProvisioningState *ProvisioningState
}

PolicyVirtualNetworkLinkProperties - Represents the properties of a DNS resolver policy virtual network link.

func (PolicyVirtualNetworkLinkProperties) MarshalJSON

func (p PolicyVirtualNetworkLinkProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PolicyVirtualNetworkLinkProperties.

func (*PolicyVirtualNetworkLinkProperties) UnmarshalJSON

func (p *PolicyVirtualNetworkLinkProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PolicyVirtualNetworkLinkProperties.

type PolicyVirtualNetworkLinksClient

type PolicyVirtualNetworkLinksClient struct {
	// contains filtered or unexported fields
}

PolicyVirtualNetworkLinksClient contains the methods for the DNSResolverPolicyVirtualNetworkLinks group. Don't use this type directly, use NewPolicyVirtualNetworkLinksClient() instead.

func NewPolicyVirtualNetworkLinksClient

func NewPolicyVirtualNetworkLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PolicyVirtualNetworkLinksClient, error)

NewPolicyVirtualNetworkLinksClient creates a new instance of PolicyVirtualNetworkLinksClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PolicyVirtualNetworkLinksClient) BeginCreateOrUpdate

func (client *PolicyVirtualNetworkLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsResolverPolicyVirtualNetworkLinkName string, parameters PolicyVirtualNetworkLink, options *PolicyVirtualNetworkLinksClientBeginCreateOrUpdateOptions) (*runtime.Poller[PolicyVirtualNetworkLinksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a DNS resolver policy virtual network link. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsResolverPolicyVirtualNetworkLinkName - The name of the DNS resolver policy virtual network link for the DNS resolver policy.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - PolicyVirtualNetworkLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicyVirtualNetworkLink_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPolicyVirtualNetworkLinksClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", armdnsresolver.PolicyVirtualNetworkLink{
		Location: to.Ptr("westus2"),
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
		Properties: &armdnsresolver.PolicyVirtualNetworkLinkProperties{
			VirtualNetwork: &armdnsresolver.SubResource{
				ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
			},
		},
	}, &armdnsresolver.PolicyVirtualNetworkLinksClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PolicyVirtualNetworkLink = armdnsresolver.PolicyVirtualNetworkLink{
	// 	Name: to.Ptr("sampleVirtualNetworkLink"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/virtualNetworkLinks"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicy/sampleDnsResolverPolicy/virtualNetworkLinks/sampleVirtualNetworkLink"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.PolicyVirtualNetworkLinkProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*PolicyVirtualNetworkLinksClient) BeginDelete

func (client *PolicyVirtualNetworkLinksClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsResolverPolicyVirtualNetworkLinkName string, options *PolicyVirtualNetworkLinksClientBeginDeleteOptions) (*runtime.Poller[PolicyVirtualNetworkLinksClientDeleteResponse], error)

BeginDelete - Deletes a DNS resolver policy virtual network link. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsResolverPolicyVirtualNetworkLinkName - The name of the DNS resolver policy virtual network link for the DNS resolver policy.
  • options - PolicyVirtualNetworkLinksClientBeginDeleteOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicyVirtualNetworkLink_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPolicyVirtualNetworkLinksClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", &armdnsresolver.PolicyVirtualNetworkLinksClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*PolicyVirtualNetworkLinksClient) BeginUpdate

func (client *PolicyVirtualNetworkLinksClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsResolverPolicyVirtualNetworkLinkName string, parameters PolicyVirtualNetworkLinkPatch, options *PolicyVirtualNetworkLinksClientBeginUpdateOptions) (*runtime.Poller[PolicyVirtualNetworkLinksClientUpdateResponse], error)

BeginUpdate - Updates a DNS resolver policy virtual network link. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsResolverPolicyVirtualNetworkLinkName - The name of the DNS resolver policy virtual network link for the DNS resolver policy.
  • parameters - Parameters supplied to the Update operation.
  • options - PolicyVirtualNetworkLinksClientBeginUpdateOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicyVirtualNetworkLink_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewPolicyVirtualNetworkLinksClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", armdnsresolver.PolicyVirtualNetworkLinkPatch{
		Tags: map[string]*string{
			"key1": to.Ptr("value1"),
		},
	}, &armdnsresolver.PolicyVirtualNetworkLinksClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PolicyVirtualNetworkLink = armdnsresolver.PolicyVirtualNetworkLink{
	// 	Name: to.Ptr("sampleVirtualNetworkLink"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/virtualNetworkLinks"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/virtualNetworkLinks/sampleVirtualNetworkLink"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.PolicyVirtualNetworkLinkProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*PolicyVirtualNetworkLinksClient) Get

func (client *PolicyVirtualNetworkLinksClient) Get(ctx context.Context, resourceGroupName string, dnsResolverPolicyName string, dnsResolverPolicyVirtualNetworkLinkName string, options *PolicyVirtualNetworkLinksClientGetOptions) (PolicyVirtualNetworkLinksClientGetResponse, error)

Get - Gets properties of a DNS resolver policy virtual network link. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • dnsResolverPolicyVirtualNetworkLinkName - The name of the DNS resolver policy virtual network link for the DNS resolver policy.
  • options - PolicyVirtualNetworkLinksClientGetOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicyVirtualNetworkLink_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewPolicyVirtualNetworkLinksClient().Get(ctx, "sampleResourceGroup", "sampleDnsResolverPolicy", "sampleVirtualNetworkLink", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.PolicyVirtualNetworkLink = armdnsresolver.PolicyVirtualNetworkLink{
	// 	Name: to.Ptr("sampleVirtualNetworkLink"),
	// 	Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/virtualNetworkLinks"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/virtualNetworkLinks/sampleVirtualNetworkLink"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Location: to.Ptr("westus2"),
	// 	Tags: map[string]*string{
	// 		"key1": to.Ptr("value1"),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.PolicyVirtualNetworkLinkProperties{
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*PolicyVirtualNetworkLinksClient) NewListPager

NewListPager - Lists DNS resolver policy virtual network links.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsResolverPolicyName - The name of the DNS resolver policy.
  • options - PolicyVirtualNetworkLinksClientListOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DnsResolverPolicyVirtualNetworkLink_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewPolicyVirtualNetworkLinksClient().NewListPager("sampleResourceGroup", "sampleDnsResolverPolicy", &armdnsresolver.PolicyVirtualNetworkLinksClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.PolicyVirtualNetworkLinkListResult = armdnsresolver.PolicyVirtualNetworkLinkListResult{
		// 	Value: []*armdnsresolver.PolicyVirtualNetworkLink{
		// 		{
		// 			Name: to.Ptr("sampleVirtualNetworkLink"),
		// 			Type: to.Ptr("Microsoft.Network/dnsResolverPolicies/virtualNetworkLinks"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolverPolicies/sampleDnsResolverPolicy/virtualNetworkLinks/sampleVirtualNetworkLink"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Location: to.Ptr("westus2"),
		// 			Tags: map[string]*string{
		// 				"key1": to.Ptr("value1"),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.PolicyVirtualNetworkLinkProperties{
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				VirtualNetwork: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}

type PolicyVirtualNetworkLinksClientBeginCreateOrUpdateOptions

type PolicyVirtualNetworkLinksClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

PolicyVirtualNetworkLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.BeginCreateOrUpdate method.

type PolicyVirtualNetworkLinksClientBeginDeleteOptions

type PolicyVirtualNetworkLinksClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

PolicyVirtualNetworkLinksClientBeginDeleteOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.BeginDelete method.

type PolicyVirtualNetworkLinksClientBeginUpdateOptions

type PolicyVirtualNetworkLinksClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

PolicyVirtualNetworkLinksClientBeginUpdateOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.BeginUpdate method.

type PolicyVirtualNetworkLinksClientCreateOrUpdateResponse

type PolicyVirtualNetworkLinksClientCreateOrUpdateResponse struct {
	// Describes a DNS resolver policy virtual network link.
	PolicyVirtualNetworkLink
}

PolicyVirtualNetworkLinksClientCreateOrUpdateResponse contains the response from method PolicyVirtualNetworkLinksClient.BeginCreateOrUpdate.

type PolicyVirtualNetworkLinksClientDeleteResponse

type PolicyVirtualNetworkLinksClientDeleteResponse struct {
}

PolicyVirtualNetworkLinksClientDeleteResponse contains the response from method PolicyVirtualNetworkLinksClient.BeginDelete.

type PolicyVirtualNetworkLinksClientGetOptions

type PolicyVirtualNetworkLinksClientGetOptions struct {
}

PolicyVirtualNetworkLinksClientGetOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.Get method.

type PolicyVirtualNetworkLinksClientGetResponse

type PolicyVirtualNetworkLinksClientGetResponse struct {
	// Describes a DNS resolver policy virtual network link.
	PolicyVirtualNetworkLink
}

PolicyVirtualNetworkLinksClientGetResponse contains the response from method PolicyVirtualNetworkLinksClient.Get.

type PolicyVirtualNetworkLinksClientListOptions

type PolicyVirtualNetworkLinksClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

PolicyVirtualNetworkLinksClientListOptions contains the optional parameters for the PolicyVirtualNetworkLinksClient.NewListPager method.

type PolicyVirtualNetworkLinksClientListResponse

type PolicyVirtualNetworkLinksClientListResponse struct {
	// The response to an enumeration operation on DNS resolver policy virtual network links.
	PolicyVirtualNetworkLinkListResult
}

PolicyVirtualNetworkLinksClientListResponse contains the response from method PolicyVirtualNetworkLinksClient.NewListPager.

type PolicyVirtualNetworkLinksClientUpdateResponse

type PolicyVirtualNetworkLinksClientUpdateResponse struct {
	// Describes a DNS resolver policy virtual network link.
	PolicyVirtualNetworkLink
}

PolicyVirtualNetworkLinksClientUpdateResponse contains the response from method PolicyVirtualNetworkLinksClient.BeginUpdate.

type Properties

type Properties struct {
	// REQUIRED; The reference to the virtual network. This cannot be changed after creation.
	VirtualNetwork *SubResource

	// READ-ONLY; The current status of the DNS resolver. This is a read-only property and any attempt to set this value will
	// be ignored.
	DNSResolverState *DNSResolverState

	// READ-ONLY; The current provisioning state of the DNS resolver. This is a read-only property and any attempt to set this
	// value will be ignored.
	ProvisioningState *ProvisioningState

	// READ-ONLY; The resourceGuid property of the DNS resolver resource.
	ResourceGUID *string
}

Properties - Represents the properties of a DNS resolver.

func (Properties) MarshalJSON

func (p Properties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Properties.

func (*Properties) UnmarshalJSON

func (p *Properties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Properties.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The current provisioning state of the resource.

const (
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type SubResource

type SubResource struct {
	// REQUIRED; Resource ID.
	ID *string
}

SubResource - Reference to another ARM resource.

func (SubResource) MarshalJSON

func (s SubResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubResource.

func (*SubResource) UnmarshalJSON

func (s *SubResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubResource.

type SubResourceListResult

type SubResourceListResult struct {
	// Enumeration of the sub-resources.
	Value []*SubResource

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

SubResourceListResult - The response to an enumeration operation on sub-resources.

func (SubResourceListResult) MarshalJSON

func (s SubResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SubResourceListResult.

func (*SubResourceListResult) UnmarshalJSON

func (s *SubResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SubResourceListResult.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TargetDNSServer

type TargetDNSServer struct {
	// REQUIRED; DNS server IP address.
	IPAddress *string

	// DNS server port.
	Port *int32
}

TargetDNSServer - Describes a server to forward the DNS queries to.

func (TargetDNSServer) MarshalJSON

func (t TargetDNSServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TargetDNSServer.

func (*TargetDNSServer) UnmarshalJSON

func (t *TargetDNSServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TargetDNSServer.

type VirtualNetworkDNSForwardingRuleset

type VirtualNetworkDNSForwardingRuleset struct {
	// DNS Forwarding Ruleset Resource ID.
	ID *string

	// Properties of the virtual network link sub-resource reference.
	Properties *VirtualNetworkLinkSubResourceProperties
}

VirtualNetworkDNSForwardingRuleset - Reference to DNS forwarding ruleset and associated virtual network link.

func (VirtualNetworkDNSForwardingRuleset) MarshalJSON

func (v VirtualNetworkDNSForwardingRuleset) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkDNSForwardingRuleset.

func (*VirtualNetworkDNSForwardingRuleset) UnmarshalJSON

func (v *VirtualNetworkDNSForwardingRuleset) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkDNSForwardingRuleset.

type VirtualNetworkDNSForwardingRulesetListResult

type VirtualNetworkDNSForwardingRulesetListResult struct {
	// Enumeration of the Virtual Network DNS Forwarding Ruleset.
	Value []*VirtualNetworkDNSForwardingRuleset

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

VirtualNetworkDNSForwardingRulesetListResult - The response to an enumeration operation on Virtual Network DNS Forwarding Ruleset.

func (VirtualNetworkDNSForwardingRulesetListResult) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkDNSForwardingRulesetListResult.

func (*VirtualNetworkDNSForwardingRulesetListResult) UnmarshalJSON

func (v *VirtualNetworkDNSForwardingRulesetListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkDNSForwardingRulesetListResult.

type VirtualNetworkLink struct {
	// REQUIRED; Properties of the virtual network link.
	Properties *VirtualNetworkLinkProperties

	// READ-ONLY; ETag of the virtual network link.
	Etag *string

	// READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

VirtualNetworkLink - Describes a virtual network link.

func (VirtualNetworkLink) MarshalJSON

func (v VirtualNetworkLink) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLink.

func (*VirtualNetworkLink) UnmarshalJSON

func (v *VirtualNetworkLink) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkLink.

type VirtualNetworkLinkListResult

type VirtualNetworkLinkListResult struct {
	// Enumeration of the virtual network links.
	Value []*VirtualNetworkLink

	// READ-ONLY; The continuation token for the next page of results.
	NextLink *string
}

VirtualNetworkLinkListResult - The response to an enumeration operation on virtual network links.

func (VirtualNetworkLinkListResult) MarshalJSON

func (v VirtualNetworkLinkListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkListResult.

func (*VirtualNetworkLinkListResult) UnmarshalJSON

func (v *VirtualNetworkLinkListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkLinkListResult.

type VirtualNetworkLinkPatch

type VirtualNetworkLinkPatch struct {
	// Updatable properties of the virtual network link.
	Properties *VirtualNetworkLinkPatchProperties
}

VirtualNetworkLinkPatch - Describes a virtual network link for PATCH operation.

func (VirtualNetworkLinkPatch) MarshalJSON

func (v VirtualNetworkLinkPatch) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkPatch.

func (*VirtualNetworkLinkPatch) UnmarshalJSON

func (v *VirtualNetworkLinkPatch) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkLinkPatch.

type VirtualNetworkLinkPatchProperties

type VirtualNetworkLinkPatchProperties struct {
	// Metadata attached to the virtual network link.
	Metadata map[string]*string
}

VirtualNetworkLinkPatchProperties - Represents the updatable properties of the virtual network link.

func (VirtualNetworkLinkPatchProperties) MarshalJSON

func (v VirtualNetworkLinkPatchProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkPatchProperties.

func (*VirtualNetworkLinkPatchProperties) UnmarshalJSON

func (v *VirtualNetworkLinkPatchProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkLinkPatchProperties.

type VirtualNetworkLinkProperties

type VirtualNetworkLinkProperties struct {
	// REQUIRED; The reference to the virtual network. This cannot be changed after creation.
	VirtualNetwork *SubResource

	// Metadata attached to the virtual network link.
	Metadata map[string]*string

	// READ-ONLY; 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.
	ProvisioningState *ProvisioningState
}

VirtualNetworkLinkProperties - Represents the properties of a virtual network link.

func (VirtualNetworkLinkProperties) MarshalJSON

func (v VirtualNetworkLinkProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkProperties.

func (*VirtualNetworkLinkProperties) UnmarshalJSON

func (v *VirtualNetworkLinkProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkLinkProperties.

type VirtualNetworkLinkSubResourceProperties

type VirtualNetworkLinkSubResourceProperties struct {
	// The reference to the virtual network link.
	VirtualNetworkLink *SubResource
}

VirtualNetworkLinkSubResourceProperties - The reference to the virtual network link that associates between the DNS forwarding ruleset and virtual network.

func (VirtualNetworkLinkSubResourceProperties) MarshalJSON

func (v VirtualNetworkLinkSubResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type VirtualNetworkLinkSubResourceProperties.

func (*VirtualNetworkLinkSubResourceProperties) UnmarshalJSON

func (v *VirtualNetworkLinkSubResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkLinkSubResourceProperties.

type VirtualNetworkLinksClient

type VirtualNetworkLinksClient struct {
	// contains filtered or unexported fields
}

VirtualNetworkLinksClient contains the methods for the VirtualNetworkLinks group. Don't use this type directly, use NewVirtualNetworkLinksClient() instead.

func NewVirtualNetworkLinksClient

func NewVirtualNetworkLinksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworkLinksClient, error)

NewVirtualNetworkLinksClient creates a new instance of VirtualNetworkLinksClient with the specified values.

  • subscriptionID - The ID of the target subscription. The value must be an UUID.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*VirtualNetworkLinksClient) BeginCreateOrUpdate

func (client *VirtualNetworkLinksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, parameters VirtualNetworkLink, options *VirtualNetworkLinksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworkLinksClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - Creates or updates a virtual network link to a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • virtualNetworkLinkName - The name of the virtual network link.
  • parameters - Parameters supplied to the CreateOrUpdate operation.
  • options - VirtualNetworkLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/VirtualNetworkLink_Put.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworkLinksClient().BeginCreateOrUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", armdnsresolver.VirtualNetworkLink{
		Properties: &armdnsresolver.VirtualNetworkLinkProperties{
			Metadata: map[string]*string{
				"additionalProp1": to.Ptr("value1"),
			},
			VirtualNetwork: &armdnsresolver.SubResource{
				ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
			},
		},
	}, &armdnsresolver.VirtualNetworkLinksClientBeginCreateOrUpdateOptions{IfMatch: nil,
		IfNoneMatch: nil,
	})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VirtualNetworkLink = armdnsresolver.VirtualNetworkLink{
	// 	Name: to.Ptr("sampleVirtualNetworkLink"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/virtualNetworkLinks"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRuleset/sampleDnsForwardingRuleset/virtualNetworkLinks/sampleVirtualNetworkLink"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.VirtualNetworkLinkProperties{
	// 		Metadata: map[string]*string{
	// 			"additionalProp1": to.Ptr("value1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*VirtualNetworkLinksClient) BeginDelete

func (client *VirtualNetworkLinksClient) BeginDelete(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, options *VirtualNetworkLinksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworkLinksClientDeleteResponse], error)

BeginDelete - Deletes a virtual network link to a DNS forwarding ruleset. WARNING: This operation cannot be undone. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • virtualNetworkLinkName - The name of the virtual network link.
  • options - VirtualNetworkLinksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/VirtualNetworkLink_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworkLinksClient().BeginDelete(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", &armdnsresolver.VirtualNetworkLinksClientBeginDeleteOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	_, err = poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
}

func (*VirtualNetworkLinksClient) BeginUpdate

func (client *VirtualNetworkLinksClient) BeginUpdate(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, parameters VirtualNetworkLinkPatch, options *VirtualNetworkLinksClientBeginUpdateOptions) (*runtime.Poller[VirtualNetworkLinksClientUpdateResponse], error)

BeginUpdate - Updates a virtual network link to a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • virtualNetworkLinkName - The name of the virtual network link.
  • parameters - Parameters supplied to the Update operation.
  • options - VirtualNetworkLinksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/VirtualNetworkLink_Patch.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	poller, err := clientFactory.NewVirtualNetworkLinksClient().BeginUpdate(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", armdnsresolver.VirtualNetworkLinkPatch{
		Properties: &armdnsresolver.VirtualNetworkLinkPatchProperties{
			Metadata: map[string]*string{
				"additionalProp1": to.Ptr("value1"),
			},
		},
	}, &armdnsresolver.VirtualNetworkLinksClientBeginUpdateOptions{IfMatch: nil})
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	res, err := poller.PollUntilDone(ctx, nil)
	if err != nil {
		log.Fatalf("failed to pull the result: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VirtualNetworkLink = armdnsresolver.VirtualNetworkLink{
	// 	Name: to.Ptr("sampleVirtualNetworkLink"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/virtualNetworkLinks"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRuleset/sampleDnsForwardingRuleset/virtualNetworkLinks/sampleVirtualNetworkLink"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.VirtualNetworkLinkProperties{
	// 		Metadata: map[string]*string{
	// 			"additionalProp1": to.Ptr("value1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*VirtualNetworkLinksClient) Get

func (client *VirtualNetworkLinksClient) Get(ctx context.Context, resourceGroupName string, dnsForwardingRulesetName string, virtualNetworkLinkName string, options *VirtualNetworkLinksClientGetOptions) (VirtualNetworkLinksClientGetResponse, error)

Get - Gets properties of a virtual network link to a DNS forwarding ruleset. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • virtualNetworkLinkName - The name of the virtual network link.
  • options - VirtualNetworkLinksClientGetOptions contains the optional parameters for the VirtualNetworkLinksClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/VirtualNetworkLink_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := clientFactory.NewVirtualNetworkLinksClient().Get(ctx, "sampleResourceGroup", "sampleDnsForwardingRuleset", "sampleVirtualNetworkLink", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// You could use response here. We use blank identifier for just demo purposes.
	_ = res
	// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// res.VirtualNetworkLink = armdnsresolver.VirtualNetworkLink{
	// 	Name: to.Ptr("sampleVirtualNetworkLink"),
	// 	Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/virtualNetworkLinks"),
	// 	ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRuleset/sampleDnsForwardingRuleset/virtualNetworkLinks/sampleVirtualNetworkLink"),
	// 	SystemData: &armdnsresolver.SystemData{
	// 		CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
	// 		CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 		LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
	// 		LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
	// 	},
	// 	Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
	// 	Properties: &armdnsresolver.VirtualNetworkLinkProperties{
	// 		Metadata: map[string]*string{
	// 			"additionalProp1": to.Ptr("value1"),
	// 		},
	// 		ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
	// 		VirtualNetwork: &armdnsresolver.SubResource{
	// 			ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
	// 		},
	// 	},
	// }
}

func (*VirtualNetworkLinksClient) NewListPager

func (client *VirtualNetworkLinksClient) NewListPager(resourceGroupName string, dnsForwardingRulesetName string, options *VirtualNetworkLinksClientListOptions) *runtime.Pager[VirtualNetworkLinksClientListResponse]

NewListPager - Lists virtual network links to a DNS forwarding ruleset.

Generated from API version 2023-07-01-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • dnsForwardingRulesetName - The name of the DNS forwarding ruleset.
  • options - VirtualNetworkLinksClientListOptions contains the optional parameters for the VirtualNetworkLinksClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/366aaa13cdd218b9adac716680e49473673410c8/specification/dnsresolver/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/VirtualNetworkLink_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dnsresolver/armdnsresolver"
)

func main() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	clientFactory, err := armdnsresolver.NewClientFactory("<subscription-id>", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := clientFactory.NewVirtualNetworkLinksClient().NewListPager("sampleResourceGroup", "sampleDnsForwardingRuleset", &armdnsresolver.VirtualNetworkLinksClientListOptions{Top: nil})
	for pager.More() {
		page, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range page.Value {
			// You could use page here. We use blank identifier for just demo purposes.
			_ = v
		}
		// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
		// page.VirtualNetworkLinkListResult = armdnsresolver.VirtualNetworkLinkListResult{
		// 	Value: []*armdnsresolver.VirtualNetworkLink{
		// 		{
		// 			Name: to.Ptr("sampleVirtualNetworkLink"),
		// 			Type: to.Ptr("Microsoft.Network/dnsForwardingRulesets/virtualNetworkLinks"),
		// 			ID: to.Ptr("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsForwardingRuleset/sampleDnsForwardingRuleset/virtualNetworkLinks/sampleVirtualNetworkLink"),
		// 			SystemData: &armdnsresolver.SystemData{
		// 				CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T01:01:01.107Z"); return t}()),
		// 				CreatedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 				LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-02T02:03:01.197Z"); return t}()),
		// 				LastModifiedByType: to.Ptr(armdnsresolver.CreatedByTypeApplication),
		// 			},
		// 			Etag: to.Ptr("00000000-0000-0000-0000-000000000000"),
		// 			Properties: &armdnsresolver.VirtualNetworkLinkProperties{
		// 				Metadata: map[string]*string{
		// 					"additionalProp1": to.Ptr("value1"),
		// 				},
		// 				ProvisioningState: to.Ptr(armdnsresolver.ProvisioningStateSucceeded),
		// 				VirtualNetwork: &armdnsresolver.SubResource{
		// 					ID: to.Ptr("/subscriptions/0403cfa9-9659-4f33-9f30-1f191c51d111/resourceGroups/sampleVnetResourceGroupName/providers/Microsoft.Network/virtualNetworks/sampleVirtualNetwork"),
		// 				},
		// 			},
		// 	}},
		// }
	}
}

type VirtualNetworkLinksClientBeginCreateOrUpdateOptions

type VirtualNetworkLinksClientBeginCreateOrUpdateOptions struct {
	// 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.
	IfMatch *string

	// Set to '*' to allow a new resource to be created, but to prevent updating an existing resource. Other values will be ignored.
	IfNoneMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualNetworkLinksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginCreateOrUpdate method.

type VirtualNetworkLinksClientBeginDeleteOptions

type VirtualNetworkLinksClientBeginDeleteOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualNetworkLinksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginDelete method.

type VirtualNetworkLinksClientBeginUpdateOptions

type VirtualNetworkLinksClientBeginUpdateOptions struct {
	// 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.
	IfMatch *string

	// Resumes the LRO from the provided token.
	ResumeToken string
}

VirtualNetworkLinksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworkLinksClient.BeginUpdate method.

type VirtualNetworkLinksClientCreateOrUpdateResponse

type VirtualNetworkLinksClientCreateOrUpdateResponse struct {
	// Describes a virtual network link.
	VirtualNetworkLink
}

VirtualNetworkLinksClientCreateOrUpdateResponse contains the response from method VirtualNetworkLinksClient.BeginCreateOrUpdate.

type VirtualNetworkLinksClientDeleteResponse

type VirtualNetworkLinksClientDeleteResponse struct {
}

VirtualNetworkLinksClientDeleteResponse contains the response from method VirtualNetworkLinksClient.BeginDelete.

type VirtualNetworkLinksClientGetOptions

type VirtualNetworkLinksClientGetOptions struct {
}

VirtualNetworkLinksClientGetOptions contains the optional parameters for the VirtualNetworkLinksClient.Get method.

type VirtualNetworkLinksClientGetResponse

type VirtualNetworkLinksClientGetResponse struct {
	// Describes a virtual network link.
	VirtualNetworkLink
}

VirtualNetworkLinksClientGetResponse contains the response from method VirtualNetworkLinksClient.Get.

type VirtualNetworkLinksClientListOptions

type VirtualNetworkLinksClientListOptions struct {
	// The maximum number of results to return. If not specified, returns up to 100 results.
	Top *int32
}

VirtualNetworkLinksClientListOptions contains the optional parameters for the VirtualNetworkLinksClient.NewListPager method.

type VirtualNetworkLinksClientListResponse

type VirtualNetworkLinksClientListResponse struct {
	// The response to an enumeration operation on virtual network links.
	VirtualNetworkLinkListResult
}

VirtualNetworkLinksClientListResponse contains the response from method VirtualNetworkLinksClient.NewListPager.

type VirtualNetworkLinksClientUpdateResponse

type VirtualNetworkLinksClientUpdateResponse struct {
	// Describes a virtual network link.
	VirtualNetworkLink
}

VirtualNetworkLinksClientUpdateResponse contains the response from method VirtualNetworkLinksClient.BeginUpdate.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL