zones

package
v0.20221007.1222316 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: MPL-2.0 Imports: 10 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/zones Documentation

The zones SDK allows for interaction with the Azure Resource Manager Service dns (API Version 2018-05-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/dns/2018-05-01/zones"

Client Initialization

client := zones.NewZonesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ZonesClient.CreateOrUpdate

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

payload := zones.Zone{
	// ...
}


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

Example Usage: ZonesClient.Delete

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

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

Example Usage: ZonesClient.Get

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

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: ZonesClient.List

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

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

Example Usage: ZonesClient.ListByResourceGroup

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

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

Example Usage: ZonesClient.Update

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

payload := zones.ZoneUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForZoneType

func PossibleValuesForZoneType() []string

func ValidateDnsZoneID

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

ValidateDnsZoneID checks that 'input' can be parsed as a Dns Zone ID

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Zone
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DnsZoneId

type DnsZoneId struct {
	SubscriptionId    string
	ResourceGroupName string
	ZoneName          string
}

DnsZoneId is a struct representing the Resource ID for a Dns Zone

func NewDnsZoneID

func NewDnsZoneID(subscriptionId string, resourceGroupName string, zoneName string) DnsZoneId

NewDnsZoneID returns a new DnsZoneId struct

func ParseDnsZoneID

func ParseDnsZoneID(input string) (*DnsZoneId, error)

ParseDnsZoneID parses 'input' into a DnsZoneId

func ParseDnsZoneIDInsensitively

func ParseDnsZoneIDInsensitively(input string) (*DnsZoneId, error)

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

func (DnsZoneId) ID

func (id DnsZoneId) ID() string

ID returns the formatted Dns Zone ID

func (DnsZoneId) Segments

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

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

func (DnsZoneId) String

func (id DnsZoneId) String() string

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

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Zone
}

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Zone
}

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	Top *int64
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Zone
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []Zone
}

type ListOperationOptions

type ListOperationOptions struct {
	Top *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Zone
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type SubResource

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

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Zone
}

type Zone

type Zone struct {
	Etag       *string            `json:"etag,omitempty"`
	Id         *string            `json:"id,omitempty"`
	Location   string             `json:"location"`
	Name       *string            `json:"name,omitempty"`
	Properties *ZoneProperties    `json:"properties,omitempty"`
	Tags       *map[string]string `json:"tags,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type ZoneOperationPredicate

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

func (ZoneOperationPredicate) Matches

func (p ZoneOperationPredicate) Matches(input Zone) bool

type ZoneProperties

type ZoneProperties struct {
	MaxNumberOfRecordSets          *int64         `json:"maxNumberOfRecordSets,omitempty"`
	MaxNumberOfRecordsPerRecordSet *int64         `json:"maxNumberOfRecordsPerRecordSet,omitempty"`
	NameServers                    *[]string      `json:"nameServers,omitempty"`
	NumberOfRecordSets             *int64         `json:"numberOfRecordSets,omitempty"`
	RegistrationVirtualNetworks    *[]SubResource `json:"registrationVirtualNetworks,omitempty"`
	ResolutionVirtualNetworks      *[]SubResource `json:"resolutionVirtualNetworks,omitempty"`
	ZoneType                       *ZoneType      `json:"zoneType,omitempty"`
}

type ZoneType

type ZoneType string
const (
	ZoneTypePrivate ZoneType = "Private"
	ZoneTypePublic  ZoneType = "Public"
)

type ZoneUpdate

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

type ZonesClient

type ZonesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewZonesClientWithBaseURI

func NewZonesClientWithBaseURI(endpoint string) ZonesClient

func (ZonesClient) CreateOrUpdate

func (c ZonesClient) CreateOrUpdate(ctx context.Context, id DnsZoneId, input Zone, options CreateOrUpdateOperationOptions) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ZonesClient) Delete

func (c ZonesClient) Delete(ctx context.Context, id DnsZoneId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (ZonesClient) DeleteThenPoll

func (c ZonesClient) DeleteThenPoll(ctx context.Context, id DnsZoneId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (ZonesClient) Get

func (c ZonesClient) Get(ctx context.Context, id DnsZoneId) (result GetOperationResponse, err error)

Get ...

func (ZonesClient) List

List ...

func (ZonesClient) ListByResourceGroup

ListByResourceGroup ...

func (ZonesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (ZonesClient) ListByResourceGroupCompleteMatchingPredicate

func (c ZonesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, options ListByResourceGroupOperationOptions, predicate ZoneOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ZonesClient) ListComplete

ListComplete retrieves all of the results into a single object

func (ZonesClient) ListCompleteMatchingPredicate

func (c ZonesClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ListOperationOptions, predicate ZoneOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ZonesClient) Update

func (c ZonesClient) Update(ctx context.Context, id DnsZoneId, input ZoneUpdate, options UpdateOperationOptions) (result UpdateOperationResponse, err error)

Update ...

Jump to

Keyboard shortcuts

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