syncmembers

package
v0.20231024.1145744 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := syncmembers.NewSyncMembersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SyncMembersClient.CreateOrUpdate

ctx := context.TODO()
id := syncmembers.NewSyncMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "syncGroupValue", "syncMemberValue")

payload := syncmembers.SyncMember{
	// ...
}


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

Example Usage: SyncMembersClient.Delete

ctx := context.TODO()
id := syncmembers.NewSyncMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "syncGroupValue", "syncMemberValue")

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

Example Usage: SyncMembersClient.Get

ctx := context.TODO()
id := syncmembers.NewSyncMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "syncGroupValue", "syncMemberValue")

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: SyncMembersClient.ListBySyncGroup

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

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

Example Usage: SyncMembersClient.ListMemberSchemas

ctx := context.TODO()
id := syncmembers.NewSyncMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "syncGroupValue", "syncMemberValue")

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

Example Usage: SyncMembersClient.RefreshMemberSchema

ctx := context.TODO()
id := syncmembers.NewSyncMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "syncGroupValue", "syncMemberValue")

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

Example Usage: SyncMembersClient.Update

ctx := context.TODO()
id := syncmembers.NewSyncMemberID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serverValue", "databaseValue", "syncGroupValue", "syncMemberValue")

payload := syncmembers.SyncMember{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForSyncDirection

func PossibleValuesForSyncDirection() []string

func PossibleValuesForSyncMemberDbType

func PossibleValuesForSyncMemberDbType() []string

func PossibleValuesForSyncMemberState

func PossibleValuesForSyncMemberState() []string

func ValidateSyncGroupID

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

ValidateSyncGroupID checks that 'input' can be parsed as a Sync Group ID

func ValidateSyncMemberID

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

ValidateSyncMemberID checks that 'input' can be parsed as a Sync Member 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 GetOperationResponse

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

type ListBySyncGroupCompleteResult

type ListBySyncGroupCompleteResult struct {
	Items []SyncMember
}

type ListBySyncGroupOperationResponse

type ListBySyncGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SyncMember
}

type ListMemberSchemasCompleteResult

type ListMemberSchemasCompleteResult struct {
	Items []SyncFullSchemaProperties
}

type ListMemberSchemasOperationResponse

type ListMemberSchemasOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SyncFullSchemaProperties
}

type RefreshMemberSchemaOperationResponse

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

type SyncDirection

type SyncDirection string
const (
	SyncDirectionBidirectional     SyncDirection = "Bidirectional"
	SyncDirectionOneWayHubToMember SyncDirection = "OneWayHubToMember"
	SyncDirectionOneWayMemberToHub SyncDirection = "OneWayMemberToHub"
)

func (*SyncDirection) UnmarshalJSON

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

type SyncFullSchemaProperties

type SyncFullSchemaProperties struct {
	LastUpdateTime *string                `json:"lastUpdateTime,omitempty"`
	Tables         *[]SyncFullSchemaTable `json:"tables,omitempty"`
}

func (*SyncFullSchemaProperties) GetLastUpdateTimeAsTime

func (o *SyncFullSchemaProperties) GetLastUpdateTimeAsTime() (*time.Time, error)

func (*SyncFullSchemaProperties) SetLastUpdateTimeAsTime

func (o *SyncFullSchemaProperties) SetLastUpdateTimeAsTime(input time.Time)

type SyncFullSchemaPropertiesOperationPredicate

type SyncFullSchemaPropertiesOperationPredicate struct {
	LastUpdateTime *string
}

func (SyncFullSchemaPropertiesOperationPredicate) Matches

type SyncFullSchemaTable

type SyncFullSchemaTable struct {
	Columns    *[]SyncFullSchemaTableColumn `json:"columns,omitempty"`
	ErrorId    *string                      `json:"errorId,omitempty"`
	HasError   *bool                        `json:"hasError,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	QuotedName *string                      `json:"quotedName,omitempty"`
}

type SyncFullSchemaTableColumn

type SyncFullSchemaTableColumn struct {
	DataSize     *string `json:"dataSize,omitempty"`
	DataType     *string `json:"dataType,omitempty"`
	ErrorId      *string `json:"errorId,omitempty"`
	HasError     *bool   `json:"hasError,omitempty"`
	IsPrimaryKey *bool   `json:"isPrimaryKey,omitempty"`
	Name         *string `json:"name,omitempty"`
	QuotedName   *string `json:"quotedName,omitempty"`
}

type SyncGroupId

type SyncGroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	SyncGroupName     string
}

SyncGroupId is a struct representing the Resource ID for a Sync Group

func NewSyncGroupID

func NewSyncGroupID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, syncGroupName string) SyncGroupId

NewSyncGroupID returns a new SyncGroupId struct

func ParseSyncGroupID

func ParseSyncGroupID(input string) (*SyncGroupId, error)

ParseSyncGroupID parses 'input' into a SyncGroupId

func ParseSyncGroupIDInsensitively

func ParseSyncGroupIDInsensitively(input string) (*SyncGroupId, error)

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

func (SyncGroupId) ID

func (id SyncGroupId) ID() string

ID returns the formatted Sync Group ID

func (SyncGroupId) Segments

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

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

func (SyncGroupId) String

func (id SyncGroupId) String() string

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

type SyncMember

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

type SyncMemberDbType

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

func (*SyncMemberDbType) UnmarshalJSON

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

type SyncMemberId

type SyncMemberId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServerName        string
	DatabaseName      string
	SyncGroupName     string
	SyncMemberName    string
}

SyncMemberId is a struct representing the Resource ID for a Sync Member

func NewSyncMemberID

func NewSyncMemberID(subscriptionId string, resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) SyncMemberId

NewSyncMemberID returns a new SyncMemberId struct

func ParseSyncMemberID

func ParseSyncMemberID(input string) (*SyncMemberId, error)

ParseSyncMemberID parses 'input' into a SyncMemberId

func ParseSyncMemberIDInsensitively

func ParseSyncMemberIDInsensitively(input string) (*SyncMemberId, error)

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

func (SyncMemberId) ID

func (id SyncMemberId) ID() string

ID returns the formatted Sync Member ID

func (SyncMemberId) Segments

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

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

func (SyncMemberId) String

func (id SyncMemberId) String() string

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

type SyncMemberOperationPredicate

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

func (SyncMemberOperationPredicate) Matches

func (p SyncMemberOperationPredicate) Matches(input SyncMember) bool

type SyncMemberProperties

type SyncMemberProperties struct {
	DatabaseName                      *string           `json:"databaseName,omitempty"`
	DatabaseType                      *SyncMemberDbType `json:"databaseType,omitempty"`
	Password                          *string           `json:"password,omitempty"`
	PrivateEndpointName               *string           `json:"privateEndpointName,omitempty"`
	ServerName                        *string           `json:"serverName,omitempty"`
	SqlServerDatabaseId               *string           `json:"sqlServerDatabaseId,omitempty"`
	SyncAgentId                       *string           `json:"syncAgentId,omitempty"`
	SyncDirection                     *SyncDirection    `json:"syncDirection,omitempty"`
	SyncMemberAzureDatabaseResourceId *string           `json:"syncMemberAzureDatabaseResourceId,omitempty"`
	SyncState                         *SyncMemberState  `json:"syncState,omitempty"`
	UsePrivateLinkConnection          *bool             `json:"usePrivateLinkConnection,omitempty"`
	UserName                          *string           `json:"userName,omitempty"`
}

type SyncMemberState

type SyncMemberState string
const (
	SyncMemberStateDeProvisionFailed         SyncMemberState = "DeProvisionFailed"
	SyncMemberStateDeProvisioned             SyncMemberState = "DeProvisioned"
	SyncMemberStateDeProvisioning            SyncMemberState = "DeProvisioning"
	SyncMemberStateDisabledBackupRestore     SyncMemberState = "DisabledBackupRestore"
	SyncMemberStateDisabledTombstoneCleanup  SyncMemberState = "DisabledTombstoneCleanup"
	SyncMemberStateProvisionFailed           SyncMemberState = "ProvisionFailed"
	SyncMemberStateProvisioned               SyncMemberState = "Provisioned"
	SyncMemberStateProvisioning              SyncMemberState = "Provisioning"
	SyncMemberStateReprovisionFailed         SyncMemberState = "ReprovisionFailed"
	SyncMemberStateReprovisioning            SyncMemberState = "Reprovisioning"
	SyncMemberStateSyncCancelled             SyncMemberState = "SyncCancelled"
	SyncMemberStateSyncCancelling            SyncMemberState = "SyncCancelling"
	SyncMemberStateSyncFailed                SyncMemberState = "SyncFailed"
	SyncMemberStateSyncInProgress            SyncMemberState = "SyncInProgress"
	SyncMemberStateSyncSucceeded             SyncMemberState = "SyncSucceeded"
	SyncMemberStateSyncSucceededWithWarnings SyncMemberState = "SyncSucceededWithWarnings"
	SyncMemberStateUnProvisioned             SyncMemberState = "UnProvisioned"
	SyncMemberStateUnReprovisioned           SyncMemberState = "UnReprovisioned"
)

func (*SyncMemberState) UnmarshalJSON

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

type SyncMembersClient

type SyncMembersClient struct {
	Client *resourcemanager.Client
}

func NewSyncMembersClientWithBaseURI

func NewSyncMembersClientWithBaseURI(sdkApi sdkEnv.Api) (*SyncMembersClient, error)

func (SyncMembersClient) CreateOrUpdate

func (c SyncMembersClient) CreateOrUpdate(ctx context.Context, id SyncMemberId, input SyncMember) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (SyncMembersClient) CreateOrUpdateThenPoll

func (c SyncMembersClient) CreateOrUpdateThenPoll(ctx context.Context, id SyncMemberId, input SyncMember) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (SyncMembersClient) Delete

Delete ...

func (SyncMembersClient) DeleteThenPoll

func (c SyncMembersClient) DeleteThenPoll(ctx context.Context, id SyncMemberId) error

DeleteThenPoll performs Delete then polls until it's completed

func (SyncMembersClient) Get

Get ...

func (SyncMembersClient) ListBySyncGroup

func (c SyncMembersClient) ListBySyncGroup(ctx context.Context, id SyncGroupId) (result ListBySyncGroupOperationResponse, err error)

ListBySyncGroup ...

func (SyncMembersClient) ListBySyncGroupComplete

func (c SyncMembersClient) ListBySyncGroupComplete(ctx context.Context, id SyncGroupId) (ListBySyncGroupCompleteResult, error)

ListBySyncGroupComplete retrieves all the results into a single object

func (SyncMembersClient) ListBySyncGroupCompleteMatchingPredicate

func (c SyncMembersClient) ListBySyncGroupCompleteMatchingPredicate(ctx context.Context, id SyncGroupId, predicate SyncMemberOperationPredicate) (result ListBySyncGroupCompleteResult, err error)

ListBySyncGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SyncMembersClient) ListMemberSchemas

func (c SyncMembersClient) ListMemberSchemas(ctx context.Context, id SyncMemberId) (result ListMemberSchemasOperationResponse, err error)

ListMemberSchemas ...

func (SyncMembersClient) ListMemberSchemasComplete

func (c SyncMembersClient) ListMemberSchemasComplete(ctx context.Context, id SyncMemberId) (ListMemberSchemasCompleteResult, error)

ListMemberSchemasComplete retrieves all the results into a single object

func (SyncMembersClient) ListMemberSchemasCompleteMatchingPredicate

func (c SyncMembersClient) ListMemberSchemasCompleteMatchingPredicate(ctx context.Context, id SyncMemberId, predicate SyncFullSchemaPropertiesOperationPredicate) (result ListMemberSchemasCompleteResult, err error)

ListMemberSchemasCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SyncMembersClient) RefreshMemberSchema

func (c SyncMembersClient) RefreshMemberSchema(ctx context.Context, id SyncMemberId) (result RefreshMemberSchemaOperationResponse, err error)

RefreshMemberSchema ...

func (SyncMembersClient) RefreshMemberSchemaThenPoll

func (c SyncMembersClient) RefreshMemberSchemaThenPoll(ctx context.Context, id SyncMemberId) error

RefreshMemberSchemaThenPoll performs RefreshMemberSchema then polls until it's completed

func (SyncMembersClient) Update

func (c SyncMembersClient) Update(ctx context.Context, id SyncMemberId, input SyncMember) (result UpdateOperationResponse, err error)

Update ...

func (SyncMembersClient) UpdateThenPoll

func (c SyncMembersClient) UpdateThenPoll(ctx context.Context, id SyncMemberId, input SyncMember) error

UpdateThenPoll performs Update then polls until it's completed

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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