consumergroups

package
v0.20240222.1164640 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2024-01-01/consumergroups Documentation

The consumergroups SDK allows for interaction with the Azure Resource Manager Service eventhub (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/eventhub/2024-01-01/consumergroups"

Client Initialization

client := consumergroups.NewConsumerGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ConsumerGroupsClient.CreateOrUpdate

ctx := context.TODO()
id := consumergroups.NewConsumerGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "eventhubValue", "consumerGroupValue")

payload := consumergroups.ConsumerGroup{
	// ...
}


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

ctx := context.TODO()
id := consumergroups.NewConsumerGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "eventhubValue", "consumerGroupValue")

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

ctx := context.TODO()
id := consumergroups.NewConsumerGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "namespaceValue", "eventhubValue", "consumerGroupValue")

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: ConsumerGroupsClient.ListByEventHub

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

// alternatively `client.ListByEventHub(ctx, id, consumergroups.DefaultListByEventHubOperationOptions())` can be used to do batched pagination
items, err := client.ListByEventHubComplete(ctx, id, consumergroups.DefaultListByEventHubOperationOptions())
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 ValidateConsumerGroupID

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

ValidateConsumerGroupID checks that 'input' can be parsed as a Consumer Group ID

func ValidateEventhubID

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

ValidateEventhubID checks that 'input' can be parsed as a Eventhub ID

Types

type ConsumerGroup

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

type ConsumerGroupId

type ConsumerGroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	EventhubName      string
	ConsumerGroupName string
}

ConsumerGroupId is a struct representing the Resource ID for a Consumer Group

func NewConsumerGroupID

func NewConsumerGroupID(subscriptionId string, resourceGroupName string, namespaceName string, eventhubName string, consumerGroupName string) ConsumerGroupId

NewConsumerGroupID returns a new ConsumerGroupId struct

func ParseConsumerGroupID

func ParseConsumerGroupID(input string) (*ConsumerGroupId, error)

ParseConsumerGroupID parses 'input' into a ConsumerGroupId

func ParseConsumerGroupIDInsensitively

func ParseConsumerGroupIDInsensitively(input string) (*ConsumerGroupId, error)

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

func (*ConsumerGroupId) FromParseResult

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

func (ConsumerGroupId) ID

func (id ConsumerGroupId) ID() string

ID returns the formatted Consumer Group ID

func (ConsumerGroupId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Consumer Group ID

func (ConsumerGroupId) String

func (id ConsumerGroupId) String() string

String returns a human-readable description of this Consumer Group ID

type ConsumerGroupOperationPredicate

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

func (ConsumerGroupOperationPredicate) Matches

type ConsumerGroupProperties

type ConsumerGroupProperties struct {
	CreatedAt    *string `json:"createdAt,omitempty"`
	UpdatedAt    *string `json:"updatedAt,omitempty"`
	UserMetadata *string `json:"userMetadata,omitempty"`
}

func (*ConsumerGroupProperties) GetCreatedAtAsTime

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

func (*ConsumerGroupProperties) GetUpdatedAtAsTime

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

func (*ConsumerGroupProperties) SetCreatedAtAsTime

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

func (*ConsumerGroupProperties) SetUpdatedAtAsTime

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

type ConsumerGroupsClient

type ConsumerGroupsClient struct {
	Client *resourcemanager.Client
}

func NewConsumerGroupsClientWithBaseURI

func NewConsumerGroupsClientWithBaseURI(sdkApi sdkEnv.Api) (*ConsumerGroupsClient, error)

func (ConsumerGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (ConsumerGroupsClient) Delete

Delete ...

func (ConsumerGroupsClient) Get

Get ...

func (ConsumerGroupsClient) ListByEventHub

ListByEventHub ...

func (ConsumerGroupsClient) ListByEventHubComplete

ListByEventHubComplete retrieves all the results into a single object

func (ConsumerGroupsClient) ListByEventHubCompleteMatchingPredicate

func (c ConsumerGroupsClient) ListByEventHubCompleteMatchingPredicate(ctx context.Context, id EventhubId, options ListByEventHubOperationOptions, predicate ConsumerGroupOperationPredicate) (result ListByEventHubCompleteResult, err error)

ListByEventHubCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type EventhubId

type EventhubId struct {
	SubscriptionId    string
	ResourceGroupName string
	NamespaceName     string
	EventhubName      string
}

EventhubId is a struct representing the Resource ID for a Eventhub

func NewEventhubID

func NewEventhubID(subscriptionId string, resourceGroupName string, namespaceName string, eventhubName string) EventhubId

NewEventhubID returns a new EventhubId struct

func ParseEventhubID

func ParseEventhubID(input string) (*EventhubId, error)

ParseEventhubID parses 'input' into a EventhubId

func ParseEventhubIDInsensitively

func ParseEventhubIDInsensitively(input string) (*EventhubId, error)

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

func (*EventhubId) FromParseResult

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

func (EventhubId) ID

func (id EventhubId) ID() string

ID returns the formatted Eventhub ID

func (EventhubId) Segments

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

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

func (EventhubId) String

func (id EventhubId) String() string

String returns a human-readable description of this Eventhub ID

type GetOperationResponse

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

type ListByEventHubCompleteResult

type ListByEventHubCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ConsumerGroup
}

type ListByEventHubOperationOptions

type ListByEventHubOperationOptions struct {
	Skip *int64
	Top  *int64
}

func DefaultListByEventHubOperationOptions

func DefaultListByEventHubOperationOptions() ListByEventHubOperationOptions

func (ListByEventHubOperationOptions) ToHeaders

func (ListByEventHubOperationOptions) ToOData

func (ListByEventHubOperationOptions) ToQuery

type ListByEventHubOperationResponse

type ListByEventHubOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ConsumerGroup
}

Jump to

Keyboard shortcuts

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