eventhubs

package
v0.20240521.1173452 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/eventhub/2022-01-01-preview/eventhubs Documentation

The eventhubs SDK allows for interaction with the Azure Resource Manager Service eventhub (API Version 2022-01-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/eventhub/2022-01-01-preview/eventhubs"

Client Initialization

client := eventhubs.NewEventHubsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: EventHubsClient.CreateOrUpdate

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

payload := eventhubs.Eventhub{
	// ...
}


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

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

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: EventHubsClient.DeleteAuthorizationRule

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

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

Example Usage: EventHubsClient.Get

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

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: EventHubsClient.GetAuthorizationRule

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

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

Example Usage: EventHubsClient.ListByNamespace

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

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

func PossibleValuesForAccessRights() []string

func PossibleValuesForEncodingCaptureDescription

func PossibleValuesForEncodingCaptureDescription() []string

func PossibleValuesForEntityStatus

func PossibleValuesForEntityStatus() []string

func ValidateEventhubAuthorizationRuleID

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

ValidateEventhubAuthorizationRuleID checks that 'input' can be parsed as a Eventhub Authorization Rule ID

func ValidateEventhubID

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

ValidateEventhubID checks that 'input' can be parsed as a Eventhub 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 AccessRights

type AccessRights string
const (
	AccessRightsListen AccessRights = "Listen"
	AccessRightsManage AccessRights = "Manage"
	AccessRightsSend   AccessRights = "Send"
)

func (*AccessRights) UnmarshalJSON

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

type AuthorizationRule

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

type AuthorizationRuleProperties

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

type CaptureDescription

type CaptureDescription struct {
	Destination       *Destination                `json:"destination,omitempty"`
	Enabled           *bool                       `json:"enabled,omitempty"`
	Encoding          *EncodingCaptureDescription `json:"encoding,omitempty"`
	IntervalInSeconds *int64                      `json:"intervalInSeconds,omitempty"`
	SizeLimitInBytes  *int64                      `json:"sizeLimitInBytes,omitempty"`
	SkipEmptyArchives *bool                       `json:"skipEmptyArchives,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteAuthorizationRuleOperationResponse

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

type DeleteOperationResponse

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

type Destination

type Destination struct {
	Name       *string                `json:"name,omitempty"`
	Properties *DestinationProperties `json:"properties,omitempty"`
}

type DestinationProperties

type DestinationProperties struct {
	ArchiveNameFormat        *string `json:"archiveNameFormat,omitempty"`
	BlobContainer            *string `json:"blobContainer,omitempty"`
	DataLakeAccountName      *string `json:"dataLakeAccountName,omitempty"`
	DataLakeFolderPath       *string `json:"dataLakeFolderPath,omitempty"`
	DataLakeSubscriptionId   *string `json:"dataLakeSubscriptionId,omitempty"`
	StorageAccountResourceId *string `json:"storageAccountResourceId,omitempty"`
}

type EncodingCaptureDescription

type EncodingCaptureDescription string
const (
	EncodingCaptureDescriptionAvro        EncodingCaptureDescription = "Avro"
	EncodingCaptureDescriptionAvroDeflate EncodingCaptureDescription = "AvroDeflate"
)

func (*EncodingCaptureDescription) UnmarshalJSON

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

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 EventHubsClient

type EventHubsClient struct {
	Client *resourcemanager.Client
}

func NewEventHubsClientWithBaseURI

func NewEventHubsClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClient, error)

func (EventHubsClient) CreateOrUpdate

func (c EventHubsClient) CreateOrUpdate(ctx context.Context, id EventhubId, input Eventhub) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (EventHubsClient) Delete

func (c EventHubsClient) Delete(ctx context.Context, id EventhubId) (result DeleteOperationResponse, err error)

Delete ...

func (EventHubsClient) DeleteAuthorizationRule

DeleteAuthorizationRule ...

func (EventHubsClient) Get

func (c EventHubsClient) Get(ctx context.Context, id EventhubId) (result GetOperationResponse, err error)

Get ...

func (EventHubsClient) GetAuthorizationRule

GetAuthorizationRule ...

func (EventHubsClient) ListByNamespace

ListByNamespace ...

func (EventHubsClient) ListByNamespaceComplete

ListByNamespaceComplete retrieves all the results into a single object

func (EventHubsClient) ListByNamespaceCompleteMatchingPredicate

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

ListByNamespaceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type Eventhub

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

type EventhubAuthorizationRuleId

type EventhubAuthorizationRuleId struct {
	SubscriptionId        string
	ResourceGroupName     string
	NamespaceName         string
	EventhubName          string
	AuthorizationRuleName string
}

EventhubAuthorizationRuleId is a struct representing the Resource ID for a Eventhub Authorization Rule

func NewEventhubAuthorizationRuleID

func NewEventhubAuthorizationRuleID(subscriptionId string, resourceGroupName string, namespaceName string, eventhubName string, authorizationRuleName string) EventhubAuthorizationRuleId

NewEventhubAuthorizationRuleID returns a new EventhubAuthorizationRuleId struct

func ParseEventhubAuthorizationRuleID

func ParseEventhubAuthorizationRuleID(input string) (*EventhubAuthorizationRuleId, error)

ParseEventhubAuthorizationRuleID parses 'input' into a EventhubAuthorizationRuleId

func ParseEventhubAuthorizationRuleIDInsensitively

func ParseEventhubAuthorizationRuleIDInsensitively(input string) (*EventhubAuthorizationRuleId, error)

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

func (*EventhubAuthorizationRuleId) FromParseResult

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

func (EventhubAuthorizationRuleId) ID

ID returns the formatted Eventhub Authorization Rule ID

func (EventhubAuthorizationRuleId) Segments

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

func (EventhubAuthorizationRuleId) String

func (id EventhubAuthorizationRuleId) String() string

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

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 EventhubOperationPredicate

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

func (EventhubOperationPredicate) Matches

func (p EventhubOperationPredicate) Matches(input Eventhub) bool

type EventhubProperties

type EventhubProperties struct {
	CaptureDescription     *CaptureDescription `json:"captureDescription,omitempty"`
	CreatedAt              *string             `json:"createdAt,omitempty"`
	MessageRetentionInDays *int64              `json:"messageRetentionInDays,omitempty"`
	PartitionCount         *int64              `json:"partitionCount,omitempty"`
	PartitionIds           *[]string           `json:"partitionIds,omitempty"`
	Status                 *EntityStatus       `json:"status,omitempty"`
	UpdatedAt              *string             `json:"updatedAt,omitempty"`
}

func (*EventhubProperties) GetCreatedAtAsTime

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

func (*EventhubProperties) GetUpdatedAtAsTime

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

func (*EventhubProperties) SetCreatedAtAsTime

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

func (*EventhubProperties) SetUpdatedAtAsTime

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

type GetAuthorizationRuleOperationResponse

type GetAuthorizationRuleOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AuthorizationRule
}

type GetOperationResponse

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

type ListByNamespaceCompleteResult

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

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        *[]Eventhub
}

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

Jump to

Keyboard shortcuts

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