instancefailovergroups

package
v0.20240628.1153531 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

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

Client Initialization

client := instancefailovergroups.NewInstanceFailoverGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: InstanceFailoverGroupsClient.CreateOrUpdate

ctx := context.TODO()
id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue")

payload := instancefailovergroups.InstanceFailoverGroup{
	// ...
}


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

Example Usage: InstanceFailoverGroupsClient.Delete

ctx := context.TODO()
id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue")

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

Example Usage: InstanceFailoverGroupsClient.Failover

ctx := context.TODO()
id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue")

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

Example Usage: InstanceFailoverGroupsClient.ForceFailoverAllowDataLoss

ctx := context.TODO()
id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue")

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

Example Usage: InstanceFailoverGroupsClient.Get

ctx := context.TODO()
id := instancefailovergroups.NewInstanceFailoverGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue", "instanceFailoverGroupValue")

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: InstanceFailoverGroupsClient.ListByLocation

ctx := context.TODO()
id := instancefailovergroups.NewProviderLocationID("12345678-1234-9876-4563-123456789012", "example-resource-group", "locationValue")

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

func PossibleValuesForInstanceFailoverGroupReplicationRole() []string

func PossibleValuesForReadOnlyEndpointFailoverPolicy

func PossibleValuesForReadOnlyEndpointFailoverPolicy() []string

func PossibleValuesForReadWriteEndpointFailoverPolicy

func PossibleValuesForReadWriteEndpointFailoverPolicy() []string

func PossibleValuesForSecondaryInstanceType

func PossibleValuesForSecondaryInstanceType() []string

func ValidateInstanceFailoverGroupID

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

ValidateInstanceFailoverGroupID checks that 'input' can be parsed as a Instance Failover Group ID

func ValidateProviderLocationID

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

ValidateProviderLocationID checks that 'input' can be parsed as a Provider Location ID

Types

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type FailoverOperationResponse

type FailoverOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *InstanceFailoverGroup
}

type ForceFailoverAllowDataLossOperationResponse

type ForceFailoverAllowDataLossOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *InstanceFailoverGroup
}

type GetOperationResponse

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

type InstanceFailoverGroup

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

type InstanceFailoverGroupId

type InstanceFailoverGroupId struct {
	SubscriptionId            string
	ResourceGroupName         string
	LocationName              string
	InstanceFailoverGroupName string
}

InstanceFailoverGroupId is a struct representing the Resource ID for a Instance Failover Group

func NewInstanceFailoverGroupID

func NewInstanceFailoverGroupID(subscriptionId string, resourceGroupName string, locationName string, instanceFailoverGroupName string) InstanceFailoverGroupId

NewInstanceFailoverGroupID returns a new InstanceFailoverGroupId struct

func ParseInstanceFailoverGroupID

func ParseInstanceFailoverGroupID(input string) (*InstanceFailoverGroupId, error)

ParseInstanceFailoverGroupID parses 'input' into a InstanceFailoverGroupId

func ParseInstanceFailoverGroupIDInsensitively

func ParseInstanceFailoverGroupIDInsensitively(input string) (*InstanceFailoverGroupId, error)

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

func (*InstanceFailoverGroupId) FromParseResult

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

func (InstanceFailoverGroupId) ID

ID returns the formatted Instance Failover Group ID

func (InstanceFailoverGroupId) Segments

Segments returns a slice of Resource ID Segments which comprise this Instance Failover Group ID

func (InstanceFailoverGroupId) String

func (id InstanceFailoverGroupId) String() string

String returns a human-readable description of this Instance Failover Group ID

type InstanceFailoverGroupOperationPredicate

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

func (InstanceFailoverGroupOperationPredicate) Matches

type InstanceFailoverGroupProperties

type InstanceFailoverGroupProperties struct {
	ManagedInstancePairs []ManagedInstancePairInfo              `json:"managedInstancePairs"`
	PartnerRegions       []PartnerRegionInfo                    `json:"partnerRegions"`
	ReadOnlyEndpoint     *InstanceFailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"`
	ReadWriteEndpoint    InstanceFailoverGroupReadWriteEndpoint `json:"readWriteEndpoint"`
	ReplicationRole      *InstanceFailoverGroupReplicationRole  `json:"replicationRole,omitempty"`
	ReplicationState     *string                                `json:"replicationState,omitempty"`
	SecondaryType        *SecondaryInstanceType                 `json:"secondaryType,omitempty"`
}

type InstanceFailoverGroupReadOnlyEndpoint

type InstanceFailoverGroupReadOnlyEndpoint struct {
	FailoverPolicy *ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"`
}

type InstanceFailoverGroupReadWriteEndpoint

type InstanceFailoverGroupReadWriteEndpoint struct {
	FailoverPolicy                         ReadWriteEndpointFailoverPolicy `json:"failoverPolicy"`
	FailoverWithDataLossGracePeriodMinutes *int64                          `json:"failoverWithDataLossGracePeriodMinutes,omitempty"`
}

type InstanceFailoverGroupReplicationRole

type InstanceFailoverGroupReplicationRole string
const (
	InstanceFailoverGroupReplicationRolePrimary   InstanceFailoverGroupReplicationRole = "Primary"
	InstanceFailoverGroupReplicationRoleSecondary InstanceFailoverGroupReplicationRole = "Secondary"
)

func (*InstanceFailoverGroupReplicationRole) UnmarshalJSON

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

type InstanceFailoverGroupsClient

type InstanceFailoverGroupsClient struct {
	Client *resourcemanager.Client
}

func NewInstanceFailoverGroupsClientWithBaseURI

func NewInstanceFailoverGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*InstanceFailoverGroupsClient, error)

func (InstanceFailoverGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (InstanceFailoverGroupsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (InstanceFailoverGroupsClient) Delete

Delete ...

func (InstanceFailoverGroupsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (InstanceFailoverGroupsClient) Failover

Failover ...

func (InstanceFailoverGroupsClient) FailoverThenPoll

FailoverThenPoll performs Failover then polls until it's completed

func (InstanceFailoverGroupsClient) ForceFailoverAllowDataLoss

ForceFailoverAllowDataLoss ...

func (InstanceFailoverGroupsClient) ForceFailoverAllowDataLossThenPoll

func (c InstanceFailoverGroupsClient) ForceFailoverAllowDataLossThenPoll(ctx context.Context, id InstanceFailoverGroupId) error

ForceFailoverAllowDataLossThenPoll performs ForceFailoverAllowDataLoss then polls until it's completed

func (InstanceFailoverGroupsClient) Get

Get ...

func (InstanceFailoverGroupsClient) ListByLocation

ListByLocation ...

func (InstanceFailoverGroupsClient) ListByLocationComplete

ListByLocationComplete retrieves all the results into a single object

func (InstanceFailoverGroupsClient) ListByLocationCompleteMatchingPredicate

func (c InstanceFailoverGroupsClient) ListByLocationCompleteMatchingPredicate(ctx context.Context, id ProviderLocationId, predicate InstanceFailoverGroupOperationPredicate) (result ListByLocationCompleteResult, err error)

ListByLocationCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ListByLocationCompleteResult

type ListByLocationCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []InstanceFailoverGroup
}

type ListByLocationCustomPager added in v0.20240628.1153531

type ListByLocationCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByLocationCustomPager) NextPageLink() *odata.Link

type ListByLocationOperationResponse

type ListByLocationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]InstanceFailoverGroup
}

type ManagedInstancePairInfo

type ManagedInstancePairInfo struct {
	PartnerManagedInstanceId *string `json:"partnerManagedInstanceId,omitempty"`
	PrimaryManagedInstanceId *string `json:"primaryManagedInstanceId,omitempty"`
}

type PartnerRegionInfo

type PartnerRegionInfo struct {
	Location        *string                               `json:"location,omitempty"`
	ReplicationRole *InstanceFailoverGroupReplicationRole `json:"replicationRole,omitempty"`
}

type ProviderLocationId

type ProviderLocationId struct {
	SubscriptionId    string
	ResourceGroupName string
	LocationName      string
}

ProviderLocationId is a struct representing the Resource ID for a Provider Location

func NewProviderLocationID

func NewProviderLocationID(subscriptionId string, resourceGroupName string, locationName string) ProviderLocationId

NewProviderLocationID returns a new ProviderLocationId struct

func ParseProviderLocationID

func ParseProviderLocationID(input string) (*ProviderLocationId, error)

ParseProviderLocationID parses 'input' into a ProviderLocationId

func ParseProviderLocationIDInsensitively

func ParseProviderLocationIDInsensitively(input string) (*ProviderLocationId, error)

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

func (*ProviderLocationId) FromParseResult

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

func (ProviderLocationId) ID

func (id ProviderLocationId) ID() string

ID returns the formatted Provider Location ID

func (ProviderLocationId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Provider Location ID

func (ProviderLocationId) String

func (id ProviderLocationId) String() string

String returns a human-readable description of this Provider Location ID

type ReadOnlyEndpointFailoverPolicy

type ReadOnlyEndpointFailoverPolicy string
const (
	ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled"
	ReadOnlyEndpointFailoverPolicyEnabled  ReadOnlyEndpointFailoverPolicy = "Enabled"
)

func (*ReadOnlyEndpointFailoverPolicy) UnmarshalJSON

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

type ReadWriteEndpointFailoverPolicy

type ReadWriteEndpointFailoverPolicy string
const (
	ReadWriteEndpointFailoverPolicyAutomatic ReadWriteEndpointFailoverPolicy = "Automatic"
	ReadWriteEndpointFailoverPolicyManual    ReadWriteEndpointFailoverPolicy = "Manual"
)

func (*ReadWriteEndpointFailoverPolicy) UnmarshalJSON

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

type SecondaryInstanceType

type SecondaryInstanceType string
const (
	SecondaryInstanceTypeGeo     SecondaryInstanceType = "Geo"
	SecondaryInstanceTypeStandby SecondaryInstanceType = "Standby"
)

func (*SecondaryInstanceType) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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