zones

package
v0.20240826.1115152 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MPL-2.0 Imports: 13 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-helpers/resourcemanager/commonids"
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", "dnsZoneValue")

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", "dnsZoneValue")

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", "dnsZoneValue")

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 := commonids.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 := commonids.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", "dnsZoneValue")

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

func (CreateOrUpdateOperationOptions) ToHeaders

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

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 DnsZoneId

type DnsZoneId struct {
	SubscriptionId    string
	ResourceGroupName string
	DnsZoneName       string
}

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

func NewDnsZoneID

func NewDnsZoneID(subscriptionId string, resourceGroupName string, dnsZoneName 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) FromParseResult

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

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
	OData        *odata.OData
	Model        *Zone
}

type ListByResourceGroupCompleteResult

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

type ListByResourceGroupCustomPager added in v0.20240628.1153531

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

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        *[]Zone
}

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

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        *[]Zone
}

type SubResource

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

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 {
	HttpResponse *http.Response
	OData        *odata.OData
	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"
)

func (*ZoneType) UnmarshalJSON

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

type ZoneUpdate

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

type ZonesClient

type ZonesClient struct {
	Client *resourcemanager.Client
}

func NewZonesClientWithBaseURI

func NewZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*ZonesClient, error)

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 the results into a single object

func (ZonesClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ZonesClient) ListComplete

ListComplete retrieves all the results into a single object

func (ZonesClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies 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