namespacesauthorizationrule

package
v0.20230417.1132703 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2021-11-01/namespacesauthorizationrule Documentation

The namespacesauthorizationrule SDK allows for interaction with the Azure Resource Manager Service servicebus (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/servicebus/2021-11-01/namespacesauthorizationrule"

Client Initialization

client := namespacesauthorizationrule.NewNamespacesAuthorizationRuleClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: NamespacesAuthorizationRuleClient.NamespacesCreateOrUpdateAuthorizationRule

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

payload := namespacesauthorizationrule.SBAuthorizationRule{
	// ...
}


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

Example Usage: NamespacesAuthorizationRuleClient.NamespacesDeleteAuthorizationRule

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

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

Example Usage: NamespacesAuthorizationRuleClient.NamespacesGetAuthorizationRule

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

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

Example Usage: NamespacesAuthorizationRuleClient.NamespacesListAuthorizationRules

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

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

Example Usage: NamespacesAuthorizationRuleClient.NamespacesListKeys

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

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

Example Usage: NamespacesAuthorizationRuleClient.NamespacesRegenerateKeys

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

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


read, err := client.NamespacesRegenerateKeys(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 ValidateAuthorizationRuleID

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

ValidateAuthorizationRuleID checks that 'input' can be parsed as a Authorization Rule 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 added in v0.20230406.1124617

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

type AuthorizationRuleId

type AuthorizationRuleId struct {
	SubscriptionId        string
	ResourceGroupName     string
	NamespaceName         string
	AuthorizationRuleName string
}

AuthorizationRuleId is a struct representing the Resource ID for a Authorization Rule

func NewAuthorizationRuleID

func NewAuthorizationRuleID(subscriptionId string, resourceGroupName string, namespaceName string, authorizationRuleName string) AuthorizationRuleId

NewAuthorizationRuleID returns a new AuthorizationRuleId struct

func ParseAuthorizationRuleID

func ParseAuthorizationRuleID(input string) (*AuthorizationRuleId, error)

ParseAuthorizationRuleID parses 'input' into a AuthorizationRuleId

func ParseAuthorizationRuleIDInsensitively

func ParseAuthorizationRuleIDInsensitively(input string) (*AuthorizationRuleId, error)

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

func (AuthorizationRuleId) ID

func (id AuthorizationRuleId) ID() string

ID returns the formatted Authorization Rule ID

func (AuthorizationRuleId) Segments

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

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

func (AuthorizationRuleId) String

func (id AuthorizationRuleId) String() string

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

type KeyType

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

func (*KeyType) UnmarshalJSON added in v0.20230406.1124617

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

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) 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 NamespacesAuthorizationRuleClient

type NamespacesAuthorizationRuleClient struct {
	Client *resourcemanager.Client
}

func NewNamespacesAuthorizationRuleClientWithBaseURI

func NewNamespacesAuthorizationRuleClientWithBaseURI(api environments.Api) (*NamespacesAuthorizationRuleClient, error)

func (NamespacesAuthorizationRuleClient) NamespacesCreateOrUpdateAuthorizationRule

NamespacesCreateOrUpdateAuthorizationRule ...

func (NamespacesAuthorizationRuleClient) NamespacesDeleteAuthorizationRule

NamespacesDeleteAuthorizationRule ...

func (NamespacesAuthorizationRuleClient) NamespacesGetAuthorizationRule

NamespacesGetAuthorizationRule ...

func (NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRules

NamespacesListAuthorizationRules ...

func (NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRulesComplete

NamespacesListAuthorizationRulesComplete retrieves all the results into a single object

func (NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRulesCompleteMatchingPredicate

func (c NamespacesAuthorizationRuleClient) NamespacesListAuthorizationRulesCompleteMatchingPredicate(ctx context.Context, id NamespaceId, predicate SBAuthorizationRuleOperationPredicate) (result NamespacesListAuthorizationRulesCompleteResult, err error)

NamespacesListAuthorizationRulesCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (NamespacesAuthorizationRuleClient) NamespacesListKeys

NamespacesListKeys ...

func (NamespacesAuthorizationRuleClient) NamespacesRegenerateKeys

NamespacesRegenerateKeys ...

type NamespacesCreateOrUpdateAuthorizationRuleOperationResponse

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

type NamespacesDeleteAuthorizationRuleOperationResponse

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

type NamespacesGetAuthorizationRuleOperationResponse

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

type NamespacesListAuthorizationRulesCompleteResult

type NamespacesListAuthorizationRulesCompleteResult struct {
	Items []SBAuthorizationRule
}

type NamespacesListAuthorizationRulesOperationResponse

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

type NamespacesListKeysOperationResponse

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

type NamespacesRegenerateKeysOperationResponse

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

type RegenerateAccessKeyParameters

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

type SBAuthorizationRule

type SBAuthorizationRule struct {
	Id         *string                        `json:"id,omitempty"`
	Location   *string                        `json:"location,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
	Location *string
	Name     *string
	Type     *string
}

func (SBAuthorizationRuleOperationPredicate) Matches

type SBAuthorizationRuleProperties

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

Jump to

Keyboard shortcuts

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