privatezones

package
v0.20240903.1111904 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MPL-2.0 Imports: 13 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-helpers/resourcemanager/commonids"
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 := commonids.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 := commonids.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

func (CreateOrUpdateOperationOptions) ToOData

func (CreateOrUpdateOperationOptions) ToQuery

type CreateOrUpdateOperationResponse

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

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 GetOperationResponse

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

type ListByResourceGroupCompleteResult

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

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

type ListCompleteResult

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

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        *[]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) FromParseResult

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

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

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

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        *PrivateZone
}

Jump to

Keyboard shortcuts

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