clusters

package
v0.20220726.1130940 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/streamanalytics/2020-03-01/clusters Documentation

The clusters SDK allows for interaction with the Azure Resource Manager Service streamanalytics (API Version 2020-03-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/streamanalytics/2020-03-01/clusters"

Client Initialization

client := clusters.NewClustersClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ClustersClient.CreateOrUpdate

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

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


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

Example Usage: ClustersClient.Delete

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

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

Example Usage: ClustersClient.Get

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

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: ClustersClient.ListByResourceGroup

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

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

Example Usage: ClustersClient.ListBySubscription

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

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

Example Usage: ClustersClient.ListStreamingJobs

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

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

Example Usage: ClustersClient.Update

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForClusterProvisioningState

func PossibleValuesForClusterProvisioningState() []string

func PossibleValuesForClusterSkuName

func PossibleValuesForClusterSkuName() []string

func PossibleValuesForJobState

func PossibleValuesForJobState() []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 {
	Etag       *string            `json:"etag,omitempty"`
	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"`
	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 ClusterJob

type ClusterJob struct {
	Id             *string   `json:"id,omitempty"`
	JobState       *JobState `json:"jobState,omitempty"`
	StreamingUnits *int64    `json:"streamingUnits,omitempty"`
}

type ClusterJobOperationPredicate

type ClusterJobOperationPredicate struct {
	Id             *string
	StreamingUnits *int64
}

func (ClusterJobOperationPredicate) Matches

func (p ClusterJobOperationPredicate) Matches(input ClusterJob) bool

type ClusterOperationPredicate

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

func (ClusterOperationPredicate) Matches

func (p ClusterOperationPredicate) Matches(input Cluster) bool

type ClusterProperties

type ClusterProperties struct {
	CapacityAllocated *int64                    `json:"capacityAllocated,omitempty"`
	CapacityAssigned  *int64                    `json:"capacityAssigned,omitempty"`
	ClusterId         *string                   `json:"clusterId,omitempty"`
	CreatedDate       *string                   `json:"createdDate,omitempty"`
	ProvisioningState *ClusterProvisioningState `json:"provisioningState,omitempty"`
}

func (*ClusterProperties) GetCreatedDateAsTime

func (o *ClusterProperties) GetCreatedDateAsTime() (*time.Time, error)

func (*ClusterProperties) SetCreatedDateAsTime

func (o *ClusterProperties) SetCreatedDateAsTime(input time.Time)

type ClusterProvisioningState

type ClusterProvisioningState string
const (
	ClusterProvisioningStateCanceled   ClusterProvisioningState = "Canceled"
	ClusterProvisioningStateFailed     ClusterProvisioningState = "Failed"
	ClusterProvisioningStateInProgress ClusterProvisioningState = "InProgress"
	ClusterProvisioningStateSucceeded  ClusterProvisioningState = "Succeeded"
)

type ClusterSku

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

type ClusterSkuName

type ClusterSkuName string
const (
	ClusterSkuNameDefault ClusterSkuName = "Default"
)

type ClustersClient

type ClustersClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewClustersClientWithBaseURI

func NewClustersClientWithBaseURI(endpoint string) ClustersClient

func (ClustersClient) CreateOrUpdate

CreateOrUpdate ...

func (ClustersClient) CreateOrUpdateThenPoll

func (c ClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id ClusterId, input Cluster, options CreateOrUpdateOperationOptions) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ClustersClient) Delete

func (c ClustersClient) Delete(ctx context.Context, id ClusterId) (result DeleteOperationResponse, err error)

Delete ...

func (ClustersClient) DeleteThenPoll

func (c ClustersClient) DeleteThenPoll(ctx context.Context, id ClusterId) error

DeleteThenPoll performs Delete then polls until it's completed

func (ClustersClient) Get

func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperationResponse, err error)

Get ...

func (ClustersClient) ListByResourceGroup

ListByResourceGroup ...

func (ClustersClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (ClustersClient) ListByResourceGroupCompleteMatchingPredicate

func (c ClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ClustersClient) ListBySubscription

ListBySubscription ...

func (ClustersClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (ClustersClient) ListBySubscriptionCompleteMatchingPredicate

func (c ClustersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ClustersClient) ListStreamingJobs

func (c ClustersClient) ListStreamingJobs(ctx context.Context, id ClusterId) (resp ListStreamingJobsOperationResponse, err error)

ListStreamingJobs ...

func (ClustersClient) ListStreamingJobsComplete

func (c ClustersClient) ListStreamingJobsComplete(ctx context.Context, id ClusterId) (ListStreamingJobsCompleteResult, error)

ListStreamingJobsComplete retrieves all of the results into a single object

func (ClustersClient) ListStreamingJobsCompleteMatchingPredicate

func (c ClustersClient) ListStreamingJobsCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate ClusterJobOperationPredicate) (resp ListStreamingJobsCompleteResult, err error)

ListStreamingJobsCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ClustersClient) Update

func (c ClustersClient) Update(ctx context.Context, id ClusterId, input Cluster, options UpdateOperationOptions) (result UpdateOperationResponse, err error)

Update ...

func (ClustersClient) UpdateThenPoll

func (c ClustersClient) UpdateThenPoll(ctx context.Context, id ClusterId, input Cluster, options UpdateOperationOptions) error

UpdateThenPoll performs Update then polls until it's completed

type CreateOrUpdateOperationOptions

type CreateOrUpdateOperationOptions struct {
	IfMatch     *string
	IfNoneMatch *string
}

func DefaultCreateOrUpdateOperationOptions

func DefaultCreateOrUpdateOperationOptions() CreateOrUpdateOperationOptions

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Cluster
}

type JobState

type JobState string
const (
	JobStateCreated    JobState = "Created"
	JobStateDegraded   JobState = "Degraded"
	JobStateDeleting   JobState = "Deleting"
	JobStateFailed     JobState = "Failed"
	JobStateRestarting JobState = "Restarting"
	JobStateRunning    JobState = "Running"
	JobStateScaling    JobState = "Scaling"
	JobStateStarting   JobState = "Starting"
	JobStateStopped    JobState = "Stopped"
	JobStateStopping   JobState = "Stopping"
)

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Cluster
}

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Cluster
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []Cluster
}

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Cluster
	// contains filtered or unexported fields
}

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

type ListStreamingJobsCompleteResult

type ListStreamingJobsCompleteResult struct {
	Items []ClusterJob
}

type ListStreamingJobsOperationResponse

type ListStreamingJobsOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ClusterJob
	// contains filtered or unexported fields
}

func (ListStreamingJobsOperationResponse) HasMore

func (ListStreamingJobsOperationResponse) LoadMore

type UpdateOperationOptions

type UpdateOperationOptions struct {
	IfMatch *string
}

func DefaultUpdateOperationOptions

func DefaultUpdateOperationOptions() UpdateOperationOptions

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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