eventhubsclusters

package
v0.20231101.1154023 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := eventhubsclusters.NewEventHubsClustersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: EventHubsClustersClient.ClustersCreateOrUpdate

ctx := context.TODO()
id := eventhubsclusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")

payload := eventhubsclusters.Cluster{
	// ...
}


if err := client.ClustersCreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: EventHubsClustersClient.ClustersDelete

ctx := context.TODO()
id := eventhubsclusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")

if err := client.ClustersDeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: EventHubsClustersClient.ClustersGet

ctx := context.TODO()
id := eventhubsclusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")

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

Example Usage: EventHubsClustersClient.ClustersListByResourceGroup

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

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

Example Usage: EventHubsClustersClient.ClustersListBySubscription

ctx := context.TODO()
id := eventhubsclusters.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: EventHubsClustersClient.ClustersUpdate

ctx := context.TODO()
id := eventhubsclusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")

payload := eventhubsclusters.Cluster{
	// ...
}


if err := client.ClustersUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForClusterSkuName

func PossibleValuesForClusterSkuName() []string

func ValidateClusterID

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

ValidateClusterID checks that 'input' can be parsed as a Cluster ID

Types

type Cluster

type Cluster struct {
	Id         *string                `json:"id,omitempty"`
	Location   *string                `json:"location,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ClusterProperties     `json:"properties,omitempty"`
	Sku        *ClusterSku            `json:"sku,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Tags       *map[string]string     `json:"tags,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, clusterName string) ClusterId

NewClusterID returns a new ClusterId struct

func ParseClusterID

func ParseClusterID(input string) (*ClusterId, error)

ParseClusterID parses 'input' into a ClusterId

func ParseClusterIDInsensitively

func ParseClusterIDInsensitively(input string) (*ClusterId, error)

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

func (ClusterId) ID

func (id ClusterId) ID() string

ID returns the formatted Cluster ID

func (ClusterId) Segments

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

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

func (ClusterId) String

func (id ClusterId) String() string

String returns a human-readable description of this Cluster ID

type ClusterOperationPredicate

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

func (ClusterOperationPredicate) Matches

func (p ClusterOperationPredicate) Matches(input Cluster) bool

type ClusterProperties

type ClusterProperties struct {
	CreatedAt       *string `json:"createdAt,omitempty"`
	MetricId        *string `json:"metricId,omitempty"`
	Status          *string `json:"status,omitempty"`
	SupportsScaling *bool   `json:"supportsScaling,omitempty"`
	UpdatedAt       *string `json:"updatedAt,omitempty"`
}

type ClusterSku

type ClusterSku struct {
	Capacity *int64         `json:"capacity,omitempty"`
	Name     ClusterSkuName `json:"name"`
}

type ClusterSkuName

type ClusterSkuName string
const (
	ClusterSkuNameDedicated ClusterSkuName = "Dedicated"
)

func (*ClusterSkuName) UnmarshalJSON added in v0.20230508.1101604

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

type ClustersCreateOrUpdateOperationResponse

type ClustersCreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type ClustersDeleteOperationResponse

type ClustersDeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type ClustersGetOperationResponse

type ClustersGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Cluster
}

type ClustersListByResourceGroupCompleteResult

type ClustersListByResourceGroupCompleteResult struct {
	Items []Cluster
}

type ClustersListByResourceGroupOperationResponse

type ClustersListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Cluster
}

type ClustersListBySubscriptionCompleteResult

type ClustersListBySubscriptionCompleteResult struct {
	Items []Cluster
}

type ClustersListBySubscriptionOperationResponse

type ClustersListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Cluster
}

type ClustersUpdateOperationResponse

type ClustersUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type EventHubsClustersClient

type EventHubsClustersClient struct {
	Client *resourcemanager.Client
}

func NewEventHubsClustersClientWithBaseURI

func NewEventHubsClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*EventHubsClustersClient, error)

func (EventHubsClustersClient) ClustersCreateOrUpdate

func (c EventHubsClustersClient) ClustersCreateOrUpdate(ctx context.Context, id ClusterId, input Cluster) (result ClustersCreateOrUpdateOperationResponse, err error)

ClustersCreateOrUpdate ...

func (EventHubsClustersClient) ClustersCreateOrUpdateThenPoll

func (c EventHubsClustersClient) ClustersCreateOrUpdateThenPoll(ctx context.Context, id ClusterId, input Cluster) error

ClustersCreateOrUpdateThenPoll performs ClustersCreateOrUpdate then polls until it's completed

func (EventHubsClustersClient) ClustersDelete

ClustersDelete ...

func (EventHubsClustersClient) ClustersDeleteThenPoll

func (c EventHubsClustersClient) ClustersDeleteThenPoll(ctx context.Context, id ClusterId) error

ClustersDeleteThenPoll performs ClustersDelete then polls until it's completed

func (EventHubsClustersClient) ClustersGet

ClustersGet ...

func (EventHubsClustersClient) ClustersListByResourceGroup

ClustersListByResourceGroup ...

func (EventHubsClustersClient) ClustersListByResourceGroupComplete

ClustersListByResourceGroupComplete retrieves all the results into a single object

func (EventHubsClustersClient) ClustersListByResourceGroupCompleteMatchingPredicate

func (c EventHubsClustersClient) ClustersListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (result ClustersListByResourceGroupCompleteResult, err error)

ClustersListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (EventHubsClustersClient) ClustersListBySubscription

ClustersListBySubscription ...

func (EventHubsClustersClient) ClustersListBySubscriptionComplete

ClustersListBySubscriptionComplete retrieves all the results into a single object

func (EventHubsClustersClient) ClustersListBySubscriptionCompleteMatchingPredicate

func (c EventHubsClustersClient) ClustersListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (result ClustersListBySubscriptionCompleteResult, err error)

ClustersListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (EventHubsClustersClient) ClustersUpdate

func (c EventHubsClustersClient) ClustersUpdate(ctx context.Context, id ClusterId, input Cluster) (result ClustersUpdateOperationResponse, err error)

ClustersUpdate ...

func (EventHubsClustersClient) ClustersUpdateThenPoll

func (c EventHubsClustersClient) ClustersUpdateThenPoll(ctx context.Context, id ClusterId, input Cluster) error

ClustersUpdateThenPoll performs ClustersUpdate then polls until it's completed

Jump to

Keyboard shortcuts

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