serverdnsaliases

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2021-02-01-preview/serverdnsaliases Documentation

The serverdnsaliases SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2021-02-01-preview).

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/sql/2021-02-01-preview/serverdnsaliases"

Client Initialization

client := serverdnsaliases.NewServerDnsAliasesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServerDnsAliasesClient.Acquire

ctx := context.TODO()
id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue")

payload := serverdnsaliases.ServerDnsAliasAcquisition{
	// ...
}


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

Example Usage: ServerDnsAliasesClient.CreateOrUpdate

ctx := context.TODO()
id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue")

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

Example Usage: ServerDnsAliasesClient.Delete

ctx := context.TODO()
id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue")

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

Example Usage: ServerDnsAliasesClient.Get

ctx := context.TODO()
id := serverdnsaliases.NewDnsAliasID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "dnsAliasValue")

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: ServerDnsAliasesClient.ListByServer

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDnsAliasID

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

ValidateDnsAliasID checks that 'input' can be parsed as a Dns Alias ID

func ValidateServerID

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

ValidateServerID checks that 'input' can be parsed as a Server ID

Types

type AcquireOperationResponse

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

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type DnsAliasId

type DnsAliasId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DnsAliasName      string
}

DnsAliasId is a struct representing the Resource ID for a Dns Alias

func NewDnsAliasID

func NewDnsAliasID(subscriptionId string, resourceGroupName string, serverName string, dnsAliasName string) DnsAliasId

NewDnsAliasID returns a new DnsAliasId struct

func ParseDnsAliasID

func ParseDnsAliasID(input string) (*DnsAliasId, error)

ParseDnsAliasID parses 'input' into a DnsAliasId

func ParseDnsAliasIDInsensitively

func ParseDnsAliasIDInsensitively(input string) (*DnsAliasId, error)

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

func (DnsAliasId) ID

func (id DnsAliasId) ID() string

ID returns the formatted Dns Alias ID

func (DnsAliasId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Dns Alias ID

func (DnsAliasId) String

func (id DnsAliasId) String() string

String returns a human-readable description of this Dns Alias ID

type GetOperationResponse

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

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []ServerDnsAlias
}

type ListByServerOperationResponse

type ListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ServerDnsAlias
}

type ServerDnsAlias

type ServerDnsAlias struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *ServerDnsAliasProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type ServerDnsAliasAcquisition

type ServerDnsAliasAcquisition struct {
	OldServerDnsAliasId string `json:"oldServerDnsAliasId"`
}

type ServerDnsAliasOperationPredicate

type ServerDnsAliasOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (ServerDnsAliasOperationPredicate) Matches

type ServerDnsAliasProperties

type ServerDnsAliasProperties struct {
	AzureDnsRecord *string `json:"azureDnsRecord,omitempty"`
}

type ServerDnsAliasesClient

type ServerDnsAliasesClient struct {
	Client *resourcemanager.Client
}

func NewServerDnsAliasesClientWithBaseURI

func NewServerDnsAliasesClientWithBaseURI(api environments.Api) (*ServerDnsAliasesClient, error)

func (ServerDnsAliasesClient) Acquire

Acquire ...

func (ServerDnsAliasesClient) AcquireThenPoll

AcquireThenPoll performs Acquire then polls until it's completed

func (ServerDnsAliasesClient) CreateOrUpdate

CreateOrUpdate ...

func (ServerDnsAliasesClient) CreateOrUpdateThenPoll

func (c ServerDnsAliasesClient) CreateOrUpdateThenPoll(ctx context.Context, id DnsAliasId) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServerDnsAliasesClient) Delete

Delete ...

func (ServerDnsAliasesClient) DeleteThenPoll

func (c ServerDnsAliasesClient) DeleteThenPoll(ctx context.Context, id DnsAliasId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ServerDnsAliasesClient) Get

Get ...

func (ServerDnsAliasesClient) ListByServer

func (c ServerDnsAliasesClient) ListByServer(ctx context.Context, id ServerId) (result ListByServerOperationResponse, err error)

ListByServer ...

func (ServerDnsAliasesClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (ServerDnsAliasesClient) ListByServerCompleteMatchingPredicate

func (c ServerDnsAliasesClient) ListByServerCompleteMatchingPredicate(ctx context.Context, id ServerId, predicate ServerDnsAliasOperationPredicate) (result ListByServerCompleteResult, err error)

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ServerId

type ServerId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
}

ServerId is a struct representing the Resource ID for a Server

func NewServerID

func NewServerID(subscriptionId string, resourceGroupName string, serverName string) ServerId

NewServerID returns a new ServerId struct

func ParseServerID

func ParseServerID(input string) (*ServerId, error)

ParseServerID parses 'input' into a ServerId

func ParseServerIDInsensitively

func ParseServerIDInsensitively(input string) (*ServerId, error)

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

func (ServerId) ID

func (id ServerId) ID() string

ID returns the formatted Server ID

func (ServerId) Segments

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

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

func (ServerId) String

func (id ServerId) String() string

String returns a human-readable description of this Server ID

Jump to

Keyboard shortcuts

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