Documentation ¶
Index ¶
- type ActionType
- type ArcIdentityResponse
- type ArcIdentityResponseProperties
- type ArcSetting
- type ArcSettingAggregateState
- type ArcSettingList
- type ArcSettingProperties
- type ArcSettingsClient
- func (client *ArcSettingsClient) BeginCreateIdentity(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ArcSettingsClientCreateIdentityResponse], error)
- func (client *ArcSettingsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ArcSettingsClientDeleteResponse], error)
- func (client *ArcSettingsClient) Create(ctx context.Context, resourceGroupName string, clusterName string, ...) (ArcSettingsClientCreateResponse, error)
- func (client *ArcSettingsClient) GeneratePassword(ctx context.Context, resourceGroupName string, clusterName string, ...) (ArcSettingsClientGeneratePasswordResponse, error)
- func (client *ArcSettingsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ArcSettingsClientGetResponse, error)
- func (client *ArcSettingsClient) NewListByClusterPager(resourceGroupName string, clusterName string, ...) *runtime.Pager[ArcSettingsClientListByClusterResponse]
- func (client *ArcSettingsClient) Update(ctx context.Context, resourceGroupName string, clusterName string, ...) (ArcSettingsClientUpdateResponse, error)
- type ArcSettingsClientBeginCreateIdentityOptions
- type ArcSettingsClientBeginDeleteOptions
- type ArcSettingsClientCreateIdentityResponse
- type ArcSettingsClientCreateOptions
- type ArcSettingsClientCreateResponse
- type ArcSettingsClientDeleteResponse
- type ArcSettingsClientGeneratePasswordOptions
- type ArcSettingsClientGeneratePasswordResponse
- type ArcSettingsClientGetOptions
- type ArcSettingsClientGetResponse
- type ArcSettingsClientListByClusterOptions
- type ArcSettingsClientListByClusterResponse
- type ArcSettingsClientUpdateOptions
- type ArcSettingsClientUpdateResponse
- type ArcSettingsPatch
- type ArcSettingsPatchProperties
- type ClientFactory
- type Cluster
- type ClusterDesiredProperties
- type ClusterIdentityResponse
- type ClusterIdentityResponseProperties
- type ClusterList
- type ClusterNode
- type ClusterPatch
- type ClusterPatchProperties
- type ClusterProperties
- type ClusterReportedProperties
- type ClustersClient
- func (client *ClustersClient) BeginCreateIdentity(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientCreateIdentityResponse], error)
- func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientDeleteResponse], error)
- func (client *ClustersClient) BeginUploadCertificate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ClustersClientUploadCertificateResponse], error)
- func (client *ClustersClient) Create(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientCreateResponse, error)
- func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientGetResponse, error)
- func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
- func (client *ClustersClient) NewListBySubscriptionPager(options *ClustersClientListBySubscriptionOptions) *runtime.Pager[ClustersClientListBySubscriptionResponse]
- func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, ...) (ClustersClientUpdateResponse, error)
- type ClustersClientBeginCreateIdentityOptions
- type ClustersClientBeginDeleteOptions
- type ClustersClientBeginUploadCertificateOptions
- type ClustersClientCreateIdentityResponse
- type ClustersClientCreateOptions
- type ClustersClientCreateResponse
- type ClustersClientDeleteResponse
- type ClustersClientGetOptions
- type ClustersClientGetResponse
- type ClustersClientListByResourceGroupOptions
- type ClustersClientListByResourceGroupResponse
- type ClustersClientListBySubscriptionOptions
- type ClustersClientListBySubscriptionResponse
- type ClustersClientUpdateOptions
- type ClustersClientUpdateResponse
- type ClustersClientUploadCertificateResponse
- type CreatedByType
- type DiagnosticLevel
- type Extension
- type ExtensionAggregateState
- type ExtensionList
- type ExtensionParameters
- type ExtensionProperties
- type ExtensionsClient
- func (client *ExtensionsClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientCreateResponse], error)
- func (client *ExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientDeleteResponse], error)
- func (client *ExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, ...) (*runtime.Poller[ExtensionsClientUpdateResponse], error)
- func (client *ExtensionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, ...) (ExtensionsClientGetResponse, error)
- func (client *ExtensionsClient) NewListByArcSettingPager(resourceGroupName string, clusterName string, arcSettingName string, ...) *runtime.Pager[ExtensionsClientListByArcSettingResponse]
- type ExtensionsClientBeginCreateOptions
- type ExtensionsClientBeginDeleteOptions
- type ExtensionsClientBeginUpdateOptions
- type ExtensionsClientCreateResponse
- type ExtensionsClientDeleteResponse
- type ExtensionsClientGetOptions
- type ExtensionsClientGetResponse
- type ExtensionsClientListByArcSettingOptions
- type ExtensionsClientListByArcSettingResponse
- type ExtensionsClientUpdateResponse
- type ImdsAttestation
- type NodeArcState
- type NodeExtensionState
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type PasswordCredential
- type PerNodeExtensionState
- type PerNodeState
- type ProvisioningState
- type RawCertificateData
- type Status
- type SystemData
- type UploadCertificateRequest
- type WindowsServerSubscription
Examples ¶
- ArcSettingsClient.BeginCreateIdentity
- ArcSettingsClient.BeginDelete
- ArcSettingsClient.Create
- ArcSettingsClient.GeneratePassword
- ArcSettingsClient.Get
- ArcSettingsClient.NewListByClusterPager
- ArcSettingsClient.Update
- ClustersClient.BeginCreateIdentity
- ClustersClient.BeginDelete
- ClustersClient.BeginUploadCertificate
- ClustersClient.Create
- ClustersClient.Get
- ClustersClient.NewListByResourceGroupPager
- ClustersClient.NewListBySubscriptionPager
- ClustersClient.Update
- ExtensionsClient.BeginCreate
- ExtensionsClient.BeginDelete
- ExtensionsClient.BeginUpdate
- ExtensionsClient.Get
- ExtensionsClient.NewListByArcSettingPager
- OperationsClient.List
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionType ¶
type ActionType string
ActionType - Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
const (
ActionTypeInternal ActionType = "Internal"
)
func PossibleActionTypeValues ¶
func PossibleActionTypeValues() []ActionType
PossibleActionTypeValues returns the possible values for the ActionType const type.
type ArcIdentityResponse ¶ added in v0.3.0
type ArcIdentityResponse struct { // READ-ONLY; ArcIdentity properties. Properties *ArcIdentityResponseProperties }
ArcIdentityResponse - ArcIdentity details.
func (ArcIdentityResponse) MarshalJSON ¶ added in v1.1.0
func (a ArcIdentityResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArcIdentityResponse.
func (*ArcIdentityResponse) UnmarshalJSON ¶ added in v1.1.0
func (a *ArcIdentityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArcIdentityResponse.
type ArcIdentityResponseProperties ¶ added in v0.3.0
type ArcIdentityResponseProperties struct { ArcApplicationClientID *string ArcApplicationObjectID *string ArcApplicationTenantID *string ArcServicePrincipalObjectID *string }
func (ArcIdentityResponseProperties) MarshalJSON ¶ added in v1.1.0
func (a ArcIdentityResponseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArcIdentityResponseProperties.
func (*ArcIdentityResponseProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *ArcIdentityResponseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArcIdentityResponseProperties.
type ArcSetting ¶
type ArcSetting struct { // ArcSetting properties. Properties *ArcSettingProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; System data of ArcSetting resource SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
ArcSetting details.
func (ArcSetting) MarshalJSON ¶
func (a ArcSetting) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArcSetting.
func (*ArcSetting) UnmarshalJSON ¶ added in v1.1.0
func (a *ArcSetting) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArcSetting.
type ArcSettingAggregateState ¶
type ArcSettingAggregateState string
ArcSettingAggregateState - Aggregate state of Arc agent across the nodes in this HCI cluster.
const ( ArcSettingAggregateStateCanceled ArcSettingAggregateState = "Canceled" ArcSettingAggregateStateConnected ArcSettingAggregateState = "Connected" ArcSettingAggregateStateCreating ArcSettingAggregateState = "Creating" ArcSettingAggregateStateDeleted ArcSettingAggregateState = "Deleted" ArcSettingAggregateStateDeleting ArcSettingAggregateState = "Deleting" ArcSettingAggregateStateDisconnected ArcSettingAggregateState = "Disconnected" ArcSettingAggregateStateError ArcSettingAggregateState = "Error" ArcSettingAggregateStateFailed ArcSettingAggregateState = "Failed" ArcSettingAggregateStateInProgress ArcSettingAggregateState = "InProgress" ArcSettingAggregateStateMoving ArcSettingAggregateState = "Moving" ArcSettingAggregateStateNotSpecified ArcSettingAggregateState = "NotSpecified" ArcSettingAggregateStatePartiallyConnected ArcSettingAggregateState = "PartiallyConnected" ArcSettingAggregateStatePartiallySucceeded ArcSettingAggregateState = "PartiallySucceeded" ArcSettingAggregateStateSucceeded ArcSettingAggregateState = "Succeeded" ArcSettingAggregateStateUpdating ArcSettingAggregateState = "Updating" )
func PossibleArcSettingAggregateStateValues ¶
func PossibleArcSettingAggregateStateValues() []ArcSettingAggregateState
PossibleArcSettingAggregateStateValues returns the possible values for the ArcSettingAggregateState const type.
type ArcSettingList ¶
type ArcSettingList struct { // READ-ONLY; Link to the next set of results. NextLink *string // READ-ONLY; List of ArcSetting proxy resources. Value []*ArcSetting }
ArcSettingList - List of ArcSetting proxy resources for the HCI cluster.
func (ArcSettingList) MarshalJSON ¶
func (a ArcSettingList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArcSettingList.
func (*ArcSettingList) UnmarshalJSON ¶ added in v1.1.0
func (a *ArcSettingList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArcSettingList.
type ArcSettingProperties ¶
type ArcSettingProperties struct { // App id of arc AAD identity. ArcApplicationClientID *string // Object id of arc AAD identity. ArcApplicationObjectID *string // Tenant id of arc AAD identity. ArcApplicationTenantID *string // The resource group that hosts the Arc agents, ie. Hybrid Compute Machine resources. ArcInstanceResourceGroup *string // Object id of arc AAD service principal. ArcServicePrincipalObjectID *string // contains connectivity related configuration for ARC resources ConnectivityProperties any // READ-ONLY; Aggregate state of Arc agent across the nodes in this HCI cluster. AggregateState *ArcSettingAggregateState // READ-ONLY; State of Arc agent in each of the nodes. PerNodeDetails []*PerNodeState // READ-ONLY; Provisioning state of the ArcSetting proxy resource. ProvisioningState *ProvisioningState }
ArcSettingProperties - ArcSetting properties.
func (ArcSettingProperties) MarshalJSON ¶
func (a ArcSettingProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArcSettingProperties.
func (*ArcSettingProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *ArcSettingProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArcSettingProperties.
type ArcSettingsClient ¶
type ArcSettingsClient struct {
// contains filtered or unexported fields
}
ArcSettingsClient contains the methods for the ArcSettings group. Don't use this type directly, use NewArcSettingsClient() instead.
func NewArcSettingsClient ¶
func NewArcSettingsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ArcSettingsClient, error)
NewArcSettingsClient creates a new instance of ArcSettingsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ArcSettingsClient) BeginCreateIdentity ¶ added in v0.3.0
func (client *ArcSettingsClient) BeginCreateIdentity(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, options *ArcSettingsClientBeginCreateIdentityOptions) (*runtime.Poller[ArcSettingsClientCreateIdentityResponse], error)
BeginCreateIdentity - Create Aad identity for arc settings. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- options - ArcSettingsClientBeginCreateIdentityOptions contains the optional parameters for the ArcSettingsClient.BeginCreateIdentity method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/CreateArcIdentity.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewArcSettingsClient().BeginCreateIdentity(ctx, "test-rg", "myCluster", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ArcIdentityResponse = armazurestackhci.ArcIdentityResponse{ // Properties: &armazurestackhci.ArcIdentityResponseProperties{ // ArcApplicationClientID: to.Ptr("7b93bf67-60ac-4909-a987-ac438e69f9ba"), // ArcApplicationObjectID: to.Ptr("400bd05f-395f-45a6-ba75-72601df80107"), // ArcApplicationTenantID: to.Ptr("bdb2c88c-9cfd-4e19-927d-51e875f6912b"), // ArcServicePrincipalObjectID: to.Ptr("00cc4014-482e-4de9-9932-83415cc75f45"), // }, // } }
Output:
func (*ArcSettingsClient) BeginDelete ¶
func (client *ArcSettingsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, options *ArcSettingsClientBeginDeleteOptions) (*runtime.Poller[ArcSettingsClientDeleteResponse], error)
BeginDelete - Delete ArcSetting resource details of HCI Cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- options - ArcSettingsClientBeginDeleteOptions contains the optional parameters for the ArcSettingsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/DeleteArcSetting.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewArcSettingsClient().BeginDelete(ctx, "test-rg", "myCluster", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ArcSettingsClient) Create ¶
func (client *ArcSettingsClient) Create(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, arcSetting ArcSetting, options *ArcSettingsClientCreateOptions) (ArcSettingsClientCreateResponse, error)
Create - Create ArcSetting for HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- arcSetting - Parameters supplied to the Create ArcSetting resource for this HCI cluster.
- options - ArcSettingsClientCreateOptions contains the optional parameters for the ArcSettingsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/PutArcSetting.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewArcSettingsClient().Create(ctx, "test-rg", "myCluster", "default", armazurestackhci.ArcSetting{}, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ArcSetting = armazurestackhci.ArcSetting{ // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default"), // Properties: &armazurestackhci.ArcSettingProperties{ // AggregateState: to.Ptr(armazurestackhci.ArcSettingAggregateStateCreating), // ArcInstanceResourceGroup: to.Ptr("ArcInstance-rg"), // ConnectivityProperties: map[string]any{ // "enabled": false, // }, // PerNodeDetails: []*armazurestackhci.PerNodeState{ // { // Name: to.Ptr("Node-1"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1"), // State: to.Ptr(armazurestackhci.NodeArcStateCreating), // }, // { // Name: to.Ptr("Node-2"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"), // State: to.Ptr(armazurestackhci.NodeArcStateCreating), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
func (*ArcSettingsClient) GeneratePassword ¶ added in v0.3.0
func (client *ArcSettingsClient) GeneratePassword(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, options *ArcSettingsClientGeneratePasswordOptions) (ArcSettingsClientGeneratePasswordResponse, error)
GeneratePassword - Generate password for arc settings. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- options - ArcSettingsClientGeneratePasswordOptions contains the optional parameters for the ArcSettingsClient.GeneratePassword method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/GeneratePassword.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewArcSettingsClient().GeneratePassword(ctx, "test-rg", "myCluster", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.PasswordCredential = armazurestackhci.PasswordCredential{ // EndDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2121-02-17T10:54:23.626Z"); return t}()), // KeyID: to.Ptr("00000000-2d47-4fb2-8ed2-fed71a5c197b"), // SecretText: to.Ptr("secretText"), // StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2022-02-17T10:54:23.626Z"); return t}()), // } }
Output:
func (*ArcSettingsClient) Get ¶
func (client *ArcSettingsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, options *ArcSettingsClientGetOptions) (ArcSettingsClientGetResponse, error)
Get - Get ArcSetting resource details of HCI Cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- options - ArcSettingsClientGetOptions contains the optional parameters for the ArcSettingsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/GetArcSetting.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewArcSettingsClient().Get(ctx, "test-rg", "myCluster", "default", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ArcSetting = armazurestackhci.ArcSetting{ // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default"), // Properties: &armazurestackhci.ArcSettingProperties{ // AggregateState: to.Ptr(armazurestackhci.ArcSettingAggregateStatePartiallyConnected), // ArcInstanceResourceGroup: to.Ptr("ArcInstance-rg"), // PerNodeDetails: []*armazurestackhci.PerNodeState{ // { // Name: to.Ptr("Node-1"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1"), // State: to.Ptr(armazurestackhci.NodeArcStateConnected), // }, // { // Name: to.Ptr("Node-2"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"), // State: to.Ptr(armazurestackhci.NodeArcStateDisconnected), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
func (*ArcSettingsClient) NewListByClusterPager ¶ added in v0.4.0
func (client *ArcSettingsClient) NewListByClusterPager(resourceGroupName string, clusterName string, options *ArcSettingsClientListByClusterOptions) *runtime.Pager[ArcSettingsClientListByClusterResponse]
NewListByClusterPager - Get ArcSetting resources of HCI Cluster.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - ArcSettingsClientListByClusterOptions contains the optional parameters for the ArcSettingsClient.NewListByClusterPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/ListArcSettingsByCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewArcSettingsClient().NewListByClusterPager("test-rg", "myCluster", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ArcSettingList = armazurestackhci.ArcSettingList{ // Value: []*armazurestackhci.ArcSetting{ // { // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default"), // Properties: &armazurestackhci.ArcSettingProperties{ // AggregateState: to.Ptr(armazurestackhci.ArcSettingAggregateStatePartiallyConnected), // ArcInstanceResourceGroup: to.Ptr("ArcInstance-rg"), // PerNodeDetails: []*armazurestackhci.PerNodeState{ // { // Name: to.Ptr("Node-1"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1"), // State: to.Ptr(armazurestackhci.NodeArcStateConnected), // }, // { // Name: to.Ptr("Node-2"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"), // State: to.Ptr(armazurestackhci.NodeArcStateDisconnected), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*ArcSettingsClient) Update ¶ added in v1.0.0
func (client *ArcSettingsClient) Update(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, arcSetting ArcSettingsPatch, options *ArcSettingsClientUpdateOptions) (ArcSettingsClientUpdateResponse, error)
Update - Update ArcSettings for HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- arcSetting - ArcSettings parameters that needs to be updated
- options - ArcSettingsClientUpdateOptions contains the optional parameters for the ArcSettingsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/PatchArcSetting.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewArcSettingsClient().Update(ctx, "test-rg", "myCluster", "default", armazurestackhci.ArcSettingsPatch{ Properties: &armazurestackhci.ArcSettingsPatchProperties{ ConnectivityProperties: map[string]any{ "enabled": true, }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ArcSetting = armazurestackhci.ArcSetting{ // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default"), // Properties: &armazurestackhci.ArcSettingProperties{ // AggregateState: to.Ptr(armazurestackhci.ArcSettingAggregateStateCreating), // ArcInstanceResourceGroup: to.Ptr("ArcInstance-rg"), // ConnectivityProperties: map[string]any{ // "enabled": true, // }, // PerNodeDetails: []*armazurestackhci.PerNodeState{ // { // Name: to.Ptr("Node-1"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1"), // State: to.Ptr(armazurestackhci.NodeArcStateCreating), // }, // { // Name: to.Ptr("Node-2"), // ArcInstance: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2"), // State: to.Ptr(armazurestackhci.NodeArcStateCreating), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
type ArcSettingsClientBeginCreateIdentityOptions ¶ added in v0.3.0
type ArcSettingsClientBeginCreateIdentityOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ArcSettingsClientBeginCreateIdentityOptions contains the optional parameters for the ArcSettingsClient.BeginCreateIdentity method.
type ArcSettingsClientBeginDeleteOptions ¶ added in v0.2.0
type ArcSettingsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ArcSettingsClientBeginDeleteOptions contains the optional parameters for the ArcSettingsClient.BeginDelete method.
type ArcSettingsClientCreateIdentityResponse ¶ added in v0.3.0
type ArcSettingsClientCreateIdentityResponse struct { // ArcIdentity details. ArcIdentityResponse }
ArcSettingsClientCreateIdentityResponse contains the response from method ArcSettingsClient.BeginCreateIdentity.
type ArcSettingsClientCreateOptions ¶ added in v0.2.0
type ArcSettingsClientCreateOptions struct { }
ArcSettingsClientCreateOptions contains the optional parameters for the ArcSettingsClient.Create method.
type ArcSettingsClientCreateResponse ¶ added in v0.2.0
type ArcSettingsClientCreateResponse struct { // ArcSetting details. ArcSetting }
ArcSettingsClientCreateResponse contains the response from method ArcSettingsClient.Create.
type ArcSettingsClientDeleteResponse ¶ added in v0.2.0
type ArcSettingsClientDeleteResponse struct { }
ArcSettingsClientDeleteResponse contains the response from method ArcSettingsClient.BeginDelete.
type ArcSettingsClientGeneratePasswordOptions ¶ added in v0.3.0
type ArcSettingsClientGeneratePasswordOptions struct { }
ArcSettingsClientGeneratePasswordOptions contains the optional parameters for the ArcSettingsClient.GeneratePassword method.
type ArcSettingsClientGeneratePasswordResponse ¶ added in v0.3.0
type ArcSettingsClientGeneratePasswordResponse struct {
PasswordCredential
}
ArcSettingsClientGeneratePasswordResponse contains the response from method ArcSettingsClient.GeneratePassword.
type ArcSettingsClientGetOptions ¶ added in v0.2.0
type ArcSettingsClientGetOptions struct { }
ArcSettingsClientGetOptions contains the optional parameters for the ArcSettingsClient.Get method.
type ArcSettingsClientGetResponse ¶ added in v0.2.0
type ArcSettingsClientGetResponse struct { // ArcSetting details. ArcSetting }
ArcSettingsClientGetResponse contains the response from method ArcSettingsClient.Get.
type ArcSettingsClientListByClusterOptions ¶ added in v0.2.0
type ArcSettingsClientListByClusterOptions struct { }
ArcSettingsClientListByClusterOptions contains the optional parameters for the ArcSettingsClient.NewListByClusterPager method.
type ArcSettingsClientListByClusterResponse ¶ added in v0.2.0
type ArcSettingsClientListByClusterResponse struct { // List of ArcSetting proxy resources for the HCI cluster. ArcSettingList }
ArcSettingsClientListByClusterResponse contains the response from method ArcSettingsClient.NewListByClusterPager.
type ArcSettingsClientUpdateOptions ¶ added in v1.0.0
type ArcSettingsClientUpdateOptions struct { }
ArcSettingsClientUpdateOptions contains the optional parameters for the ArcSettingsClient.Update method.
type ArcSettingsClientUpdateResponse ¶ added in v1.0.0
type ArcSettingsClientUpdateResponse struct { // ArcSetting details. ArcSetting }
ArcSettingsClientUpdateResponse contains the response from method ArcSettingsClient.Update.
type ArcSettingsPatch ¶ added in v1.0.0
type ArcSettingsPatch struct { // ArcSettings properties. Properties *ArcSettingsPatchProperties // Resource tags. Tags map[string]*string }
ArcSettingsPatch - ArcSetting details to update.
func (ArcSettingsPatch) MarshalJSON ¶ added in v1.0.0
func (a ArcSettingsPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArcSettingsPatch.
func (*ArcSettingsPatch) UnmarshalJSON ¶ added in v1.1.0
func (a *ArcSettingsPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArcSettingsPatch.
type ArcSettingsPatchProperties ¶ added in v1.0.0
type ArcSettingsPatchProperties struct { // contains connectivity related configuration for ARC resources ConnectivityProperties any }
ArcSettingsPatchProperties - ArcSettings properties.
func (ArcSettingsPatchProperties) MarshalJSON ¶ added in v1.1.0
func (a ArcSettingsPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ArcSettingsPatchProperties.
func (*ArcSettingsPatchProperties) UnmarshalJSON ¶ added in v1.1.0
func (a *ArcSettingsPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ArcSettingsPatchProperties.
type ClientFactory ¶ added in v1.1.0
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.
func NewClientFactory ¶ added in v1.1.0
func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)
NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewArcSettingsClient ¶ added in v1.1.0
func (c *ClientFactory) NewArcSettingsClient() *ArcSettingsClient
NewArcSettingsClient creates a new instance of ArcSettingsClient.
func (*ClientFactory) NewClustersClient ¶ added in v1.1.0
func (c *ClientFactory) NewClustersClient() *ClustersClient
NewClustersClient creates a new instance of ClustersClient.
func (*ClientFactory) NewExtensionsClient ¶ added in v1.1.0
func (c *ClientFactory) NewExtensionsClient() *ExtensionsClient
NewExtensionsClient creates a new instance of ExtensionsClient.
func (*ClientFactory) NewOperationsClient ¶ added in v1.1.0
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
type Cluster ¶
type Cluster struct { // REQUIRED; The geo-location where the resource lives Location *string // Cluster properties. Properties *ClusterProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; System data of Cluster resource SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Cluster details.
func (Cluster) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Cluster.
func (*Cluster) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Cluster.
type ClusterDesiredProperties ¶
type ClusterDesiredProperties struct { // Desired level of diagnostic data emitted by the cluster. DiagnosticLevel *DiagnosticLevel // Desired state of Windows Server Subscription. WindowsServerSubscription *WindowsServerSubscription }
ClusterDesiredProperties - Desired properties of the cluster.
func (ClusterDesiredProperties) MarshalJSON ¶ added in v1.1.0
func (c ClusterDesiredProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterDesiredProperties.
func (*ClusterDesiredProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterDesiredProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterDesiredProperties.
type ClusterIdentityResponse ¶ added in v0.3.0
type ClusterIdentityResponse struct { // READ-ONLY; Cluster identity properties. Properties *ClusterIdentityResponseProperties }
ClusterIdentityResponse - Cluster Identity details.
func (ClusterIdentityResponse) MarshalJSON ¶ added in v1.1.0
func (c ClusterIdentityResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterIdentityResponse.
func (*ClusterIdentityResponse) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterIdentityResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterIdentityResponse.
type ClusterIdentityResponseProperties ¶ added in v0.3.0
type ClusterIdentityResponseProperties struct { AADApplicationObjectID *string AADClientID *string AADServicePrincipalObjectID *string AADTenantID *string }
func (ClusterIdentityResponseProperties) MarshalJSON ¶ added in v1.1.0
func (c ClusterIdentityResponseProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterIdentityResponseProperties.
func (*ClusterIdentityResponseProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterIdentityResponseProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterIdentityResponseProperties.
type ClusterList ¶
type ClusterList struct { // List of clusters. Value []*Cluster // READ-ONLY; Link to the next set of results. NextLink *string }
ClusterList - List of clusters.
func (ClusterList) MarshalJSON ¶
func (c ClusterList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterList.
func (*ClusterList) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterList.
type ClusterNode ¶
type ClusterNode struct { // READ-ONLY; Number of physical cores on the cluster node. CoreCount *float32 // READ-ONLY; Id of the node in the cluster. ID *float32 // READ-ONLY; Manufacturer of the cluster node hardware. Manufacturer *string // READ-ONLY; Total available memory on the cluster node (in GiB). MemoryInGiB *float32 // READ-ONLY; Model name of the cluster node hardware. Model *string // READ-ONLY; Name of the cluster node. Name *string // READ-ONLY; Operating system running on the cluster node. OSName *string // READ-ONLY; Version of the operating system running on the cluster node. OSVersion *string // READ-ONLY; Immutable id of the cluster node. SerialNumber *string // READ-ONLY; State of Windows Server Subscription. WindowsServerSubscription *WindowsServerSubscription }
ClusterNode - Cluster node details.
func (ClusterNode) MarshalJSON ¶ added in v1.1.0
func (c ClusterNode) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterNode.
func (*ClusterNode) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterNode) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterNode.
type ClusterPatch ¶
type ClusterPatch struct { // Cluster properties. Properties *ClusterPatchProperties // Resource tags. Tags map[string]*string }
ClusterPatch - Cluster details to update.
func (ClusterPatch) MarshalJSON ¶
func (c ClusterPatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterPatch.
func (*ClusterPatch) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterPatch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPatch.
type ClusterPatchProperties ¶
type ClusterPatchProperties struct { // App id of cluster AAD identity. AADClientID *string // Tenant id of cluster AAD identity. AADTenantID *string // Endpoint configured for management from the Azure portal CloudManagementEndpoint *string // Desired properties of the cluster. DesiredProperties *ClusterDesiredProperties }
ClusterPatchProperties - Cluster properties.
func (ClusterPatchProperties) MarshalJSON ¶ added in v1.1.0
func (c ClusterPatchProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterPatchProperties.
func (*ClusterPatchProperties) UnmarshalJSON ¶ added in v1.1.0
func (c *ClusterPatchProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterPatchProperties.
type ClusterProperties ¶
type ClusterProperties struct { // Object id of cluster AAD identity. AADApplicationObjectID *string // App id of cluster AAD identity. AADClientID *string // Id of cluster identity service principal. AADServicePrincipalObjectID *string // Tenant id of cluster AAD identity. AADTenantID *string // Endpoint configured for management from the Azure portal. CloudManagementEndpoint *string // Desired properties of the cluster. DesiredProperties *ClusterDesiredProperties // READ-ONLY; Type of billing applied to the resource. BillingModel *string // READ-ONLY; Unique, immutable resource id. CloudID *string // READ-ONLY; Most recent billing meter timestamp. LastBillingTimestamp *time.Time // READ-ONLY; Most recent cluster sync timestamp. LastSyncTimestamp *time.Time // READ-ONLY; Provisioning state. ProvisioningState *ProvisioningState // READ-ONLY; First cluster sync timestamp. RegistrationTimestamp *time.Time // READ-ONLY; Properties reported by cluster agent. ReportedProperties *ClusterReportedProperties // READ-ONLY; Region specific DataPath Endpoint of the cluster. ServiceEndpoint *string // READ-ONLY; Status of the cluster agent. Status *Status // READ-ONLY; Number of days remaining in the trial period. TrialDaysRemaining *float32 }
ClusterProperties - Cluster properties.
func (ClusterProperties) MarshalJSON ¶
func (c ClusterProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterProperties.
func (*ClusterProperties) UnmarshalJSON ¶
func (c *ClusterProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterProperties.
type ClusterReportedProperties ¶
type ClusterReportedProperties struct { // Level of diagnostic data emitted by the cluster. DiagnosticLevel *DiagnosticLevel // READ-ONLY; Unique id generated by the on-prem cluster. ClusterID *string // READ-ONLY; Name of the on-prem cluster connected to this resource. ClusterName *string // READ-ONLY; Version of the cluster software. ClusterVersion *string // READ-ONLY; IMDS attestation status of the cluster. ImdsAttestation *ImdsAttestation // READ-ONLY; Last time the cluster reported the data. LastUpdated *time.Time // READ-ONLY; List of nodes reported by the cluster. Nodes []*ClusterNode }
ClusterReportedProperties - Properties reported by cluster agent.
func (ClusterReportedProperties) MarshalJSON ¶
func (c ClusterReportedProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ClusterReportedProperties.
func (*ClusterReportedProperties) UnmarshalJSON ¶
func (c *ClusterReportedProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ClusterReportedProperties.
type ClustersClient ¶
type ClustersClient struct {
// contains filtered or unexported fields
}
ClustersClient contains the methods for the Clusters group. Don't use this type directly, use NewClustersClient() instead.
func NewClustersClient ¶
func NewClustersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClustersClient, error)
NewClustersClient creates a new instance of ClustersClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClustersClient) BeginCreateIdentity ¶ added in v0.3.0
func (client *ClustersClient) BeginCreateIdentity(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginCreateIdentityOptions) (*runtime.Poller[ClustersClientCreateIdentityResponse], error)
BeginCreateIdentity - Create cluster identity. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - ClustersClientBeginCreateIdentityOptions contains the optional parameters for the ClustersClient.BeginCreateIdentity method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/CreateClusterIdentity.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginCreateIdentity(ctx, "test-rg", "myCluster", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.ClusterIdentityResponse = armazurestackhci.ClusterIdentityResponse{ // Properties: &armazurestackhci.ClusterIdentityResponseProperties{ // AADApplicationObjectID: to.Ptr("00cc4014-482e-4de9-9932-83415cc75f45"), // AADClientID: to.Ptr("7b93bf67-60ac-4909-a987-ac438e69f9ba"), // AADServicePrincipalObjectID: to.Ptr("400bd05f-395f-45a6-ba75-72601df80107"), // AADTenantID: to.Ptr("bdb2c88c-9cfd-4e19-927d-51e875f6912b"), // }, // } }
Output:
func (*ClustersClient) BeginDelete ¶ added in v1.0.0
func (client *ClustersClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientBeginDeleteOptions) (*runtime.Poller[ClustersClientDeleteResponse], error)
BeginDelete - Delete an HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/DeleteCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginDelete(ctx, "test-rg", "myCluster", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ClustersClient) BeginUploadCertificate ¶ added in v0.3.0
func (client *ClustersClient) BeginUploadCertificate(ctx context.Context, resourceGroupName string, clusterName string, uploadCertificateRequest UploadCertificateRequest, options *ClustersClientBeginUploadCertificateOptions) (*runtime.Poller[ClustersClientUploadCertificateResponse], error)
BeginUploadCertificate - Upload certificate. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- uploadCertificateRequest - Upload certificate request.
- options - ClustersClientBeginUploadCertificateOptions contains the optional parameters for the ClustersClient.BeginUploadCertificate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/UploadCertificate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewClustersClient().BeginUploadCertificate(ctx, "test-rg", "myCluster", armazurestackhci.UploadCertificateRequest{ Properties: &armazurestackhci.RawCertificateData{ Certificates: []*string{ to.Ptr("base64cert"), to.Ptr("base64cert")}, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ClustersClient) Create ¶
func (client *ClustersClient) Create(ctx context.Context, resourceGroupName string, clusterName string, cluster Cluster, options *ClustersClientCreateOptions) (ClustersClientCreateResponse, error)
Create - Create an HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- cluster - Details of the HCI cluster.
- options - ClustersClientCreateOptions contains the optional parameters for the ClustersClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/CreateCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Create(ctx, "test-rg", "myCluster", armazurestackhci.Cluster{ Location: to.Ptr("East US"), Properties: &armazurestackhci.ClusterProperties{ AADClientID: to.Ptr("24a6e53d-04e5-44d2-b7cc-1b732a847dfc"), AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armazurestackhci.Cluster{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // }, // Properties: &armazurestackhci.ClusterProperties{ // AADClientID: to.Ptr("24a6e53d-04e5-44d2-b7cc-1b732a847dfc"), // AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), // BillingModel: to.Ptr("Trial"), // CloudID: to.Ptr("a3c0468f-e38e-4dda-ac48-817f620536f0"), // CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), // DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionDisabled), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // ReportedProperties: &armazurestackhci.ClusterReportedProperties{ // }, // ServiceEndpoint: to.Ptr("https://azurestackhci.azurefd.net/eastus"), // Status: to.Ptr(armazurestackhci.StatusNotYetRegistered), // TrialDaysRemaining: to.Ptr[float32](30), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
func (*ClustersClient) Get ¶
func (client *ClustersClient) Get(ctx context.Context, resourceGroupName string, clusterName string, options *ClustersClientGetOptions) (ClustersClientGetResponse, error)
Get - Get HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- options - ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/GetCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Get(ctx, "test-rg", "myCluster", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armazurestackhci.Cluster{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // }, // Properties: &armazurestackhci.ClusterProperties{ // AADClientID: to.Ptr("24a6e53d-04e5-44d2-b7cc-1b732a847dfc"), // AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), // BillingModel: to.Ptr("Trial"), // CloudID: to.Ptr("a3c0468f-e38e-4dda-ac48-817f620536f0"), // CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), // DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // LastBillingTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T08:12:55.231Z"); return t}()), // LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // RegistrationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ReportedProperties: &armazurestackhci.ClusterReportedProperties{ // ClusterID: to.Ptr("a76ac23a-1819-4e82-9410-e3e4ec3d1425"), // ClusterName: to.Ptr("cluster1"), // ClusterVersion: to.Ptr("10.0.17777"), // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // ImdsAttestation: to.Ptr(armazurestackhci.ImdsAttestationDisabled), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T19:24:42.194Z"); return t}()), // Nodes: []*armazurestackhci.ClusterNode{ // { // Name: to.Ptr("Node1"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](1), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q45CZC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node2"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](2), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44BSC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node3"), // CoreCount: to.Ptr[float32](16), // ID: to.Ptr[float32](3), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](256), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44RFC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }}, // }, // Status: to.Ptr(armazurestackhci.StatusConnectedRecently), // TrialDaysRemaining: to.Ptr[float32](30), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
func (*ClustersClient) NewListByResourceGroupPager ¶ added in v0.4.0
func (client *ClustersClient) NewListByResourceGroupPager(resourceGroupName string, options *ClustersClientListByResourceGroupOptions) *runtime.Pager[ClustersClientListByResourceGroupResponse]
NewListByResourceGroupPager - List all HCI clusters in a resource group.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/ListClustersByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().NewListByResourceGroupPager("test-rg", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterList = armazurestackhci.ClusterList{ // Value: []*armazurestackhci.Cluster{ // { // Name: to.Ptr("myCluster1"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster1"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // }, // Properties: &armazurestackhci.ClusterProperties{ // AADClientID: to.Ptr("515da1c2-379e-49b4-9975-09e3e40c86be"), // AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), // BillingModel: to.Ptr("Trial"), // CloudID: to.Ptr("91c2b355-4826-4e96-9164-e3f26dcf1cdd"), // CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), // DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // ReportedProperties: &armazurestackhci.ClusterReportedProperties{ // }, // Status: to.Ptr(armazurestackhci.StatusNotYetRegistered), // TrialDaysRemaining: to.Ptr[float32](29), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // }, // { // Name: to.Ptr("myCluster2"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster2"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // }, // Properties: &armazurestackhci.ClusterProperties{ // AADClientID: to.Ptr("24a6e53d-04e5-44d2-b7cc-1b732a847dfc"), // AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), // BillingModel: to.Ptr("Trial"), // CloudID: to.Ptr("a3c0468f-e38e-4dda-ac48-817f620536f0"), // CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), // DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // LastBillingTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T08:12:55.231Z"); return t}()), // LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // RegistrationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ReportedProperties: &armazurestackhci.ClusterReportedProperties{ // ClusterID: to.Ptr("a76ac23a-1819-4e82-9410-e3e4ec3d1425"), // ClusterName: to.Ptr("cluster1"), // ClusterVersion: to.Ptr("10.0.17777"), // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // ImdsAttestation: to.Ptr(armazurestackhci.ImdsAttestationDisabled), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T19:24:42.194Z"); return t}()), // Nodes: []*armazurestackhci.ClusterNode{ // { // Name: to.Ptr("Node1"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](0), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q45CZC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node2"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](1), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44BSC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node3"), // CoreCount: to.Ptr[float32](16), // ID: to.Ptr[float32](2), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](256), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44RFC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }}, // }, // Status: to.Ptr(armazurestackhci.StatusConnectedRecently), // TrialDaysRemaining: to.Ptr[float32](30), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*ClustersClient) NewListBySubscriptionPager ¶ added in v0.4.0
func (client *ClustersClient) NewListBySubscriptionPager(options *ClustersClientListBySubscriptionOptions) *runtime.Pager[ClustersClientListBySubscriptionResponse]
NewListBySubscriptionPager - List all HCI clusters in a subscription.
Generated from API version 2022-05-01
- options - ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/ListClustersBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewClustersClient().NewListBySubscriptionPager(nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ClusterList = armazurestackhci.ClusterList{ // Value: []*armazurestackhci.Cluster{ // { // Name: to.Ptr("myCluster1"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg1/providers/Microsoft.AzureStackHCI/clusters/myCluster1"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // }, // Properties: &armazurestackhci.ClusterProperties{ // AADClientID: to.Ptr("515da1c2-379e-49b4-9975-09e3e40c86be"), // AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), // BillingModel: to.Ptr("Trial"), // CloudID: to.Ptr("91c2b355-4826-4e96-9164-e3f26dcf1cdd"), // CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), // DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // ReportedProperties: &armazurestackhci.ClusterReportedProperties{ // }, // Status: to.Ptr(armazurestackhci.StatusNotYetRegistered), // TrialDaysRemaining: to.Ptr[float32](29), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // }, // { // Name: to.Ptr("myCluster2"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg2/providers/Microsoft.AzureStackHCI/clusters/myCluster2"), // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armazurestackhci.ClusterProperties{ // AADClientID: to.Ptr("24a6e53d-04e5-44d2-b7cc-1b732a847dfc"), // AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), // BillingModel: to.Ptr("Trial"), // CloudID: to.Ptr("a3c0468f-e38e-4dda-ac48-817f620536f0"), // CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), // DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // LastBillingTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T08:12:55.231Z"); return t}()), // LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // RegistrationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ReportedProperties: &armazurestackhci.ClusterReportedProperties{ // ClusterID: to.Ptr("a76ac23a-1819-4e82-9410-e3e4ec3d1425"), // ClusterName: to.Ptr("cluster1"), // ClusterVersion: to.Ptr("10.0.17777"), // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // ImdsAttestation: to.Ptr(armazurestackhci.ImdsAttestationDisabled), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T19:24:42.194Z"); return t}()), // Nodes: []*armazurestackhci.ClusterNode{ // { // Name: to.Ptr("Node1"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](0), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q45CZC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node2"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](1), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44BSC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node3"), // CoreCount: to.Ptr[float32](16), // ID: to.Ptr[float32](2), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](256), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44RFC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }}, // }, // Status: to.Ptr(armazurestackhci.StatusConnectedRecently), // TrialDaysRemaining: to.Ptr[float32](30), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // }}, // } } }
Output:
func (*ClustersClient) Update ¶
func (client *ClustersClient) Update(ctx context.Context, resourceGroupName string, clusterName string, cluster ClusterPatch, options *ClustersClientUpdateOptions) (ClustersClientUpdateResponse, error)
Update - Update an HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- cluster - Details of the HCI cluster.
- options - ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/UpdateCluster.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewClustersClient().Update(ctx, "test-rg", "myCluster", armazurestackhci.ClusterPatch{ Properties: &armazurestackhci.ClusterPatchProperties{ CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), }, }, Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Cluster = armazurestackhci.Cluster{ // Name: to.Ptr("myCluster"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster"), // Location: to.Ptr("East US"), // Tags: map[string]*string{ // "tag1": to.Ptr("value1"), // "tag2": to.Ptr("value2"), // }, // Properties: &armazurestackhci.ClusterProperties{ // AADClientID: to.Ptr("515da1c2-379e-49b4-9975-09e3e40c86be"), // AADTenantID: to.Ptr("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"), // BillingModel: to.Ptr("Trial"), // CloudID: to.Ptr("91c2b355-4826-4e96-9164-e3f26dcf1cdd"), // CloudManagementEndpoint: to.Ptr("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"), // DesiredProperties: &armazurestackhci.ClusterDesiredProperties{ // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // LastBillingTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-12T08:12:55.231Z"); return t}()), // LastSyncTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // RegistrationTimestamp: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T20:44:32.562Z"); return t}()), // ReportedProperties: &armazurestackhci.ClusterReportedProperties{ // ClusterID: to.Ptr("a76ac23a-1819-4e82-9410-e3e4ec3d1425"), // ClusterName: to.Ptr("cluster1"), // ClusterVersion: to.Ptr("10.0.17777"), // DiagnosticLevel: to.Ptr(armazurestackhci.DiagnosticLevelBasic), // ImdsAttestation: to.Ptr(armazurestackhci.ImdsAttestationDisabled), // LastUpdated: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-03-11T19:24:42.194Z"); return t}()), // Nodes: []*armazurestackhci.ClusterNode{ // { // Name: to.Ptr("Node1"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](1), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q45CZC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node2"), // CoreCount: to.Ptr[float32](8), // ID: to.Ptr[float32](2), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](128), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44BSC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }, // { // Name: to.Ptr("Node3"), // CoreCount: to.Ptr[float32](16), // ID: to.Ptr[float32](3), // Manufacturer: to.Ptr("Dell Inc."), // MemoryInGiB: to.Ptr[float32](256), // Model: to.Ptr("EMC AX740"), // OSName: to.Ptr("Azure Stack HCI"), // OSVersion: to.Ptr("10.0.17777.1061"), // SerialNumber: to.Ptr("Q44RFC3"), // WindowsServerSubscription: to.Ptr(armazurestackhci.WindowsServerSubscriptionEnabled), // }}, // }, // Status: to.Ptr(armazurestackhci.StatusConnectedRecently), // TrialDaysRemaining: to.Ptr[float32](30), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
type ClustersClientBeginCreateIdentityOptions ¶ added in v0.3.0
type ClustersClientBeginCreateIdentityOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginCreateIdentityOptions contains the optional parameters for the ClustersClient.BeginCreateIdentity method.
type ClustersClientBeginDeleteOptions ¶ added in v1.0.0
type ClustersClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginDeleteOptions contains the optional parameters for the ClustersClient.BeginDelete method.
type ClustersClientBeginUploadCertificateOptions ¶ added in v0.3.0
type ClustersClientBeginUploadCertificateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ClustersClientBeginUploadCertificateOptions contains the optional parameters for the ClustersClient.BeginUploadCertificate method.
type ClustersClientCreateIdentityResponse ¶ added in v0.3.0
type ClustersClientCreateIdentityResponse struct { // Cluster Identity details. ClusterIdentityResponse }
ClustersClientCreateIdentityResponse contains the response from method ClustersClient.BeginCreateIdentity.
type ClustersClientCreateOptions ¶ added in v0.2.0
type ClustersClientCreateOptions struct { }
ClustersClientCreateOptions contains the optional parameters for the ClustersClient.Create method.
type ClustersClientCreateResponse ¶ added in v0.2.0
type ClustersClientCreateResponse struct { // Cluster details. Cluster }
ClustersClientCreateResponse contains the response from method ClustersClient.Create.
type ClustersClientDeleteResponse ¶ added in v0.2.0
type ClustersClientDeleteResponse struct { }
ClustersClientDeleteResponse contains the response from method ClustersClient.BeginDelete.
type ClustersClientGetOptions ¶ added in v0.2.0
type ClustersClientGetOptions struct { }
ClustersClientGetOptions contains the optional parameters for the ClustersClient.Get method.
type ClustersClientGetResponse ¶ added in v0.2.0
type ClustersClientGetResponse struct { // Cluster details. Cluster }
ClustersClientGetResponse contains the response from method ClustersClient.Get.
type ClustersClientListByResourceGroupOptions ¶ added in v0.2.0
type ClustersClientListByResourceGroupOptions struct { }
ClustersClientListByResourceGroupOptions contains the optional parameters for the ClustersClient.NewListByResourceGroupPager method.
type ClustersClientListByResourceGroupResponse ¶ added in v0.2.0
type ClustersClientListByResourceGroupResponse struct { // List of clusters. ClusterList }
ClustersClientListByResourceGroupResponse contains the response from method ClustersClient.NewListByResourceGroupPager.
type ClustersClientListBySubscriptionOptions ¶ added in v0.2.0
type ClustersClientListBySubscriptionOptions struct { }
ClustersClientListBySubscriptionOptions contains the optional parameters for the ClustersClient.NewListBySubscriptionPager method.
type ClustersClientListBySubscriptionResponse ¶ added in v0.2.0
type ClustersClientListBySubscriptionResponse struct { // List of clusters. ClusterList }
ClustersClientListBySubscriptionResponse contains the response from method ClustersClient.NewListBySubscriptionPager.
type ClustersClientUpdateOptions ¶ added in v0.2.0
type ClustersClientUpdateOptions struct { }
ClustersClientUpdateOptions contains the optional parameters for the ClustersClient.Update method.
type ClustersClientUpdateResponse ¶ added in v0.2.0
type ClustersClientUpdateResponse struct { // Cluster details. Cluster }
ClustersClientUpdateResponse contains the response from method ClustersClient.Update.
type ClustersClientUploadCertificateResponse ¶ added in v0.3.0
type ClustersClientUploadCertificateResponse struct { }
ClustersClientUploadCertificateResponse contains the response from method ClustersClient.BeginUploadCertificate.
type CreatedByType ¶
type CreatedByType string
CreatedByType - The type of identity that created the resource.
const ( CreatedByTypeApplication CreatedByType = "Application" CreatedByTypeKey CreatedByType = "Key" CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity" CreatedByTypeUser CreatedByType = "User" )
func PossibleCreatedByTypeValues ¶
func PossibleCreatedByTypeValues() []CreatedByType
PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.
type DiagnosticLevel ¶
type DiagnosticLevel string
DiagnosticLevel - Desired level of diagnostic data emitted by the cluster.
const ( DiagnosticLevelBasic DiagnosticLevel = "Basic" DiagnosticLevelEnhanced DiagnosticLevel = "Enhanced" DiagnosticLevelOff DiagnosticLevel = "Off" )
func PossibleDiagnosticLevelValues ¶
func PossibleDiagnosticLevelValues() []DiagnosticLevel
PossibleDiagnosticLevelValues returns the possible values for the DiagnosticLevel const type.
type Extension ¶
type Extension struct { // Describes Machine Extension Properties. Properties *ExtensionProperties // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; System data of Extension resource. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
Extension - Details of a particular extension in HCI Cluster.
func (Extension) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Extension.
func (*Extension) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Extension.
type ExtensionAggregateState ¶
type ExtensionAggregateState string
ExtensionAggregateState - Aggregate state of Arc Extensions across the nodes in this HCI cluster.
const ( ExtensionAggregateStateCanceled ExtensionAggregateState = "Canceled" ExtensionAggregateStateConnected ExtensionAggregateState = "Connected" ExtensionAggregateStateCreating ExtensionAggregateState = "Creating" ExtensionAggregateStateDeleted ExtensionAggregateState = "Deleted" ExtensionAggregateStateDeleting ExtensionAggregateState = "Deleting" ExtensionAggregateStateDisconnected ExtensionAggregateState = "Disconnected" ExtensionAggregateStateError ExtensionAggregateState = "Error" ExtensionAggregateStateFailed ExtensionAggregateState = "Failed" ExtensionAggregateStateInProgress ExtensionAggregateState = "InProgress" ExtensionAggregateStateMoving ExtensionAggregateState = "Moving" ExtensionAggregateStateNotSpecified ExtensionAggregateState = "NotSpecified" ExtensionAggregateStatePartiallyConnected ExtensionAggregateState = "PartiallyConnected" ExtensionAggregateStatePartiallySucceeded ExtensionAggregateState = "PartiallySucceeded" ExtensionAggregateStateSucceeded ExtensionAggregateState = "Succeeded" ExtensionAggregateStateUpdating ExtensionAggregateState = "Updating" )
func PossibleExtensionAggregateStateValues ¶
func PossibleExtensionAggregateStateValues() []ExtensionAggregateState
PossibleExtensionAggregateStateValues returns the possible values for the ExtensionAggregateState const type.
type ExtensionList ¶
type ExtensionList struct { // READ-ONLY; Link to the next set of results. NextLink *string // READ-ONLY; List of Extensions in HCI cluster. Value []*Extension }
ExtensionList - List of Extensions in HCI cluster.
func (ExtensionList) MarshalJSON ¶
func (e ExtensionList) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtensionList.
func (*ExtensionList) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtensionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionList.
type ExtensionParameters ¶
type ExtensionParameters struct { // Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, // however, the extension will not upgrade minor versions unless redeployed, even // with this property set to true. AutoUpgradeMinorVersion *bool // How the extension handler should be forced to update even if the extension configuration has not changed. ForceUpdateTag *string // Protected settings (may contain secrets). ProtectedSettings any // The name of the extension handler publisher. Publisher *string // Json formatted public settings for the extension. Settings any // Specifies the type of the extension; an example is "CustomScriptExtension". Type *string // Specifies the version of the script handler. TypeHandlerVersion *string }
ExtensionParameters - Describes the properties of a Machine Extension. This object mirrors the definition in HybridCompute.
func (ExtensionParameters) MarshalJSON ¶ added in v1.1.0
func (e ExtensionParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtensionParameters.
func (*ExtensionParameters) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtensionParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionParameters.
type ExtensionProperties ¶
type ExtensionProperties struct { // Parameters specific to this extension type. ExtensionParameters *ExtensionParameters // READ-ONLY; Aggregate state of Arc Extensions across the nodes in this HCI cluster. AggregateState *ExtensionAggregateState // READ-ONLY; State of Arc Extension in each of the nodes. PerNodeExtensionDetails []*PerNodeExtensionState // READ-ONLY; Provisioning state of the Extension proxy resource. ProvisioningState *ProvisioningState }
ExtensionProperties - Status of Arc Extension for a particular node in HCI Cluster.
func (ExtensionProperties) MarshalJSON ¶
func (e ExtensionProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ExtensionProperties.
func (*ExtensionProperties) UnmarshalJSON ¶ added in v1.1.0
func (e *ExtensionProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionProperties.
type ExtensionsClient ¶
type ExtensionsClient struct {
// contains filtered or unexported fields
}
ExtensionsClient contains the methods for the Extensions group. Don't use this type directly, use NewExtensionsClient() instead.
func NewExtensionsClient ¶
func NewExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtensionsClient, error)
NewExtensionsClient creates a new instance of ExtensionsClient with the specified values.
- subscriptionID - The ID of the target subscription.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ExtensionsClient) BeginCreate ¶
func (client *ExtensionsClient) BeginCreate(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, extensionName string, extension Extension, options *ExtensionsClientBeginCreateOptions) (*runtime.Poller[ExtensionsClientCreateResponse], error)
BeginCreate - Create Extension for HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- extensionName - The name of the machine extension.
- extension - Details of the Machine Extension to be created.
- options - ExtensionsClientBeginCreateOptions contains the optional parameters for the ExtensionsClient.BeginCreate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/PutExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginCreate(ctx, "test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", armazurestackhci.Extension{ Properties: &armazurestackhci.ExtensionProperties{ ExtensionParameters: &armazurestackhci.ExtensionParameters{ Type: to.Ptr("MicrosoftMonitoringAgent"), ProtectedSettings: map[string]any{ "workspaceKey": "xx", }, Publisher: to.Ptr("Microsoft.Compute"), Settings: map[string]any{ "workspaceId": "xx", }, TypeHandlerVersion: to.Ptr("1.10"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Extension = armazurestackhci.Extension{ // Name: to.Ptr("MicrosoftMonitoringAgent"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings/extensions"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent"), // Properties: &armazurestackhci.ExtensionProperties{ // AggregateState: to.Ptr(armazurestackhci.ExtensionAggregateStatePartiallySucceeded), // ExtensionParameters: &armazurestackhci.ExtensionParameters{ // Type: to.Ptr("string"), // AutoUpgradeMinorVersion: to.Ptr(false), // Publisher: to.Ptr("Microsoft.Compute"), // Settings: map[string]any{ // "workspaceId": "xx", // }, // TypeHandlerVersion: to.Ptr("1.10.3"), // }, // PerNodeExtensionDetails: []*armazurestackhci.PerNodeExtensionState{ // { // Name: to.Ptr("Node-1"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateSucceeded), // }, // { // Name: to.Ptr("Node-2"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateFailed), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
func (*ExtensionsClient) BeginDelete ¶
func (client *ExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, extensionName string, options *ExtensionsClientBeginDeleteOptions) (*runtime.Poller[ExtensionsClientDeleteResponse], error)
BeginDelete - Delete particular Arc Extension of HCI Cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- extensionName - The name of the machine extension.
- options - ExtensionsClientBeginDeleteOptions contains the optional parameters for the ExtensionsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/DeleteExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginDelete(ctx, "test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } _, err = poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } }
Output:
func (*ExtensionsClient) BeginUpdate ¶
func (client *ExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, extensionName string, extension Extension, options *ExtensionsClientBeginUpdateOptions) (*runtime.Poller[ExtensionsClientUpdateResponse], error)
BeginUpdate - Update Extension for HCI cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- extensionName - The name of the machine extension.
- extension - Details of the Machine Extension to be created.
- options - ExtensionsClientBeginUpdateOptions contains the optional parameters for the ExtensionsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/PatchExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewExtensionsClient().BeginUpdate(ctx, "test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", armazurestackhci.Extension{ Properties: &armazurestackhci.ExtensionProperties{ ExtensionParameters: &armazurestackhci.ExtensionParameters{ Type: to.Ptr("MicrosoftMonitoringAgent"), Publisher: to.Ptr("Microsoft.Compute"), Settings: map[string]any{ "workspaceId": "xx", }, TypeHandlerVersion: to.Ptr("1.10"), }, }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Extension = armazurestackhci.Extension{ // Name: to.Ptr("MicrosoftMonitoringAgent"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings/extensions"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent"), // Properties: &armazurestackhci.ExtensionProperties{ // AggregateState: to.Ptr(armazurestackhci.ExtensionAggregateStatePartiallyConnected), // ExtensionParameters: &armazurestackhci.ExtensionParameters{ // Type: to.Ptr("string"), // AutoUpgradeMinorVersion: to.Ptr(false), // Publisher: to.Ptr("Microsoft.Compute"), // Settings: map[string]any{ // "workspaceId": "xx", // }, // TypeHandlerVersion: to.Ptr("1.10.3"), // }, // PerNodeExtensionDetails: []*armazurestackhci.PerNodeExtensionState{ // { // Name: to.Ptr("Node-1"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateConnected), // }, // { // Name: to.Ptr("Node-2"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateDisconnected), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
func (*ExtensionsClient) Get ¶
func (client *ExtensionsClient) Get(ctx context.Context, resourceGroupName string, clusterName string, arcSettingName string, extensionName string, options *ExtensionsClientGetOptions) (ExtensionsClientGetResponse, error)
Get - Get particular Arc Extension of HCI Cluster. If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- extensionName - The name of the machine extension.
- options - ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/GetExtension.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewExtensionsClient().Get(ctx, "test-rg", "myCluster", "default", "MicrosoftMonitoringAgent", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.Extension = armazurestackhci.Extension{ // Name: to.Ptr("MicrosoftMonitoringAgent"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings/extensions"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent"), // Properties: &armazurestackhci.ExtensionProperties{ // AggregateState: to.Ptr(armazurestackhci.ExtensionAggregateStatePartiallySucceeded), // ExtensionParameters: &armazurestackhci.ExtensionParameters{ // Type: to.Ptr("string"), // AutoUpgradeMinorVersion: to.Ptr(false), // Publisher: to.Ptr("Microsoft.Compute"), // Settings: map[string]any{ // "workspaceId": "xx", // }, // TypeHandlerVersion: to.Ptr("1.10.3"), // }, // PerNodeExtensionDetails: []*armazurestackhci.PerNodeExtensionState{ // { // Name: to.Ptr("Node-1"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateSucceeded), // }, // { // Name: to.Ptr("Node-2"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateFailed), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // } }
Output:
func (*ExtensionsClient) NewListByArcSettingPager ¶ added in v0.4.0
func (client *ExtensionsClient) NewListByArcSettingPager(resourceGroupName string, clusterName string, arcSettingName string, options *ExtensionsClientListByArcSettingOptions) *runtime.Pager[ExtensionsClientListByArcSettingResponse]
NewListByArcSettingPager - List all Extensions under ArcSetting resource.
Generated from API version 2022-05-01
- resourceGroupName - The name of the resource group. The name is case insensitive.
- clusterName - The name of the cluster.
- arcSettingName - The name of the proxy resource holding details of HCI ArcSetting information.
- options - ExtensionsClientListByArcSettingOptions contains the optional parameters for the ExtensionsClient.NewListByArcSettingPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/ListExtensionsByArcSetting.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewExtensionsClient().NewListByArcSettingPager("test-rg", "myCluster", "default", nil) for pager.More() { page, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range page.Value { // You could use page here. We use blank identifier for just demo purposes. _ = v } // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // page.ExtensionList = armazurestackhci.ExtensionList{ // Value: []*armazurestackhci.Extension{ // { // Name: to.Ptr("MicrosoftMonitoringAgent"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings/extensions"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/extensions/MicrosoftMonitoringAgent"), // Properties: &armazurestackhci.ExtensionProperties{ // AggregateState: to.Ptr(armazurestackhci.ExtensionAggregateStatePartiallyConnected), // ExtensionParameters: &armazurestackhci.ExtensionParameters{ // Type: to.Ptr("string"), // AutoUpgradeMinorVersion: to.Ptr(false), // Publisher: to.Ptr("Microsoft.Compute"), // Settings: map[string]any{ // "workspaceId": "xx", // }, // TypeHandlerVersion: to.Ptr("1.10.3"), // }, // PerNodeExtensionDetails: []*armazurestackhci.PerNodeExtensionState{ // { // Name: to.Ptr("Node-1"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateConnected), // }, // { // Name: to.Ptr("Node-2"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/Extensions/MicrosoftMonitoringAgent"), // State: to.Ptr(armazurestackhci.NodeExtensionStateDisconnected), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // }, // { // Name: to.Ptr("CustomScriptExtension"), // Type: to.Ptr("Microsoft.AzureStackHCI/clusters/arcSettings/extensions"), // ID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/test-rg/providers/Microsoft.AzureStackHCI/clusters/myCluster/arcSettings/default/Extensions/SecurityExtension"), // Properties: &armazurestackhci.ExtensionProperties{ // AggregateState: to.Ptr(armazurestackhci.ExtensionAggregateStatePartiallySucceeded), // ExtensionParameters: &armazurestackhci.ExtensionParameters{ // Type: to.Ptr("string"), // AutoUpgradeMinorVersion: to.Ptr(false), // Publisher: to.Ptr("Microsoft.CustomScriptExtension"), // Settings: map[string]any{ // "scriptLocation": "xx", // }, // TypeHandlerVersion: to.Ptr("1.10.3"), // }, // PerNodeExtensionDetails: []*armazurestackhci.PerNodeExtensionState{ // { // Name: to.Ptr("Node-1"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1/Extensions/SecurityExtension"), // State: to.Ptr(armazurestackhci.NodeExtensionStateSucceeded), // }, // { // Name: to.Ptr("Node-2"), // Extension: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-2/Extensions/SecurityExtension"), // State: to.Ptr(armazurestackhci.NodeExtensionStateFailed), // }}, // ProvisioningState: to.Ptr(armazurestackhci.ProvisioningStateSucceeded), // }, // SystemData: &armazurestackhci.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-01T17:18:19.123Z"); return t}()), // CreatedBy: to.Ptr("user1"), // CreatedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-01-02T17:18:19.123Z"); return t}()), // LastModifiedBy: to.Ptr("user2"), // LastModifiedByType: to.Ptr(armazurestackhci.CreatedByTypeUser), // }, // }}, // } } }
Output:
type ExtensionsClientBeginCreateOptions ¶ added in v0.2.0
type ExtensionsClientBeginCreateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginCreateOptions contains the optional parameters for the ExtensionsClient.BeginCreate method.
type ExtensionsClientBeginDeleteOptions ¶ added in v0.2.0
type ExtensionsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginDeleteOptions contains the optional parameters for the ExtensionsClient.BeginDelete method.
type ExtensionsClientBeginUpdateOptions ¶ added in v0.2.0
type ExtensionsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
ExtensionsClientBeginUpdateOptions contains the optional parameters for the ExtensionsClient.BeginUpdate method.
type ExtensionsClientCreateResponse ¶ added in v0.2.0
type ExtensionsClientCreateResponse struct { // Details of a particular extension in HCI Cluster. Extension }
ExtensionsClientCreateResponse contains the response from method ExtensionsClient.BeginCreate.
type ExtensionsClientDeleteResponse ¶ added in v0.2.0
type ExtensionsClientDeleteResponse struct { }
ExtensionsClientDeleteResponse contains the response from method ExtensionsClient.BeginDelete.
type ExtensionsClientGetOptions ¶ added in v0.2.0
type ExtensionsClientGetOptions struct { }
ExtensionsClientGetOptions contains the optional parameters for the ExtensionsClient.Get method.
type ExtensionsClientGetResponse ¶ added in v0.2.0
type ExtensionsClientGetResponse struct { // Details of a particular extension in HCI Cluster. Extension }
ExtensionsClientGetResponse contains the response from method ExtensionsClient.Get.
type ExtensionsClientListByArcSettingOptions ¶ added in v0.2.0
type ExtensionsClientListByArcSettingOptions struct { }
ExtensionsClientListByArcSettingOptions contains the optional parameters for the ExtensionsClient.NewListByArcSettingPager method.
type ExtensionsClientListByArcSettingResponse ¶ added in v0.2.0
type ExtensionsClientListByArcSettingResponse struct { // List of Extensions in HCI cluster. ExtensionList }
ExtensionsClientListByArcSettingResponse contains the response from method ExtensionsClient.NewListByArcSettingPager.
type ExtensionsClientUpdateResponse ¶ added in v0.2.0
type ExtensionsClientUpdateResponse struct { // Details of a particular extension in HCI Cluster. Extension }
ExtensionsClientUpdateResponse contains the response from method ExtensionsClient.BeginUpdate.
type ImdsAttestation ¶
type ImdsAttestation string
ImdsAttestation - IMDS attestation status of the cluster.
const ( ImdsAttestationDisabled ImdsAttestation = "Disabled" ImdsAttestationEnabled ImdsAttestation = "Enabled" )
func PossibleImdsAttestationValues ¶
func PossibleImdsAttestationValues() []ImdsAttestation
PossibleImdsAttestationValues returns the possible values for the ImdsAttestation const type.
type NodeArcState ¶
type NodeArcState string
NodeArcState - State of Arc agent in this node.
const ( NodeArcStateCanceled NodeArcState = "Canceled" NodeArcStateConnected NodeArcState = "Connected" NodeArcStateCreating NodeArcState = "Creating" NodeArcStateDeleted NodeArcState = "Deleted" NodeArcStateDeleting NodeArcState = "Deleting" NodeArcStateDisconnected NodeArcState = "Disconnected" NodeArcStateError NodeArcState = "Error" NodeArcStateFailed NodeArcState = "Failed" NodeArcStateMoving NodeArcState = "Moving" NodeArcStateNotSpecified NodeArcState = "NotSpecified" NodeArcStateSucceeded NodeArcState = "Succeeded" NodeArcStateUpdating NodeArcState = "Updating" )
func PossibleNodeArcStateValues ¶
func PossibleNodeArcStateValues() []NodeArcState
PossibleNodeArcStateValues returns the possible values for the NodeArcState const type.
type NodeExtensionState ¶
type NodeExtensionState string
NodeExtensionState - State of Arc Extension in this node.
const ( NodeExtensionStateCanceled NodeExtensionState = "Canceled" NodeExtensionStateConnected NodeExtensionState = "Connected" NodeExtensionStateCreating NodeExtensionState = "Creating" NodeExtensionStateDeleted NodeExtensionState = "Deleted" NodeExtensionStateDeleting NodeExtensionState = "Deleting" NodeExtensionStateDisconnected NodeExtensionState = "Disconnected" NodeExtensionStateError NodeExtensionState = "Error" NodeExtensionStateFailed NodeExtensionState = "Failed" NodeExtensionStateMoving NodeExtensionState = "Moving" NodeExtensionStateNotSpecified NodeExtensionState = "NotSpecified" NodeExtensionStateSucceeded NodeExtensionState = "Succeeded" NodeExtensionStateUpdating NodeExtensionState = "Updating" )
func PossibleNodeExtensionStateValues ¶
func PossibleNodeExtensionStateValues() []NodeExtensionState
PossibleNodeExtensionStateValues returns the possible values for the NodeExtensionState const type.
type Operation ¶
type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane // operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin }
Operation - Details of a REST API operation, returned from the Resource Provider Operations API
func (Operation) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaller interface for type Operation.
type OperationDisplay ¶
type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string }
OperationDisplay - Localized display information for this particular operation.
func (OperationDisplay) MarshalJSON ¶ added in v1.1.0
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationDisplay) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationDisplay.
type OperationListResult ¶
type OperationListResult struct { // READ-ONLY; URL to get the next set of operation list results (if there are any). NextLink *string // READ-ONLY; List of operations supported by the resource provider Value []*Operation }
OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results.
func (OperationListResult) MarshalJSON ¶
func (o OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationListResult.
func (*OperationListResult) UnmarshalJSON ¶ added in v1.1.0
func (o *OperationListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.
type OperationsClient ¶
type OperationsClient struct {
// contains filtered or unexported fields
}
OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.
func NewOperationsClient ¶
func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)
NewOperationsClient creates a new instance of OperationsClient with the specified values.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*OperationsClient) List ¶
func (client *OperationsClient) List(ctx context.Context, options *OperationsClientListOptions) (OperationsClientListResponse, error)
List - List all available Microsoft.AzureStackHCI provider operations If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2022-05-01
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2022-05-01/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/azurestackhci/armazurestackhci" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armazurestackhci.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewOperationsClient().List(ctx, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // You could use response here. We use blank identifier for just demo purposes. _ = res // If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. // res.OperationListResult = armazurestackhci.OperationListResult{ // Value: []*armazurestackhci.Operation{ // { // Name: to.Ptr("Microsoft.AzureStackHCI/Register/Action"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Registers the subscription for the Azure Stack HCI resource provider and enables the creation of Azure Stack HCI resources."), // Operation: to.Ptr("Registers the Azure Stack HCI Resource Provider"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Register"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Unregister/Action"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Unregisters the subscription for the Azure Stack HCI resource provider."), // Operation: to.Ptr("Unregisters the Azure Stack HCI Resource Provider"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Unregister"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Operations/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets operations"), // Operation: to.Ptr("Gets/List operations resources"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Operations"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets clusters"), // Operation: to.Ptr("Gets/List cluster resources"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Creates or updates a cluster"), // Operation: to.Ptr("Create/update cluster resources"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Deletes cluster resource"), // Operation: to.Ptr("Deletes cluster resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/ArcSettings/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets arc resource of HCI cluster"), // Operation: to.Ptr("Gets/List arc resources"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters/ArcSettings"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/ArcSettings/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Create or updates arc resource of HCI cluster"), // Operation: to.Ptr("Create/Update arc resources"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters/ArcSettings"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/ArcSettings/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Delete arc resource of HCI cluster"), // Operation: to.Ptr("Delete arc resources"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters/ArcSettings"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/ArcSettings/Extensions/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets extension resource of HCI cluster"), // Operation: to.Ptr("Gets/List extension resources of HCI cluster"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters/ArcSettings/Extensions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/ArcSettings/Extensions/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Create or update extension resource of HCI cluster"), // Operation: to.Ptr("Create/Update extension resources of HCI cluster"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters/ArcSettings/Extensions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/Clusters/ArcSettings/Extensions/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Delete extension resources of HCI cluster"), // Operation: to.Ptr("Delete extension resources of HCI cluster"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("Clusters/ArcSettings/Extensions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Restart/Action"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Restarts virtual machine resource"), // Operation: to.Ptr("Restarts virtual machine resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Start/Action"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Starts virtual machine resource"), // Operation: to.Ptr("Starts virtual machine resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Stop/Action"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Stops virtual machine resource"), // Operation: to.Ptr("Stops virtual machine resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Deletes virtual machine resource"), // Operation: to.Ptr("Deletes virtual machine resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Creates/Updates virtual machine resource"), // Operation: to.Ptr("Creates/Updates virtual machine resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets/Lists virtual machine resource"), // Operation: to.Ptr("Gets/Lists virtual machine resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualNetworks/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Deletes virtual networks resource"), // Operation: to.Ptr("Deletes virtual networks resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualNetworks"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualNetworks/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Creates/Updates virtual networks resource"), // Operation: to.Ptr("Creates/Updates virtual networks resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualNetworks"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualNetworks/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets/Lists virtual networks resource"), // Operation: to.Ptr("Gets/Lists virtual networks resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualNetworks"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualHardDisks/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Deletes virtual hard disk resource"), // Operation: to.Ptr("Deletes virtual hard disk resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualHardDisks"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualHardDisks/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Creates/Updates virtual hard disk resource"), // Operation: to.Ptr("Creates/Updates virtual hard disk resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualHardDisks"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualHardDisks/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets/Lists virtual hard disk resource"), // Operation: to.Ptr("Gets/Lists virtual hard disk resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualHardDisks"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/NetworkInterfaces/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Deletes network interfaces resource"), // Operation: to.Ptr("Deletes network interfaces resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("NetworkInterfaces"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/NetworkInterfaces/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Creates/Updates network interfaces resource"), // Operation: to.Ptr("Creates/Updates network interfaces resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("NetworkInterfaces"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/NetworkInterfaces/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets/Lists network interfaces resource"), // Operation: to.Ptr("Gets/Lists network interfaces resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("NetworkInterfaces"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/GalleryImages/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Deletes gallery images resource"), // Operation: to.Ptr("Deletes gallery images resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("GalleryImages"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/GalleryImages/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Creates/Updates gallery images resource"), // Operation: to.Ptr("Creates/Updates gallery images resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("GalleryImages"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/GalleryImages/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets/Lists gallery images resource"), // Operation: to.Ptr("Gets/Lists gallery images resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("GalleryImages"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/HybridIdentityMetadata/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets/Lists virtual machine hybrid identity metadata proxy resource"), // Operation: to.Ptr("Gets/Lists virtual machine hybrid identity metadata proxy resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines/HybridIdentityMetadata"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Extensions/Read"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Gets/Lists virtual machine extensions resource"), // Operation: to.Ptr("Gets/Lists virtual machine extensions resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines/Extensions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Extensions/Write"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Creates/Updates virtual machine extensions resource"), // Operation: to.Ptr("Creates/Updates virtual machine extensions resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines/Extensions"), // }, // IsDataAction: to.Ptr(false), // }, // { // Name: to.Ptr("Microsoft.AzureStackHCI/VirtualMachines/Extensions/Delete"), // Display: &armazurestackhci.OperationDisplay{ // Description: to.Ptr("Deletes virtual machine extensions resource"), // Operation: to.Ptr("Deletes virtual machine extensions resource"), // Provider: to.Ptr("Microsoft.AzureStackHCI"), // Resource: to.Ptr("VirtualMachines/Extensions"), // }, // IsDataAction: to.Ptr(false), // }}, // } }
Output:
type OperationsClientListOptions ¶ added in v0.2.0
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶ added in v0.2.0
type OperationsClientListResponse struct { // A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. OperationListResult }
OperationsClientListResponse contains the response from method OperationsClient.List.
type Origin ¶
type Origin string
Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system"
func PossibleOriginValues ¶
func PossibleOriginValues() []Origin
PossibleOriginValues returns the possible values for the Origin const type.
type PasswordCredential ¶ added in v0.3.0
type PasswordCredential struct { EndDateTime *time.Time KeyID *string SecretText *string StartDateTime *time.Time }
func (PasswordCredential) MarshalJSON ¶ added in v0.3.0
func (p PasswordCredential) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PasswordCredential.
func (*PasswordCredential) UnmarshalJSON ¶ added in v0.3.0
func (p *PasswordCredential) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PasswordCredential.
type PerNodeExtensionState ¶
type PerNodeExtensionState struct { // READ-ONLY; Fully qualified resource ID for the particular Arc Extension on this node. Extension *string // READ-ONLY; Name of the node in HCI Cluster. Name *string // READ-ONLY; State of Arc Extension in this node. State *NodeExtensionState }
PerNodeExtensionState - Status of Arc Extension for a particular node in HCI Cluster.
func (PerNodeExtensionState) MarshalJSON ¶ added in v1.1.0
func (p PerNodeExtensionState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PerNodeExtensionState.
func (*PerNodeExtensionState) UnmarshalJSON ¶ added in v1.1.0
func (p *PerNodeExtensionState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PerNodeExtensionState.
type PerNodeState ¶
type PerNodeState struct { // READ-ONLY; Fully qualified resource ID for the Arc agent of this node. ArcInstance *string // READ-ONLY; Name of the Node in HCI Cluster Name *string // READ-ONLY; State of Arc agent in this node. State *NodeArcState }
PerNodeState - Status of Arc agent for a particular node in HCI Cluster.
func (PerNodeState) MarshalJSON ¶ added in v1.1.0
func (p PerNodeState) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type PerNodeState.
func (*PerNodeState) UnmarshalJSON ¶ added in v1.1.0
func (p *PerNodeState) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type PerNodeState.
type ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Provisioning state of the ArcSetting proxy resource.
const ( ProvisioningStateAccepted ProvisioningState = "Accepted" ProvisioningStateCanceled ProvisioningState = "Canceled" ProvisioningStateFailed ProvisioningState = "Failed" ProvisioningStateProvisioning ProvisioningState = "Provisioning" ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type RawCertificateData ¶ added in v0.3.0
type RawCertificateData struct {
Certificates []*string
}
func (RawCertificateData) MarshalJSON ¶ added in v0.3.0
func (r RawCertificateData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type RawCertificateData.
func (*RawCertificateData) UnmarshalJSON ¶ added in v1.1.0
func (r *RawCertificateData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type RawCertificateData.
type Status ¶
type Status string
Status - Status of the cluster agent.
func PossibleStatusValues ¶
func PossibleStatusValues() []Status
PossibleStatusValues returns the possible values for the Status const type.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time // The identity that created the resource. CreatedBy *string // The type of identity that created the resource. CreatedByType *CreatedByType // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time // The identity that last modified the resource. LastModifiedBy *string // The type of identity that last modified the resource. LastModifiedByType *CreatedByType }
SystemData - Metadata pertaining to creation and last modification of the resource.
func (SystemData) MarshalJSON ¶
func (s SystemData) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type SystemData.
func (*SystemData) UnmarshalJSON ¶
func (s *SystemData) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.
type UploadCertificateRequest ¶ added in v0.3.0
type UploadCertificateRequest struct {
Properties *RawCertificateData
}
func (UploadCertificateRequest) MarshalJSON ¶ added in v1.1.0
func (u UploadCertificateRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type UploadCertificateRequest.
func (*UploadCertificateRequest) UnmarshalJSON ¶ added in v1.1.0
func (u *UploadCertificateRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type UploadCertificateRequest.
type WindowsServerSubscription ¶
type WindowsServerSubscription string
WindowsServerSubscription - Desired state of Windows Server Subscription.
const ( WindowsServerSubscriptionDisabled WindowsServerSubscription = "Disabled" WindowsServerSubscriptionEnabled WindowsServerSubscription = "Enabled" )
func PossibleWindowsServerSubscriptionValues ¶
func PossibleWindowsServerSubscriptionValues() []WindowsServerSubscription
PossibleWindowsServerSubscriptionValues returns the possible values for the WindowsServerSubscription const type.