hybridconnections

package
v0.20240226.1173038 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/relay/2021-11-01/hybridconnections Documentation

The hybridconnections SDK allows for interaction with the Azure Resource Manager Service relay (API Version 2021-11-01).

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/relay/2021-11-01/hybridconnections"

Client Initialization

client := hybridconnections.NewHybridConnectionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HybridConnectionsClient.CreateOrUpdate

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue")

payload := hybridconnections.HybridConnection{
	// ...
}


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: HybridConnectionsClient.CreateOrUpdateAuthorizationRule

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue")

payload := hybridconnections.AuthorizationRule{
	// ...
}


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

Example Usage: HybridConnectionsClient.Delete

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue")

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: HybridConnectionsClient.DeleteAuthorizationRule

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue")

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

Example Usage: HybridConnectionsClient.Get

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue")

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

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue")

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: HybridConnectionsClient.ListAuthorizationRules

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue")

// 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: HybridConnectionsClient.ListByNamespace

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

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

Example Usage: HybridConnectionsClient.ListKeys

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue")

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
}

Example Usage: HybridConnectionsClient.RegenerateKeys

ctx := context.TODO()
id := hybridconnections.NewHybridConnectionAuthorizationRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "hybridConnectionValue", "authorizationRuleValue")

payload := hybridconnections.RegenerateAccessKeyParameters{
	// ...
}


read, err := client.RegenerateKeys(ctx, id, payload)
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 PossibleValuesForKeyType

func PossibleValuesForKeyType() []string

func ValidateHybridConnectionAuthorizationRuleID

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

ValidateHybridConnectionAuthorizationRuleID checks that 'input' can be parsed as a Hybrid Connection Authorization Rule ID

func ValidateHybridConnectionID

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

ValidateHybridConnectionID checks that 'input' can be parsed as a Hybrid Connection 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 {
	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 AuthorizationRule

type AuthorizationRule struct {
	Id         *string                      `json:"id,omitempty"`
	Location   *string                      `json:"location,omitempty"`
	Name       *string                      `json:"name,omitempty"`
	Properties *AuthorizationRuleProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData       `json:"systemData,omitempty"`
	Type       *string                      `json:"type,omitempty"`
}

type AuthorizationRuleOperationPredicate

type AuthorizationRuleOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (AuthorizationRuleOperationPredicate) Matches

type AuthorizationRuleProperties

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

type CreateOrUpdateAuthorizationRuleOperationResponse

type CreateOrUpdateAuthorizationRuleOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AuthorizationRule
}

type CreateOrUpdateOperationResponse

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

type DeleteAuthorizationRuleOperationResponse

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

type DeleteOperationResponse

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

type GetAuthorizationRuleOperationResponse

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

type GetOperationResponse

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

type HybridConnection

type HybridConnection struct {
	Id         *string                     `json:"id,omitempty"`
	Location   *string                     `json:"location,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *HybridConnectionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData      `json:"systemData,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type HybridConnectionAuthorizationRuleId

type HybridConnectionAuthorizationRuleId struct {
	SubscriptionId        string
	ResourceGroupName     string
	NamespaceName         string
	HybridConnectionName  string
	AuthorizationRuleName string
}

HybridConnectionAuthorizationRuleId is a struct representing the Resource ID for a Hybrid Connection Authorization Rule

func NewHybridConnectionAuthorizationRuleID

func NewHybridConnectionAuthorizationRuleID(subscriptionId string, resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) HybridConnectionAuthorizationRuleId

NewHybridConnectionAuthorizationRuleID returns a new HybridConnectionAuthorizationRuleId struct

func ParseHybridConnectionAuthorizationRuleID

func ParseHybridConnectionAuthorizationRuleID(input string) (*HybridConnectionAuthorizationRuleId, error)

ParseHybridConnectionAuthorizationRuleID parses 'input' into a HybridConnectionAuthorizationRuleId

func ParseHybridConnectionAuthorizationRuleIDInsensitively

func ParseHybridConnectionAuthorizationRuleIDInsensitively(input string) (*HybridConnectionAuthorizationRuleId, error)

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

func (*HybridConnectionAuthorizationRuleId) FromParseResult

func (HybridConnectionAuthorizationRuleId) ID

ID returns the formatted Hybrid Connection Authorization Rule ID

func (HybridConnectionAuthorizationRuleId) Segments

Segments returns a slice of Resource ID Segments which comprise this Hybrid Connection Authorization Rule ID

func (HybridConnectionAuthorizationRuleId) String

String returns a human-readable description of this Hybrid Connection Authorization Rule ID

type HybridConnectionId

type HybridConnectionId struct {
	SubscriptionId       string
	ResourceGroupName    string
	NamespaceName        string
	HybridConnectionName string
}

HybridConnectionId is a struct representing the Resource ID for a Hybrid Connection

func NewHybridConnectionID

func NewHybridConnectionID(subscriptionId string, resourceGroupName string, namespaceName string, hybridConnectionName string) HybridConnectionId

NewHybridConnectionID returns a new HybridConnectionId struct

func ParseHybridConnectionID

func ParseHybridConnectionID(input string) (*HybridConnectionId, error)

ParseHybridConnectionID parses 'input' into a HybridConnectionId

func ParseHybridConnectionIDInsensitively

func ParseHybridConnectionIDInsensitively(input string) (*HybridConnectionId, error)

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

func (*HybridConnectionId) FromParseResult

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

func (HybridConnectionId) ID

func (id HybridConnectionId) ID() string

ID returns the formatted Hybrid Connection ID

func (HybridConnectionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Hybrid Connection ID

func (HybridConnectionId) String

func (id HybridConnectionId) String() string

String returns a human-readable description of this Hybrid Connection ID

type HybridConnectionOperationPredicate

type HybridConnectionOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (HybridConnectionOperationPredicate) Matches

type HybridConnectionProperties

type HybridConnectionProperties struct {
	CreatedAt                   *string `json:"createdAt,omitempty"`
	ListenerCount               *int64  `json:"listenerCount,omitempty"`
	RequiresClientAuthorization *bool   `json:"requiresClientAuthorization,omitempty"`
	UpdatedAt                   *string `json:"updatedAt,omitempty"`
	UserMetadata                *string `json:"userMetadata,omitempty"`
}

func (*HybridConnectionProperties) GetCreatedAtAsTime

func (o *HybridConnectionProperties) GetCreatedAtAsTime() (*time.Time, error)

func (*HybridConnectionProperties) GetUpdatedAtAsTime

func (o *HybridConnectionProperties) GetUpdatedAtAsTime() (*time.Time, error)

func (*HybridConnectionProperties) SetCreatedAtAsTime

func (o *HybridConnectionProperties) SetCreatedAtAsTime(input time.Time)

func (*HybridConnectionProperties) SetUpdatedAtAsTime

func (o *HybridConnectionProperties) SetUpdatedAtAsTime(input time.Time)

type HybridConnectionsClient

type HybridConnectionsClient struct {
	Client *resourcemanager.Client
}

func NewHybridConnectionsClientWithBaseURI

func NewHybridConnectionsClientWithBaseURI(sdkApi sdkEnv.Api) (*HybridConnectionsClient, error)

func (HybridConnectionsClient) CreateOrUpdate

CreateOrUpdate ...

func (HybridConnectionsClient) CreateOrUpdateAuthorizationRule

CreateOrUpdateAuthorizationRule ...

func (HybridConnectionsClient) Delete

Delete ...

func (HybridConnectionsClient) DeleteAuthorizationRule

DeleteAuthorizationRule ...

func (HybridConnectionsClient) Get

Get ...

func (HybridConnectionsClient) GetAuthorizationRule

GetAuthorizationRule ...

func (HybridConnectionsClient) ListAuthorizationRules

ListAuthorizationRules ...

func (HybridConnectionsClient) ListAuthorizationRulesComplete

ListAuthorizationRulesComplete retrieves all the results into a single object

func (HybridConnectionsClient) ListAuthorizationRulesCompleteMatchingPredicate

func (c HybridConnectionsClient) ListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id HybridConnectionId, predicate AuthorizationRuleOperationPredicate) (result ListAuthorizationRulesCompleteResult, err error)

ListAuthorizationRulesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HybridConnectionsClient) ListByNamespace

ListByNamespace ...

func (HybridConnectionsClient) ListByNamespaceComplete

ListByNamespaceComplete retrieves all the results into a single object

func (HybridConnectionsClient) ListByNamespaceCompleteMatchingPredicate

func (c HybridConnectionsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate HybridConnectionOperationPredicate) (result ListByNamespaceCompleteResult, err error)

ListByNamespaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HybridConnectionsClient) ListKeys

ListKeys ...

func (HybridConnectionsClient) RegenerateKeys

RegenerateKeys ...

type KeyType

type KeyType string
const (
	KeyTypePrimaryKey   KeyType = "PrimaryKey"
	KeyTypeSecondaryKey KeyType = "SecondaryKey"
)

func (*KeyType) UnmarshalJSON

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

type ListAuthorizationRulesCompleteResult

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

type ListAuthorizationRulesOperationResponse

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

type ListByNamespaceCompleteResult

type ListByNamespaceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []HybridConnection
}

type ListByNamespaceOperationResponse

type ListByNamespaceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]HybridConnection
}

type ListKeysOperationResponse

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

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 RegenerateAccessKeyParameters

type RegenerateAccessKeyParameters struct {
	Key     *string `json:"key,omitempty"`
	KeyType KeyType `json:"keyType"`
}

type RegenerateKeysOperationResponse

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

Jump to

Keyboard shortcuts

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