topics

package
v0.20231108.1171627 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

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

Client Initialization

client := topics.NewTopicsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: TopicsClient.CreateOrUpdate

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

payload := topics.SBTopic{
	// ...
}


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

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

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

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

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: TopicsClient.ListByNamespace

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

// alternatively `client.ListByNamespace(ctx, id, topics.DefaultListByNamespaceOperationOptions())` can be used to do batched pagination
items, err := client.ListByNamespaceComplete(ctx, id, topics.DefaultListByNamespaceOperationOptions())
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 PossibleValuesForEntityStatus

func PossibleValuesForEntityStatus() []string

func ValidateNamespaceID

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

ValidateNamespaceID checks that 'input' can be parsed as a Namespace 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 CreateOrUpdateOperationResponse

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

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 added in v0.20230406.1124617

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

type GetOperationResponse

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

type ListByNamespaceCompleteResult

type ListByNamespaceCompleteResult struct {
	Items []SBTopic
}

type ListByNamespaceOperationOptions

type ListByNamespaceOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListByNamespaceOperationOptions

func DefaultListByNamespaceOperationOptions() ListByNamespaceOperationOptions

func (ListByNamespaceOperationOptions) ToHeaders added in v0.20230307.1085324

func (ListByNamespaceOperationOptions) ToOData added in v0.20230307.1085324

func (ListByNamespaceOperationOptions) ToQuery added in v0.20230307.1085324

type ListByNamespaceOperationResponse

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

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 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 SBTopic

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

type SBTopicOperationPredicate

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

func (SBTopicOperationPredicate) Matches

func (p SBTopicOperationPredicate) Matches(input SBTopic) bool

type SBTopicProperties

type SBTopicProperties struct {
	AccessedAt                          *string              `json:"accessedAt,omitempty"`
	AutoDeleteOnIdle                    *string              `json:"autoDeleteOnIdle,omitempty"`
	CountDetails                        *MessageCountDetails `json:"countDetails,omitempty"`
	CreatedAt                           *string              `json:"createdAt,omitempty"`
	DefaultMessageTimeToLive            *string              `json:"defaultMessageTimeToLive,omitempty"`
	DuplicateDetectionHistoryTimeWindow *string              `json:"duplicateDetectionHistoryTimeWindow,omitempty"`
	EnableBatchedOperations             *bool                `json:"enableBatchedOperations,omitempty"`
	EnableExpress                       *bool                `json:"enableExpress,omitempty"`
	EnablePartitioning                  *bool                `json:"enablePartitioning,omitempty"`
	MaxMessageSizeInKilobytes           *int64               `json:"maxMessageSizeInKilobytes,omitempty"`
	MaxSizeInMegabytes                  *int64               `json:"maxSizeInMegabytes,omitempty"`
	RequiresDuplicateDetection          *bool                `json:"requiresDuplicateDetection,omitempty"`
	SizeInBytes                         *int64               `json:"sizeInBytes,omitempty"`
	Status                              *EntityStatus        `json:"status,omitempty"`
	SubscriptionCount                   *int64               `json:"subscriptionCount,omitempty"`
	SupportOrdering                     *bool                `json:"supportOrdering,omitempty"`
	UpdatedAt                           *string              `json:"updatedAt,omitempty"`
}

func (*SBTopicProperties) GetAccessedAtAsTime

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

func (*SBTopicProperties) GetCreatedAtAsTime

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

func (*SBTopicProperties) GetUpdatedAtAsTime

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

func (*SBTopicProperties) SetAccessedAtAsTime

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

func (*SBTopicProperties) SetCreatedAtAsTime

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

func (*SBTopicProperties) SetUpdatedAtAsTime

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

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

type TopicsClient

type TopicsClient struct {
	Client *resourcemanager.Client
}

func NewTopicsClientWithBaseURI

func NewTopicsClientWithBaseURI(sdkApi sdkEnv.Api) (*TopicsClient, error)

func (TopicsClient) CreateOrUpdate

func (c TopicsClient) CreateOrUpdate(ctx context.Context, id TopicId, input SBTopic) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (TopicsClient) Delete

func (c TopicsClient) Delete(ctx context.Context, id TopicId) (result DeleteOperationResponse, err error)

Delete ...

func (TopicsClient) Get

func (c TopicsClient) Get(ctx context.Context, id TopicId) (result GetOperationResponse, err error)

Get ...

func (TopicsClient) ListByNamespace

ListByNamespace ...

func (TopicsClient) ListByNamespaceComplete

ListByNamespaceComplete retrieves all the results into a single object

func (TopicsClient) ListByNamespaceCompleteMatchingPredicate

func (c TopicsClient) ListByNamespaceCompleteMatchingPredicate(ctx context.Context, id NamespaceId, options ListByNamespaceOperationOptions, predicate SBTopicOperationPredicate) (result ListByNamespaceCompleteResult, err error)

ListByNamespaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

Jump to

Keyboard shortcuts

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