clusters

package
v0.20221013.1075625 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2020-10-01/clusters Documentation

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

Client Initialization

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

Example Usage: ClustersClient.Create

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

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


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

Example Usage: ClustersClient.Delete

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

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: 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.Update

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []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"`
	Name       *string                `json:"name,omitempty"`
	Properties *ClusterProperties     `json:"properties,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 ClusterNode

type ClusterNode struct {
	CoreCount    *float64 `json:"coreCount,omitempty"`
	Id           *float64 `json:"id,omitempty"`
	Manufacturer *string  `json:"manufacturer,omitempty"`
	MemoryInGiB  *float64 `json:"memoryInGiB,omitempty"`
	Model        *string  `json:"model,omitempty"`
	Name         *string  `json:"name,omitempty"`
	OsName       *string  `json:"osName,omitempty"`
	OsVersion    *string  `json:"osVersion,omitempty"`
	SerialNumber *string  `json:"serialNumber,omitempty"`
}

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 {
	AadClientId           string                     `json:"aadClientId"`
	AadTenantId           string                     `json:"aadTenantId"`
	BillingModel          *string                    `json:"billingModel,omitempty"`
	CloudId               *string                    `json:"cloudId,omitempty"`
	LastBillingTimestamp  *string                    `json:"lastBillingTimestamp,omitempty"`
	LastSyncTimestamp     *string                    `json:"lastSyncTimestamp,omitempty"`
	ProvisioningState     *ProvisioningState         `json:"provisioningState,omitempty"`
	RegistrationTimestamp *string                    `json:"registrationTimestamp,omitempty"`
	ReportedProperties    *ClusterReportedProperties `json:"reportedProperties,omitempty"`
	Status                *Status                    `json:"status,omitempty"`
	TrialDaysRemaining    *float64                   `json:"trialDaysRemaining,omitempty"`
}

func (*ClusterProperties) GetLastBillingTimestampAsTime

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

func (*ClusterProperties) GetLastSyncTimestampAsTime

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

func (*ClusterProperties) GetRegistrationTimestampAsTime

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

func (*ClusterProperties) SetLastBillingTimestampAsTime

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

func (*ClusterProperties) SetLastSyncTimestampAsTime

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

func (*ClusterProperties) SetRegistrationTimestampAsTime

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

type ClusterReportedProperties

type ClusterReportedProperties struct {
	ClusterId      *string        `json:"clusterId,omitempty"`
	ClusterName    *string        `json:"clusterName,omitempty"`
	ClusterVersion *string        `json:"clusterVersion,omitempty"`
	LastUpdated    *string        `json:"lastUpdated,omitempty"`
	Nodes          *[]ClusterNode `json:"nodes,omitempty"`
}

func (*ClusterReportedProperties) GetLastUpdatedAsTime

func (o *ClusterReportedProperties) GetLastUpdatedAsTime() (*time.Time, error)

func (*ClusterReportedProperties) SetLastUpdatedAsTime

func (o *ClusterReportedProperties) SetLastUpdatedAsTime(input time.Time)

type ClusterUpdate

type ClusterUpdate struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type ClustersClient

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

func NewClustersClientWithBaseURI

func NewClustersClientWithBaseURI(endpoint string) ClustersClient

func (ClustersClient) Create

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

Create ...

func (ClustersClient) Delete

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

Delete ...

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) Update

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

Update ...

type CreateOperationResponse

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

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type GetOperationResponse

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

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 ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
)

type Status

type Status string
const (
	StatusConnectedRecently    Status = "ConnectedRecently"
	StatusDisconnected         Status = "Disconnected"
	StatusError                Status = "Error"
	StatusNotConnectedRecently Status = "NotConnectedRecently"
	StatusNotYetRegistered     Status = "NotYetRegistered"
)

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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