clusters

package
v0.20240320.1143605 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-09-01/clusters Documentation

The clusters SDK allows for interaction with the Azure Resource Manager Service vmware (API Version 2023-09-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/vmware/2023-09-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", "privateCloudValue", "clusterValue")

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


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

Example Usage: ClustersClient.Delete

ctx := context.TODO()
id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "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", "privateCloudValue", "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.List

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

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

Example Usage: ClustersClient.ListZones

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

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

Example Usage: ClustersClient.Update

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForClusterProvisioningState

func PossibleValuesForClusterProvisioningState() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func ValidateClusterID

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

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

func ValidatePrivateCloudID

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

ValidatePrivateCloudID checks that 'input' can be parsed as a Private Cloud ID

Types

type Cluster

type Cluster struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ClusterProperties     `json:"properties,omitempty"`
	Sku        Sku                    `json:"sku"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, privateCloudName 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) FromParseResult

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

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
	Name *string
	Type *string
}

func (ClusterOperationPredicate) Matches

func (p ClusterOperationPredicate) Matches(input Cluster) bool

type ClusterProperties

type ClusterProperties struct {
	ClusterId         *int64                    `json:"clusterId,omitempty"`
	ClusterSize       *int64                    `json:"clusterSize,omitempty"`
	Hosts             *[]string                 `json:"hosts,omitempty"`
	ProvisioningState *ClusterProvisioningState `json:"provisioningState,omitempty"`
	VsanDatastoreName *string                   `json:"vsanDatastoreName,omitempty"`
}

type ClusterProvisioningState

type ClusterProvisioningState string
const (
	ClusterProvisioningStateCanceled  ClusterProvisioningState = "Canceled"
	ClusterProvisioningStateCancelled ClusterProvisioningState = "Cancelled"
	ClusterProvisioningStateDeleting  ClusterProvisioningState = "Deleting"
	ClusterProvisioningStateFailed    ClusterProvisioningState = "Failed"
	ClusterProvisioningStateSucceeded ClusterProvisioningState = "Succeeded"
	ClusterProvisioningStateUpdating  ClusterProvisioningState = "Updating"
)

func (*ClusterProvisioningState) UnmarshalJSON

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

type ClusterUpdate

type ClusterUpdate struct {
	Properties *ClusterUpdateProperties `json:"properties,omitempty"`
	Sku        *Sku                     `json:"sku,omitempty"`
}

type ClusterUpdateProperties

type ClusterUpdateProperties struct {
	ClusterSize *int64    `json:"clusterSize,omitempty"`
	Hosts       *[]string `json:"hosts,omitempty"`
}

type ClusterZone

type ClusterZone struct {
	Hosts *[]string `json:"hosts,omitempty"`
	Zone  *string   `json:"zone,omitempty"`
}

type ClusterZoneList

type ClusterZoneList struct {
	Zones *[]ClusterZone `json:"zones,omitempty"`
}

type ClustersClient

type ClustersClient struct {
	Client *resourcemanager.Client
}

func NewClustersClientWithBaseURI

func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error)

func (ClustersClient) CreateOrUpdate

func (c ClustersClient) CreateOrUpdate(ctx context.Context, id ClusterId, input Cluster) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (ClustersClient) CreateOrUpdateThenPoll

func (c ClustersClient) CreateOrUpdateThenPoll(ctx context.Context, id ClusterId, input Cluster) 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) List

List ...

func (ClustersClient) ListComplete

ListComplete retrieves all the results into a single object

func (ClustersClient) ListCompleteMatchingPredicate

func (c ClustersClient) ListCompleteMatchingPredicate(ctx context.Context, id PrivateCloudId, predicate ClusterOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ClustersClient) ListZones

func (c ClustersClient) ListZones(ctx context.Context, id ClusterId) (result ListZonesOperationResponse, err error)

ListZones ...

func (ClustersClient) Update

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

Update ...

func (ClustersClient) UpdateThenPoll

func (c ClustersClient) UpdateThenPoll(ctx context.Context, id ClusterId, input ClusterUpdate) error

UpdateThenPoll performs Update then polls until it's completed

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Cluster
}

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Cluster
}

type ListOperationResponse

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

type ListZonesOperationResponse

type ListZonesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ClusterZoneList
}

type PrivateCloudId

type PrivateCloudId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
}

PrivateCloudId is a struct representing the Resource ID for a Private Cloud

func NewPrivateCloudID

func NewPrivateCloudID(subscriptionId string, resourceGroupName string, privateCloudName string) PrivateCloudId

NewPrivateCloudID returns a new PrivateCloudId struct

func ParsePrivateCloudID

func ParsePrivateCloudID(input string) (*PrivateCloudId, error)

ParsePrivateCloudID parses 'input' into a PrivateCloudId

func ParsePrivateCloudIDInsensitively

func ParsePrivateCloudIDInsensitively(input string) (*PrivateCloudId, error)

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

func (*PrivateCloudId) FromParseResult

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

func (PrivateCloudId) ID

func (id PrivateCloudId) ID() string

ID returns the formatted Private Cloud ID

func (PrivateCloudId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Private Cloud ID

func (PrivateCloudId) String

func (id PrivateCloudId) String() string

String returns a human-readable description of this Private Cloud ID

type Sku

type Sku struct {
	Capacity *int64   `json:"capacity,omitempty"`
	Family   *string  `json:"family,omitempty"`
	Name     string   `json:"name"`
	Size     *string  `json:"size,omitempty"`
	Tier     *SkuTier `json:"tier,omitempty"`
}

type SkuTier

type SkuTier string
const (
	SkuTierBasic    SkuTier = "Basic"
	SkuTierFree     SkuTier = "Free"
	SkuTierPremium  SkuTier = "Premium"
	SkuTierStandard SkuTier = "Standard"
)

func (*SkuTier) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Cluster
}

Jump to

Keyboard shortcuts

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