recordsets

package
v0.20231213.1160254 Latest Latest
Warning

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

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

README

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

The recordsets 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/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", "dnsZoneValue", "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", "dnsZoneValue", "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", "dnsZoneValue", "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.ListAllByDnsZone

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

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

Example Usage: RecordSetsClient.ListByDnsZone

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

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

Example Usage: RecordSetsClient.ListByType

ctx := context.TODO()
id := recordsets.NewZoneID("12345678-1234-9876-4563-123456789012", "example-resource-group", "dnsZoneValue", "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", "dnsZoneValue", "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 ValidateDnsZoneID

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

ValidateDnsZoneID checks that 'input' can be parsed as a Dns 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

func ValidateZoneID

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

ValidateZoneID checks that 'input' can be parsed as a Zone ID

Types

type ARecord

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

type AaaaRecord

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

type CaaRecord

type CaaRecord struct {
	Flags *int64  `json:"flags,omitempty"`
	Tag   *string `json:"tag,omitempty"`
	Value *string `json:"value,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.20230227.1195936

func (CreateOrUpdateOperationOptions) ToOData added in v0.20230227.1195936

func (CreateOrUpdateOperationOptions) ToQuery added in v0.20230227.1195936

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.20230227.1195936

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

func (DeleteOperationOptions) ToOData added in v0.20230227.1195936

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

func (DeleteOperationOptions) ToQuery added in v0.20230227.1195936

type DeleteOperationResponse

type DeleteOperationResponse struct {
	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 added in v0.20231127.1171502

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

type ListAllByDnsZoneCompleteResult

type ListAllByDnsZoneCompleteResult struct {
	Items []RecordSet
}

type ListAllByDnsZoneOperationOptions

type ListAllByDnsZoneOperationOptions struct {
	Recordsetnamesuffix *string
	Top                 *int64
}

func DefaultListAllByDnsZoneOperationOptions

func DefaultListAllByDnsZoneOperationOptions() ListAllByDnsZoneOperationOptions

func (ListAllByDnsZoneOperationOptions) ToHeaders added in v0.20230227.1195936

func (ListAllByDnsZoneOperationOptions) ToOData added in v0.20230227.1195936

func (ListAllByDnsZoneOperationOptions) ToQuery added in v0.20230227.1195936

type ListAllByDnsZoneOperationResponse

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

type ListByDnsZoneCompleteResult

type ListByDnsZoneCompleteResult struct {
	Items []RecordSet
}

type ListByDnsZoneOperationOptions

type ListByDnsZoneOperationOptions struct {
	Recordsetnamesuffix *string
	Top                 *int64
}

func DefaultListByDnsZoneOperationOptions

func DefaultListByDnsZoneOperationOptions() ListByDnsZoneOperationOptions

func (ListByDnsZoneOperationOptions) ToHeaders added in v0.20230227.1195936

func (ListByDnsZoneOperationOptions) ToOData added in v0.20230227.1195936

func (ListByDnsZoneOperationOptions) ToQuery added in v0.20230227.1195936

type ListByDnsZoneOperationResponse

type ListByDnsZoneOperationResponse 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.20230227.1195936

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

func (ListByTypeOperationOptions) ToOData added in v0.20230227.1195936

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

func (ListByTypeOperationOptions) ToQuery added in v0.20230227.1195936

type ListByTypeOperationResponse

type ListByTypeOperationResponse 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 NsRecord

type NsRecord struct {
	Nsdname *string `json:"nsdname,omitempty"`
}

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 {
	AAAARecords       *[]AaaaRecord      `json:"AAAARecords,omitempty"`
	ARecords          *[]ARecord         `json:"ARecords,omitempty"`
	CNAMERecord       *CnameRecord       `json:"CNAMERecord,omitempty"`
	CaaRecords        *[]CaaRecord       `json:"caaRecords,omitempty"`
	Fqdn              *string            `json:"fqdn,omitempty"`
	MXRecords         *[]MxRecord        `json:"MXRecords,omitempty"`
	Metadata          *map[string]string `json:"metadata,omitempty"`
	NSRecords         *[]NsRecord        `json:"NSRecords,omitempty"`
	PTRRecords        *[]PtrRecord       `json:"PTRRecords,omitempty"`
	ProvisioningState *string            `json:"provisioningState,omitempty"`
	SOARecord         *SoaRecord         `json:"SOARecord,omitempty"`
	SRVRecords        *[]SrvRecord       `json:"SRVRecords,omitempty"`
	TTL               *int64             `json:"TTL,omitempty"`
	TXTRecords        *[]TxtRecord       `json:"TXTRecords,omitempty"`
	TargetResource    *SubResource       `json:"targetResource,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) ListAllByDnsZone

ListAllByDnsZone ...

func (RecordSetsClient) ListAllByDnsZoneComplete

ListAllByDnsZoneComplete retrieves all the results into a single object

func (RecordSetsClient) ListAllByDnsZoneCompleteMatchingPredicate

func (c RecordSetsClient) ListAllByDnsZoneCompleteMatchingPredicate(ctx context.Context, id DnsZoneId, options ListAllByDnsZoneOperationOptions, predicate RecordSetOperationPredicate) (result ListAllByDnsZoneCompleteResult, err error)

ListAllByDnsZoneCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (RecordSetsClient) ListByDnsZone

ListByDnsZone ...

func (RecordSetsClient) ListByDnsZoneComplete

ListByDnsZoneComplete retrieves all the results into a single object

func (RecordSetsClient) ListByDnsZoneCompleteMatchingPredicate

func (c RecordSetsClient) ListByDnsZoneCompleteMatchingPredicate(ctx context.Context, id DnsZoneId, options ListByDnsZoneOperationOptions, predicate RecordSetOperationPredicate) (result ListByDnsZoneCompleteResult, err error)

ListByDnsZoneCompleteMatchingPredicate retrieves all the results and then applies the predicate

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 ZoneId, options ListByTypeOperationOptions, predicate RecordSetOperationPredicate) (result ListByTypeCompleteResult, err error)

ListByTypeCompleteMatchingPredicate 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"
	RecordTypeCAA   RecordType = "CAA"
	RecordTypeCNAME RecordType = "CNAME"
	RecordTypeMX    RecordType = "MX"
	RecordTypeNS    RecordType = "NS"
	RecordTypePTR   RecordType = "PTR"
	RecordTypeSOA   RecordType = "SOA"
	RecordTypeSRV   RecordType = "SRV"
	RecordTypeTXT   RecordType = "TXT"
)

func (*RecordType) UnmarshalJSON added in v0.20230406.1124617

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

type RecordTypeId

type RecordTypeId struct {
	SubscriptionId        string
	ResourceGroupName     string
	DnsZoneName           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, dnsZoneName 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 SubResource

type SubResource struct {
	Id *string `json:"id,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.20230227.1195936

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

func (UpdateOperationOptions) ToOData added in v0.20230227.1195936

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

func (UpdateOperationOptions) ToQuery added in v0.20230227.1195936

type UpdateOperationResponse

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

type ZoneId

type ZoneId struct {
	SubscriptionId    string
	ResourceGroupName string
	DnsZoneName       string
	RecordType        RecordType
}

ZoneId is a struct representing the Resource ID for a Zone

func NewZoneID

func NewZoneID(subscriptionId string, resourceGroupName string, dnsZoneName string, recordType RecordType) ZoneId

NewZoneID returns a new ZoneId struct

func ParseZoneID

func ParseZoneID(input string) (*ZoneId, error)

ParseZoneID parses 'input' into a ZoneId

func ParseZoneIDInsensitively

func ParseZoneIDInsensitively(input string) (*ZoneId, error)

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

func (*ZoneId) FromParseResult added in v0.20231127.1171502

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

func (ZoneId) ID

func (id ZoneId) ID() string

ID returns the formatted Zone ID

func (ZoneId) Segments

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

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

func (ZoneId) String

func (id ZoneId) String() string

String returns a human-readable description of this Zone ID

Jump to

Keyboard shortcuts

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