serverdnsaliases

package
v0.20240125.1170241 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

README

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

The serverdnsaliases SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2023-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/2023-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.NewSqlServerID("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

Types

type AcquireOperationResponse

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

type CreateOrUpdateOperationResponse

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

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) FromParseResult

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

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 {
	LatestHttpResponse *http.Response
	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(sdkApi sdkEnv.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

ListByServer ...

func (ServerDnsAliasesClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (ServerDnsAliasesClient) ListByServerCompleteMatchingPredicate

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

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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