disasterrecoveryconfigs

package
v0.20241023.1122425 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-06-01-preview/disasterrecoveryconfigs Documentation

The disasterrecoveryconfigs SDK allows for interaction with Azure Resource Manager servicebus (API Version 2021-06-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/servicebus/2021-06-01-preview/disasterrecoveryconfigs"

Client Initialization

client := disasterrecoveryconfigs.NewDisasterRecoveryConfigsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DisasterRecoveryConfigsClient.BreakPairing

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName")

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

Example Usage: DisasterRecoveryConfigsClient.CheckNameAvailability

ctx := context.TODO()
id := disasterrecoveryconfigs.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName")

payload := disasterrecoveryconfigs.CheckNameAvailability{
	// ...
}


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

Example Usage: DisasterRecoveryConfigsClient.CreateOrUpdate

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName")

payload := disasterrecoveryconfigs.ArmDisasterRecovery{
	// ...
}


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

Example Usage: DisasterRecoveryConfigsClient.Delete

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName")

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

Example Usage: DisasterRecoveryConfigsClient.FailOver

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName")

payload := disasterrecoveryconfigs.FailoverProperties{
	// ...
}


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

Example Usage: DisasterRecoveryConfigsClient.Get

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName")

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: DisasterRecoveryConfigsClient.GetAuthorizationRule

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName", "authorizationRuleName")

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

Example Usage: DisasterRecoveryConfigsClient.List

ctx := context.TODO()
id := disasterrecoveryconfigs.NewNamespaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName")

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

Example Usage: DisasterRecoveryConfigsClient.ListAuthorizationRules

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName")

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

Example Usage: DisasterRecoveryConfigsClient.ListKeys

ctx := context.TODO()
id := disasterrecoveryconfigs.NewDisasterRecoveryConfigAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceName", "disasterRecoveryConfigName", "authorizationRuleName")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAccessRights

func PossibleValuesForAccessRights() []string

func PossibleValuesForProvisioningStateDR

func PossibleValuesForProvisioningStateDR() []string

func PossibleValuesForRoleDisasterRecovery

func PossibleValuesForRoleDisasterRecovery() []string

func PossibleValuesForUnavailableReason

func PossibleValuesForUnavailableReason() []string

func ValidateDisasterRecoveryConfigAuthorizationRuleID

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

ValidateDisasterRecoveryConfigAuthorizationRuleID checks that 'input' can be parsed as a Disaster Recovery Config Authorization Rule ID

func ValidateDisasterRecoveryConfigID

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

ValidateDisasterRecoveryConfigID checks that 'input' can be parsed as a Disaster Recovery Config ID

func ValidateNamespaceID

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

ValidateNamespaceID checks that 'input' can be parsed as a Namespace ID

Types

type AccessKeys

type AccessKeys struct {
	AliasPrimaryConnectionString   *string `json:"aliasPrimaryConnectionString,omitempty"`
	AliasSecondaryConnectionString *string `json:"aliasSecondaryConnectionString,omitempty"`
	KeyName                        *string `json:"keyName,omitempty"`
	PrimaryConnectionString        *string `json:"primaryConnectionString,omitempty"`
	PrimaryKey                     *string `json:"primaryKey,omitempty"`
	SecondaryConnectionString      *string `json:"secondaryConnectionString,omitempty"`
	SecondaryKey                   *string `json:"secondaryKey,omitempty"`
}

type AccessRights

type AccessRights string
const (
	AccessRightsListen AccessRights = "Listen"
	AccessRightsManage AccessRights = "Manage"
	AccessRightsSend   AccessRights = "Send"
)

func (*AccessRights) UnmarshalJSON

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

type ArmDisasterRecovery

type ArmDisasterRecovery struct {
	Id         *string                        `json:"id,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *ArmDisasterRecoveryProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData         `json:"systemData,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type ArmDisasterRecoveryOperationPredicate

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

func (ArmDisasterRecoveryOperationPredicate) Matches

type ArmDisasterRecoveryProperties

type ArmDisasterRecoveryProperties struct {
	AlternateName                     *string               `json:"alternateName,omitempty"`
	PartnerNamespace                  *string               `json:"partnerNamespace,omitempty"`
	PendingReplicationOperationsCount *int64                `json:"pendingReplicationOperationsCount,omitempty"`
	ProvisioningState                 *ProvisioningStateDR  `json:"provisioningState,omitempty"`
	Role                              *RoleDisasterRecovery `json:"role,omitempty"`
}

type BreakPairingOperationResponse

type BreakPairingOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type CheckNameAvailability

type CheckNameAvailability struct {
	Name string `json:"name"`
}

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CheckNameAvailabilityResult
}

type CheckNameAvailabilityResult

type CheckNameAvailabilityResult struct {
	Message       *string            `json:"message,omitempty"`
	NameAvailable *bool              `json:"nameAvailable,omitempty"`
	Reason        *UnavailableReason `json:"reason,omitempty"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ArmDisasterRecovery
}

type DeleteOperationResponse

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

type DisasterRecoveryConfigAuthorizationRuleId

type DisasterRecoveryConfigAuthorizationRuleId struct {
	SubscriptionId             string
	ResourceGroupName          string
	NamespaceName              string
	DisasterRecoveryConfigName string
	AuthorizationRuleName      string
}

DisasterRecoveryConfigAuthorizationRuleId is a struct representing the Resource ID for a Disaster Recovery Config Authorization Rule

func NewDisasterRecoveryConfigAuthorizationRuleID

func NewDisasterRecoveryConfigAuthorizationRuleID(subscriptionId string, resourceGroupName string, namespaceName string, disasterRecoveryConfigName string, authorizationRuleName string) DisasterRecoveryConfigAuthorizationRuleId

NewDisasterRecoveryConfigAuthorizationRuleID returns a new DisasterRecoveryConfigAuthorizationRuleId struct

func ParseDisasterRecoveryConfigAuthorizationRuleID

func ParseDisasterRecoveryConfigAuthorizationRuleID(input string) (*DisasterRecoveryConfigAuthorizationRuleId, error)

ParseDisasterRecoveryConfigAuthorizationRuleID parses 'input' into a DisasterRecoveryConfigAuthorizationRuleId

func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively

func ParseDisasterRecoveryConfigAuthorizationRuleIDInsensitively(input string) (*DisasterRecoveryConfigAuthorizationRuleId, error)

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

func (*DisasterRecoveryConfigAuthorizationRuleId) FromParseResult

func (DisasterRecoveryConfigAuthorizationRuleId) ID

ID returns the formatted Disaster Recovery Config Authorization Rule ID

func (DisasterRecoveryConfigAuthorizationRuleId) Segments

Segments returns a slice of Resource ID Segments which comprise this Disaster Recovery Config Authorization Rule ID

func (DisasterRecoveryConfigAuthorizationRuleId) String

String returns a human-readable description of this Disaster Recovery Config Authorization Rule ID

type DisasterRecoveryConfigId

type DisasterRecoveryConfigId struct {
	SubscriptionId             string
	ResourceGroupName          string
	NamespaceName              string
	DisasterRecoveryConfigName string
}

DisasterRecoveryConfigId is a struct representing the Resource ID for a Disaster Recovery Config

func NewDisasterRecoveryConfigID

func NewDisasterRecoveryConfigID(subscriptionId string, resourceGroupName string, namespaceName string, disasterRecoveryConfigName string) DisasterRecoveryConfigId

NewDisasterRecoveryConfigID returns a new DisasterRecoveryConfigId struct

func ParseDisasterRecoveryConfigID

func ParseDisasterRecoveryConfigID(input string) (*DisasterRecoveryConfigId, error)

ParseDisasterRecoveryConfigID parses 'input' into a DisasterRecoveryConfigId

func ParseDisasterRecoveryConfigIDInsensitively

func ParseDisasterRecoveryConfigIDInsensitively(input string) (*DisasterRecoveryConfigId, error)

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

func (*DisasterRecoveryConfigId) FromParseResult

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

func (DisasterRecoveryConfigId) ID

ID returns the formatted Disaster Recovery Config ID

func (DisasterRecoveryConfigId) Segments

Segments returns a slice of Resource ID Segments which comprise this Disaster Recovery Config ID

func (DisasterRecoveryConfigId) String

func (id DisasterRecoveryConfigId) String() string

String returns a human-readable description of this Disaster Recovery Config ID

type DisasterRecoveryConfigsClient

type DisasterRecoveryConfigsClient struct {
	Client *resourcemanager.Client
}

func NewDisasterRecoveryConfigsClientWithBaseURI

func NewDisasterRecoveryConfigsClientWithBaseURI(sdkApi sdkEnv.Api) (*DisasterRecoveryConfigsClient, error)

func (DisasterRecoveryConfigsClient) BreakPairing

BreakPairing ...

func (DisasterRecoveryConfigsClient) CheckNameAvailability

CheckNameAvailability ...

func (DisasterRecoveryConfigsClient) CreateOrUpdate

CreateOrUpdate ...

func (DisasterRecoveryConfigsClient) Delete

Delete ...

func (DisasterRecoveryConfigsClient) FailOver

FailOver ...

func (DisasterRecoveryConfigsClient) Get

Get ...

func (DisasterRecoveryConfigsClient) GetAuthorizationRule

GetAuthorizationRule ...

func (DisasterRecoveryConfigsClient) List

List ...

func (DisasterRecoveryConfigsClient) ListAuthorizationRules

ListAuthorizationRules ...

func (DisasterRecoveryConfigsClient) ListAuthorizationRulesComplete

ListAuthorizationRulesComplete retrieves all the results into a single object

func (DisasterRecoveryConfigsClient) ListAuthorizationRulesCompleteMatchingPredicate

func (c DisasterRecoveryConfigsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id DisasterRecoveryConfigId, predicate SBAuthorizationRuleOperationPredicate) (result ListAuthorizationRulesCompleteResult, err error)

ListAuthorizationRulesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DisasterRecoveryConfigsClient) ListComplete

ListComplete retrieves all the results into a single object

func (DisasterRecoveryConfigsClient) ListCompleteMatchingPredicate

func (c DisasterRecoveryConfigsClient) ListCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate ArmDisasterRecoveryOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (DisasterRecoveryConfigsClient) ListKeys

ListKeys ...

type FailOverOperationResponse

type FailOverOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type FailoverProperties

type FailoverProperties struct {
	Properties *FailoverPropertiesProperties `json:"properties,omitempty"`
}

type FailoverPropertiesProperties

type FailoverPropertiesProperties struct {
	IsSafeFailover *bool `json:"IsSafeFailover,omitempty"`
}

type GetAuthorizationRuleOperationResponse

type GetAuthorizationRuleOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *SBAuthorizationRule
}

type GetOperationResponse

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

type ListAuthorizationRulesCompleteResult

type ListAuthorizationRulesCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SBAuthorizationRule
}

type ListAuthorizationRulesCustomPager added in v0.20240628.1153531

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

type ListAuthorizationRulesOperationResponse

type ListAuthorizationRulesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SBAuthorizationRule
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ArmDisasterRecovery
}

type ListCustomPager added in v0.20240628.1153531

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

type ListKeysOperationResponse

type ListKeysOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AccessKeys
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ArmDisasterRecovery
}

type NamespaceId

type NamespaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
}

NamespaceId is a struct representing the Resource ID for a Namespace

func NewNamespaceID

func NewNamespaceID(subscriptionId string, resourceGroupName string, namespaceName string) NamespaceId

NewNamespaceID returns a new NamespaceId struct

func ParseNamespaceID

func ParseNamespaceID(input string) (*NamespaceId, error)

ParseNamespaceID parses 'input' into a NamespaceId

func ParseNamespaceIDInsensitively

func ParseNamespaceIDInsensitively(input string) (*NamespaceId, error)

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

func (*NamespaceId) FromParseResult

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

func (NamespaceId) ID

func (id NamespaceId) ID() string

ID returns the formatted Namespace ID

func (NamespaceId) Segments

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

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

func (NamespaceId) String

func (id NamespaceId) String() string

String returns a human-readable description of this Namespace ID

type ProvisioningStateDR

type ProvisioningStateDR string
const (
	ProvisioningStateDRAccepted  ProvisioningStateDR = "Accepted"
	ProvisioningStateDRFailed    ProvisioningStateDR = "Failed"
	ProvisioningStateDRSucceeded ProvisioningStateDR = "Succeeded"
)

func (*ProvisioningStateDR) UnmarshalJSON

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

type RoleDisasterRecovery

type RoleDisasterRecovery string
const (
	RoleDisasterRecoveryPrimary               RoleDisasterRecovery = "Primary"
	RoleDisasterRecoveryPrimaryNotReplicating RoleDisasterRecovery = "PrimaryNotReplicating"
	RoleDisasterRecoverySecondary             RoleDisasterRecovery = "Secondary"
)

func (*RoleDisasterRecovery) UnmarshalJSON

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

type SBAuthorizationRule

type SBAuthorizationRule struct {
	Id         *string                        `json:"id,omitempty"`
	Name       *string                        `json:"name,omitempty"`
	Properties *SBAuthorizationRuleProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData         `json:"systemData,omitempty"`
	Type       *string                        `json:"type,omitempty"`
}

type SBAuthorizationRuleOperationPredicate

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

func (SBAuthorizationRuleOperationPredicate) Matches

type SBAuthorizationRuleProperties

type SBAuthorizationRuleProperties struct {
	Rights []AccessRights `json:"rights"`
}

type UnavailableReason

type UnavailableReason string
const (
	UnavailableReasonInvalidName                           UnavailableReason = "InvalidName"
	UnavailableReasonNameInLockdown                        UnavailableReason = "NameInLockdown"
	UnavailableReasonNameInUse                             UnavailableReason = "NameInUse"
	UnavailableReasonNone                                  UnavailableReason = "None"
	UnavailableReasonSubscriptionIsDisabled                UnavailableReason = "SubscriptionIsDisabled"
	UnavailableReasonTooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription"
)

func (*UnavailableReason) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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