recordsets

package
v0.20231214.1140441 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

The recordsets 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/recordsets"

Client Initialization

client := recordsets.NewRecordSetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: RecordSetsClient.CreateOrUpdate

ctx := context.TODO()
id := recordsets.NewRecordTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateDnsZoneValue", "A", "relativeRecordSetValue")

payload := recordsets.RecordSet{
	// ...
}


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

Example Usage: RecordSetsClient.Delete

ctx := context.TODO()
id := recordsets.NewRecordTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateDnsZoneValue", "A", "relativeRecordSetValue")

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

Example Usage: RecordSetsClient.Get

ctx := context.TODO()
id := recordsets.NewRecordTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateDnsZoneValue", "A", "relativeRecordSetValue")

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

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

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

Example Usage: RecordSetsClient.ListByType

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

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

Example Usage: RecordSetsClient.Update

ctx := context.TODO()
id := recordsets.NewRecordTypeID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateDnsZoneValue", "A", "relativeRecordSetValue")

payload := recordsets.RecordSet{
	// ...
}


read, err := client.Update(ctx, id, payload, recordsets.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 PossibleValuesForRecordType

func PossibleValuesForRecordType() []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

func ValidatePrivateZoneID

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

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

func ValidateRecordTypeID

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

ValidateRecordTypeID checks that 'input' can be parsed as a Record Type ID

Types

type ARecord

type ARecord struct {
	IPv4Address *string `json:"ipv4Address,omitempty"`
}

type AaaaRecord

type AaaaRecord struct {
	IPv6Address *string `json:"ipv6Address,omitempty"`
}

type CnameRecord

type CnameRecord struct {
	Cname *string `json:"cname,omitempty"`
}

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 {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RecordSet
}

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

type GetOperationResponse

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

type ListByTypeCompleteResult

type ListByTypeCompleteResult struct {
	Items []RecordSet
}

type ListByTypeOperationOptions

type ListByTypeOperationOptions struct {
	Recordsetnamesuffix *string
	Top                 *int64
}

func DefaultListByTypeOperationOptions

func DefaultListByTypeOperationOptions() ListByTypeOperationOptions

func (ListByTypeOperationOptions) ToHeaders added in v0.20230725.1205316

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

func (ListByTypeOperationOptions) ToOData added in v0.20230725.1205316

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

func (ListByTypeOperationOptions) ToQuery added in v0.20230725.1205316

type ListByTypeOperationResponse

type ListByTypeOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]RecordSet
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []RecordSet
}

type ListOperationOptions

type ListOperationOptions struct {
	Recordsetnamesuffix *string
	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        *[]RecordSet
}

type MxRecord

type MxRecord struct {
	Exchange   *string `json:"exchange,omitempty"`
	Preference *int64  `json:"preference,omitempty"`
}

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

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 PrivateZoneId

type PrivateZoneId struct {
	SubscriptionId     string
	ResourceGroupName  string
	PrivateDnsZoneName string
	RecordType         RecordType
}

PrivateZoneId is a struct representing the Resource ID for a Private Zone

func NewPrivateZoneID

func NewPrivateZoneID(subscriptionId string, resourceGroupName string, privateDnsZoneName string, recordType RecordType) PrivateZoneId

NewPrivateZoneID returns a new PrivateZoneId struct

func ParsePrivateZoneID

func ParsePrivateZoneID(input string) (*PrivateZoneId, error)

ParsePrivateZoneID parses 'input' into a PrivateZoneId

func ParsePrivateZoneIDInsensitively

func ParsePrivateZoneIDInsensitively(input string) (*PrivateZoneId, error)

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

func (*PrivateZoneId) FromParseResult added in v0.20231127.1171502

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

func (PrivateZoneId) ID

func (id PrivateZoneId) ID() string

ID returns the formatted Private Zone ID

func (PrivateZoneId) Segments

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

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

func (PrivateZoneId) String

func (id PrivateZoneId) String() string

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

type PtrRecord

type PtrRecord struct {
	Ptrdname *string `json:"ptrdname,omitempty"`
}

type RecordSet

type RecordSet struct {
	Etag       *string              `json:"etag,omitempty"`
	Id         *string              `json:"id,omitempty"`
	Name       *string              `json:"name,omitempty"`
	Properties *RecordSetProperties `json:"properties,omitempty"`
	Type       *string              `json:"type,omitempty"`
}

type RecordSetOperationPredicate

type RecordSetOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (RecordSetOperationPredicate) Matches

func (p RecordSetOperationPredicate) Matches(input RecordSet) bool

type RecordSetProperties

type RecordSetProperties struct {
	ARecords         *[]ARecord         `json:"aRecords,omitempty"`
	AaaaRecords      *[]AaaaRecord      `json:"aaaaRecords,omitempty"`
	CnameRecord      *CnameRecord       `json:"cnameRecord,omitempty"`
	Fqdn             *string            `json:"fqdn,omitempty"`
	IsAutoRegistered *bool              `json:"isAutoRegistered,omitempty"`
	Metadata         *map[string]string `json:"metadata,omitempty"`
	MxRecords        *[]MxRecord        `json:"mxRecords,omitempty"`
	PtrRecords       *[]PtrRecord       `json:"ptrRecords,omitempty"`
	SoaRecord        *SoaRecord         `json:"soaRecord,omitempty"`
	SrvRecords       *[]SrvRecord       `json:"srvRecords,omitempty"`
	Ttl              *int64             `json:"ttl,omitempty"`
	TxtRecords       *[]TxtRecord       `json:"txtRecords,omitempty"`
}

type RecordSetsClient

type RecordSetsClient struct {
	Client *resourcemanager.Client
}

func NewRecordSetsClientWithBaseURI

func NewRecordSetsClientWithBaseURI(sdkApi sdkEnv.Api) (*RecordSetsClient, error)

func (RecordSetsClient) CreateOrUpdate

CreateOrUpdate ...

func (RecordSetsClient) Delete

Delete ...

func (RecordSetsClient) Get

Get ...

func (RecordSetsClient) List

List ...

func (RecordSetsClient) ListByType

ListByType ...

func (RecordSetsClient) ListByTypeComplete

ListByTypeComplete retrieves all the results into a single object

func (RecordSetsClient) ListByTypeCompleteMatchingPredicate

func (c RecordSetsClient) ListByTypeCompleteMatchingPredicate(ctx context.Context, id PrivateZoneId, options ListByTypeOperationOptions, predicate RecordSetOperationPredicate) (result ListByTypeCompleteResult, err error)

ListByTypeCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RecordSetsClient) ListComplete

ListComplete retrieves all the results into a single object

func (RecordSetsClient) ListCompleteMatchingPredicate

func (c RecordSetsClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateDnsZoneId, options ListOperationOptions, predicate RecordSetOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RecordSetsClient) Update

Update ...

type RecordType

type RecordType string
const (
	RecordTypeA     RecordType = "A"
	RecordTypeAAAA  RecordType = "AAAA"
	RecordTypeCNAME RecordType = "CNAME"
	RecordTypeMX    RecordType = "MX"
	RecordTypePTR   RecordType = "PTR"
	RecordTypeSOA   RecordType = "SOA"
	RecordTypeSRV   RecordType = "SRV"
	RecordTypeTXT   RecordType = "TXT"
)

func (*RecordType) UnmarshalJSON added in v0.20230725.1205316

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

type RecordTypeId

type RecordTypeId struct {
	SubscriptionId        string
	ResourceGroupName     string
	PrivateDnsZoneName    string
	RecordType            RecordType
	RelativeRecordSetName string
}

RecordTypeId is a struct representing the Resource ID for a Record Type

func NewRecordTypeID

func NewRecordTypeID(subscriptionId string, resourceGroupName string, privateDnsZoneName string, recordType RecordType, relativeRecordSetName string) RecordTypeId

NewRecordTypeID returns a new RecordTypeId struct

func ParseRecordTypeID

func ParseRecordTypeID(input string) (*RecordTypeId, error)

ParseRecordTypeID parses 'input' into a RecordTypeId

func ParseRecordTypeIDInsensitively

func ParseRecordTypeIDInsensitively(input string) (*RecordTypeId, error)

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

func (*RecordTypeId) FromParseResult added in v0.20231127.1171502

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

func (RecordTypeId) ID

func (id RecordTypeId) ID() string

ID returns the formatted Record Type ID

func (RecordTypeId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Record Type ID

func (RecordTypeId) String

func (id RecordTypeId) String() string

String returns a human-readable description of this Record Type ID

type SoaRecord

type SoaRecord struct {
	Email        *string `json:"email,omitempty"`
	ExpireTime   *int64  `json:"expireTime,omitempty"`
	Host         *string `json:"host,omitempty"`
	MinimumTtl   *int64  `json:"minimumTtl,omitempty"`
	RefreshTime  *int64  `json:"refreshTime,omitempty"`
	RetryTime    *int64  `json:"retryTime,omitempty"`
	SerialNumber *int64  `json:"serialNumber,omitempty"`
}

type SrvRecord

type SrvRecord struct {
	Port     *int64  `json:"port,omitempty"`
	Priority *int64  `json:"priority,omitempty"`
	Target   *string `json:"target,omitempty"`
	Weight   *int64  `json:"weight,omitempty"`
}

type TxtRecord

type TxtRecord struct {
	Value *[]string `json:"value,omitempty"`
}

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 {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *RecordSet
}

Jump to

Keyboard shortcuts

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