README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-03-01/clusters
Documentation
The clusters
SDK allows for interaction with the Azure Resource Manager Service azurestackhci
(API Version 2023-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/azurestackhci/2023-03-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")
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.Update
ctx := context.TODO()
id := clusters.NewClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")
payload := clusters.ClusterPatch{
// ...
}
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 ¶
- func PossibleValuesForClusterNodeType() []string
- func PossibleValuesForDiagnosticLevel() []string
- func PossibleValuesForImdsAttestation() []string
- func PossibleValuesForProvisioningState() []string
- func PossibleValuesForSoftwareAssuranceIntent() []string
- func PossibleValuesForSoftwareAssuranceStatus() []string
- func PossibleValuesForStatus() []string
- func PossibleValuesForWindowsServerSubscription() []string
- func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error)
- type Cluster
- type ClusterDesiredProperties
- type ClusterId
- type ClusterNode
- type ClusterNodeType
- type ClusterOperationPredicate
- type ClusterPatch
- type ClusterPatchProperties
- type ClusterProperties
- func (o *ClusterProperties) GetLastBillingTimestampAsTime() (*time.Time, error)
- func (o *ClusterProperties) GetLastSyncTimestampAsTime() (*time.Time, error)
- func (o *ClusterProperties) GetRegistrationTimestampAsTime() (*time.Time, error)
- func (o *ClusterProperties) SetLastBillingTimestampAsTime(input time.Time)
- func (o *ClusterProperties) SetLastSyncTimestampAsTime(input time.Time)
- func (o *ClusterProperties) SetRegistrationTimestampAsTime(input time.Time)
- type ClusterReportedProperties
- type ClustersClient
- func (c ClustersClient) Create(ctx context.Context, id ClusterId, input Cluster) (result CreateOperationResponse, err error)
- func (c ClustersClient) Delete(ctx context.Context, id ClusterId) (result DeleteOperationResponse, err error)
- func (c ClustersClient) DeleteThenPoll(ctx context.Context, id ClusterId) error
- func (c ClustersClient) Get(ctx context.Context, id ClusterId) (result GetOperationResponse, err error)
- func (c ClustersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c ClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c ClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c ClustersClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
- func (c ClustersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c ClustersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListBySubscriptionCompleteResult, err error)
- func (c ClustersClient) Update(ctx context.Context, id ClusterId, input ClusterPatch) (result UpdateOperationResponse, err error)
- type CreateOperationResponse
- type DeleteOperationResponse
- type DiagnosticLevel
- type GetOperationResponse
- type ImdsAttestation
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type ProvisioningState
- type SoftwareAssuranceIntent
- type SoftwareAssuranceProperties
- type SoftwareAssuranceStatus
- type Status
- type UpdateOperationResponse
- type WindowsServerSubscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForClusterNodeType ¶
func PossibleValuesForClusterNodeType() []string
func PossibleValuesForDiagnosticLevel ¶
func PossibleValuesForDiagnosticLevel() []string
func PossibleValuesForImdsAttestation ¶
func PossibleValuesForImdsAttestation() []string
func PossibleValuesForProvisioningState ¶
func PossibleValuesForProvisioningState() []string
func PossibleValuesForSoftwareAssuranceIntent ¶
func PossibleValuesForSoftwareAssuranceIntent() []string
func PossibleValuesForSoftwareAssuranceStatus ¶
func PossibleValuesForSoftwareAssuranceStatus() []string
func PossibleValuesForStatus ¶
func PossibleValuesForStatus() []string
func PossibleValuesForWindowsServerSubscription ¶
func PossibleValuesForWindowsServerSubscription() []string
func ValidateClusterID ¶
ValidateClusterID checks that 'input' can be parsed as a Cluster ID
Types ¶
type Cluster ¶
type Cluster struct { Id *string `json:"id,omitempty"` Identity *identity.SystemAndUserAssignedMap `json:"identity,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 ClusterDesiredProperties ¶
type ClusterDesiredProperties struct { DiagnosticLevel *DiagnosticLevel `json:"diagnosticLevel,omitempty"` WindowsServerSubscription *WindowsServerSubscription `json:"windowsServerSubscription,omitempty"` }
type ClusterId ¶
ClusterId is a struct representing the Resource ID for a Cluster
func NewClusterID ¶
NewClusterID returns a new ClusterId struct
func ParseClusterID ¶
ParseClusterID parses 'input' into a ClusterId
func ParseClusterIDInsensitively ¶
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) Segments ¶
func (id ClusterId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Cluster ID
type ClusterNode ¶
type ClusterNode struct { CoreCount *float64 `json:"coreCount,omitempty"` EhcResourceId *string `json:"ehcResourceId,omitempty"` Id *float64 `json:"id,omitempty"` LastLicensingTimestamp *string `json:"lastLicensingTimestamp,omitempty"` Manufacturer *string `json:"manufacturer,omitempty"` MemoryInGiB *float64 `json:"memoryInGiB,omitempty"` Model *string `json:"model,omitempty"` Name *string `json:"name,omitempty"` NodeType *ClusterNodeType `json:"nodeType,omitempty"` OsDisplayVersion *string `json:"osDisplayVersion,omitempty"` OsName *string `json:"osName,omitempty"` OsVersion *string `json:"osVersion,omitempty"` SerialNumber *string `json:"serialNumber,omitempty"` WindowsServerSubscription *WindowsServerSubscription `json:"windowsServerSubscription,omitempty"` }
func (*ClusterNode) GetLastLicensingTimestampAsTime ¶
func (o *ClusterNode) GetLastLicensingTimestampAsTime() (*time.Time, error)
func (*ClusterNode) SetLastLicensingTimestampAsTime ¶
func (o *ClusterNode) SetLastLicensingTimestampAsTime(input time.Time)
type ClusterNodeType ¶
type ClusterNodeType string
const ( ClusterNodeTypeFirstParty ClusterNodeType = "FirstParty" ClusterNodeTypeThirdParty ClusterNodeType = "ThirdParty" )
func (*ClusterNodeType) UnmarshalJSON ¶ added in v0.20230731.1080956
func (s *ClusterNodeType) UnmarshalJSON(bytes []byte) error
type ClusterOperationPredicate ¶
func (ClusterOperationPredicate) Matches ¶
func (p ClusterOperationPredicate) Matches(input Cluster) bool
type ClusterPatch ¶
type ClusterPatch struct { Identity *identity.SystemAndUserAssignedMap `json:"identity,omitempty"` Properties *ClusterPatchProperties `json:"properties,omitempty"` Tags *map[string]string `json:"tags,omitempty"` }
type ClusterPatchProperties ¶
type ClusterPatchProperties struct { AadClientId *string `json:"aadClientId,omitempty"` AadTenantId *string `json:"aadTenantId,omitempty"` CloudManagementEndpoint *string `json:"cloudManagementEndpoint,omitempty"` DesiredProperties *ClusterDesiredProperties `json:"desiredProperties,omitempty"` }
type ClusterProperties ¶
type ClusterProperties struct { AadApplicationObjectId *string `json:"aadApplicationObjectId,omitempty"` AadClientId *string `json:"aadClientId,omitempty"` AadServicePrincipalObjectId *string `json:"aadServicePrincipalObjectId,omitempty"` AadTenantId *string `json:"aadTenantId,omitempty"` BillingModel *string `json:"billingModel,omitempty"` CloudId *string `json:"cloudId,omitempty"` CloudManagementEndpoint *string `json:"cloudManagementEndpoint,omitempty"` DesiredProperties *ClusterDesiredProperties `json:"desiredProperties,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"` ResourceProviderObjectId *string `json:"resourceProviderObjectId,omitempty"` ServiceEndpoint *string `json:"serviceEndpoint,omitempty"` SoftwareAssuranceProperties *SoftwareAssuranceProperties `json:"softwareAssuranceProperties,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"` ClusterType *ClusterNodeType `json:"clusterType,omitempty"` ClusterVersion *string `json:"clusterVersion,omitempty"` DiagnosticLevel *DiagnosticLevel `json:"diagnosticLevel,omitempty"` ImdsAttestation *ImdsAttestation `json:"imdsAttestation,omitempty"` LastUpdated *string `json:"lastUpdated,omitempty"` Manufacturer *string `json:"manufacturer,omitempty"` Nodes *[]ClusterNode `json:"nodes,omitempty"` SupportedCapabilities *[]string `json:"supportedCapabilities,omitempty"` }
func (*ClusterReportedProperties) GetLastUpdatedAsTime ¶
func (o *ClusterReportedProperties) GetLastUpdatedAsTime() (*time.Time, error)
func (*ClusterReportedProperties) SetLastUpdatedAsTime ¶
func (o *ClusterReportedProperties) SetLastUpdatedAsTime(input time.Time)
type ClustersClient ¶
type ClustersClient struct {
Client *resourcemanager.Client
}
func NewClustersClientWithBaseURI ¶
func NewClustersClientWithBaseURI(sdkApi sdkEnv.Api) (*ClustersClient, error)
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) 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 ¶
func (c ClustersClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (ClustersClient) ListByResourceGroupComplete ¶
func (c ClustersClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all the results into a single object
func (ClustersClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c ClustersClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate ClusterOperationPredicate) (result ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (ClustersClient) ListBySubscription ¶
func (c ClustersClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (ClustersClient) ListBySubscriptionComplete ¶
func (c ClustersClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
ListBySubscriptionComplete retrieves all the results into a single object
func (ClustersClient) ListBySubscriptionCompleteMatchingPredicate ¶
func (c ClustersClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate ClusterOperationPredicate) (result ListBySubscriptionCompleteResult, err error)
ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (ClustersClient) Update ¶
func (c ClustersClient) Update(ctx context.Context, id ClusterId, input ClusterPatch) (result UpdateOperationResponse, err error)
Update ...
type CreateOperationResponse ¶
type DeleteOperationResponse ¶
type DiagnosticLevel ¶
type DiagnosticLevel string
const ( DiagnosticLevelBasic DiagnosticLevel = "Basic" DiagnosticLevelEnhanced DiagnosticLevel = "Enhanced" DiagnosticLevelOff DiagnosticLevel = "Off" )
func (*DiagnosticLevel) UnmarshalJSON ¶ added in v0.20230731.1080956
func (s *DiagnosticLevel) UnmarshalJSON(bytes []byte) error
type GetOperationResponse ¶
type ImdsAttestation ¶
type ImdsAttestation string
const ( ImdsAttestationDisabled ImdsAttestation = "Disabled" ImdsAttestationEnabled ImdsAttestation = "Enabled" )
func (*ImdsAttestation) UnmarshalJSON ¶ added in v0.20230731.1080956
func (s *ImdsAttestation) UnmarshalJSON(bytes []byte) error
type ListByResourceGroupCompleteResult ¶
type ListByResourceGroupCompleteResult struct {
Items []Cluster
}
type ListBySubscriptionCompleteResult ¶
type ListBySubscriptionCompleteResult struct {
Items []Cluster
}
type ProvisioningState ¶
type ProvisioningState string
const ( ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateConnected ProvisioningState = "Connected" ProvisioningStateCreating ProvisioningState = "Creating" ProvisioningStateDeleted ProvisioningState = "Deleted" ProvisioningStateDeleting ProvisioningState = "Deleting" ProvisioningStateDisableInProgress ProvisioningState = "DisableInProgress" ProvisioningStateDisconnected ProvisioningState = "Disconnected" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateInProgress ProvisioningState = "InProgress" ProvisioningStateMoving ProvisioningState = "Moving" ProvisioningStateNotSpecified ProvisioningState = "NotSpecified" ProvisioningStatePartiallyConnected ProvisioningState = "PartiallyConnected" ProvisioningStatePartiallySucceeded ProvisioningState = "PartiallySucceeded" ProvisioningStateProvisioning ProvisioningState = "Provisioning" ProvisioningStateSucceeded ProvisioningState = "Succeeded" ProvisioningStateUpdating ProvisioningState = "Updating" )
func (*ProvisioningState) UnmarshalJSON ¶ added in v0.20230731.1080956
func (s *ProvisioningState) UnmarshalJSON(bytes []byte) error
type SoftwareAssuranceIntent ¶
type SoftwareAssuranceIntent string
const ( SoftwareAssuranceIntentDisable SoftwareAssuranceIntent = "Disable" SoftwareAssuranceIntentEnable SoftwareAssuranceIntent = "Enable" )
func (*SoftwareAssuranceIntent) UnmarshalJSON ¶ added in v0.20230731.1080956
func (s *SoftwareAssuranceIntent) UnmarshalJSON(bytes []byte) error
type SoftwareAssuranceProperties ¶
type SoftwareAssuranceProperties struct { LastUpdated *string `json:"lastUpdated,omitempty"` SoftwareAssuranceIntent *SoftwareAssuranceIntent `json:"softwareAssuranceIntent,omitempty"` SoftwareAssuranceStatus *SoftwareAssuranceStatus `json:"softwareAssuranceStatus,omitempty"` }
func (*SoftwareAssuranceProperties) GetLastUpdatedAsTime ¶
func (o *SoftwareAssuranceProperties) GetLastUpdatedAsTime() (*time.Time, error)
func (*SoftwareAssuranceProperties) SetLastUpdatedAsTime ¶
func (o *SoftwareAssuranceProperties) SetLastUpdatedAsTime(input time.Time)
type SoftwareAssuranceStatus ¶
type SoftwareAssuranceStatus string
const ( SoftwareAssuranceStatusDisabled SoftwareAssuranceStatus = "Disabled" SoftwareAssuranceStatusEnabled SoftwareAssuranceStatus = "Enabled" )
func (*SoftwareAssuranceStatus) UnmarshalJSON ¶ added in v0.20230731.1080956
func (s *SoftwareAssuranceStatus) UnmarshalJSON(bytes []byte) error
type UpdateOperationResponse ¶
type WindowsServerSubscription ¶
type WindowsServerSubscription string
const ( WindowsServerSubscriptionDisabled WindowsServerSubscription = "Disabled" WindowsServerSubscriptionEnabled WindowsServerSubscription = "Enabled" )
func (*WindowsServerSubscription) UnmarshalJSON ¶ added in v0.20230731.1080956
func (s *WindowsServerSubscription) UnmarshalJSON(bytes []byte) error
Source Files ¶
- client.go
- constants.go
- id_cluster.go
- method_create.go
- method_delete.go
- method_get.go
- method_listbyresourcegroup.go
- method_listbysubscription.go
- method_update.go
- model_cluster.go
- model_clusterdesiredproperties.go
- model_clusternode.go
- model_clusterpatch.go
- model_clusterpatchproperties.go
- model_clusterproperties.go
- model_clusterreportedproperties.go
- model_softwareassuranceproperties.go
- predicates.go
- version.go