Documentation ¶
Index ¶
- type ActionType
- type ClientFactory
- func (c *ClientFactory) NewOperationsClient() *OperationsClient
- func (c *ClientFactory) NewStandbyContainerGroupPoolsClient() *StandbyContainerGroupPoolsClient
- func (c *ClientFactory) NewStandbyVirtualMachinePoolsClient() *StandbyVirtualMachinePoolsClient
- func (c *ClientFactory) NewStandbyVirtualMachinesClient() *StandbyVirtualMachinesClient
- type ContainerGroupProfile
- type ContainerGroupProfileUpdate
- type ContainerGroupProperties
- type ContainerGroupPropertiesUpdate
- type CreatedByType
- type Operation
- type OperationDisplay
- type OperationListResult
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type Origin
- type ProvisioningState
- type RefillPolicy
- type StandbyContainerGroupPoolElasticityProfile
- type StandbyContainerGroupPoolElasticityProfileUpdate
- type StandbyContainerGroupPoolResource
- type StandbyContainerGroupPoolResourceListResult
- type StandbyContainerGroupPoolResourceProperties
- type StandbyContainerGroupPoolResourceUpdate
- type StandbyContainerGroupPoolResourceUpdateProperties
- type StandbyContainerGroupPoolsClient
- func (client *StandbyContainerGroupPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[StandbyContainerGroupPoolsClientCreateOrUpdateResponse], error)
- func (client *StandbyContainerGroupPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[StandbyContainerGroupPoolsClientDeleteResponse], error)
- func (client *StandbyContainerGroupPoolsClient) Get(ctx context.Context, resourceGroupName string, ...) (StandbyContainerGroupPoolsClientGetResponse, error)
- func (client *StandbyContainerGroupPoolsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[StandbyContainerGroupPoolsClientListByResourceGroupResponse]
- func (client *StandbyContainerGroupPoolsClient) NewListBySubscriptionPager(options *StandbyContainerGroupPoolsClientListBySubscriptionOptions) *runtime.Pager[StandbyContainerGroupPoolsClientListBySubscriptionResponse]
- func (client *StandbyContainerGroupPoolsClient) Update(ctx context.Context, resourceGroupName string, ...) (StandbyContainerGroupPoolsClientUpdateResponse, error)
- type StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions
- type StandbyContainerGroupPoolsClientBeginDeleteOptions
- type StandbyContainerGroupPoolsClientCreateOrUpdateResponse
- type StandbyContainerGroupPoolsClientDeleteResponse
- type StandbyContainerGroupPoolsClientGetOptions
- type StandbyContainerGroupPoolsClientGetResponse
- type StandbyContainerGroupPoolsClientListByResourceGroupOptions
- type StandbyContainerGroupPoolsClientListByResourceGroupResponse
- type StandbyContainerGroupPoolsClientListBySubscriptionOptions
- type StandbyContainerGroupPoolsClientListBySubscriptionResponse
- type StandbyContainerGroupPoolsClientUpdateOptions
- type StandbyContainerGroupPoolsClientUpdateResponse
- type StandbyVirtualMachinePoolElasticityProfile
- type StandbyVirtualMachinePoolElasticityProfileUpdate
- type StandbyVirtualMachinePoolResource
- type StandbyVirtualMachinePoolResourceListResult
- type StandbyVirtualMachinePoolResourceProperties
- type StandbyVirtualMachinePoolResourceUpdate
- type StandbyVirtualMachinePoolResourceUpdateProperties
- type StandbyVirtualMachinePoolsClient
- func (client *StandbyVirtualMachinePoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[StandbyVirtualMachinePoolsClientCreateOrUpdateResponse], error)
- func (client *StandbyVirtualMachinePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[StandbyVirtualMachinePoolsClientDeleteResponse], error)
- func (client *StandbyVirtualMachinePoolsClient) Get(ctx context.Context, resourceGroupName string, ...) (StandbyVirtualMachinePoolsClientGetResponse, error)
- func (client *StandbyVirtualMachinePoolsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[StandbyVirtualMachinePoolsClientListByResourceGroupResponse]
- func (client *StandbyVirtualMachinePoolsClient) NewListBySubscriptionPager(options *StandbyVirtualMachinePoolsClientListBySubscriptionOptions) *runtime.Pager[StandbyVirtualMachinePoolsClientListBySubscriptionResponse]
- func (client *StandbyVirtualMachinePoolsClient) Update(ctx context.Context, resourceGroupName string, ...) (StandbyVirtualMachinePoolsClientUpdateResponse, error)
- type StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions
- type StandbyVirtualMachinePoolsClientBeginDeleteOptions
- type StandbyVirtualMachinePoolsClientCreateOrUpdateResponse
- type StandbyVirtualMachinePoolsClientDeleteResponse
- type StandbyVirtualMachinePoolsClientGetOptions
- type StandbyVirtualMachinePoolsClientGetResponse
- type StandbyVirtualMachinePoolsClientListByResourceGroupOptions
- type StandbyVirtualMachinePoolsClientListByResourceGroupResponse
- type StandbyVirtualMachinePoolsClientListBySubscriptionOptions
- type StandbyVirtualMachinePoolsClientListBySubscriptionResponse
- type StandbyVirtualMachinePoolsClientUpdateOptions
- type StandbyVirtualMachinePoolsClientUpdateResponse
- type StandbyVirtualMachineResource
- type StandbyVirtualMachineResourceListResult
- type StandbyVirtualMachineResourceProperties
- type StandbyVirtualMachinesClient
- func (client *StandbyVirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, ...) (StandbyVirtualMachinesClientGetResponse, error)
- func (client *StandbyVirtualMachinesClient) NewListByStandbyVirtualMachinePoolResourcePager(resourceGroupName string, standbyVirtualMachinePoolName string, ...) ...
- type StandbyVirtualMachinesClientGetOptions
- type StandbyVirtualMachinesClientGetResponse
- type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions
- type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse
- type Subnet
- type SystemData
- type VirtualMachineState
Examples ¶
- OperationsClient.NewListPager
- StandbyContainerGroupPoolsClient.BeginCreateOrUpdate
- StandbyContainerGroupPoolsClient.BeginDelete
- StandbyContainerGroupPoolsClient.Get
- StandbyContainerGroupPoolsClient.NewListByResourceGroupPager
- StandbyContainerGroupPoolsClient.NewListBySubscriptionPager
- StandbyContainerGroupPoolsClient.Update
- StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate
- StandbyVirtualMachinePoolsClient.BeginDelete
- StandbyVirtualMachinePoolsClient.Get
- StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager
- StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager
- StandbyVirtualMachinePoolsClient.Update
- StandbyVirtualMachinesClient.Get
- StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager
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 ClientFactory ¶
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 ¶
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. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*ClientFactory) NewOperationsClient ¶
func (c *ClientFactory) NewOperationsClient() *OperationsClient
NewOperationsClient creates a new instance of OperationsClient.
func (*ClientFactory) NewStandbyContainerGroupPoolsClient ¶
func (c *ClientFactory) NewStandbyContainerGroupPoolsClient() *StandbyContainerGroupPoolsClient
NewStandbyContainerGroupPoolsClient creates a new instance of StandbyContainerGroupPoolsClient.
func (*ClientFactory) NewStandbyVirtualMachinePoolsClient ¶
func (c *ClientFactory) NewStandbyVirtualMachinePoolsClient() *StandbyVirtualMachinePoolsClient
NewStandbyVirtualMachinePoolsClient creates a new instance of StandbyVirtualMachinePoolsClient.
func (*ClientFactory) NewStandbyVirtualMachinesClient ¶
func (c *ClientFactory) NewStandbyVirtualMachinesClient() *StandbyVirtualMachinesClient
NewStandbyVirtualMachinesClient creates a new instance of StandbyVirtualMachinesClient.
type ContainerGroupProfile ¶
type ContainerGroupProfile struct { // REQUIRED; Specifies container group profile id of standby container groups. ID *string // Specifies revision of container group profile. Revision *int64 }
ContainerGroupProfile - Details of the ContainerGroupProfile.
func (ContainerGroupProfile) MarshalJSON ¶
func (c ContainerGroupProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerGroupProfile.
func (*ContainerGroupProfile) UnmarshalJSON ¶
func (c *ContainerGroupProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerGroupProfile.
type ContainerGroupProfileUpdate ¶
type ContainerGroupProfileUpdate struct { // Specifies container group profile id of standby container groups. ID *string // Specifies revision of container group profile. Revision *int64 }
ContainerGroupProfileUpdate - Details of the ContainerGroupProfile.
func (ContainerGroupProfileUpdate) MarshalJSON ¶
func (c ContainerGroupProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerGroupProfileUpdate.
func (*ContainerGroupProfileUpdate) UnmarshalJSON ¶
func (c *ContainerGroupProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerGroupProfileUpdate.
type ContainerGroupProperties ¶
type ContainerGroupProperties struct { // REQUIRED; Specifies container group profile of standby container groups. ContainerGroupProfile *ContainerGroupProfile // Specifies subnet Ids for container group. SubnetIDs []*Subnet }
ContainerGroupProperties - Details of the ContainerGroupProperties.
func (ContainerGroupProperties) MarshalJSON ¶
func (c ContainerGroupProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerGroupProperties.
func (*ContainerGroupProperties) UnmarshalJSON ¶
func (c *ContainerGroupProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerGroupProperties.
type ContainerGroupPropertiesUpdate ¶
type ContainerGroupPropertiesUpdate struct { // Specifies container group profile of standby container groups. ContainerGroupProfile *ContainerGroupProfileUpdate // Specifies subnet Ids for container group. SubnetIDs []*Subnet }
ContainerGroupPropertiesUpdate - Details of the ContainerGroupProperties.
func (ContainerGroupPropertiesUpdate) MarshalJSON ¶
func (c ContainerGroupPropertiesUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ContainerGroupPropertiesUpdate.
func (*ContainerGroupPropertiesUpdate) UnmarshalJSON ¶
func (c *ContainerGroupPropertiesUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type ContainerGroupPropertiesUpdate.
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 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 ¶
MarshalJSON implements the json.Marshaller interface for type Operation.
func (*Operation) UnmarshalJSON ¶
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 ¶
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type OperationDisplay.
func (*OperationDisplay) UnmarshalJSON ¶
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 ¶
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) NewListPager ¶
func (client *OperationsClient) NewListPager(options *OperationsClientListOptions) *runtime.Pager[OperationsClientListResponse]
NewListPager - List the operations for the provider
Generated from API version 2023-12-01-preview
- options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/Operations_List.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewOperationsClient().NewListPager(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.OperationListResult = armstandbypool.OperationListResult{ // Value: []*armstandbypool.Operation{ // { // Name: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools/write"), // ActionType: to.Ptr(armstandbypool.ActionTypeInternal), // Display: &armstandbypool.OperationDisplay{ // Description: to.Ptr("Create a StandbyContainerGroupPools Resource"), // Operation: to.Ptr("StandbyContainerGroupPools_Create"), // Provider: to.Ptr("Microsoft.StandbyPool"), // Resource: to.Ptr("standbyContainerGroupPools"), // }, // IsDataAction: to.Ptr(true), // Origin: to.Ptr(armstandbypool.OriginUser), // }}, // } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
type OperationsClientListResponse ¶
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.NewListPager.
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 ProvisioningState ¶
type ProvisioningState string
ProvisioningState - Provisioning state
const ( // ProvisioningStateCanceled - Resource creation was canceled. ProvisioningStateCanceled ProvisioningState = "Canceled" // ProvisioningStateDeleting - Resource is being deleted. ProvisioningStateDeleting ProvisioningState = "Deleting" // ProvisioningStateFailed - Resource creation failed. ProvisioningStateFailed ProvisioningState = "Failed" // ProvisioningStateSucceeded - Resource has been created. ProvisioningStateSucceeded ProvisioningState = "Succeeded" )
func PossibleProvisioningStateValues ¶
func PossibleProvisioningStateValues() []ProvisioningState
PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.
type RefillPolicy ¶
type RefillPolicy string
RefillPolicy - Refill policy of standby pool
const ( // RefillPolicyAlways - A refill policy that standby pool is automatically refilled to maintain maxReadyCapacity. RefillPolicyAlways RefillPolicy = "always" )
func PossibleRefillPolicyValues ¶
func PossibleRefillPolicyValues() []RefillPolicy
PossibleRefillPolicyValues returns the possible values for the RefillPolicy const type.
type StandbyContainerGroupPoolElasticityProfile ¶
type StandbyContainerGroupPoolElasticityProfile struct { // REQUIRED; Specifies maximum number of standby container groups in the standby pool. MaxReadyCapacity *int64 // Specifies refill policy of the pool. RefillPolicy *RefillPolicy }
StandbyContainerGroupPoolElasticityProfile - Specifies the elasticity profile of the standby container group pools.
func (StandbyContainerGroupPoolElasticityProfile) MarshalJSON ¶
func (s StandbyContainerGroupPoolElasticityProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolElasticityProfile.
func (*StandbyContainerGroupPoolElasticityProfile) UnmarshalJSON ¶
func (s *StandbyContainerGroupPoolElasticityProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolElasticityProfile.
type StandbyContainerGroupPoolElasticityProfileUpdate ¶
type StandbyContainerGroupPoolElasticityProfileUpdate struct { // Specifies maximum number of standby container groups in the standby pool. MaxReadyCapacity *int64 // Specifies refill policy of the pool. RefillPolicy *RefillPolicy }
StandbyContainerGroupPoolElasticityProfileUpdate - Specifies the elasticity profile of the standby container group pools.
func (StandbyContainerGroupPoolElasticityProfileUpdate) MarshalJSON ¶
func (s StandbyContainerGroupPoolElasticityProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolElasticityProfileUpdate.
func (*StandbyContainerGroupPoolElasticityProfileUpdate) UnmarshalJSON ¶
func (s *StandbyContainerGroupPoolElasticityProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolElasticityProfileUpdate.
type StandbyContainerGroupPoolResource ¶
type StandbyContainerGroupPoolResource struct { // REQUIRED; The geo-location where the resource lives Location *string // The resource-specific properties for this resource. Properties *StandbyContainerGroupPoolResourceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
StandbyContainerGroupPoolResource - A StandbyContainerGroupPoolResource.
func (StandbyContainerGroupPoolResource) MarshalJSON ¶
func (s StandbyContainerGroupPoolResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResource.
func (*StandbyContainerGroupPoolResource) UnmarshalJSON ¶
func (s *StandbyContainerGroupPoolResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResource.
type StandbyContainerGroupPoolResourceListResult ¶
type StandbyContainerGroupPoolResourceListResult struct { // REQUIRED; The StandbyContainerGroupPoolResource items on this page Value []*StandbyContainerGroupPoolResource // READ-ONLY; The link to the next page of items NextLink *string }
StandbyContainerGroupPoolResourceListResult - The response of a StandbyContainerGroupPoolResource list operation.
func (StandbyContainerGroupPoolResourceListResult) MarshalJSON ¶
func (s StandbyContainerGroupPoolResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceListResult.
func (*StandbyContainerGroupPoolResourceListResult) UnmarshalJSON ¶
func (s *StandbyContainerGroupPoolResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceListResult.
type StandbyContainerGroupPoolResourceProperties ¶
type StandbyContainerGroupPoolResourceProperties struct { // REQUIRED; Specifies container group properties of standby container group pools. ContainerGroupProperties *ContainerGroupProperties // REQUIRED; Specifies elasticity profile of standby container group pools. ElasticityProfile *StandbyContainerGroupPoolElasticityProfile // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
StandbyContainerGroupPoolResourceProperties - Details of the StandbyContainerGroupPool.
func (StandbyContainerGroupPoolResourceProperties) MarshalJSON ¶
func (s StandbyContainerGroupPoolResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceProperties.
func (*StandbyContainerGroupPoolResourceProperties) UnmarshalJSON ¶
func (s *StandbyContainerGroupPoolResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceProperties.
type StandbyContainerGroupPoolResourceUpdate ¶
type StandbyContainerGroupPoolResourceUpdate struct { // The updatable properties of the StandbyContainerGroupPoolResource. Properties *StandbyContainerGroupPoolResourceUpdateProperties // Resource tags. Tags map[string]*string }
StandbyContainerGroupPoolResourceUpdate - The type used for update operations of the StandbyContainerGroupPoolResource.
func (StandbyContainerGroupPoolResourceUpdate) MarshalJSON ¶
func (s StandbyContainerGroupPoolResourceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceUpdate.
func (*StandbyContainerGroupPoolResourceUpdate) UnmarshalJSON ¶
func (s *StandbyContainerGroupPoolResourceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceUpdate.
type StandbyContainerGroupPoolResourceUpdateProperties ¶
type StandbyContainerGroupPoolResourceUpdateProperties struct { // Specifies container group properties of standby container group pools. ContainerGroupProperties *ContainerGroupPropertiesUpdate // Specifies elasticity profile of standby container group pools. ElasticityProfile *StandbyContainerGroupPoolElasticityProfileUpdate }
StandbyContainerGroupPoolResourceUpdateProperties - The updatable properties of the StandbyContainerGroupPoolResource.
func (StandbyContainerGroupPoolResourceUpdateProperties) MarshalJSON ¶
func (s StandbyContainerGroupPoolResourceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyContainerGroupPoolResourceUpdateProperties.
func (*StandbyContainerGroupPoolResourceUpdateProperties) UnmarshalJSON ¶
func (s *StandbyContainerGroupPoolResourceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyContainerGroupPoolResourceUpdateProperties.
type StandbyContainerGroupPoolsClient ¶
type StandbyContainerGroupPoolsClient struct {
// contains filtered or unexported fields
}
StandbyContainerGroupPoolsClient contains the methods for the StandbyContainerGroupPools group. Don't use this type directly, use NewStandbyContainerGroupPoolsClient() instead.
func NewStandbyContainerGroupPoolsClient ¶
func NewStandbyContainerGroupPoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyContainerGroupPoolsClient, error)
NewStandbyContainerGroupPoolsClient creates a new instance of StandbyContainerGroupPoolsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StandbyContainerGroupPoolsClient) BeginCreateOrUpdate ¶
func (client *StandbyContainerGroupPoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, resource StandbyContainerGroupPoolResource, options *StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StandbyContainerGroupPoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a StandbyContainerGroupPoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyContainerGroupPoolName - Name of the standby container group pool
- resource - Resource create parameters.
- options - StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_CreateOrUpdate.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/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStandbyContainerGroupPoolsClient().BeginCreateOrUpdate(ctx, "rgstandbypool", "pool", armstandbypool.StandbyContainerGroupPoolResource{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{ ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{ ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{ ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"), Revision: to.Ptr[int64](1), }, SubnetIDs: []*armstandbypool.Subnet{ { ID: to.Ptr("/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"), }}, }, ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{ MaxReadyCapacity: to.Ptr[int64](688), RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways), }, }, }, 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.StandbyContainerGroupPoolResource = armstandbypool.StandbyContainerGroupPoolResource{ // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{ // ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{ // ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{ // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"), // Revision: to.Ptr[int64](1), // }, // SubnetIDs: []*armstandbypool.Subnet{ // { // ID: to.Ptr("/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"), // }}, // }, // ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](688), // RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // }, // } }
Output:
func (*StandbyContainerGroupPoolsClient) BeginDelete ¶
func (client *StandbyContainerGroupPoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, options *StandbyContainerGroupPoolsClientBeginDeleteOptions) (*runtime.Poller[StandbyContainerGroupPoolsClientDeleteResponse], error)
BeginDelete - Delete a StandbyContainerGroupPoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyContainerGroupPoolName - Name of the standby container group pool
- options - StandbyContainerGroupPoolsClientBeginDeleteOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStandbyContainerGroupPoolsClient().BeginDelete(ctx, "rgstandbypool", "pool", 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 (*StandbyContainerGroupPoolsClient) Get ¶
func (client *StandbyContainerGroupPoolsClient) Get(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, options *StandbyContainerGroupPoolsClientGetOptions) (StandbyContainerGroupPoolsClientGetResponse, error)
Get - Get a StandbyContainerGroupPoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyContainerGroupPoolName - Name of the standby container group pool
- options - StandbyContainerGroupPoolsClientGetOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStandbyContainerGroupPoolsClient().Get(ctx, "rgstandbypool", "pool", 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.StandbyContainerGroupPoolResource = armstandbypool.StandbyContainerGroupPoolResource{ // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{ // ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{ // ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{ // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"), // Revision: to.Ptr[int64](1), // }, // SubnetIDs: []*armstandbypool.Subnet{ // { // ID: to.Ptr("/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"), // }}, // }, // ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](688), // RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // }, // } }
Output:
func (*StandbyContainerGroupPoolsClient) NewListByResourceGroupPager ¶
func (client *StandbyContainerGroupPoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *StandbyContainerGroupPoolsClientListByResourceGroupOptions) *runtime.Pager[StandbyContainerGroupPoolsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List StandbyContainerGroupPoolResource resources by resource group
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - StandbyContainerGroupPoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStandbyContainerGroupPoolsClient().NewListByResourceGroupPager("rgstandbypool", 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.StandbyContainerGroupPoolResourceListResult = armstandbypool.StandbyContainerGroupPoolResourceListResult{ // Value: []*armstandbypool.StandbyContainerGroupPoolResource{ // { // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{ // ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{ // ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{ // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"), // Revision: to.Ptr[int64](1), // }, // SubnetIDs: []*armstandbypool.Subnet{ // { // ID: to.Ptr("/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"), // }}, // }, // ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](688), // RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*StandbyContainerGroupPoolsClient) NewListBySubscriptionPager ¶
func (client *StandbyContainerGroupPoolsClient) NewListBySubscriptionPager(options *StandbyContainerGroupPoolsClientListBySubscriptionOptions) *runtime.Pager[StandbyContainerGroupPoolsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List StandbyContainerGroupPoolResource resources by subscription ID
Generated from API version 2023-12-01-preview
- options - StandbyContainerGroupPoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStandbyContainerGroupPoolsClient().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.StandbyContainerGroupPoolResourceListResult = armstandbypool.StandbyContainerGroupPoolResourceListResult{ // Value: []*armstandbypool.StandbyContainerGroupPoolResource{ // { // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{ // ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{ // ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{ // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"), // Revision: to.Ptr[int64](1), // }, // SubnetIDs: []*armstandbypool.Subnet{ // { // ID: to.Ptr("/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"), // }}, // }, // ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](688), // RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // }, // }}, // } } }
Output:
func (*StandbyContainerGroupPoolsClient) Update ¶
func (client *StandbyContainerGroupPoolsClient) Update(ctx context.Context, resourceGroupName string, standbyContainerGroupPoolName string, properties StandbyContainerGroupPoolResourceUpdate, options *StandbyContainerGroupPoolsClientUpdateOptions) (StandbyContainerGroupPoolsClientUpdateResponse, error)
Update - Update a StandbyContainerGroupPoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyContainerGroupPoolName - Name of the standby container group pool
- properties - The resource properties to be updated.
- options - StandbyContainerGroupPoolsClientUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyContainerGroupPools_Update.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/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStandbyContainerGroupPoolsClient().Update(ctx, "rgstandbypool", "pool", armstandbypool.StandbyContainerGroupPoolResourceUpdate{ Properties: &armstandbypool.StandbyContainerGroupPoolResourceUpdateProperties{ ContainerGroupProperties: &armstandbypool.ContainerGroupPropertiesUpdate{ ContainerGroupProfile: &armstandbypool.ContainerGroupProfileUpdate{ ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"), Revision: to.Ptr[int64](2), }, SubnetIDs: []*armstandbypool.Subnet{ { ID: to.Ptr("/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"), }}, }, ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfileUpdate{ MaxReadyCapacity: to.Ptr[int64](1743), RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways), }, }, Tags: map[string]*string{}, }, 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.StandbyContainerGroupPoolResource = armstandbypool.StandbyContainerGroupPoolResource{ // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyContainerGroupPools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyContainerGroupPools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyContainerGroupPoolResourceProperties{ // ContainerGroupProperties: &armstandbypool.ContainerGroupProperties{ // ContainerGroupProfile: &armstandbypool.ContainerGroupProfile{ // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile"), // Revision: to.Ptr[int64](2), // }, // SubnetIDs: []*armstandbypool.Subnet{ // { // ID: to.Ptr("/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet"), // }}, // }, // ElasticityProfile: &armstandbypool.StandbyContainerGroupPoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](1743), // RefillPolicy: to.Ptr(armstandbypool.RefillPolicyAlways), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // }, // } }
Output:
type StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions ¶
type StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StandbyContainerGroupPoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginCreateOrUpdate method.
type StandbyContainerGroupPoolsClientBeginDeleteOptions ¶
type StandbyContainerGroupPoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StandbyContainerGroupPoolsClientBeginDeleteOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.BeginDelete method.
type StandbyContainerGroupPoolsClientCreateOrUpdateResponse ¶
type StandbyContainerGroupPoolsClientCreateOrUpdateResponse struct { // A StandbyContainerGroupPoolResource. StandbyContainerGroupPoolResource }
StandbyContainerGroupPoolsClientCreateOrUpdateResponse contains the response from method StandbyContainerGroupPoolsClient.BeginCreateOrUpdate.
type StandbyContainerGroupPoolsClientDeleteResponse ¶
type StandbyContainerGroupPoolsClientDeleteResponse struct { }
StandbyContainerGroupPoolsClientDeleteResponse contains the response from method StandbyContainerGroupPoolsClient.BeginDelete.
type StandbyContainerGroupPoolsClientGetOptions ¶
type StandbyContainerGroupPoolsClientGetOptions struct { }
StandbyContainerGroupPoolsClientGetOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Get method.
type StandbyContainerGroupPoolsClientGetResponse ¶
type StandbyContainerGroupPoolsClientGetResponse struct { // A StandbyContainerGroupPoolResource. StandbyContainerGroupPoolResource }
StandbyContainerGroupPoolsClientGetResponse contains the response from method StandbyContainerGroupPoolsClient.Get.
type StandbyContainerGroupPoolsClientListByResourceGroupOptions ¶
type StandbyContainerGroupPoolsClientListByResourceGroupOptions struct { }
StandbyContainerGroupPoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListByResourceGroupPager method.
type StandbyContainerGroupPoolsClientListByResourceGroupResponse ¶
type StandbyContainerGroupPoolsClientListByResourceGroupResponse struct { // The response of a StandbyContainerGroupPoolResource list operation. StandbyContainerGroupPoolResourceListResult }
StandbyContainerGroupPoolsClientListByResourceGroupResponse contains the response from method StandbyContainerGroupPoolsClient.NewListByResourceGroupPager.
type StandbyContainerGroupPoolsClientListBySubscriptionOptions ¶
type StandbyContainerGroupPoolsClientListBySubscriptionOptions struct { }
StandbyContainerGroupPoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.NewListBySubscriptionPager method.
type StandbyContainerGroupPoolsClientListBySubscriptionResponse ¶
type StandbyContainerGroupPoolsClientListBySubscriptionResponse struct { // The response of a StandbyContainerGroupPoolResource list operation. StandbyContainerGroupPoolResourceListResult }
StandbyContainerGroupPoolsClientListBySubscriptionResponse contains the response from method StandbyContainerGroupPoolsClient.NewListBySubscriptionPager.
type StandbyContainerGroupPoolsClientUpdateOptions ¶
type StandbyContainerGroupPoolsClientUpdateOptions struct { }
StandbyContainerGroupPoolsClientUpdateOptions contains the optional parameters for the StandbyContainerGroupPoolsClient.Update method.
type StandbyContainerGroupPoolsClientUpdateResponse ¶
type StandbyContainerGroupPoolsClientUpdateResponse struct { // A StandbyContainerGroupPoolResource. StandbyContainerGroupPoolResource }
StandbyContainerGroupPoolsClientUpdateResponse contains the response from method StandbyContainerGroupPoolsClient.Update.
type StandbyVirtualMachinePoolElasticityProfile ¶
type StandbyVirtualMachinePoolElasticityProfile struct { // REQUIRED; Specifies the maximum number of virtual machines in the standby virtual machine pool. MaxReadyCapacity *int64 }
StandbyVirtualMachinePoolElasticityProfile - Details of the elasticity profile.
func (StandbyVirtualMachinePoolElasticityProfile) MarshalJSON ¶
func (s StandbyVirtualMachinePoolElasticityProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolElasticityProfile.
func (*StandbyVirtualMachinePoolElasticityProfile) UnmarshalJSON ¶
func (s *StandbyVirtualMachinePoolElasticityProfile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolElasticityProfile.
type StandbyVirtualMachinePoolElasticityProfileUpdate ¶
type StandbyVirtualMachinePoolElasticityProfileUpdate struct { // Specifies the maximum number of virtual machines in the standby virtual machine pool. MaxReadyCapacity *int64 }
StandbyVirtualMachinePoolElasticityProfileUpdate - Details of the elasticity profile.
func (StandbyVirtualMachinePoolElasticityProfileUpdate) MarshalJSON ¶
func (s StandbyVirtualMachinePoolElasticityProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolElasticityProfileUpdate.
func (*StandbyVirtualMachinePoolElasticityProfileUpdate) UnmarshalJSON ¶
func (s *StandbyVirtualMachinePoolElasticityProfileUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolElasticityProfileUpdate.
type StandbyVirtualMachinePoolResource ¶
type StandbyVirtualMachinePoolResource struct { // REQUIRED; The geo-location where the resource lives Location *string // The resource-specific properties for this resource. Properties *StandbyVirtualMachinePoolResourceProperties // Resource tags. Tags map[string]*string // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
StandbyVirtualMachinePoolResource - A StandbyVirtualMachinePoolResource.
func (StandbyVirtualMachinePoolResource) MarshalJSON ¶
func (s StandbyVirtualMachinePoolResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResource.
func (*StandbyVirtualMachinePoolResource) UnmarshalJSON ¶
func (s *StandbyVirtualMachinePoolResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResource.
type StandbyVirtualMachinePoolResourceListResult ¶
type StandbyVirtualMachinePoolResourceListResult struct { // REQUIRED; The StandbyVirtualMachinePoolResource items on this page Value []*StandbyVirtualMachinePoolResource // READ-ONLY; The link to the next page of items NextLink *string }
StandbyVirtualMachinePoolResourceListResult - The response of a StandbyVirtualMachinePoolResource list operation.
func (StandbyVirtualMachinePoolResourceListResult) MarshalJSON ¶
func (s StandbyVirtualMachinePoolResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceListResult.
func (*StandbyVirtualMachinePoolResourceListResult) UnmarshalJSON ¶
func (s *StandbyVirtualMachinePoolResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceListResult.
type StandbyVirtualMachinePoolResourceProperties ¶
type StandbyVirtualMachinePoolResourceProperties struct { // REQUIRED; Specifies the desired state of virtual machines in the pool. VirtualMachineState *VirtualMachineState // Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to. AttachedVirtualMachineScaleSetID *string // Specifies the elasticity profile of the standby virtual machine pools. ElasticityProfile *StandbyVirtualMachinePoolElasticityProfile // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
StandbyVirtualMachinePoolResourceProperties - Details of the StandbyVirtualMachinePool.
func (StandbyVirtualMachinePoolResourceProperties) MarshalJSON ¶
func (s StandbyVirtualMachinePoolResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceProperties.
func (*StandbyVirtualMachinePoolResourceProperties) UnmarshalJSON ¶
func (s *StandbyVirtualMachinePoolResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceProperties.
type StandbyVirtualMachinePoolResourceUpdate ¶
type StandbyVirtualMachinePoolResourceUpdate struct { // The updatable properties of the StandbyVirtualMachinePoolResource. Properties *StandbyVirtualMachinePoolResourceUpdateProperties // Resource tags. Tags map[string]*string }
StandbyVirtualMachinePoolResourceUpdate - The type used for update operations of the StandbyVirtualMachinePoolResource.
func (StandbyVirtualMachinePoolResourceUpdate) MarshalJSON ¶
func (s StandbyVirtualMachinePoolResourceUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceUpdate.
func (*StandbyVirtualMachinePoolResourceUpdate) UnmarshalJSON ¶
func (s *StandbyVirtualMachinePoolResourceUpdate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceUpdate.
type StandbyVirtualMachinePoolResourceUpdateProperties ¶
type StandbyVirtualMachinePoolResourceUpdateProperties struct { // Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to. AttachedVirtualMachineScaleSetID *string // Specifies the elasticity profile of the standby virtual machine pools. ElasticityProfile *StandbyVirtualMachinePoolElasticityProfileUpdate // Specifies the desired state of virtual machines in the pool. VirtualMachineState *VirtualMachineState }
StandbyVirtualMachinePoolResourceUpdateProperties - The updatable properties of the StandbyVirtualMachinePoolResource.
func (StandbyVirtualMachinePoolResourceUpdateProperties) MarshalJSON ¶
func (s StandbyVirtualMachinePoolResourceUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachinePoolResourceUpdateProperties.
func (*StandbyVirtualMachinePoolResourceUpdateProperties) UnmarshalJSON ¶
func (s *StandbyVirtualMachinePoolResourceUpdateProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachinePoolResourceUpdateProperties.
type StandbyVirtualMachinePoolsClient ¶
type StandbyVirtualMachinePoolsClient struct {
// contains filtered or unexported fields
}
StandbyVirtualMachinePoolsClient contains the methods for the StandbyVirtualMachinePools group. Don't use this type directly, use NewStandbyVirtualMachinePoolsClient() instead.
func NewStandbyVirtualMachinePoolsClient ¶
func NewStandbyVirtualMachinePoolsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyVirtualMachinePoolsClient, error)
NewStandbyVirtualMachinePoolsClient creates a new instance of StandbyVirtualMachinePoolsClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StandbyVirtualMachinePoolsClient) BeginCreateOrUpdate ¶
func (client *StandbyVirtualMachinePoolsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, resource StandbyVirtualMachinePoolResource, options *StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions) (*runtime.Poller[StandbyVirtualMachinePoolsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Create a StandbyVirtualMachinePoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyVirtualMachinePoolName - Name of the standby virtual machine pool
- resource - Resource create parameters.
- options - StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_CreateOrUpdate.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/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStandbyVirtualMachinePoolsClient().BeginCreateOrUpdate(ctx, "rgstandbypool", "pool", armstandbypool.StandbyVirtualMachinePoolResource{ Location: to.Ptr("West US"), Tags: map[string]*string{}, Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{ AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{ MaxReadyCapacity: to.Ptr[int64](304), }, VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), }, }, 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.StandbyVirtualMachinePoolResource = armstandbypool.StandbyVirtualMachinePoolResource{ // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{ // AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), // ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](304), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), // }, // } }
Output:
func (*StandbyVirtualMachinePoolsClient) BeginDelete ¶
func (client *StandbyVirtualMachinePoolsClient) BeginDelete(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, options *StandbyVirtualMachinePoolsClientBeginDeleteOptions) (*runtime.Poller[StandbyVirtualMachinePoolsClientDeleteResponse], error)
BeginDelete - Delete a StandbyVirtualMachinePoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyVirtualMachinePoolName - Name of the standby virtual machine pool
- options - StandbyVirtualMachinePoolsClientBeginDeleteOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Delete.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := clientFactory.NewStandbyVirtualMachinePoolsClient().BeginDelete(ctx, "rgstandbypool", "pool", 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 (*StandbyVirtualMachinePoolsClient) Get ¶
func (client *StandbyVirtualMachinePoolsClient) Get(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, options *StandbyVirtualMachinePoolsClientGetOptions) (StandbyVirtualMachinePoolsClientGetResponse, error)
Get - Get a StandbyVirtualMachinePoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyVirtualMachinePoolName - Name of the standby virtual machine pool
- options - StandbyVirtualMachinePoolsClientGetOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStandbyVirtualMachinePoolsClient().Get(ctx, "rgstandbypool", "pool", 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.StandbyVirtualMachinePoolResource = armstandbypool.StandbyVirtualMachinePoolResource{ // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{ // AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), // ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](304), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), // }, // } }
Output:
func (*StandbyVirtualMachinePoolsClient) NewListByResourceGroupPager ¶
func (client *StandbyVirtualMachinePoolsClient) NewListByResourceGroupPager(resourceGroupName string, options *StandbyVirtualMachinePoolsClientListByResourceGroupOptions) *runtime.Pager[StandbyVirtualMachinePoolsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List StandbyVirtualMachinePoolResource resources by resource group
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- options - StandbyVirtualMachinePoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStandbyVirtualMachinePoolsClient().NewListByResourceGroupPager("rgstandbypool", 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.StandbyVirtualMachinePoolResourceListResult = armstandbypool.StandbyVirtualMachinePoolResourceListResult{ // Value: []*armstandbypool.StandbyVirtualMachinePoolResource{ // { // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{ // AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), // ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](304), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), // }, // }}, // } } }
Output:
func (*StandbyVirtualMachinePoolsClient) NewListBySubscriptionPager ¶
func (client *StandbyVirtualMachinePoolsClient) NewListBySubscriptionPager(options *StandbyVirtualMachinePoolsClientListBySubscriptionOptions) *runtime.Pager[StandbyVirtualMachinePoolsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List StandbyVirtualMachinePoolResource resources by subscription ID
Generated from API version 2023-12-01-preview
- options - StandbyVirtualMachinePoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_ListBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStandbyVirtualMachinePoolsClient().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.StandbyVirtualMachinePoolResourceListResult = armstandbypool.StandbyVirtualMachinePoolResourceListResult{ // Value: []*armstandbypool.StandbyVirtualMachinePoolResource{ // { // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{ // AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), // ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](304), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), // }, // }}, // } } }
Output:
func (*StandbyVirtualMachinePoolsClient) Update ¶
func (client *StandbyVirtualMachinePoolsClient) Update(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, properties StandbyVirtualMachinePoolResourceUpdate, options *StandbyVirtualMachinePoolsClientUpdateOptions) (StandbyVirtualMachinePoolsClientUpdateResponse, error)
Update - Update a StandbyVirtualMachinePoolResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyVirtualMachinePoolName - Name of the standby virtual machine pool
- properties - The resource properties to be updated.
- options - StandbyVirtualMachinePoolsClientUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Update method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachinePools_Update.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/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStandbyVirtualMachinePoolsClient().Update(ctx, "rgstandbypool", "pool", armstandbypool.StandbyVirtualMachinePoolResourceUpdate{ Properties: &armstandbypool.StandbyVirtualMachinePoolResourceUpdateProperties{ AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfileUpdate{ MaxReadyCapacity: to.Ptr[int64](304), }, VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), }, Tags: map[string]*string{}, }, 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.StandbyVirtualMachinePoolResource = armstandbypool.StandbyVirtualMachinePoolResource{ // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Location: to.Ptr("West US"), // Tags: map[string]*string{ // }, // Properties: &armstandbypool.StandbyVirtualMachinePoolResourceProperties{ // AttachedVirtualMachineScaleSetID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"), // ElasticityProfile: &armstandbypool.StandbyVirtualMachinePoolElasticityProfile{ // MaxReadyCapacity: to.Ptr[int64](304), // }, // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // VirtualMachineState: to.Ptr(armstandbypool.VirtualMachineStateRunning), // }, // } }
Output:
type StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions ¶
type StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StandbyVirtualMachinePoolsClientBeginCreateOrUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate method.
type StandbyVirtualMachinePoolsClientBeginDeleteOptions ¶
type StandbyVirtualMachinePoolsClientBeginDeleteOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
StandbyVirtualMachinePoolsClientBeginDeleteOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.BeginDelete method.
type StandbyVirtualMachinePoolsClientCreateOrUpdateResponse ¶
type StandbyVirtualMachinePoolsClientCreateOrUpdateResponse struct { // A StandbyVirtualMachinePoolResource. StandbyVirtualMachinePoolResource }
StandbyVirtualMachinePoolsClientCreateOrUpdateResponse contains the response from method StandbyVirtualMachinePoolsClient.BeginCreateOrUpdate.
type StandbyVirtualMachinePoolsClientDeleteResponse ¶
type StandbyVirtualMachinePoolsClientDeleteResponse struct { }
StandbyVirtualMachinePoolsClientDeleteResponse contains the response from method StandbyVirtualMachinePoolsClient.BeginDelete.
type StandbyVirtualMachinePoolsClientGetOptions ¶
type StandbyVirtualMachinePoolsClientGetOptions struct { }
StandbyVirtualMachinePoolsClientGetOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Get method.
type StandbyVirtualMachinePoolsClientGetResponse ¶
type StandbyVirtualMachinePoolsClientGetResponse struct { // A StandbyVirtualMachinePoolResource. StandbyVirtualMachinePoolResource }
StandbyVirtualMachinePoolsClientGetResponse contains the response from method StandbyVirtualMachinePoolsClient.Get.
type StandbyVirtualMachinePoolsClientListByResourceGroupOptions ¶
type StandbyVirtualMachinePoolsClientListByResourceGroupOptions struct { }
StandbyVirtualMachinePoolsClientListByResourceGroupOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager method.
type StandbyVirtualMachinePoolsClientListByResourceGroupResponse ¶
type StandbyVirtualMachinePoolsClientListByResourceGroupResponse struct { // The response of a StandbyVirtualMachinePoolResource list operation. StandbyVirtualMachinePoolResourceListResult }
StandbyVirtualMachinePoolsClientListByResourceGroupResponse contains the response from method StandbyVirtualMachinePoolsClient.NewListByResourceGroupPager.
type StandbyVirtualMachinePoolsClientListBySubscriptionOptions ¶
type StandbyVirtualMachinePoolsClientListBySubscriptionOptions struct { }
StandbyVirtualMachinePoolsClientListBySubscriptionOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager method.
type StandbyVirtualMachinePoolsClientListBySubscriptionResponse ¶
type StandbyVirtualMachinePoolsClientListBySubscriptionResponse struct { // The response of a StandbyVirtualMachinePoolResource list operation. StandbyVirtualMachinePoolResourceListResult }
StandbyVirtualMachinePoolsClientListBySubscriptionResponse contains the response from method StandbyVirtualMachinePoolsClient.NewListBySubscriptionPager.
type StandbyVirtualMachinePoolsClientUpdateOptions ¶
type StandbyVirtualMachinePoolsClientUpdateOptions struct { }
StandbyVirtualMachinePoolsClientUpdateOptions contains the optional parameters for the StandbyVirtualMachinePoolsClient.Update method.
type StandbyVirtualMachinePoolsClientUpdateResponse ¶
type StandbyVirtualMachinePoolsClientUpdateResponse struct { // A StandbyVirtualMachinePoolResource. StandbyVirtualMachinePoolResource }
StandbyVirtualMachinePoolsClientUpdateResponse contains the response from method StandbyVirtualMachinePoolsClient.Update.
type StandbyVirtualMachineResource ¶
type StandbyVirtualMachineResource struct { // The resource-specific properties for this resource. Properties *StandbyVirtualMachineResourceProperties // READ-ONLY; Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" ID *string // READ-ONLY; The name of the resource Name *string // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. SystemData *SystemData // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string }
StandbyVirtualMachineResource - Concrete proxy resource types can be created by aliasing this type using a specific property type.
func (StandbyVirtualMachineResource) MarshalJSON ¶
func (s StandbyVirtualMachineResource) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachineResource.
func (*StandbyVirtualMachineResource) UnmarshalJSON ¶
func (s *StandbyVirtualMachineResource) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachineResource.
type StandbyVirtualMachineResourceListResult ¶
type StandbyVirtualMachineResourceListResult struct { // REQUIRED; The StandbyVirtualMachineResource items on this page Value []*StandbyVirtualMachineResource // READ-ONLY; The link to the next page of items NextLink *string }
StandbyVirtualMachineResourceListResult - The response of a StandbyVirtualMachineResource list operation.
func (StandbyVirtualMachineResourceListResult) MarshalJSON ¶
func (s StandbyVirtualMachineResourceListResult) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachineResourceListResult.
func (*StandbyVirtualMachineResourceListResult) UnmarshalJSON ¶
func (s *StandbyVirtualMachineResourceListResult) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachineResourceListResult.
type StandbyVirtualMachineResourceProperties ¶
type StandbyVirtualMachineResourceProperties struct { // REQUIRED; Resource id of the virtual machine. VirtualMachineResourceID *string // READ-ONLY; The status of the last operation. ProvisioningState *ProvisioningState }
StandbyVirtualMachineResourceProperties - Details of the StandbyVirtualMachine.
func (StandbyVirtualMachineResourceProperties) MarshalJSON ¶
func (s StandbyVirtualMachineResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StandbyVirtualMachineResourceProperties.
func (*StandbyVirtualMachineResourceProperties) UnmarshalJSON ¶
func (s *StandbyVirtualMachineResourceProperties) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type StandbyVirtualMachineResourceProperties.
type StandbyVirtualMachinesClient ¶
type StandbyVirtualMachinesClient struct {
// contains filtered or unexported fields
}
StandbyVirtualMachinesClient contains the methods for the StandbyVirtualMachines group. Don't use this type directly, use NewStandbyVirtualMachinesClient() instead.
func NewStandbyVirtualMachinesClient ¶
func NewStandbyVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*StandbyVirtualMachinesClient, error)
NewStandbyVirtualMachinesClient creates a new instance of StandbyVirtualMachinesClient with the specified values.
- subscriptionID - The ID of the target subscription. The value must be an UUID.
- credential - used to authorize requests. Usually a credential from azidentity.
- options - pass nil to accept the default values.
func (*StandbyVirtualMachinesClient) Get ¶
func (client *StandbyVirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, standbyVirtualMachinePoolName string, standbyVirtualMachineName string, options *StandbyVirtualMachinesClientGetOptions) (StandbyVirtualMachinesClientGetResponse, error)
Get - Get a StandbyVirtualMachineResource If the operation fails it returns an *azcore.ResponseError type.
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyVirtualMachinePoolName - Name of the standby virtual machine pool
- standbyVirtualMachineName - Name of the standby virtual machine
- options - StandbyVirtualMachinesClientGetOptions contains the optional parameters for the StandbyVirtualMachinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_Get.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := clientFactory.NewStandbyVirtualMachinesClient().Get(ctx, "rgstandbypool", "pool", "virtualMachine", 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.StandbyVirtualMachineResource = armstandbypool.StandbyVirtualMachineResource{ // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Properties: &armstandbypool.StandbyVirtualMachineResourceProperties{ // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // VirtualMachineResourceID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/provider/Microsoft.Compute/virtualMachines/virtualMachine"), // }, // } }
Output:
func (*StandbyVirtualMachinesClient) NewListByStandbyVirtualMachinePoolResourcePager ¶
func (client *StandbyVirtualMachinesClient) NewListByStandbyVirtualMachinePoolResourcePager(resourceGroupName string, standbyVirtualMachinePoolName string, options *StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions) *runtime.Pager[StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse]
NewListByStandbyVirtualMachinePoolResourcePager - List StandbyVirtualMachineResource resources by StandbyVirtualMachinePoolResource
Generated from API version 2023-12-01-preview
- resourceGroupName - The name of the resource group. The name is case insensitive.
- standbyVirtualMachinePoolName - Name of the standby virtual machine pool
- options - StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions contains the optional parameters for the StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/92de53a5f1e0e03c94b40475d2135d97148ed014/specification/standbypool/resource-manager/Microsoft.StandbyPool/preview/2023-12-01-preview/examples/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/standbypool/armstandbypool" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() clientFactory, err := armstandbypool.NewClientFactory("<subscription-id>", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := clientFactory.NewStandbyVirtualMachinesClient().NewListByStandbyVirtualMachinePoolResourcePager("rgstandbypool", "pool", 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.StandbyVirtualMachineResourceListResult = armstandbypool.StandbyVirtualMachineResourceListResult{ // Value: []*armstandbypool.StandbyVirtualMachineResource{ // { // Name: to.Ptr("pool"), // Type: to.Ptr("Microsoft.StandbyPool/standbyVirtualMachinePools/virtualMachines"), // ID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/pool/standbyVirtualMachines/virtualMachine"), // SystemData: &armstandbypool.SystemData{ // CreatedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // CreatedBy: to.Ptr("pooluser@microsoft.com"), // CreatedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // LastModifiedAt: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-09-07T16:33:22.210Z"); return t}()), // LastModifiedBy: to.Ptr("pooluser@microsoft.com"), // LastModifiedByType: to.Ptr(armstandbypool.CreatedByTypeUser), // }, // Properties: &armstandbypool.StandbyVirtualMachineResourceProperties{ // ProvisioningState: to.Ptr(armstandbypool.ProvisioningStateSucceeded), // VirtualMachineResourceID: to.Ptr("/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/provider/Microsoft.Compute/virtualMachines/virtualMachine"), // }, // }}, // } } }
Output:
type StandbyVirtualMachinesClientGetOptions ¶
type StandbyVirtualMachinesClientGetOptions struct { }
StandbyVirtualMachinesClientGetOptions contains the optional parameters for the StandbyVirtualMachinesClient.Get method.
type StandbyVirtualMachinesClientGetResponse ¶
type StandbyVirtualMachinesClientGetResponse struct { // Concrete proxy resource types can be created by aliasing this type using a specific property type. StandbyVirtualMachineResource }
StandbyVirtualMachinesClientGetResponse contains the response from method StandbyVirtualMachinesClient.Get.
type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions ¶
type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions struct { }
StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceOptions contains the optional parameters for the StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager method.
type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse ¶
type StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse struct { // The response of a StandbyVirtualMachineResource list operation. StandbyVirtualMachineResourceListResult }
StandbyVirtualMachinesClientListByStandbyVirtualMachinePoolResourceResponse contains the response from method StandbyVirtualMachinesClient.NewListByStandbyVirtualMachinePoolResourcePager.
type Subnet ¶
type Subnet struct { // REQUIRED; Specifies ARM resource id of the subnet. ID *string }
Subnet of container group
func (Subnet) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Subnet.
func (*Subnet) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface for type Subnet.
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 VirtualMachineState ¶
type VirtualMachineState string
VirtualMachineState - State of standby virtual machines
const ( // VirtualMachineStateDeallocated - The virtual machine has released the lease on the underlying hardware and is powered off. VirtualMachineStateDeallocated VirtualMachineState = "Deallocated" // VirtualMachineStateRunning - The virtual machine is up and running. VirtualMachineStateRunning VirtualMachineState = "Running" )
func PossibleVirtualMachineStateValues ¶
func PossibleVirtualMachineStateValues() []VirtualMachineState
PossibleVirtualMachineStateValues returns the possible values for the VirtualMachineState const type.