queues

package
v0.20241017.1093842 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/servicebus/2024-01-01/queues Documentation

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

Client Initialization

client := queues.NewQueuesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: QueuesClient.CreateOrUpdate

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

payload := queues.SBQueue{
	// ...
}


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

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

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

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

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

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

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

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

ValidateQueueID checks that 'input' can be parsed as a Queue ID

Types

type CreateOrUpdateOperationResponse

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

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 GetOperationResponse

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

type ListByNamespaceCompleteResult

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

type ListByNamespaceCustomPager

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

type ListByNamespaceOperationOptions

type ListByNamespaceOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListByNamespaceOperationOptions

func DefaultListByNamespaceOperationOptions() ListByNamespaceOperationOptions

func (ListByNamespaceOperationOptions) ToHeaders

func (ListByNamespaceOperationOptions) ToOData

func (ListByNamespaceOperationOptions) ToQuery

type ListByNamespaceOperationResponse

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

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

type QueueId struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	QueueName         string
}

QueueId is a struct representing the Resource ID for a Queue

func NewQueueID

func NewQueueID(subscriptionId string, resourceGroupName string, namespaceName string, queueName string) QueueId

NewQueueID returns a new QueueId struct

func ParseQueueID

func ParseQueueID(input string) (*QueueId, error)

ParseQueueID parses 'input' into a QueueId

func ParseQueueIDInsensitively

func ParseQueueIDInsensitively(input string) (*QueueId, error)

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

func (*QueueId) FromParseResult

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

func (QueueId) ID

func (id QueueId) ID() string

ID returns the formatted Queue ID

func (QueueId) Segments

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

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

func (QueueId) String

func (id QueueId) String() string

String returns a human-readable description of this Queue ID

type QueuesClient

type QueuesClient struct {
	Client *resourcemanager.Client
}

func NewQueuesClientWithBaseURI

func NewQueuesClientWithBaseURI(sdkApi sdkEnv.Api) (*QueuesClient, error)

func (QueuesClient) CreateOrUpdate

func (c QueuesClient) CreateOrUpdate(ctx context.Context, id QueueId, input SBQueue) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (QueuesClient) Delete

func (c QueuesClient) Delete(ctx context.Context, id QueueId) (result DeleteOperationResponse, err error)

Delete ...

func (QueuesClient) Get

func (c QueuesClient) Get(ctx context.Context, id QueueId) (result GetOperationResponse, err error)

Get ...

func (QueuesClient) ListByNamespace

ListByNamespace ...

func (QueuesClient) ListByNamespaceComplete

ListByNamespaceComplete retrieves all the results into a single object

func (QueuesClient) ListByNamespaceCompleteMatchingPredicate

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

ListByNamespaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type SBQueue

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

type SBQueueOperationPredicate

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

func (SBQueueOperationPredicate) Matches

func (p SBQueueOperationPredicate) Matches(input SBQueue) bool

type SBQueueProperties

type SBQueueProperties struct {
	AccessedAt                          *string              `json:"accessedAt,omitempty"`
	AutoDeleteOnIdle                    *string              `json:"autoDeleteOnIdle,omitempty"`
	CountDetails                        *MessageCountDetails `json:"countDetails,omitempty"`
	CreatedAt                           *string              `json:"createdAt,omitempty"`
	DeadLetteringOnMessageExpiration    *bool                `json:"deadLetteringOnMessageExpiration,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"`
	ForwardDeadLetteredMessagesTo       *string              `json:"forwardDeadLetteredMessagesTo,omitempty"`
	ForwardTo                           *string              `json:"forwardTo,omitempty"`
	LockDuration                        *string              `json:"lockDuration,omitempty"`
	MaxDeliveryCount                    *int64               `json:"maxDeliveryCount,omitempty"`
	MaxMessageSizeInKilobytes           *int64               `json:"maxMessageSizeInKilobytes,omitempty"`
	MaxSizeInMegabytes                  *int64               `json:"maxSizeInMegabytes,omitempty"`
	MessageCount                        *int64               `json:"messageCount,omitempty"`
	RequiresDuplicateDetection          *bool                `json:"requiresDuplicateDetection,omitempty"`
	RequiresSession                     *bool                `json:"requiresSession,omitempty"`
	SizeInBytes                         *int64               `json:"sizeInBytes,omitempty"`
	Status                              *EntityStatus        `json:"status,omitempty"`
	UpdatedAt                           *string              `json:"updatedAt,omitempty"`
}

func (*SBQueueProperties) GetAccessedAtAsTime

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

func (*SBQueueProperties) GetCreatedAtAsTime

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

func (*SBQueueProperties) GetUpdatedAtAsTime

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

func (*SBQueueProperties) SetAccessedAtAsTime

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

func (*SBQueueProperties) SetCreatedAtAsTime

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

func (*SBQueueProperties) SetUpdatedAtAsTime

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

Jump to

Keyboard shortcuts

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