privatezones

package
v0.20231116.1162710 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/privatedns/2020-06-01/privatezones Documentation

The privatezones SDK allows for interaction with the Azure Resource Manager Service privatedns (API Version 2020-06-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/privatedns/2020-06-01/privatezones"

Client Initialization

client := privatezones.NewPrivateZonesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PrivateZonesClient.CreateOrUpdate

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

payload := privatezones.PrivateZone{
	// ...
}


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

Example Usage: PrivateZonesClient.Delete

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

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

Example Usage: PrivateZonesClient.Get

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

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

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

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

Example Usage: PrivateZonesClient.ListByResourceGroup

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

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

Example Usage: PrivateZonesClient.Update

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

payload := privatezones.PrivateZone{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidatePrivateDnsZoneID

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

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

Types

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

func (CreateOrUpdateOperationOptions) ToHeaders added in v0.20230725.1205316

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230725.1205316

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230725.1205316

type CreateOrUpdateOperationResponse

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

type DeleteOperationOptions

type DeleteOperationOptions struct {
	IfMatch *string
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders added in v0.20230725.1205316

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

func (DeleteOperationOptions) ToOData added in v0.20230725.1205316

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

func (DeleteOperationOptions) ToQuery added in v0.20230725.1205316

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []PrivateZone
}

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	Top *int64
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

func (ListByResourceGroupOperationOptions) ToHeaders added in v0.20230725.1205316

func (ListByResourceGroupOperationOptions) ToOData added in v0.20230725.1205316

func (ListByResourceGroupOperationOptions) ToQuery added in v0.20230725.1205316

type ListByResourceGroupOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []PrivateZone
}

type ListOperationOptions

type ListOperationOptions struct {
	Top *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230725.1205316

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

func (ListOperationOptions) ToOData added in v0.20230725.1205316

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

func (ListOperationOptions) ToQuery added in v0.20230725.1205316

type ListOperationResponse

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

type PrivateDnsZoneId

type PrivateDnsZoneId struct {
	SubscriptionId     string
	ResourceGroupName  string
	PrivateDnsZoneName string
}

PrivateDnsZoneId is a struct representing the Resource ID for a Private Dns Zone

func NewPrivateDnsZoneID

func NewPrivateDnsZoneID(subscriptionId string, resourceGroupName string, privateDnsZoneName string) PrivateDnsZoneId

NewPrivateDnsZoneID returns a new PrivateDnsZoneId struct

func ParsePrivateDnsZoneID

func ParsePrivateDnsZoneID(input string) (*PrivateDnsZoneId, error)

ParsePrivateDnsZoneID parses 'input' into a PrivateDnsZoneId

func ParsePrivateDnsZoneIDInsensitively

func ParsePrivateDnsZoneIDInsensitively(input string) (*PrivateDnsZoneId, error)

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

func (PrivateDnsZoneId) ID

func (id PrivateDnsZoneId) ID() string

ID returns the formatted Private Dns Zone ID

func (PrivateDnsZoneId) Segments

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

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

func (PrivateDnsZoneId) String

func (id PrivateDnsZoneId) String() string

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

type PrivateZone

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

type PrivateZoneOperationPredicate

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

func (PrivateZoneOperationPredicate) Matches

type PrivateZoneProperties

type PrivateZoneProperties struct {
	InternalId                                     *string            `json:"internalId,omitempty"`
	MaxNumberOfRecordSets                          *int64             `json:"maxNumberOfRecordSets,omitempty"`
	MaxNumberOfVirtualNetworkLinks                 *int64             `json:"maxNumberOfVirtualNetworkLinks,omitempty"`
	MaxNumberOfVirtualNetworkLinksWithRegistration *int64             `json:"maxNumberOfVirtualNetworkLinksWithRegistration,omitempty"`
	NumberOfRecordSets                             *int64             `json:"numberOfRecordSets,omitempty"`
	NumberOfVirtualNetworkLinks                    *int64             `json:"numberOfVirtualNetworkLinks,omitempty"`
	NumberOfVirtualNetworkLinksWithRegistration    *int64             `json:"numberOfVirtualNetworkLinksWithRegistration,omitempty"`
	ProvisioningState                              *ProvisioningState `json:"provisioningState,omitempty"`
}

type PrivateZonesClient

type PrivateZonesClient struct {
	Client *resourcemanager.Client
}

func NewPrivateZonesClientWithBaseURI

func NewPrivateZonesClientWithBaseURI(sdkApi sdkEnv.Api) (*PrivateZonesClient, error)

func (PrivateZonesClient) CreateOrUpdate

CreateOrUpdate ...

func (PrivateZonesClient) CreateOrUpdateThenPoll

func (c PrivateZonesClient) CreateOrUpdateThenPoll(ctx context.Context, id PrivateDnsZoneId, input PrivateZone, options CreateOrUpdateOperationOptions) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (PrivateZonesClient) Delete

Delete ...

func (PrivateZonesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (PrivateZonesClient) Get

Get ...

func (PrivateZonesClient) List

List ...

func (PrivateZonesClient) ListByResourceGroup

ListByResourceGroup ...

func (PrivateZonesClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (PrivateZonesClient) ListByResourceGroupCompleteMatchingPredicate

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

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PrivateZonesClient) ListComplete

ListComplete retrieves all the results into a single object

func (PrivateZonesClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (PrivateZonesClient) Update

Update ...

func (PrivateZonesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

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 added in v0.20230725.1205316

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

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

func (UpdateOperationOptions) ToHeaders added in v0.20230725.1205316

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

func (UpdateOperationOptions) ToOData added in v0.20230725.1205316

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

func (UpdateOperationOptions) ToQuery added in v0.20230725.1205316

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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