syncagents

package
v0.20230711.1145438 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/sql/2022-11-01-preview/syncagents Documentation

The syncagents SDK allows for interaction with the Azure Resource Manager Service sql (API Version 2022-11-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/2022-11-01-preview/syncagents"

Client Initialization

client := syncagents.NewSyncAgentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SyncAgentsClient.CreateOrUpdate

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

payload := syncagents.SyncAgent{
	// ...
}


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

Example Usage: SyncAgentsClient.Delete

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

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

Example Usage: SyncAgentsClient.GenerateKey

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

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

Example Usage: SyncAgentsClient.Get

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

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

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

Example Usage: SyncAgentsClient.ListLinkedDatabases

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

// alternatively `client.ListLinkedDatabases(ctx, id)` can be used to do batched pagination
items, err := client.ListLinkedDatabasesComplete(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 PossibleValuesForSyncAgentState

func PossibleValuesForSyncAgentState() []string

func PossibleValuesForSyncMemberDbType

func PossibleValuesForSyncMemberDbType() []string

func ValidateServerID

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

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

func ValidateSyncAgentID

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

ValidateSyncAgentID checks that 'input' can be parsed as a Sync Agent ID

Types

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 GenerateKeyOperationResponse

type GenerateKeyOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SyncAgentKeyProperties
}

type GetOperationResponse

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

type ListByServerCompleteResult

type ListByServerCompleteResult struct {
	Items []SyncAgent
}

type ListByServerOperationResponse

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

type ListLinkedDatabasesCompleteResult

type ListLinkedDatabasesCompleteResult struct {
	Items []SyncAgentLinkedDatabase
}

type ListLinkedDatabasesOperationResponse

type ListLinkedDatabasesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SyncAgentLinkedDatabase
}

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

type SyncAgent

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

type SyncAgentId

type SyncAgentId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	SyncAgentName     string
}

SyncAgentId is a struct representing the Resource ID for a Sync Agent

func NewSyncAgentID

func NewSyncAgentID(subscriptionId string, resourceGroupName string, serverName string, syncAgentName string) SyncAgentId

NewSyncAgentID returns a new SyncAgentId struct

func ParseSyncAgentID

func ParseSyncAgentID(input string) (*SyncAgentId, error)

ParseSyncAgentID parses 'input' into a SyncAgentId

func ParseSyncAgentIDInsensitively

func ParseSyncAgentIDInsensitively(input string) (*SyncAgentId, error)

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

func (SyncAgentId) ID

func (id SyncAgentId) ID() string

ID returns the formatted Sync Agent ID

func (SyncAgentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Sync Agent ID

func (SyncAgentId) String

func (id SyncAgentId) String() string

String returns a human-readable description of this Sync Agent ID

type SyncAgentKeyProperties

type SyncAgentKeyProperties struct {
	SyncAgentKey *string `json:"syncAgentKey,omitempty"`
}

type SyncAgentLinkedDatabase

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

type SyncAgentLinkedDatabaseOperationPredicate

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

func (SyncAgentLinkedDatabaseOperationPredicate) Matches

type SyncAgentLinkedDatabaseProperties

type SyncAgentLinkedDatabaseProperties struct {
	DatabaseId   *string           `json:"databaseId,omitempty"`
	DatabaseName *string           `json:"databaseName,omitempty"`
	DatabaseType *SyncMemberDbType `json:"databaseType,omitempty"`
	Description  *string           `json:"description,omitempty"`
	ServerName   *string           `json:"serverName,omitempty"`
	UserName     *string           `json:"userName,omitempty"`
}

type SyncAgentOperationPredicate

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

func (SyncAgentOperationPredicate) Matches

func (p SyncAgentOperationPredicate) Matches(input SyncAgent) bool

type SyncAgentProperties

type SyncAgentProperties struct {
	ExpiryTime     *string         `json:"expiryTime,omitempty"`
	IsUpToDate     *bool           `json:"isUpToDate,omitempty"`
	LastAliveTime  *string         `json:"lastAliveTime,omitempty"`
	Name           *string         `json:"name,omitempty"`
	State          *SyncAgentState `json:"state,omitempty"`
	SyncDatabaseId *string         `json:"syncDatabaseId,omitempty"`
	Version        *string         `json:"version,omitempty"`
}

func (*SyncAgentProperties) GetExpiryTimeAsTime

func (o *SyncAgentProperties) GetExpiryTimeAsTime() (*time.Time, error)

func (*SyncAgentProperties) GetLastAliveTimeAsTime

func (o *SyncAgentProperties) GetLastAliveTimeAsTime() (*time.Time, error)

func (*SyncAgentProperties) SetExpiryTimeAsTime

func (o *SyncAgentProperties) SetExpiryTimeAsTime(input time.Time)

func (*SyncAgentProperties) SetLastAliveTimeAsTime

func (o *SyncAgentProperties) SetLastAliveTimeAsTime(input time.Time)

type SyncAgentState

type SyncAgentState string
const (
	SyncAgentStateNeverConnected SyncAgentState = "NeverConnected"
	SyncAgentStateOffline        SyncAgentState = "Offline"
	SyncAgentStateOnline         SyncAgentState = "Online"
)

func (*SyncAgentState) UnmarshalJSON

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

type SyncAgentsClient

type SyncAgentsClient struct {
	Client *resourcemanager.Client
}

func NewSyncAgentsClientWithBaseURI

func NewSyncAgentsClientWithBaseURI(api environments.Api) (*SyncAgentsClient, error)

func (SyncAgentsClient) CreateOrUpdate

func (c SyncAgentsClient) CreateOrUpdate(ctx context.Context, id SyncAgentId, input SyncAgent) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (SyncAgentsClient) CreateOrUpdateThenPoll

func (c SyncAgentsClient) CreateOrUpdateThenPoll(ctx context.Context, id SyncAgentId, input SyncAgent) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (SyncAgentsClient) Delete

func (c SyncAgentsClient) Delete(ctx context.Context, id SyncAgentId) (result DeleteOperationResponse, err error)

Delete ...

func (SyncAgentsClient) DeleteThenPoll

func (c SyncAgentsClient) DeleteThenPoll(ctx context.Context, id SyncAgentId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SyncAgentsClient) GenerateKey

func (c SyncAgentsClient) GenerateKey(ctx context.Context, id SyncAgentId) (result GenerateKeyOperationResponse, err error)

GenerateKey ...

func (SyncAgentsClient) Get

Get ...

func (SyncAgentsClient) ListByServer

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

ListByServer ...

func (SyncAgentsClient) ListByServerComplete

func (c SyncAgentsClient) ListByServerComplete(ctx context.Context, id ServerId) (ListByServerCompleteResult, error)

ListByServerComplete retrieves all the results into a single object

func (SyncAgentsClient) ListByServerCompleteMatchingPredicate

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

ListByServerCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SyncAgentsClient) ListLinkedDatabases

func (c SyncAgentsClient) ListLinkedDatabases(ctx context.Context, id SyncAgentId) (result ListLinkedDatabasesOperationResponse, err error)

ListLinkedDatabases ...

func (SyncAgentsClient) ListLinkedDatabasesComplete

func (c SyncAgentsClient) ListLinkedDatabasesComplete(ctx context.Context, id SyncAgentId) (ListLinkedDatabasesCompleteResult, error)

ListLinkedDatabasesComplete retrieves all the results into a single object

func (SyncAgentsClient) ListLinkedDatabasesCompleteMatchingPredicate

func (c SyncAgentsClient) ListLinkedDatabasesCompleteMatchingPredicate(ctx context.Context, id SyncAgentId, predicate SyncAgentLinkedDatabaseOperationPredicate) (result ListLinkedDatabasesCompleteResult, err error)

ListLinkedDatabasesCompleteMatchingPredicate retrieves all the results and then applies the predicate

type SyncMemberDbType

type SyncMemberDbType string
const (
	SyncMemberDbTypeAzureSqlDatabase  SyncMemberDbType = "AzureSqlDatabase"
	SyncMemberDbTypeSqlServerDatabase SyncMemberDbType = "SqlServerDatabase"
)

func (*SyncMemberDbType) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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