subscriptions

package
v0.20240209.1120443 Latest Latest
Warning

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

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

README

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

The subscriptions SDK allows for interaction with the Azure Resource Manager Service 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/subscriptions"

Client Initialization

client := subscriptions.NewSubscriptionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: SubscriptionsClient.CreateOrUpdate

ctx := context.TODO()
id := subscriptions.NewSubscriptions2ID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "subscriptionValue")

payload := subscriptions.SBSubscription{
	// ...
}


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: SubscriptionsClient.Delete

ctx := context.TODO()
id := subscriptions.NewSubscriptions2ID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "subscriptionValue")

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: SubscriptionsClient.Get

ctx := context.TODO()
id := subscriptions.NewSubscriptions2ID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "subscriptionValue")

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: SubscriptionsClient.ListByTopic

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

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

Example Usage: SubscriptionsClient.RulesGet

ctx := context.TODO()
id := subscriptions.NewRuleID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "topicValue", "subscriptionValue", "ruleValue")

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

func PossibleValuesForEntityStatus() []string

func PossibleValuesForFilterType

func PossibleValuesForFilterType() []string

func ValidateRuleID

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

ValidateRuleID checks that 'input' can be parsed as a Rule ID

func ValidateSubscriptions2ID

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

ValidateSubscriptions2ID checks that 'input' can be parsed as a Subscriptions 2 ID

func ValidateTopicID

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

ValidateTopicID checks that 'input' can be parsed as a Topic ID

Types

type Action

type Action struct {
	CompatibilityLevel    *int64  `json:"compatibilityLevel,omitempty"`
	RequiresPreprocessing *bool   `json:"requiresPreprocessing,omitempty"`
	SqlExpression         *string `json:"sqlExpression,omitempty"`
}

type CorrelationFilter

type CorrelationFilter struct {
	ContentType           *string            `json:"contentType,omitempty"`
	CorrelationId         *string            `json:"correlationId,omitempty"`
	Label                 *string            `json:"label,omitempty"`
	MessageId             *string            `json:"messageId,omitempty"`
	Properties            *map[string]string `json:"properties,omitempty"`
	ReplyTo               *string            `json:"replyTo,omitempty"`
	ReplyToSessionId      *string            `json:"replyToSessionId,omitempty"`
	RequiresPreprocessing *bool              `json:"requiresPreprocessing,omitempty"`
	SessionId             *string            `json:"sessionId,omitempty"`
	To                    *string            `json:"to,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type EntityStatus

type EntityStatus string
const (
	EntityStatusActive          EntityStatus = "Active"
	EntityStatusCreating        EntityStatus = "Creating"
	EntityStatusDeleting        EntityStatus = "Deleting"
	EntityStatusDisabled        EntityStatus = "Disabled"
	EntityStatusReceiveDisabled EntityStatus = "ReceiveDisabled"
	EntityStatusRenaming        EntityStatus = "Renaming"
	EntityStatusRestoring       EntityStatus = "Restoring"
	EntityStatusSendDisabled    EntityStatus = "SendDisabled"
	EntityStatusUnknown         EntityStatus = "Unknown"
)

func (*EntityStatus) UnmarshalJSON

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

type FilterType

type FilterType string
const (
	FilterTypeCorrelationFilter FilterType = "CorrelationFilter"
	FilterTypeSqlFilter         FilterType = "SqlFilter"
)

func (*FilterType) UnmarshalJSON

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

type GetOperationResponse

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

type ListByTopicCompleteResult

type ListByTopicCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SBSubscription
}

type ListByTopicOperationOptions

type ListByTopicOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListByTopicOperationOptions

func DefaultListByTopicOperationOptions() ListByTopicOperationOptions

func (ListByTopicOperationOptions) ToHeaders

func (ListByTopicOperationOptions) ToOData

func (ListByTopicOperationOptions) ToQuery

type ListByTopicOperationResponse

type ListByTopicOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SBSubscription
}

type MessageCountDetails

type MessageCountDetails struct {
	ActiveMessageCount             *int64 `json:"activeMessageCount,omitempty"`
	DeadLetterMessageCount         *int64 `json:"deadLetterMessageCount,omitempty"`
	ScheduledMessageCount          *int64 `json:"scheduledMessageCount,omitempty"`
	TransferDeadLetterMessageCount *int64 `json:"transferDeadLetterMessageCount,omitempty"`
	TransferMessageCount           *int64 `json:"transferMessageCount,omitempty"`
}

type Rule

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

type RuleId

type RuleId struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	TopicName         string
	SubscriptionName  string
	RuleName          string
}

RuleId is a struct representing the Resource ID for a Rule

func NewRuleID

func NewRuleID(subscriptionId string, resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) RuleId

NewRuleID returns a new RuleId struct

func ParseRuleID

func ParseRuleID(input string) (*RuleId, error)

ParseRuleID parses 'input' into a RuleId

func ParseRuleIDInsensitively

func ParseRuleIDInsensitively(input string) (*RuleId, error)

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

func (*RuleId) FromParseResult

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

func (RuleId) ID

func (id RuleId) ID() string

ID returns the formatted Rule ID

func (RuleId) Segments

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

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

func (RuleId) String

func (id RuleId) String() string

String returns a human-readable description of this Rule ID

type Ruleproperties

type Ruleproperties struct {
	Action            *Action            `json:"action,omitempty"`
	CorrelationFilter *CorrelationFilter `json:"correlationFilter,omitempty"`
	FilterType        *FilterType        `json:"filterType,omitempty"`
	SqlFilter         *SqlFilter         `json:"sqlFilter,omitempty"`
}

type RulesGetOperationResponse

type RulesGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Rule
}

type SBClientAffineProperties

type SBClientAffineProperties struct {
	ClientId  *string `json:"clientId,omitempty"`
	IsDurable *bool   `json:"isDurable,omitempty"`
	IsShared  *bool   `json:"isShared,omitempty"`
}

type SBSubscription

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

type SBSubscriptionOperationPredicate

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

func (SBSubscriptionOperationPredicate) Matches

type SBSubscriptionProperties

type SBSubscriptionProperties struct {
	AccessedAt                                *string                   `json:"accessedAt,omitempty"`
	AutoDeleteOnIdle                          *string                   `json:"autoDeleteOnIdle,omitempty"`
	ClientAffineProperties                    *SBClientAffineProperties `json:"clientAffineProperties,omitempty"`
	CountDetails                              *MessageCountDetails      `json:"countDetails,omitempty"`
	CreatedAt                                 *string                   `json:"createdAt,omitempty"`
	DeadLetteringOnFilterEvaluationExceptions *bool                     `json:"deadLetteringOnFilterEvaluationExceptions,omitempty"`
	DeadLetteringOnMessageExpiration          *bool                     `json:"deadLetteringOnMessageExpiration,omitempty"`
	DefaultMessageTimeToLive                  *string                   `json:"defaultMessageTimeToLive,omitempty"`
	DuplicateDetectionHistoryTimeWindow       *string                   `json:"duplicateDetectionHistoryTimeWindow,omitempty"`
	EnableBatchedOperations                   *bool                     `json:"enableBatchedOperations,omitempty"`
	ForwardDeadLetteredMessagesTo             *string                   `json:"forwardDeadLetteredMessagesTo,omitempty"`
	ForwardTo                                 *string                   `json:"forwardTo,omitempty"`
	IsClientAffine                            *bool                     `json:"isClientAffine,omitempty"`
	LockDuration                              *string                   `json:"lockDuration,omitempty"`
	MaxDeliveryCount                          *int64                    `json:"maxDeliveryCount,omitempty"`
	MessageCount                              *int64                    `json:"messageCount,omitempty"`
	RequiresSession                           *bool                     `json:"requiresSession,omitempty"`
	Status                                    *EntityStatus             `json:"status,omitempty"`
	UpdatedAt                                 *string                   `json:"updatedAt,omitempty"`
}

func (*SBSubscriptionProperties) GetAccessedAtAsTime

func (o *SBSubscriptionProperties) GetAccessedAtAsTime() (*time.Time, error)

func (*SBSubscriptionProperties) GetCreatedAtAsTime

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

func (*SBSubscriptionProperties) GetUpdatedAtAsTime

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

func (*SBSubscriptionProperties) SetAccessedAtAsTime

func (o *SBSubscriptionProperties) SetAccessedAtAsTime(input time.Time)

func (*SBSubscriptionProperties) SetCreatedAtAsTime

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

func (*SBSubscriptionProperties) SetUpdatedAtAsTime

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

type SqlFilter

type SqlFilter struct {
	CompatibilityLevel    *int64  `json:"compatibilityLevel,omitempty"`
	RequiresPreprocessing *bool   `json:"requiresPreprocessing,omitempty"`
	SqlExpression         *string `json:"sqlExpression,omitempty"`
}

type Subscriptions2Id

type Subscriptions2Id struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	TopicName         string
	SubscriptionName  string
}

Subscriptions2Id is a struct representing the Resource ID for a Subscriptions 2

func NewSubscriptions2ID

func NewSubscriptions2ID(subscriptionId string, resourceGroupName string, namespaceName string, topicName string, subscriptionName string) Subscriptions2Id

NewSubscriptions2ID returns a new Subscriptions2Id struct

func ParseSubscriptions2ID

func ParseSubscriptions2ID(input string) (*Subscriptions2Id, error)

ParseSubscriptions2ID parses 'input' into a Subscriptions2Id

func ParseSubscriptions2IDInsensitively

func ParseSubscriptions2IDInsensitively(input string) (*Subscriptions2Id, error)

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

func (*Subscriptions2Id) FromParseResult

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

func (Subscriptions2Id) ID

func (id Subscriptions2Id) ID() string

ID returns the formatted Subscriptions 2 ID

func (Subscriptions2Id) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Subscriptions 2 ID

func (Subscriptions2Id) String

func (id Subscriptions2Id) String() string

String returns a human-readable description of this Subscriptions 2 ID

type SubscriptionsClient

type SubscriptionsClient struct {
	Client *resourcemanager.Client
}

func NewSubscriptionsClientWithBaseURI

func NewSubscriptionsClientWithBaseURI(sdkApi sdkEnv.Api) (*SubscriptionsClient, error)

func (SubscriptionsClient) CreateOrUpdate

CreateOrUpdate ...

func (SubscriptionsClient) Delete

Delete ...

func (SubscriptionsClient) Get

Get ...

func (SubscriptionsClient) ListByTopic

ListByTopic ...

func (SubscriptionsClient) ListByTopicComplete

ListByTopicComplete retrieves all the results into a single object

func (SubscriptionsClient) ListByTopicCompleteMatchingPredicate

func (c SubscriptionsClient) ListByTopicCompleteMatchingPredicate(ctx context.Context, id TopicId, options ListByTopicOperationOptions, predicate SBSubscriptionOperationPredicate) (result ListByTopicCompleteResult, err error)

ListByTopicCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (SubscriptionsClient) RulesGet

func (c SubscriptionsClient) RulesGet(ctx context.Context, id RuleId) (result RulesGetOperationResponse, err error)

RulesGet ...

type TopicId

type TopicId struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	TopicName         string
}

TopicId is a struct representing the Resource ID for a Topic

func NewTopicID

func NewTopicID(subscriptionId string, resourceGroupName string, namespaceName string, topicName string) TopicId

NewTopicID returns a new TopicId struct

func ParseTopicID

func ParseTopicID(input string) (*TopicId, error)

ParseTopicID parses 'input' into a TopicId

func ParseTopicIDInsensitively

func ParseTopicIDInsensitively(input string) (*TopicId, error)

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

func (*TopicId) FromParseResult

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

func (TopicId) ID

func (id TopicId) ID() string

ID returns the formatted Topic ID

func (TopicId) Segments

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

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

func (TopicId) String

func (id TopicId) String() string

String returns a human-readable description of this Topic ID

Jump to

Keyboard shortcuts

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