replicationlinks

package
v0.20231023.1073319 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

Client Initialization

client := replicationlinks.NewReplicationLinksClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReplicationLinksClient.Get

ctx := context.TODO()
id := replicationlinks.NewReplicationLinkID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "linkIdValue")

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: ReplicationLinksClient.ListByDatabase

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

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

Example Usage: ReplicationLinksClient.ListByServer

ctx := context.TODO()
id := replicationlinks.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 PossibleValuesForReplicationLinkType

func PossibleValuesForReplicationLinkType() []string

func PossibleValuesForReplicationRole

func PossibleValuesForReplicationRole() []string

func PossibleValuesForReplicationState

func PossibleValuesForReplicationState() []string

func ValidateDatabaseID

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

ValidateDatabaseID checks that 'input' can be parsed as a Database ID

func ValidateReplicationLinkID

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

ValidateReplicationLinkID checks that 'input' can be parsed as a Replication Link 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 DatabaseId

type DatabaseId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
}

DatabaseId is a struct representing the Resource ID for a Database

func NewDatabaseID

func NewDatabaseID(subscriptionId string, resourceGroupName string, serverName string, databaseName string) DatabaseId

NewDatabaseID returns a new DatabaseId struct

func ParseDatabaseID

func ParseDatabaseID(input string) (*DatabaseId, error)

ParseDatabaseID parses 'input' into a DatabaseId

func ParseDatabaseIDInsensitively

func ParseDatabaseIDInsensitively(input string) (*DatabaseId, error)

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

func (DatabaseId) ID

func (id DatabaseId) ID() string

ID returns the formatted Database ID

func (DatabaseId) Segments

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

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

func (DatabaseId) String

func (id DatabaseId) String() string

String returns a human-readable description of this Database ID

type GetOperationResponse

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

type ListByDatabaseCompleteResult

type ListByDatabaseCompleteResult struct {
	Items []ReplicationLink
}

type ListByDatabaseOperationResponse

type ListByDatabaseOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReplicationLink
}

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []ReplicationLink
}

type ListByServerOperationResponse

type ListByServerOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReplicationLink
}
type ReplicationLink struct {
	Id         *string                    `json:"id,omitempty"`
	Name       *string                    `json:"name,omitempty"`
	Properties *ReplicationLinkProperties `json:"properties,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type ReplicationLinkId

type ReplicationLinkId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	LinkId            string
}

ReplicationLinkId is a struct representing the Resource ID for a Replication Link

func NewReplicationLinkID

func NewReplicationLinkID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, linkId string) ReplicationLinkId

NewReplicationLinkID returns a new ReplicationLinkId struct

func ParseReplicationLinkID

func ParseReplicationLinkID(input string) (*ReplicationLinkId, error)

ParseReplicationLinkID parses 'input' into a ReplicationLinkId

func ParseReplicationLinkIDInsensitively

func ParseReplicationLinkIDInsensitively(input string) (*ReplicationLinkId, error)

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

func (ReplicationLinkId) ID

func (id ReplicationLinkId) ID() string

ID returns the formatted Replication Link ID

func (ReplicationLinkId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Replication Link ID

func (ReplicationLinkId) String

func (id ReplicationLinkId) String() string

String returns a human-readable description of this Replication Link ID

type ReplicationLinkOperationPredicate

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

func (ReplicationLinkOperationPredicate) Matches

type ReplicationLinkProperties

type ReplicationLinkProperties struct {
	IsTerminationAllowed *bool                `json:"isTerminationAllowed,omitempty"`
	LinkType             *ReplicationLinkType `json:"linkType,omitempty"`
	PartnerDatabase      *string              `json:"partnerDatabase,omitempty"`
	PartnerLocation      *string              `json:"partnerLocation,omitempty"`
	PartnerRole          *ReplicationRole     `json:"partnerRole,omitempty"`
	PartnerServer        *string              `json:"partnerServer,omitempty"`
	PercentComplete      *int64               `json:"percentComplete,omitempty"`
	ReplicationMode      *string              `json:"replicationMode,omitempty"`
	ReplicationState     *ReplicationState    `json:"replicationState,omitempty"`
	Role                 *ReplicationRole     `json:"role,omitempty"`
	StartTime            *string              `json:"startTime,omitempty"`
}

func (*ReplicationLinkProperties) GetStartTimeAsTime

func (o *ReplicationLinkProperties) GetStartTimeAsTime() (*time.Time, error)

func (*ReplicationLinkProperties) SetStartTimeAsTime

func (o *ReplicationLinkProperties) SetStartTimeAsTime(input time.Time)

type ReplicationLinkType

type ReplicationLinkType string
const (
	ReplicationLinkTypeGEO   ReplicationLinkType = "GEO"
	ReplicationLinkTypeNAMED ReplicationLinkType = "NAMED"
)

func (*ReplicationLinkType) UnmarshalJSON

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

type ReplicationLinksClient

type ReplicationLinksClient struct {
	Client *resourcemanager.Client
}

func NewReplicationLinksClientWithBaseURI

func NewReplicationLinksClientWithBaseURI(sdkApi sdkEnv.Api) (*ReplicationLinksClient, error)

func (ReplicationLinksClient) Get

Get ...

func (ReplicationLinksClient) ListByDatabase

ListByDatabase ...

func (ReplicationLinksClient) ListByDatabaseComplete

ListByDatabaseComplete retrieves all the results into a single object

func (ReplicationLinksClient) ListByDatabaseCompleteMatchingPredicate

func (c ReplicationLinksClient) ListByDatabaseCompleteMatchingPredicate(ctx context.Context, id DatabaseId, predicate ReplicationLinkOperationPredicate) (result ListByDatabaseCompleteResult, err error)

ListByDatabaseCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ReplicationLinksClient) ListByServer

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

ListByServer ...

func (ReplicationLinksClient) ListByServerComplete

ListByServerComplete retrieves all the results into a single object

func (ReplicationLinksClient) ListByServerCompleteMatchingPredicate

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

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ReplicationRole

type ReplicationRole string
const (
	ReplicationRoleCopy                 ReplicationRole = "Copy"
	ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary"
	ReplicationRolePrimary              ReplicationRole = "Primary"
	ReplicationRoleSecondary            ReplicationRole = "Secondary"
	ReplicationRoleSource               ReplicationRole = "Source"
)

func (*ReplicationRole) UnmarshalJSON

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

type ReplicationState

type ReplicationState string
const (
	ReplicationStateCATCHUP   ReplicationState = "CATCH_UP"
	ReplicationStatePENDING   ReplicationState = "PENDING"
	ReplicationStateSEEDING   ReplicationState = "SEEDING"
	ReplicationStateSUSPENDED ReplicationState = "SUSPENDED"
)

func (*ReplicationState) UnmarshalJSON

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

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