dnsresolvers

package
v0.20240125.1172517 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsresolvers Documentation

The dnsresolvers SDK allows for interaction with the Azure Resource Manager Service dnsresolver (API Version 2022-07-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/dnsresolver/2022-07-01/dnsresolvers"

Client Initialization

client := dnsresolvers.NewDnsResolversClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DnsResolversClient.CreateOrUpdate

ctx := context.TODO()
id := dnsresolvers.NewDnsResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsResolverValue")

payload := dnsresolvers.DnsResolver{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload, dnsresolvers.DefaultCreateOrUpdateOperationOptions()); err != nil {
	// handle the error
}

Example Usage: DnsResolversClient.Delete

ctx := context.TODO()
id := dnsresolvers.NewDnsResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsResolverValue")

if err := client.DeleteThenPoll(ctx, id, dnsresolvers.DefaultDeleteOperationOptions()); err != nil {
	// handle the error
}

Example Usage: DnsResolversClient.Get

ctx := context.TODO()
id := dnsresolvers.NewDnsResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsResolverValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: DnsResolversClient.List

ctx := context.TODO()
id := dnsresolvers.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

// alternatively `client.List(ctx, id, dnsresolvers.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, dnsresolvers.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DnsResolversClient.ListByResourceGroup

ctx := context.TODO()
id := dnsresolvers.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

// alternatively `client.ListByResourceGroup(ctx, id, dnsresolvers.DefaultListByResourceGroupOperationOptions())` can be used to do batched pagination
items, err := client.ListByResourceGroupComplete(ctx, id, dnsresolvers.DefaultListByResourceGroupOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DnsResolversClient.ListByVirtualNetwork

ctx := context.TODO()
id := dnsresolvers.NewVirtualNetworkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualNetworkValue")

// alternatively `client.ListByVirtualNetwork(ctx, id, dnsresolvers.DefaultListByVirtualNetworkOperationOptions())` can be used to do batched pagination
items, err := client.ListByVirtualNetworkComplete(ctx, id, dnsresolvers.DefaultListByVirtualNetworkOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: DnsResolversClient.Update

ctx := context.TODO()
id := dnsresolvers.NewDnsResolverID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsResolverValue")

payload := dnsresolvers.DnsResolverPatch{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload, dnsresolvers.DefaultUpdateOperationOptions()); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDnsResolverState

func PossibleValuesForDnsResolverState() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateDnsResolverID

func ValidateDnsResolverID(input interface{}, key string) (warnings []string, errors []error)

ValidateDnsResolverID checks that 'input' can be parsed as a Dns Resolver ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DnsResolver
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type DnsResolver

type DnsResolver struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Location   string                 `json:"location"`
	Name       *string                `json:"name,omitempty"`
	Properties DnsResolverProperties  `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type DnsResolverId

type DnsResolverId struct {
	SubscriptionId    string
	ResourceGroupName string
	DnsResolverName   string
}

DnsResolverId is a struct representing the Resource ID for a Dns Resolver

func NewDnsResolverID

func NewDnsResolverID(subscriptionId string, resourceGroupName string, dnsResolverName string) DnsResolverId

NewDnsResolverID returns a new DnsResolverId struct

func ParseDnsResolverID

func ParseDnsResolverID(input string) (*DnsResolverId, error)

ParseDnsResolverID parses 'input' into a DnsResolverId

func ParseDnsResolverIDInsensitively

func ParseDnsResolverIDInsensitively(input string) (*DnsResolverId, error)

ParseDnsResolverIDInsensitively parses 'input' case-insensitively into a DnsResolverId note: this method should only be used for API response data and not user input

func (*DnsResolverId) FromParseResult

func (id *DnsResolverId) FromParseResult(input resourceids.ParseResult) error

func (DnsResolverId) ID

func (id DnsResolverId) ID() string

ID returns the formatted Dns Resolver ID

func (DnsResolverId) Segments

func (id DnsResolverId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Dns Resolver ID

func (DnsResolverId) String

func (id DnsResolverId) String() string

String returns a human-readable description of this Dns Resolver ID

type DnsResolverOperationPredicate

type DnsResolverOperationPredicate struct {
	Etag     *string
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (DnsResolverOperationPredicate) Matches

type DnsResolverPatch

type DnsResolverPatch struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type DnsResolverProperties

type DnsResolverProperties struct {
	DnsResolverState  *DnsResolverState  `json:"dnsResolverState,omitempty"`
	ProvisioningState *ProvisioningState `json:"provisioningState,omitempty"`
	ResourceGuid      *string            `json:"resourceGuid,omitempty"`
	VirtualNetwork    SubResource        `json:"virtualNetwork"`
}

type DnsResolverState

type DnsResolverState string
const (
	DnsResolverStateConnected    DnsResolverState = "Connected"
	DnsResolverStateDisconnected DnsResolverState = "Disconnected"
)

func (*DnsResolverState) UnmarshalJSON

func (s *DnsResolverState) UnmarshalJSON(bytes []byte) error

type DnsResolversClient

type DnsResolversClient struct {
	Client *resourcemanager.Client
}

func NewDnsResolversClientWithBaseURI

func NewDnsResolversClientWithBaseURI(sdkApi sdkEnv.Api) (*DnsResolversClient, error)

func (DnsResolversClient) CreateOrUpdate

CreateOrUpdate ...

func (DnsResolversClient) CreateOrUpdateThenPoll

func (c DnsResolversClient) CreateOrUpdateThenPoll(ctx context.Context, id DnsResolverId, input DnsResolver, options CreateOrUpdateOperationOptions) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DnsResolversClient) Delete

Delete ...

func (DnsResolversClient) DeleteThenPoll

func (c DnsResolversClient) DeleteThenPoll(ctx context.Context, id DnsResolverId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (DnsResolversClient) Get

Get ...

func (DnsResolversClient) List

List ...

func (DnsResolversClient) ListByResourceGroup

ListByResourceGroup ...

func (DnsResolversClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (DnsResolversClient) ListByResourceGroupCompleteMatchingPredicate

func (c DnsResolversClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate DnsResolverOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DnsResolversClient) ListByVirtualNetwork

ListByVirtualNetwork ...

func (DnsResolversClient) ListByVirtualNetworkComplete

ListByVirtualNetworkComplete retrieves all the results into a single object

func (DnsResolversClient) ListByVirtualNetworkCompleteMatchingPredicate

func (c DnsResolversClient) ListByVirtualNetworkCompleteMatchingPredicate(ctx context.Context, id commonids.VirtualNetworkId, options ListByVirtualNetworkOperationOptions, predicate SubResourceOperationPredicate) (result ListByVirtualNetworkCompleteResult, err error)

ListByVirtualNetworkCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DnsResolversClient) ListComplete

ListComplete retrieves all the results into a single object

func (DnsResolversClient) ListCompleteMatchingPredicate

func (c DnsResolversClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate DnsResolverOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DnsResolversClient) Update

Update ...

func (DnsResolversClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DnsResolver
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DnsResolver
}

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	Top *int64
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

func (ListByResourceGroupOperationOptions) ToHeaders

func (ListByResourceGroupOperationOptions) ToOData

func (ListByResourceGroupOperationOptions) ToQuery

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DnsResolver
}

type ListByVirtualNetworkCompleteResult

type ListByVirtualNetworkCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SubResource
}

type ListByVirtualNetworkOperationOptions

type ListByVirtualNetworkOperationOptions struct {
	Top *int64
}

func DefaultListByVirtualNetworkOperationOptions

func DefaultListByVirtualNetworkOperationOptions() ListByVirtualNetworkOperationOptions

func (ListByVirtualNetworkOperationOptions) ToHeaders

func (ListByVirtualNetworkOperationOptions) ToOData

func (ListByVirtualNetworkOperationOptions) ToQuery

type ListByVirtualNetworkOperationResponse

type ListByVirtualNetworkOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SubResource
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []DnsResolver
}

type ListOperationOptions

type ListOperationOptions struct {
	Top *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]DnsResolver
}

type ProvisioningState

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

func (*ProvisioningState) UnmarshalJSON

func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error

type SubResource

type SubResource struct {
	Id string `json:"id"`
}

type SubResourceOperationPredicate

type SubResourceOperationPredicate struct {
	Id *string
}

func (SubResourceOperationPredicate) Matches

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders

func (o UpdateOperationOptions) ToHeaders() *client.Headers

func (UpdateOperationOptions) ToOData

func (o UpdateOperationOptions) ToOData() *odata.Query

func (UpdateOperationOptions) ToQuery

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DnsResolver
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL