Documentation ¶
Index ¶
- type AllocationMethod
- type AvailabilitySet
- type AvailabilitySetListItem
- type AvailabilitySetListResult
- type AvailabilitySetProperties
- type AvailabilitySetsClient
- func (client *AvailabilitySetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, ...) (*runtime.Poller[AvailabilitySetsClientCreateOrUpdateResponse], error)
- func (client *AvailabilitySetsClient) BeginDelete(ctx context.Context, resourceGroupName string, availabilitySetName string, ...) (*runtime.Poller[AvailabilitySetsClientDeleteResponse], error)
- func (client *AvailabilitySetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, ...) (*runtime.Poller[AvailabilitySetsClientUpdateResponse], error)
- func (client *AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string, ...) (AvailabilitySetsClientGetResponse, error)
- func (client *AvailabilitySetsClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[AvailabilitySetsClientListByResourceGroupResponse]
- func (client *AvailabilitySetsClient) NewListBySubscriptionPager(options *AvailabilitySetsClientListBySubscriptionOptions) *runtime.Pager[AvailabilitySetsClientListBySubscriptionResponse]
- type AvailabilitySetsClientBeginCreateOrUpdateOptions
- type AvailabilitySetsClientBeginDeleteOptions
- type AvailabilitySetsClientBeginUpdateOptions
- type AvailabilitySetsClientCreateOrUpdateResponse
- type AvailabilitySetsClientDeleteResponse
- type AvailabilitySetsClientGetOptions
- type AvailabilitySetsClientGetResponse
- type AvailabilitySetsClientListByResourceGroupOptions
- type AvailabilitySetsClientListByResourceGroupResponse
- type AvailabilitySetsClientListBySubscriptionOptions
- type AvailabilitySetsClientListBySubscriptionResponse
- type AvailabilitySetsClientUpdateResponse
- type Checkpoint
- type Cloud
- type CloudCapacity
- type CloudInventoryItem
- type CloudListResult
- type CloudProperties
- type CloudsClient
- func (client *CloudsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cloudName string, body Cloud, ...) (*runtime.Poller[CloudsClientCreateOrUpdateResponse], error)
- func (client *CloudsClient) BeginDelete(ctx context.Context, resourceGroupName string, cloudName string, ...) (*runtime.Poller[CloudsClientDeleteResponse], error)
- func (client *CloudsClient) BeginUpdate(ctx context.Context, resourceGroupName string, cloudName string, ...) (*runtime.Poller[CloudsClientUpdateResponse], error)
- func (client *CloudsClient) Get(ctx context.Context, resourceGroupName string, cloudName string, ...) (CloudsClientGetResponse, error)
- func (client *CloudsClient) NewListByResourceGroupPager(resourceGroupName string, options *CloudsClientListByResourceGroupOptions) *runtime.Pager[CloudsClientListByResourceGroupResponse]
- func (client *CloudsClient) NewListBySubscriptionPager(options *CloudsClientListBySubscriptionOptions) *runtime.Pager[CloudsClientListBySubscriptionResponse]
- type CloudsClientBeginCreateOrUpdateOptions
- type CloudsClientBeginDeleteOptions
- type CloudsClientBeginUpdateOptions
- type CloudsClientCreateOrUpdateResponse
- type CloudsClientDeleteResponse
- type CloudsClientGetOptions
- type CloudsClientGetResponse
- type CloudsClientListByResourceGroupOptions
- type CloudsClientListByResourceGroupResponse
- type CloudsClientListBySubscriptionOptions
- type CloudsClientListBySubscriptionResponse
- type CloudsClientUpdateResponse
- type CreateDiffDisk
- type CreatedByType
- type DynamicMemoryEnabled
- type ErrorDefinition
- type ErrorResponse
- type ExtendedLocation
- type HardwareProfile
- type HardwareProfileUpdate
- type InventoryItem
- type InventoryItemDetails
- type InventoryItemProperties
- type InventoryItemPropertiesClassification
- type InventoryItemsClient
- func (client *InventoryItemsClient) Create(ctx context.Context, resourceGroupName string, vmmServerName string, ...) (InventoryItemsClientCreateResponse, error)
- func (client *InventoryItemsClient) Delete(ctx context.Context, resourceGroupName string, vmmServerName string, ...) (InventoryItemsClientDeleteResponse, error)
- func (client *InventoryItemsClient) Get(ctx context.Context, resourceGroupName string, vmmServerName string, ...) (InventoryItemsClientGetResponse, error)
- func (client *InventoryItemsClient) NewListByVMMServerPager(resourceGroupName string, vmmServerName string, ...) *runtime.Pager[InventoryItemsClientListByVMMServerResponse]
- type InventoryItemsClientCreateOptions
- type InventoryItemsClientCreateResponse
- type InventoryItemsClientDeleteOptions
- type InventoryItemsClientDeleteResponse
- type InventoryItemsClientGetOptions
- type InventoryItemsClientGetResponse
- type InventoryItemsClientListByVMMServerOptions
- type InventoryItemsClientListByVMMServerResponse
- type InventoryItemsList
- type InventoryType
- type IsCustomizable
- type LimitCPUForMigration
- type NetworkInterfaces
- type NetworkInterfacesUpdate
- type NetworkProfile
- type NetworkProfileUpdate
- type OperationsClient
- type OperationsClientListOptions
- type OperationsClientListResponse
- type OsProfile
- type OsType
- type ProxyResource
- type Resource
- type ResourcePatch
- type ResourceProviderOperation
- type ResourceProviderOperationDisplay
- type ResourceProviderOperationList
- type StopVirtualMachineOptions
- type StorageProfile
- type StorageProfileUpdate
- type StorageQoSPolicy
- type StorageQoSPolicyDetails
- type SystemData
- type VMMServer
- type VMMServerListResult
- type VMMServerProperties
- type VMMServerPropertiesCredentials
- type VirtualDisk
- type VirtualDiskUpdate
- type VirtualMachine
- type VirtualMachineCreateCheckpoint
- type VirtualMachineDeleteCheckpoint
- type VirtualMachineInventoryItem
- type VirtualMachineListResult
- type VirtualMachineProperties
- type VirtualMachineRestoreCheckpoint
- type VirtualMachineTemplate
- type VirtualMachineTemplateInventoryItem
- type VirtualMachineTemplateListResult
- type VirtualMachineTemplateProperties
- type VirtualMachineTemplatesClient
- func (client *VirtualMachineTemplatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[VirtualMachineTemplatesClientCreateOrUpdateResponse], error)
- func (client *VirtualMachineTemplatesClient) BeginDelete(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[VirtualMachineTemplatesClientDeleteResponse], error)
- func (client *VirtualMachineTemplatesClient) BeginUpdate(ctx context.Context, resourceGroupName string, ...) (*runtime.Poller[VirtualMachineTemplatesClientUpdateResponse], error)
- func (client *VirtualMachineTemplatesClient) Get(ctx context.Context, resourceGroupName string, ...) (VirtualMachineTemplatesClientGetResponse, error)
- func (client *VirtualMachineTemplatesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualMachineTemplatesClientListByResourceGroupResponse]
- func (client *VirtualMachineTemplatesClient) NewListBySubscriptionPager(options *VirtualMachineTemplatesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachineTemplatesClientListBySubscriptionResponse]
- type VirtualMachineTemplatesClientBeginCreateOrUpdateOptions
- type VirtualMachineTemplatesClientBeginDeleteOptions
- type VirtualMachineTemplatesClientBeginUpdateOptions
- type VirtualMachineTemplatesClientCreateOrUpdateResponse
- type VirtualMachineTemplatesClientDeleteResponse
- type VirtualMachineTemplatesClientGetOptions
- type VirtualMachineTemplatesClientGetResponse
- type VirtualMachineTemplatesClientListByResourceGroupOptions
- type VirtualMachineTemplatesClientListByResourceGroupResponse
- type VirtualMachineTemplatesClientListBySubscriptionOptions
- type VirtualMachineTemplatesClientListBySubscriptionResponse
- type VirtualMachineTemplatesClientUpdateResponse
- type VirtualMachineUpdate
- type VirtualMachineUpdateProperties
- type VirtualMachinesClient
- func (client *VirtualMachinesClient) BeginCreateCheckpoint(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientCreateCheckpointResponse], error)
- func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientCreateOrUpdateResponse], error)
- func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
- func (client *VirtualMachinesClient) BeginDeleteCheckpoint(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientDeleteCheckpointResponse], error)
- func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientRestartResponse], error)
- func (client *VirtualMachinesClient) BeginRestoreCheckpoint(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientRestoreCheckpointResponse], error)
- func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
- func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
- func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error)
- func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, ...) (VirtualMachinesClientGetResponse, error)
- func (client *VirtualMachinesClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualMachinesClientListByResourceGroupResponse]
- func (client *VirtualMachinesClient) NewListBySubscriptionPager(options *VirtualMachinesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachinesClientListBySubscriptionResponse]
- type VirtualMachinesClientBeginCreateCheckpointOptions
- type VirtualMachinesClientBeginCreateOrUpdateOptions
- type VirtualMachinesClientBeginDeleteCheckpointOptions
- type VirtualMachinesClientBeginDeleteOptions
- type VirtualMachinesClientBeginRestartOptions
- type VirtualMachinesClientBeginRestoreCheckpointOptions
- type VirtualMachinesClientBeginStartOptions
- type VirtualMachinesClientBeginStopOptions
- type VirtualMachinesClientBeginUpdateOptions
- type VirtualMachinesClientCreateCheckpointResponse
- type VirtualMachinesClientCreateOrUpdateResponse
- type VirtualMachinesClientDeleteCheckpointResponse
- type VirtualMachinesClientDeleteResponse
- type VirtualMachinesClientGetOptions
- type VirtualMachinesClientGetResponse
- type VirtualMachinesClientListByResourceGroupOptions
- type VirtualMachinesClientListByResourceGroupResponse
- type VirtualMachinesClientListBySubscriptionOptions
- type VirtualMachinesClientListBySubscriptionResponse
- type VirtualMachinesClientRestartResponse
- type VirtualMachinesClientRestoreCheckpointResponse
- type VirtualMachinesClientStartResponse
- type VirtualMachinesClientStopResponse
- type VirtualMachinesClientUpdateResponse
- type VirtualNetwork
- type VirtualNetworkInventoryItem
- type VirtualNetworkListResult
- type VirtualNetworkProperties
- type VirtualNetworksClient
- func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (*runtime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error)
- func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error)
- func (client *VirtualNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (*runtime.Poller[VirtualNetworksClientUpdateResponse], error)
- func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, ...) (VirtualNetworksClientGetResponse, error)
- func (client *VirtualNetworksClient) NewListByResourceGroupPager(resourceGroupName string, ...) *runtime.Pager[VirtualNetworksClientListByResourceGroupResponse]
- func (client *VirtualNetworksClient) NewListBySubscriptionPager(options *VirtualNetworksClientListBySubscriptionOptions) *runtime.Pager[VirtualNetworksClientListBySubscriptionResponse]
- type VirtualNetworksClientBeginCreateOrUpdateOptions
- type VirtualNetworksClientBeginDeleteOptions
- type VirtualNetworksClientBeginUpdateOptions
- type VirtualNetworksClientCreateOrUpdateResponse
- type VirtualNetworksClientDeleteResponse
- type VirtualNetworksClientGetOptions
- type VirtualNetworksClientGetResponse
- type VirtualNetworksClientListByResourceGroupOptions
- type VirtualNetworksClientListByResourceGroupResponse
- type VirtualNetworksClientListBySubscriptionOptions
- type VirtualNetworksClientListBySubscriptionResponse
- type VirtualNetworksClientUpdateResponse
- type VmmServersClient
- func (client *VmmServersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmmServerName string, ...) (*runtime.Poller[VmmServersClientCreateOrUpdateResponse], error)
- func (client *VmmServersClient) BeginDelete(ctx context.Context, resourceGroupName string, vmmServerName string, ...) (*runtime.Poller[VmmServersClientDeleteResponse], error)
- func (client *VmmServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmmServerName string, ...) (*runtime.Poller[VmmServersClientUpdateResponse], error)
- func (client *VmmServersClient) Get(ctx context.Context, resourceGroupName string, vmmServerName string, ...) (VmmServersClientGetResponse, error)
- func (client *VmmServersClient) NewListByResourceGroupPager(resourceGroupName string, options *VmmServersClientListByResourceGroupOptions) *runtime.Pager[VmmServersClientListByResourceGroupResponse]
- func (client *VmmServersClient) NewListBySubscriptionPager(options *VmmServersClientListBySubscriptionOptions) *runtime.Pager[VmmServersClientListBySubscriptionResponse]
- type VmmServersClientBeginCreateOrUpdateOptions
- type VmmServersClientBeginDeleteOptions
- type VmmServersClientBeginUpdateOptions
- type VmmServersClientCreateOrUpdateResponse
- type VmmServersClientDeleteResponse
- type VmmServersClientGetOptions
- type VmmServersClientGetResponse
- type VmmServersClientListByResourceGroupOptions
- type VmmServersClientListByResourceGroupResponse
- type VmmServersClientListBySubscriptionOptions
- type VmmServersClientListBySubscriptionResponse
- type VmmServersClientUpdateResponse
Examples ¶
- AvailabilitySetsClient.BeginCreateOrUpdate
- AvailabilitySetsClient.BeginDelete
- AvailabilitySetsClient.BeginUpdate
- AvailabilitySetsClient.Get
- AvailabilitySetsClient.NewListByResourceGroupPager
- AvailabilitySetsClient.NewListBySubscriptionPager
- CloudsClient.BeginCreateOrUpdate
- CloudsClient.BeginDelete
- CloudsClient.BeginUpdate
- CloudsClient.Get
- CloudsClient.NewListByResourceGroupPager
- CloudsClient.NewListBySubscriptionPager
- InventoryItemsClient.Create
- InventoryItemsClient.Delete
- InventoryItemsClient.Get
- InventoryItemsClient.NewListByVMMServerPager
- OperationsClient.NewListPager
- VirtualMachineTemplatesClient.BeginCreateOrUpdate
- VirtualMachineTemplatesClient.BeginDelete
- VirtualMachineTemplatesClient.BeginUpdate
- VirtualMachineTemplatesClient.Get
- VirtualMachineTemplatesClient.NewListByResourceGroupPager
- VirtualMachineTemplatesClient.NewListBySubscriptionPager
- VirtualMachinesClient.BeginCreateCheckpoint
- VirtualMachinesClient.BeginCreateOrUpdate
- VirtualMachinesClient.BeginDelete
- VirtualMachinesClient.BeginDeleteCheckpoint
- VirtualMachinesClient.BeginRestart
- VirtualMachinesClient.BeginRestoreCheckpoint
- VirtualMachinesClient.BeginStart
- VirtualMachinesClient.BeginStop
- VirtualMachinesClient.BeginUpdate
- VirtualMachinesClient.Get
- VirtualMachinesClient.NewListByResourceGroupPager
- VirtualMachinesClient.NewListBySubscriptionPager
- VirtualNetworksClient.BeginCreateOrUpdate
- VirtualNetworksClient.BeginDelete
- VirtualNetworksClient.BeginUpdate
- VirtualNetworksClient.Get
- VirtualNetworksClient.NewListByResourceGroupPager
- VirtualNetworksClient.NewListBySubscriptionPager
- VmmServersClient.BeginCreateOrUpdate
- VmmServersClient.BeginDelete
- VmmServersClient.BeginUpdate
- VmmServersClient.Get
- VmmServersClient.NewListByResourceGroupPager
- VmmServersClient.NewListBySubscriptionPager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocationMethod ¶
type AllocationMethod string
AllocationMethod - Allocation method.
const ( AllocationMethodDynamic AllocationMethod = "Dynamic" AllocationMethodStatic AllocationMethod = "Static" )
func PossibleAllocationMethodValues ¶
func PossibleAllocationMethodValues() []AllocationMethod
PossibleAllocationMethodValues returns the possible values for the AllocationMethod const type.
type AvailabilitySet ¶
type AvailabilitySet struct { // The extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // Gets or sets the location. Location *string `json:"location,omitempty"` // Resource properties. Properties *AvailabilitySetProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
AvailabilitySet - The AvailabilitySets resource definition.
func (AvailabilitySet) MarshalJSON ¶
func (a AvailabilitySet) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type AvailabilitySet.
type AvailabilitySetListItem ¶
type AvailabilitySetListItem struct { // Gets the ARM Id of the microsoft.scvmm/availabilitySets resource. ID *string `json:"id,omitempty"` // Gets or sets the name of the availability set. Name *string `json:"name,omitempty"` }
AvailabilitySetListItem - Availability Set model
type AvailabilitySetListResult ¶
type AvailabilitySetListResult struct { // Url to follow for getting next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of AvailabilitySets. Value []*AvailabilitySet `json:"value,omitempty"` }
AvailabilitySetListResult - List of AvailabilitySets.
type AvailabilitySetProperties ¶
type AvailabilitySetProperties struct { // Name of the availability set. AvailabilitySetName *string `json:"availabilitySetName,omitempty"` // ARM Id of the vmmServer resource in which this resource resides. VmmServerID *string `json:"vmmServerId,omitempty"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
AvailabilitySetProperties - Defines the resource properties.
type AvailabilitySetsClient ¶
type AvailabilitySetsClient struct {
// contains filtered or unexported fields
}
AvailabilitySetsClient contains the methods for the AvailabilitySets group. Don't use this type directly, use NewAvailabilitySetsClient() instead.
func NewAvailabilitySetsClient ¶
func NewAvailabilitySetsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*AvailabilitySetsClient, error)
NewAvailabilitySetsClient creates a new instance of AvailabilitySetsClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*AvailabilitySetsClient) BeginCreateOrUpdate ¶
func (client *AvailabilitySetsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, body AvailabilitySet, options *AvailabilitySetsClientBeginCreateOrUpdateOptions) (*runtime.Poller[AvailabilitySetsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Onboards the ScVmm availability set as an Azure resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. availabilitySetName - Name of the AvailabilitySet. body - Request payload. options - AvailabilitySetsClientBeginCreateOrUpdateOptions contains the optional parameters for the AvailabilitySetsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateAvailabilitySet.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewAvailabilitySetsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "HRAvailabilitySet", armscvmm.AvailabilitySet{ ExtendedLocation: &armscvmm.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armscvmm.AvailabilitySetProperties{ AvailabilitySetName: to.Ptr("hr-avset"), VmmServerID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ScVmm/VMMServers/ContosoVMMServer"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*AvailabilitySetsClient) BeginDelete ¶
func (client *AvailabilitySetsClient) BeginDelete(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientBeginDeleteOptions) (*runtime.Poller[AvailabilitySetsClientDeleteResponse], error)
BeginDelete - Deregisters the ScVmm availability set from Azure. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. availabilitySetName - Name of the AvailabilitySet. options - AvailabilitySetsClientBeginDeleteOptions contains the optional parameters for the AvailabilitySetsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteAvailabilitySet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewAvailabilitySetsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRAvailabilitySet", &armscvmm.AvailabilitySetsClientBeginDeleteOptions{Force: 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 (*AvailabilitySetsClient) BeginUpdate ¶
func (client *AvailabilitySetsClient) BeginUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, body ResourcePatch, options *AvailabilitySetsClientBeginUpdateOptions) (*runtime.Poller[AvailabilitySetsClientUpdateResponse], error)
BeginUpdate - Updates the AvailabilitySets resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. availabilitySetName - Name of the AvailabilitySet. body - AvailabilitySets patch payload. options - AvailabilitySetsClientBeginUpdateOptions contains the optional parameters for the AvailabilitySetsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/UpdateAvailabilitySet.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewAvailabilitySetsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testrg", "HRAvailabilitySet", armscvmm.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*AvailabilitySetsClient) Get ¶
func (client *AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string, options *AvailabilitySetsClientGetOptions) (AvailabilitySetsClientGetResponse, error)
Get - Implements AvailabilitySet GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. availabilitySetName - Name of the AvailabilitySet. options - AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/GetAvailabilitySet.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewAvailabilitySetsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRAvailabilitySet", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*AvailabilitySetsClient) NewListByResourceGroupPager ¶
func (client *AvailabilitySetsClient) NewListByResourceGroupPager(resourceGroupName string, options *AvailabilitySetsClientListByResourceGroupOptions) *runtime.Pager[AvailabilitySetsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of AvailabilitySets in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. options - AvailabilitySetsClientListByResourceGroupOptions contains the optional parameters for the AvailabilitySetsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListAvailabilitySetsByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewAvailabilitySetsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*AvailabilitySetsClient) NewListBySubscriptionPager ¶
func (client *AvailabilitySetsClient) NewListBySubscriptionPager(options *AvailabilitySetsClientListBySubscriptionOptions) *runtime.Pager[AvailabilitySetsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List of AvailabilitySets in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview options - AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListAvailabilitySetsBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewAvailabilitySetsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type AvailabilitySetsClientBeginCreateOrUpdateOptions ¶
type AvailabilitySetsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AvailabilitySetsClientBeginCreateOrUpdateOptions contains the optional parameters for the AvailabilitySetsClient.BeginCreateOrUpdate method.
type AvailabilitySetsClientBeginDeleteOptions ¶
type AvailabilitySetsClientBeginDeleteOptions struct { // Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
AvailabilitySetsClientBeginDeleteOptions contains the optional parameters for the AvailabilitySetsClient.BeginDelete method.
type AvailabilitySetsClientBeginUpdateOptions ¶
type AvailabilitySetsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
AvailabilitySetsClientBeginUpdateOptions contains the optional parameters for the AvailabilitySetsClient.BeginUpdate method.
type AvailabilitySetsClientCreateOrUpdateResponse ¶
type AvailabilitySetsClientCreateOrUpdateResponse struct {
AvailabilitySet
}
AvailabilitySetsClientCreateOrUpdateResponse contains the response from method AvailabilitySetsClient.CreateOrUpdate.
type AvailabilitySetsClientDeleteResponse ¶
type AvailabilitySetsClientDeleteResponse struct { }
AvailabilitySetsClientDeleteResponse contains the response from method AvailabilitySetsClient.Delete.
type AvailabilitySetsClientGetOptions ¶
type AvailabilitySetsClientGetOptions struct { }
AvailabilitySetsClientGetOptions contains the optional parameters for the AvailabilitySetsClient.Get method.
type AvailabilitySetsClientGetResponse ¶
type AvailabilitySetsClientGetResponse struct {
AvailabilitySet
}
AvailabilitySetsClientGetResponse contains the response from method AvailabilitySetsClient.Get.
type AvailabilitySetsClientListByResourceGroupOptions ¶
type AvailabilitySetsClientListByResourceGroupOptions struct { }
AvailabilitySetsClientListByResourceGroupOptions contains the optional parameters for the AvailabilitySetsClient.ListByResourceGroup method.
type AvailabilitySetsClientListByResourceGroupResponse ¶
type AvailabilitySetsClientListByResourceGroupResponse struct {
AvailabilitySetListResult
}
AvailabilitySetsClientListByResourceGroupResponse contains the response from method AvailabilitySetsClient.ListByResourceGroup.
type AvailabilitySetsClientListBySubscriptionOptions ¶
type AvailabilitySetsClientListBySubscriptionOptions struct { }
AvailabilitySetsClientListBySubscriptionOptions contains the optional parameters for the AvailabilitySetsClient.ListBySubscription method.
type AvailabilitySetsClientListBySubscriptionResponse ¶
type AvailabilitySetsClientListBySubscriptionResponse struct {
AvailabilitySetListResult
}
AvailabilitySetsClientListBySubscriptionResponse contains the response from method AvailabilitySetsClient.ListBySubscription.
type AvailabilitySetsClientUpdateResponse ¶
type AvailabilitySetsClientUpdateResponse struct {
AvailabilitySet
}
AvailabilitySetsClientUpdateResponse contains the response from method AvailabilitySetsClient.Update.
type Checkpoint ¶
type Checkpoint struct { // Gets ID of the checkpoint. CheckpointID *string `json:"checkpointID,omitempty"` // Gets description of the checkpoint. Description *string `json:"description,omitempty"` // Gets name of the checkpoint. Name *string `json:"name,omitempty"` // Gets ID of parent of the checkpoint. ParentCheckpointID *string `json:"parentCheckpointID,omitempty"` }
Checkpoint - Defines the resource properties.
type Cloud ¶
type Cloud struct { // REQUIRED; The extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *CloudProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
Cloud - The Clouds resource definition.
func (Cloud) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type Cloud.
type CloudCapacity ¶
type CloudCapacity struct { // CPUCount specifies the maximum number of CPUs that can be allocated in the cloud. CPUCount *int64 `json:"cpuCount,omitempty"` // MemoryMB specifies a memory usage limit in megabytes. MemoryMB *int64 `json:"memoryMB,omitempty"` // VMCount gives the max number of VMs that can be deployed in the cloud. VMCount *int64 `json:"vmCount,omitempty"` }
CloudCapacity - Cloud Capacity model
type CloudInventoryItem ¶
type CloudInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // READ-ONLY; Gets the Managed Object name in VMM for the inventory item. InventoryItemName *string `json:"inventoryItemName,omitempty" azure:"ro"` // READ-ONLY; Gets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty" azure:"ro"` // READ-ONLY; Gets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Gets the UUID (which is assigned by VMM) for the inventory item. UUID *string `json:"uuid,omitempty" azure:"ro"` }
CloudInventoryItem - The Cloud inventory item.
func (*CloudInventoryItem) GetInventoryItemProperties ¶
func (c *CloudInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type CloudInventoryItem.
func (CloudInventoryItem) MarshalJSON ¶
func (c CloudInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudInventoryItem.
func (*CloudInventoryItem) UnmarshalJSON ¶
func (c *CloudInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type CloudInventoryItem.
type CloudListResult ¶
type CloudListResult struct { // Url to follow for getting next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of Clouds. Value []*Cloud `json:"value,omitempty"` }
CloudListResult - List of Clouds.
type CloudProperties ¶
type CloudProperties struct { // Gets or sets the inventory Item ID for the resource. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Unique ID of the cloud. UUID *string `json:"uuid,omitempty"` // ARM Id of the vmmServer resource in which this resource resides. VmmServerID *string `json:"vmmServerId,omitempty"` // READ-ONLY; Capacity of the cloud. CloudCapacity *CloudCapacity `json:"cloudCapacity,omitempty" azure:"ro"` // READ-ONLY; Name of the cloud in VMMServer. CloudName *string `json:"cloudName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; List of QoS policies available for the cloud. StorageQoSPolicies []*StorageQoSPolicy `json:"storageQoSPolicies,omitempty" azure:"ro"` }
CloudProperties - Defines the resource properties.
func (CloudProperties) MarshalJSON ¶
func (c CloudProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type CloudProperties.
type CloudsClient ¶
type CloudsClient struct {
// contains filtered or unexported fields
}
CloudsClient contains the methods for the Clouds group. Don't use this type directly, use NewCloudsClient() instead.
func NewCloudsClient ¶
func NewCloudsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*CloudsClient, error)
NewCloudsClient creates a new instance of CloudsClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*CloudsClient) BeginCreateOrUpdate ¶
func (client *CloudsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, cloudName string, body Cloud, options *CloudsClientBeginCreateOrUpdateOptions) (*runtime.Poller[CloudsClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Onboards the ScVmm fabric cloud as an Azure cloud resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. cloudName - Name of the Cloud. body - Request payload. options - CloudsClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudsClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateCloud.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewCloudsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "HRCloud", armscvmm.Cloud{ ExtendedLocation: &armscvmm.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armscvmm.CloudProperties{ UUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VmmServerID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*CloudsClient) BeginDelete ¶
func (client *CloudsClient) BeginDelete(ctx context.Context, resourceGroupName string, cloudName string, options *CloudsClientBeginDeleteOptions) (*runtime.Poller[CloudsClientDeleteResponse], error)
BeginDelete - Deregisters the ScVmm fabric cloud from Azure. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. cloudName - Name of the Cloud. options - CloudsClientBeginDeleteOptions contains the optional parameters for the CloudsClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteCloud.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewCloudsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRCloud", &armscvmm.CloudsClientBeginDeleteOptions{Force: 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 (*CloudsClient) BeginUpdate ¶
func (client *CloudsClient) BeginUpdate(ctx context.Context, resourceGroupName string, cloudName string, body ResourcePatch, options *CloudsClientBeginUpdateOptions) (*runtime.Poller[CloudsClientUpdateResponse], error)
BeginUpdate - Updates the Clouds resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. cloudName - Name of the Cloud. body - Clouds patch payload. options - CloudsClientBeginUpdateOptions contains the optional parameters for the CloudsClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/UpdateCloud.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewCloudsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testrg", "HRCloud", armscvmm.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*CloudsClient) Get ¶
func (client *CloudsClient) Get(ctx context.Context, resourceGroupName string, cloudName string, options *CloudsClientGetOptions) (CloudsClientGetResponse, error)
Get - Implements Cloud GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. cloudName - Name of the Cloud. options - CloudsClientGetOptions contains the optional parameters for the CloudsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/GetCloud.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewCloudsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRCloud", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*CloudsClient) NewListByResourceGroupPager ¶
func (client *CloudsClient) NewListByResourceGroupPager(resourceGroupName string, options *CloudsClientListByResourceGroupOptions) *runtime.Pager[CloudsClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of Clouds in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. options - CloudsClientListByResourceGroupOptions contains the optional parameters for the CloudsClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListCloudsByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewCloudsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*CloudsClient) NewListBySubscriptionPager ¶
func (client *CloudsClient) NewListBySubscriptionPager(options *CloudsClientListBySubscriptionOptions) *runtime.Pager[CloudsClientListBySubscriptionResponse]
NewListBySubscriptionPager - List of Clouds in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview options - CloudsClientListBySubscriptionOptions contains the optional parameters for the CloudsClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListCloudsBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewCloudsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type CloudsClientBeginCreateOrUpdateOptions ¶
type CloudsClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CloudsClientBeginCreateOrUpdateOptions contains the optional parameters for the CloudsClient.BeginCreateOrUpdate method.
type CloudsClientBeginDeleteOptions ¶
type CloudsClientBeginDeleteOptions struct { // Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
CloudsClientBeginDeleteOptions contains the optional parameters for the CloudsClient.BeginDelete method.
type CloudsClientBeginUpdateOptions ¶
type CloudsClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
CloudsClientBeginUpdateOptions contains the optional parameters for the CloudsClient.BeginUpdate method.
type CloudsClientCreateOrUpdateResponse ¶
type CloudsClientCreateOrUpdateResponse struct {
Cloud
}
CloudsClientCreateOrUpdateResponse contains the response from method CloudsClient.CreateOrUpdate.
type CloudsClientDeleteResponse ¶
type CloudsClientDeleteResponse struct { }
CloudsClientDeleteResponse contains the response from method CloudsClient.Delete.
type CloudsClientGetOptions ¶
type CloudsClientGetOptions struct { }
CloudsClientGetOptions contains the optional parameters for the CloudsClient.Get method.
type CloudsClientGetResponse ¶
type CloudsClientGetResponse struct {
Cloud
}
CloudsClientGetResponse contains the response from method CloudsClient.Get.
type CloudsClientListByResourceGroupOptions ¶
type CloudsClientListByResourceGroupOptions struct { }
CloudsClientListByResourceGroupOptions contains the optional parameters for the CloudsClient.ListByResourceGroup method.
type CloudsClientListByResourceGroupResponse ¶
type CloudsClientListByResourceGroupResponse struct {
CloudListResult
}
CloudsClientListByResourceGroupResponse contains the response from method CloudsClient.ListByResourceGroup.
type CloudsClientListBySubscriptionOptions ¶
type CloudsClientListBySubscriptionOptions struct { }
CloudsClientListBySubscriptionOptions contains the optional parameters for the CloudsClient.ListBySubscription method.
type CloudsClientListBySubscriptionResponse ¶
type CloudsClientListBySubscriptionResponse struct {
CloudListResult
}
CloudsClientListBySubscriptionResponse contains the response from method CloudsClient.ListBySubscription.
type CloudsClientUpdateResponse ¶
type CloudsClientUpdateResponse struct {
Cloud
}
CloudsClientUpdateResponse contains the response from method CloudsClient.Update.
type CreateDiffDisk ¶
type CreateDiffDisk string
CreateDiffDisk - Gets or sets a value indicating diff disk.
const ( CreateDiffDiskFalse CreateDiffDisk = "false" CreateDiffDiskTrue CreateDiffDisk = "true" )
func PossibleCreateDiffDiskValues ¶
func PossibleCreateDiffDiskValues() []CreateDiffDisk
PossibleCreateDiffDiskValues returns the possible values for the CreateDiffDisk const type.
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 DynamicMemoryEnabled ¶
type DynamicMemoryEnabled string
DynamicMemoryEnabled - Gets or sets a value indicating whether to enable dynamic memory or not.
const ( DynamicMemoryEnabledFalse DynamicMemoryEnabled = "false" DynamicMemoryEnabledTrue DynamicMemoryEnabled = "true" )
func PossibleDynamicMemoryEnabledValues ¶
func PossibleDynamicMemoryEnabledValues() []DynamicMemoryEnabled
PossibleDynamicMemoryEnabledValues returns the possible values for the DynamicMemoryEnabled const type.
type ErrorDefinition ¶
type ErrorDefinition struct { // READ-ONLY; Service specific error code which serves as the substatus for the HTTP error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; Internal error details. Details []*ErrorDefinition `json:"details,omitempty" azure:"ro"` // READ-ONLY; Description of the error. Message *string `json:"message,omitempty" azure:"ro"` }
ErrorDefinition - Error definition.
type ErrorResponse ¶
type ErrorResponse struct { // The error details. Error *ErrorDefinition `json:"error,omitempty"` }
ErrorResponse - Error response.
type ExtendedLocation ¶
type ExtendedLocation struct { // The extended location name. Name *string `json:"name,omitempty"` // The extended location type. Type *string `json:"type,omitempty"` }
ExtendedLocation - The extended location.
type HardwareProfile ¶
type HardwareProfile struct { // Gets or sets the number of vCPUs for the vm. CPUCount *int32 `json:"cpuCount,omitempty"` // Gets or sets a value indicating whether to enable dynamic memory or not. DynamicMemoryEnabled *DynamicMemoryEnabled `json:"dynamicMemoryEnabled,omitempty"` // Gets or sets the max dynamic memory for the vm. DynamicMemoryMaxMB *int32 `json:"dynamicMemoryMaxMB,omitempty"` // Gets or sets the min dynamic memory for the vm. DynamicMemoryMinMB *int32 `json:"dynamicMemoryMinMB,omitempty"` // Gets highly available property. IsHighlyAvailable *string `json:"isHighlyAvailable,omitempty"` // Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. LimitCPUForMigration *LimitCPUForMigration `json:"limitCpuForMigration,omitempty"` // MemoryMB is the size of a virtual machine's memory, in MB. MemoryMB *int32 `json:"memoryMB,omitempty"` }
HardwareProfile - Defines the resource properties.
type HardwareProfileUpdate ¶
type HardwareProfileUpdate struct { // Gets or sets the number of vCPUs for the vm. CPUCount *int32 `json:"cpuCount,omitempty"` // Gets or sets a value indicating whether to enable dynamic memory or not. DynamicMemoryEnabled *DynamicMemoryEnabled `json:"dynamicMemoryEnabled,omitempty"` // Gets or sets the max dynamic memory for the vm. DynamicMemoryMaxMB *int32 `json:"dynamicMemoryMaxMB,omitempty"` // Gets or sets the min dynamic memory for the vm. DynamicMemoryMinMB *int32 `json:"dynamicMemoryMinMB,omitempty"` // Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. LimitCPUForMigration *LimitCPUForMigration `json:"limitCpuForMigration,omitempty"` // MemoryMB is the size of a virtual machine's memory, in MB. MemoryMB *int32 `json:"memoryMB,omitempty"` }
HardwareProfileUpdate - Defines the resource properties.
type InventoryItem ¶
type InventoryItem struct { // REQUIRED; Resource properties. Properties InventoryItemPropertiesClassification `json:"properties,omitempty"` // Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are // a kind of Microsoft.Web/sites type. If supported, the resource provider must // validate and persist this value. Kind *string `json:"kind,omitempty"` // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
InventoryItem - Defines the inventory item.
func (InventoryItem) MarshalJSON ¶
func (i InventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type InventoryItem.
func (*InventoryItem) UnmarshalJSON ¶
func (i *InventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type InventoryItem.
type InventoryItemDetails ¶
type InventoryItemDetails struct { // Gets or sets the inventory Item ID for the resource. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Gets or sets the Managed Object name in VMM for the resource. InventoryItemName *string `json:"inventoryItemName,omitempty"` }
InventoryItemDetails - Defines the resource properties.
type InventoryItemProperties ¶
type InventoryItemProperties struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // READ-ONLY; Gets the Managed Object name in VMM for the inventory item. InventoryItemName *string `json:"inventoryItemName,omitempty" azure:"ro"` // READ-ONLY; Gets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty" azure:"ro"` // READ-ONLY; Gets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Gets the UUID (which is assigned by VMM) for the inventory item. UUID *string `json:"uuid,omitempty" azure:"ro"` }
InventoryItemProperties - Defines the resource properties.
func (*InventoryItemProperties) GetInventoryItemProperties ¶
func (i *InventoryItemProperties) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type InventoryItemProperties.
type InventoryItemPropertiesClassification ¶
type InventoryItemPropertiesClassification interface { // GetInventoryItemProperties returns the InventoryItemProperties content of the underlying type. GetInventoryItemProperties() *InventoryItemProperties }
InventoryItemPropertiesClassification provides polymorphic access to related types. Call the interface's GetInventoryItemProperties() method to access the common type. Use a type switch to determine the concrete type. The possible types are: - *CloudInventoryItem, *InventoryItemProperties, *VirtualMachineInventoryItem, *VirtualMachineTemplateInventoryItem, *VirtualNetworkInventoryItem
type InventoryItemsClient ¶
type InventoryItemsClient struct {
// contains filtered or unexported fields
}
InventoryItemsClient contains the methods for the InventoryItems group. Don't use this type directly, use NewInventoryItemsClient() instead.
func NewInventoryItemsClient ¶
func NewInventoryItemsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*InventoryItemsClient, error)
NewInventoryItemsClient creates a new instance of InventoryItemsClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*InventoryItemsClient) Create ¶
func (client *InventoryItemsClient) Create(ctx context.Context, resourceGroupName string, vmmServerName string, inventoryItemName string, options *InventoryItemsClientCreateOptions) (InventoryItemsClientCreateResponse, error)
Create - Create Or Update InventoryItem. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. inventoryItemName - Name of the inventoryItem. options - InventoryItemsClientCreateOptions contains the optional parameters for the InventoryItemsClient.Create method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateInventoryItem.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Create(ctx, "testrg", "ContosoVMMServer", "12345678-1234-1234-1234-123456789abc", &armscvmm.InventoryItemsClientCreateOptions{Body: &armscvmm.InventoryItem{ Properties: &armscvmm.CloudInventoryItem{ InventoryType: to.Ptr(armscvmm.InventoryTypeCloud), }, }, }) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InventoryItemsClient) Delete ¶
func (client *InventoryItemsClient) Delete(ctx context.Context, resourceGroupName string, vmmServerName string, inventoryItemName string, options *InventoryItemsClientDeleteOptions) (InventoryItemsClientDeleteResponse, error)
Delete - Deletes an inventoryItem. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. inventoryItemName - Name of the inventoryItem. options - InventoryItemsClientDeleteOptions contains the optional parameters for the InventoryItemsClient.Delete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteInventoryItem.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } _, err = client.Delete(ctx, "testrg", "ContosoVMMServer", "12345678-1234-1234-1234-123456789abc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } }
Output:
func (*InventoryItemsClient) Get ¶
func (client *InventoryItemsClient) Get(ctx context.Context, resourceGroupName string, vmmServerName string, inventoryItemName string, options *InventoryItemsClientGetOptions) (InventoryItemsClientGetResponse, error)
Get - Shows an inventory item. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. inventoryItemName - Name of the inventoryItem. options - InventoryItemsClientGetOptions contains the optional parameters for the InventoryItemsClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/GetInventoryItem.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "ContosoVMMServer", "12345678-1234-1234-1234-123456789abc", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*InventoryItemsClient) NewListByVMMServerPager ¶
func (client *InventoryItemsClient) NewListByVMMServerPager(resourceGroupName string, vmmServerName string, options *InventoryItemsClientListByVMMServerOptions) *runtime.Pager[InventoryItemsClientListByVMMServerResponse]
NewListByVMMServerPager - Returns the list of inventoryItems in the given VMMServer. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. options - InventoryItemsClientListByVMMServerOptions contains the optional parameters for the InventoryItemsClient.ListByVMMServer method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListInventoryItemsByVMMServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewInventoryItemsClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByVMMServerPager("testrg", "ContosoVMMServer", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type InventoryItemsClientCreateOptions ¶
type InventoryItemsClientCreateOptions struct { // Request payload. Body *InventoryItem }
InventoryItemsClientCreateOptions contains the optional parameters for the InventoryItemsClient.Create method.
type InventoryItemsClientCreateResponse ¶
type InventoryItemsClientCreateResponse struct {
InventoryItem
}
InventoryItemsClientCreateResponse contains the response from method InventoryItemsClient.Create.
type InventoryItemsClientDeleteOptions ¶
type InventoryItemsClientDeleteOptions struct { }
InventoryItemsClientDeleteOptions contains the optional parameters for the InventoryItemsClient.Delete method.
type InventoryItemsClientDeleteResponse ¶
type InventoryItemsClientDeleteResponse struct { }
InventoryItemsClientDeleteResponse contains the response from method InventoryItemsClient.Delete.
type InventoryItemsClientGetOptions ¶
type InventoryItemsClientGetOptions struct { }
InventoryItemsClientGetOptions contains the optional parameters for the InventoryItemsClient.Get method.
type InventoryItemsClientGetResponse ¶
type InventoryItemsClientGetResponse struct {
InventoryItem
}
InventoryItemsClientGetResponse contains the response from method InventoryItemsClient.Get.
type InventoryItemsClientListByVMMServerOptions ¶
type InventoryItemsClientListByVMMServerOptions struct { }
InventoryItemsClientListByVMMServerOptions contains the optional parameters for the InventoryItemsClient.ListByVMMServer method.
type InventoryItemsClientListByVMMServerResponse ¶
type InventoryItemsClientListByVMMServerResponse struct {
InventoryItemsList
}
InventoryItemsClientListByVMMServerResponse contains the response from method InventoryItemsClient.ListByVMMServer.
type InventoryItemsList ¶
type InventoryItemsList struct { // REQUIRED; Array of InventoryItems Value []*InventoryItem `json:"value,omitempty"` // Url to follow for getting next page of InventoryItems. NextLink *string `json:"nextLink,omitempty"` }
InventoryItemsList - List of InventoryItems.
type InventoryType ¶
type InventoryType string
InventoryType - The inventory type.
const ( InventoryTypeCloud InventoryType = "Cloud" InventoryTypeVirtualMachine InventoryType = "VirtualMachine" InventoryTypeVirtualMachineTemplate InventoryType = "VirtualMachineTemplate" InventoryTypeVirtualNetwork InventoryType = "VirtualNetwork" )
func PossibleInventoryTypeValues ¶
func PossibleInventoryTypeValues() []InventoryType
PossibleInventoryTypeValues returns the possible values for the InventoryType const type.
type IsCustomizable ¶
type IsCustomizable string
IsCustomizable - Gets or sets a value indicating whether the vm template is customizable or not.
const ( IsCustomizableFalse IsCustomizable = "false" IsCustomizableTrue IsCustomizable = "true" )
func PossibleIsCustomizableValues ¶
func PossibleIsCustomizableValues() []IsCustomizable
PossibleIsCustomizableValues returns the possible values for the IsCustomizable const type.
type LimitCPUForMigration ¶
type LimitCPUForMigration string
LimitCPUForMigration - Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs.
const ( LimitCPUForMigrationFalse LimitCPUForMigration = "false" LimitCPUForMigrationTrue LimitCPUForMigration = "true" )
func PossibleLimitCPUForMigrationValues ¶
func PossibleLimitCPUForMigrationValues() []LimitCPUForMigration
PossibleLimitCPUForMigrationValues returns the possible values for the LimitCPUForMigration const type.
type NetworkInterfaces ¶
type NetworkInterfaces struct { // Gets or sets the ipv4 address type. IPv4AddressType *AllocationMethod `json:"ipv4AddressType,omitempty"` // Gets or sets the ipv6 address type. IPv6AddressType *AllocationMethod `json:"ipv6AddressType,omitempty"` // Gets or sets the nic MAC address. MacAddress *string `json:"macAddress,omitempty"` // Gets or sets the mac address type. MacAddressType *AllocationMethod `json:"macAddressType,omitempty"` // Gets or sets the name of the network interface. Name *string `json:"name,omitempty"` // Gets or sets the nic id. NicID *string `json:"nicId,omitempty"` // Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` // READ-ONLY; Gets the display name of the network interface as shown in the vmmServer. This is the fallback label for a NIC // when the name is not set. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the nic ipv4 addresses. IPv4Addresses []*string `json:"ipv4Addresses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the nic ipv6 addresses. IPv6Addresses []*string `json:"ipv6Addresses,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the name of the virtual network in vmmServer that the nic is connected to. NetworkName *string `json:"networkName,omitempty" azure:"ro"` }
NetworkInterfaces - Network Interface model
func (NetworkInterfaces) MarshalJSON ¶
func (n NetworkInterfaces) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkInterfaces.
type NetworkInterfacesUpdate ¶
type NetworkInterfacesUpdate struct { // Gets or sets the ipv4 address type. IPv4AddressType *AllocationMethod `json:"ipv4AddressType,omitempty"` // Gets or sets the ipv6 address type. IPv6AddressType *AllocationMethod `json:"ipv6AddressType,omitempty"` // Gets or sets the nic MAC address. MacAddress *string `json:"macAddress,omitempty"` // Gets or sets the mac address type. MacAddressType *AllocationMethod `json:"macAddressType,omitempty"` // Gets or sets the name of the network interface. Name *string `json:"name,omitempty"` // Gets or sets the nic id. NicID *string `json:"nicId,omitempty"` // Gets or sets the ARM Id of the Microsoft.ScVmm/virtualNetwork resource to connect the nic. VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` }
NetworkInterfacesUpdate - Network Interface model
type NetworkProfile ¶
type NetworkProfile struct { // Gets or sets the list of network interfaces associated with the virtual machine. NetworkInterfaces []*NetworkInterfaces `json:"networkInterfaces,omitempty"` }
NetworkProfile - Defines the resource properties.
func (NetworkProfile) MarshalJSON ¶
func (n NetworkProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProfile.
type NetworkProfileUpdate ¶
type NetworkProfileUpdate struct { // Gets or sets the list of network interfaces associated with the virtual machine. NetworkInterfaces []*NetworkInterfacesUpdate `json:"networkInterfaces,omitempty"` }
NetworkProfileUpdate - Defines the resource properties.
func (NetworkProfileUpdate) MarshalJSON ¶
func (n NetworkProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type NetworkProfileUpdate.
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 - Returns list of all operations. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview options - OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListOperations.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewOperationsClient(cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type OperationsClientListOptions ¶
type OperationsClientListOptions struct { }
OperationsClientListOptions contains the optional parameters for the OperationsClient.List method.
type OperationsClientListResponse ¶
type OperationsClientListResponse struct {
ResourceProviderOperationList
}
OperationsClientListResponse contains the response from method OperationsClient.List.
type OsProfile ¶
type OsProfile struct { // Admin password of the virtual machine. AdminPassword *string `json:"adminPassword,omitempty"` // Gets or sets computer name. ComputerName *string `json:"computerName,omitempty"` // READ-ONLY; Gets or sets os name. OSName *string `json:"osName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty" azure:"ro"` }
OsProfile - Defines the resource properties.
type OsType ¶
type OsType string
OsType - Defines the different types of VM guest operating systems.
func PossibleOsTypeValues ¶
func PossibleOsTypeValues() []OsType
PossibleOsTypeValues returns the possible values for the OsType const type.
type ProxyResource ¶
type ProxyResource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location
type Resource ¶
type Resource struct { // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; The name of the resource Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" Type *string `json:"type,omitempty" azure:"ro"` }
Resource - Common fields that are returned in the response for all Azure Resource Manager resources
type ResourcePatch ¶
ResourcePatch - Object containing tags updates for patch operations.
func (ResourcePatch) MarshalJSON ¶
func (r ResourcePatch) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type ResourcePatch.
type ResourceProviderOperation ¶
type ResourceProviderOperation struct { // Display metadata associated with the operation. Display *ResourceProviderOperationDisplay `json:"display,omitempty"` // Indicates whether the operation applies to data-plane. IsDataAction *string `json:"isDataAction,omitempty"` // Operation name, in format of {provider}/{resource}/{operation}. Name *string `json:"name,omitempty"` }
ResourceProviderOperation - Results of the request to list operations.
type ResourceProviderOperationDisplay ¶
type ResourceProviderOperationDisplay struct { // Description of this operation. Description *string `json:"description,omitempty"` // Type of operation: read, write, delete, etc. Operation *string `json:"operation,omitempty"` // The resource provider. Provider *string `json:"provider,omitempty"` // Resource on which the operation is performed. Resource *string `json:"resource,omitempty"` }
ResourceProviderOperationDisplay - Display metadata associated with the operation.
type ResourceProviderOperationList ¶
type ResourceProviderOperationList struct { // Url to follow for getting next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of Operations. Value []*ResourceProviderOperation `json:"value,omitempty"` }
ResourceProviderOperationList - Results of the request to list operations.
type StopVirtualMachineOptions ¶
type StopVirtualMachineOptions struct { // Gets or sets a value indicating whether to request non-graceful VM shutdown. True value for this flag indicates non-graceful // shutdown whereas false indicates otherwise. Defaults to false. SkipShutdown *bool `json:"skipShutdown,omitempty"` }
StopVirtualMachineOptions - Defines the stop action properties.
type StorageProfile ¶
type StorageProfile struct { // Gets or sets the list of virtual disks associated with the virtual machine. Disks []*VirtualDisk `json:"disks,omitempty"` }
StorageProfile - Defines the resource properties.
func (StorageProfile) MarshalJSON ¶
func (s StorageProfile) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfile.
type StorageProfileUpdate ¶
type StorageProfileUpdate struct { // Gets or sets the list of virtual disks associated with the virtual machine. Disks []*VirtualDiskUpdate `json:"disks,omitempty"` }
StorageProfileUpdate - Defines the resource properties.
func (StorageProfileUpdate) MarshalJSON ¶
func (s StorageProfileUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type StorageProfileUpdate.
type StorageQoSPolicy ¶
type StorageQoSPolicy struct { // The Bandwidth Limit for internet traffic. BandwidthLimit *int64 `json:"bandwidthLimit,omitempty"` // The ID of the QoS policy. ID *string `json:"id,omitempty"` // The maximum IO operations per second. IopsMaximum *int64 `json:"iopsMaximum,omitempty"` // The minimum IO operations per second. IopsMinimum *int64 `json:"iopsMinimum,omitempty"` // The name of the policy. Name *string `json:"name,omitempty"` // The underlying policy. PolicyID *string `json:"policyId,omitempty"` }
StorageQoSPolicy - The StorageQoSPolicy definition.
type StorageQoSPolicyDetails ¶
type StorageQoSPolicyDetails struct { // The ID of the QoS policy. ID *string `json:"id,omitempty"` // The name of the policy. Name *string `json:"name,omitempty"` }
StorageQoSPolicyDetails - The StorageQoSPolicyDetails definition.
type SystemData ¶
type SystemData struct { // The timestamp of resource creation (UTC). CreatedAt *time.Time `json:"createdAt,omitempty"` // The identity that created the resource. CreatedBy *string `json:"createdBy,omitempty"` // The type of identity that created the resource. CreatedByType *CreatedByType `json:"createdByType,omitempty"` // The timestamp of resource last modification (UTC) LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` // The identity that last modified the resource. LastModifiedBy *string `json:"lastModifiedBy,omitempty"` // The type of identity that last modified the resource. LastModifiedByType *CreatedByType `json:"lastModifiedByType,omitempty"` }
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 VMMServer ¶
type VMMServer struct { // REQUIRED; The extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VMMServerProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
VMMServer - The VmmServers resource definition.
func (VMMServer) MarshalJSON ¶
MarshalJSON implements the json.Marshaller interface for type VMMServer.
type VMMServerListResult ¶
type VMMServerListResult struct { // Url to follow for getting next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of VmmServers. Value []*VMMServer `json:"value,omitempty"` }
VMMServerListResult - List of VmmServers.
type VMMServerProperties ¶
type VMMServerProperties struct { // REQUIRED; Fqdn is the hostname/ip of the vmmServer. Fqdn *string `json:"fqdn,omitempty"` // Credentials to connect to VMMServer. Credentials *VMMServerPropertiesCredentials `json:"credentials,omitempty"` // Port is the port on which the vmmServer is listening. Port *int32 `json:"port,omitempty"` // READ-ONLY; Gets or sets the connection status to the vmmServer. ConnectionStatus *string `json:"connectionStatus,omitempty" azure:"ro"` // READ-ONLY; Gets or sets any error message if connection to vmmServer is having any issue. ErrorMessage *string `json:"errorMessage,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Unique ID of vmmServer. UUID *string `json:"uuid,omitempty" azure:"ro"` // READ-ONLY; Version is the version of the vmmSever. Version *string `json:"version,omitempty" azure:"ro"` }
VMMServerProperties - Defines the resource properties.
type VMMServerPropertiesCredentials ¶
type VMMServerPropertiesCredentials struct { // Credentials to use to connect to VMMServer. Password *string `json:"password,omitempty"` // Username to use to connect to VMMServer. Username *string `json:"username,omitempty"` }
VMMServerPropertiesCredentials - Credentials to connect to VMMServer.
type VirtualDisk ¶
type VirtualDisk struct { // Gets or sets the disk bus. Bus *int32 `json:"bus,omitempty"` // Gets or sets the disk bus type. BusType *string `json:"busType,omitempty"` // Gets or sets a value indicating diff disk. CreateDiffDisk *CreateDiffDisk `json:"createDiffDisk,omitempty"` // Gets or sets the disk id. DiskID *string `json:"diskId,omitempty"` // Gets or sets the disk total size. DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` // Gets or sets the disk lun. Lun *int32 `json:"lun,omitempty"` // Gets or sets the name of the disk. Name *string `json:"name,omitempty"` // The QoS policy for the disk. StorageQoSPolicy *StorageQoSPolicyDetails `json:"storageQoSPolicy,omitempty"` // Gets or sets the disk id in the template. TemplateDiskID *string `json:"templateDiskId,omitempty"` // Gets or sets the disk vhd type. VhdType *string `json:"vhdType,omitempty"` // READ-ONLY; Gets the display name of the virtual disk as shown in the vmmServer. This is the fallback label for a disk when // the name is not set. DisplayName *string `json:"displayName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the max disk size. MaxDiskSizeGB *int32 `json:"maxDiskSizeGB,omitempty" azure:"ro"` // READ-ONLY; Gets the disk vhd format type. VhdFormatType *string `json:"vhdFormatType,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the disk volume type. VolumeType *string `json:"volumeType,omitempty" azure:"ro"` }
VirtualDisk - Virtual disk model
type VirtualDiskUpdate ¶
type VirtualDiskUpdate struct { // Gets or sets the disk bus. Bus *int32 `json:"bus,omitempty"` // Gets or sets the disk bus type. BusType *string `json:"busType,omitempty"` // Gets or sets the disk id. DiskID *string `json:"diskId,omitempty"` // Gets or sets the disk total size. DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` // Gets or sets the disk lun. Lun *int32 `json:"lun,omitempty"` // Gets or sets the name of the disk. Name *string `json:"name,omitempty"` // The QoS policy for the disk. StorageQoSPolicy *StorageQoSPolicyDetails `json:"storageQoSPolicy,omitempty"` // Gets or sets the disk vhd type. VhdType *string `json:"vhdType,omitempty"` }
VirtualDiskUpdate - Virtual disk model
type VirtualMachine ¶
type VirtualMachine struct { // REQUIRED; The extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VirtualMachineProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
VirtualMachine - The VirtualMachines resource definition.
func (VirtualMachine) MarshalJSON ¶
func (v VirtualMachine) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachine.
type VirtualMachineCreateCheckpoint ¶
type VirtualMachineCreateCheckpoint struct { // Description of the checkpoint. Description *string `json:"description,omitempty"` // Name of the checkpoint. Name *string `json:"name,omitempty"` }
VirtualMachineCreateCheckpoint - Defines the create checkpoint action properties.
type VirtualMachineDeleteCheckpoint ¶
type VirtualMachineDeleteCheckpoint struct { // ID of the checkpoint to be deleted. ID *string `json:"id,omitempty"` }
VirtualMachineDeleteCheckpoint - Defines the delete checkpoint action properties.
type VirtualMachineInventoryItem ¶
type VirtualMachineInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // Cloud inventory resource details where the VM is present. Cloud *InventoryItemDetails `json:"cloud,omitempty"` // Gets or sets the nic ip addresses. IPAddresses []*string `json:"ipAddresses,omitempty"` // READ-ONLY; Gets the Managed Object name in VMM for the inventory item. InventoryItemName *string `json:"inventoryItemName,omitempty" azure:"ro"` // READ-ONLY; Gets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty" azure:"ro"` // READ-ONLY; Gets or sets os name. OSName *string `json:"osName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty" azure:"ro"` // READ-ONLY; Gets the power state of the virtual machine. PowerState *string `json:"powerState,omitempty" azure:"ro"` // READ-ONLY; Gets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Gets the UUID (which is assigned by VMM) for the inventory item. UUID *string `json:"uuid,omitempty" azure:"ro"` }
VirtualMachineInventoryItem - The Virtual machine inventory item.
func (*VirtualMachineInventoryItem) GetInventoryItemProperties ¶
func (v *VirtualMachineInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualMachineInventoryItem.
func (VirtualMachineInventoryItem) MarshalJSON ¶
func (v VirtualMachineInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineInventoryItem.
func (*VirtualMachineInventoryItem) UnmarshalJSON ¶
func (v *VirtualMachineInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineInventoryItem.
type VirtualMachineListResult ¶
type VirtualMachineListResult struct { // Url to follow for getting next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of VirtualMachines. Value []*VirtualMachine `json:"value,omitempty"` }
VirtualMachineListResult - List of VirtualMachines.
type VirtualMachineProperties ¶
type VirtualMachineProperties struct { // Availability Sets in vm. AvailabilitySets []*AvailabilitySetListItem `json:"availabilitySets,omitempty"` // Type of checkpoint supported for the vm. CheckpointType *string `json:"checkpointType,omitempty"` // Checkpoints in the vm. Checkpoints []*Checkpoint `json:"checkpoints,omitempty"` // ARM Id of the cloud resource to use for deploying the vm. CloudID *string `json:"cloudId,omitempty"` // Gets or sets the generation for the vm. Generation *int32 `json:"generation,omitempty"` // Hardware properties. HardwareProfile *HardwareProfile `json:"hardwareProfile,omitempty"` // Gets or sets the inventory Item ID for the resource. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Network properties. NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` // OS properties. OSProfile *OsProfile `json:"osProfile,omitempty"` // Storage properties. StorageProfile *StorageProfile `json:"storageProfile,omitempty"` // ARM Id of the template resource to use for deploying the vm. TemplateID *string `json:"templateId,omitempty"` // Unique ID of the virtual machine. UUID *string `json:"uuid,omitempty"` // VMName is the name of VM on the SCVMM server. VMName *string `json:"vmName,omitempty"` // ARM Id of the vmmServer resource in which this resource resides. VmmServerID *string `json:"vmmServerId,omitempty"` // READ-ONLY; Gets the power state of the virtual machine. PowerState *string `json:"powerState,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
VirtualMachineProperties - Defines the resource properties.
func (VirtualMachineProperties) MarshalJSON ¶
func (v VirtualMachineProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineProperties.
type VirtualMachineRestoreCheckpoint ¶
type VirtualMachineRestoreCheckpoint struct { // ID of the checkpoint to be restored to. ID *string `json:"id,omitempty"` }
VirtualMachineRestoreCheckpoint - Defines the restore checkpoint action properties.
type VirtualMachineTemplate ¶
type VirtualMachineTemplate struct { // REQUIRED; The extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VirtualMachineTemplateProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
VirtualMachineTemplate - The VirtualMachineTemplates resource definition.
func (VirtualMachineTemplate) MarshalJSON ¶
func (v VirtualMachineTemplate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplate.
type VirtualMachineTemplateInventoryItem ¶
type VirtualMachineTemplateInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // READ-ONLY; Gets or sets the desired number of vCPUs for the vm. CPUCount *int32 `json:"cpuCount,omitempty" azure:"ro"` // READ-ONLY; Gets the Managed Object name in VMM for the inventory item. InventoryItemName *string `json:"inventoryItemName,omitempty" azure:"ro"` // READ-ONLY; Gets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty" azure:"ro"` // READ-ONLY; MemoryMB is the desired size of a virtual machine's memory, in MB. MemoryMB *int32 `json:"memoryMB,omitempty" azure:"ro"` // READ-ONLY; Gets or sets os name. OSName *string `json:"osName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty" azure:"ro"` // READ-ONLY; Gets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Gets the UUID (which is assigned by VMM) for the inventory item. UUID *string `json:"uuid,omitempty" azure:"ro"` }
VirtualMachineTemplateInventoryItem - The Virtual machine template inventory item.
func (*VirtualMachineTemplateInventoryItem) GetInventoryItemProperties ¶
func (v *VirtualMachineTemplateInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualMachineTemplateInventoryItem.
func (VirtualMachineTemplateInventoryItem) MarshalJSON ¶
func (v VirtualMachineTemplateInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateInventoryItem.
func (*VirtualMachineTemplateInventoryItem) UnmarshalJSON ¶
func (v *VirtualMachineTemplateInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualMachineTemplateInventoryItem.
type VirtualMachineTemplateListResult ¶
type VirtualMachineTemplateListResult struct { // Url to follow for getting next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of VirtualMachineTemplates. Value []*VirtualMachineTemplate `json:"value,omitempty"` }
VirtualMachineTemplateListResult - List of VirtualMachineTemplates.
type VirtualMachineTemplateProperties ¶
type VirtualMachineTemplateProperties struct { // Gets or sets the inventory Item ID for the resource. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Unique ID of the virtual machine template. UUID *string `json:"uuid,omitempty"` // ARM Id of the vmmServer resource in which this resource resides. VmmServerID *string `json:"vmmServerId,omitempty"` // READ-ONLY; Gets or sets the desired number of vCPUs for the vm. CPUCount *int32 `json:"cpuCount,omitempty" azure:"ro"` // READ-ONLY; Gets or sets computer name. ComputerName *string `json:"computerName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the disks of the template. Disks []*VirtualDisk `json:"disks,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a value indicating whether to enable dynamic memory or not. DynamicMemoryEnabled *DynamicMemoryEnabled `json:"dynamicMemoryEnabled,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the max dynamic memory for the vm. DynamicMemoryMaxMB *int32 `json:"dynamicMemoryMaxMB,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the min dynamic memory for the vm. DynamicMemoryMinMB *int32 `json:"dynamicMemoryMinMB,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the generation for the vm. Generation *int32 `json:"generation,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a value indicating whether the vm template is customizable or not. IsCustomizable *IsCustomizable `json:"isCustomizable,omitempty" azure:"ro"` // READ-ONLY; Gets highly available property. IsHighlyAvailable *string `json:"isHighlyAvailable,omitempty" azure:"ro"` // READ-ONLY; Gets or sets a value indicating whether to enable processor compatibility mode for live migration of VMs. LimitCPUForMigration *LimitCPUForMigration `json:"limitCpuForMigration,omitempty" azure:"ro"` // READ-ONLY; MemoryMB is the desired size of a virtual machine's memory, in MB. MemoryMB *int32 `json:"memoryMB,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the network interfaces of the template. NetworkInterfaces []*NetworkInterfaces `json:"networkInterfaces,omitempty" azure:"ro"` // READ-ONLY; Gets or sets os name. OSName *string `json:"osName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the type of the os. OSType *OsType `json:"osType,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
VirtualMachineTemplateProperties - Defines the resource properties.
func (VirtualMachineTemplateProperties) MarshalJSON ¶
func (v VirtualMachineTemplateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineTemplateProperties.
type VirtualMachineTemplatesClient ¶
type VirtualMachineTemplatesClient struct {
// contains filtered or unexported fields
}
VirtualMachineTemplatesClient contains the methods for the VirtualMachineTemplates group. Don't use this type directly, use NewVirtualMachineTemplatesClient() instead.
func NewVirtualMachineTemplatesClient ¶
func NewVirtualMachineTemplatesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachineTemplatesClient, error)
NewVirtualMachineTemplatesClient creates a new instance of VirtualMachineTemplatesClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VirtualMachineTemplatesClient) BeginCreateOrUpdate ¶
func (client *VirtualMachineTemplatesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, body VirtualMachineTemplate, options *VirtualMachineTemplatesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachineTemplatesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Onboards the ScVmm VM Template as an Azure VM Template resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineTemplateName - Name of the VirtualMachineTemplate. body - Request payload. options - VirtualMachineTemplatesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateVirtualMachineTemplate.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "HRVirtualMachineTemplate", armscvmm.VirtualMachineTemplate{ ExtendedLocation: &armscvmm.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armscvmm.VirtualMachineTemplateProperties{ UUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VmmServerID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualMachineTemplatesClient) BeginDelete ¶
func (client *VirtualMachineTemplatesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, options *VirtualMachineTemplatesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachineTemplatesClientDeleteResponse], error)
BeginDelete - Deregisters the ScVmm VM Template from Azure. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineTemplateName - Name of the VirtualMachineTemplate. options - VirtualMachineTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteVirtualMachineTemplate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRVirtualMachineTemplate", &armscvmm.VirtualMachineTemplatesClientBeginDeleteOptions{Force: 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 (*VirtualMachineTemplatesClient) BeginUpdate ¶
func (client *VirtualMachineTemplatesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, body ResourcePatch, options *VirtualMachineTemplatesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachineTemplatesClientUpdateResponse], error)
BeginUpdate - Updates the VirtualMachineTemplate resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineTemplateName - Name of the VirtualMachineTemplate. body - VirtualMachineTemplates patch details. options - VirtualMachineTemplatesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/UpdateVirtualMachineTemplate.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testrg", "HRVirtualMachineTemplate", armscvmm.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualMachineTemplatesClient) Get ¶
func (client *VirtualMachineTemplatesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineTemplateName string, options *VirtualMachineTemplatesClientGetOptions) (VirtualMachineTemplatesClientGetResponse, error)
Get - Implements VirtualMachineTemplate GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineTemplateName - Name of the VirtualMachineTemplate. options - VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/GetVirtualMachineTemplate.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRVirtualMachineTemplate", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualMachineTemplatesClient) NewListByResourceGroupPager ¶
func (client *VirtualMachineTemplatesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualMachineTemplatesClientListByResourceGroupOptions) *runtime.Pager[VirtualMachineTemplatesClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of VirtualMachineTemplates in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. options - VirtualMachineTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineTemplatesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVirtualMachineTemplatesByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualMachineTemplatesClient) NewListBySubscriptionPager ¶
func (client *VirtualMachineTemplatesClient) NewListBySubscriptionPager(options *VirtualMachineTemplatesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachineTemplatesClientListBySubscriptionResponse]
NewListBySubscriptionPager - List of VirtualMachineTemplates in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview options - VirtualMachineTemplatesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachineTemplatesClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVirtualMachineTemplatesBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachineTemplatesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VirtualMachineTemplatesClientBeginCreateOrUpdateOptions ¶
type VirtualMachineTemplatesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineTemplatesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginCreateOrUpdate method.
type VirtualMachineTemplatesClientBeginDeleteOptions ¶
type VirtualMachineTemplatesClientBeginDeleteOptions struct { // Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineTemplatesClientBeginDeleteOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginDelete method.
type VirtualMachineTemplatesClientBeginUpdateOptions ¶
type VirtualMachineTemplatesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachineTemplatesClientBeginUpdateOptions contains the optional parameters for the VirtualMachineTemplatesClient.BeginUpdate method.
type VirtualMachineTemplatesClientCreateOrUpdateResponse ¶
type VirtualMachineTemplatesClientCreateOrUpdateResponse struct {
VirtualMachineTemplate
}
VirtualMachineTemplatesClientCreateOrUpdateResponse contains the response from method VirtualMachineTemplatesClient.CreateOrUpdate.
type VirtualMachineTemplatesClientDeleteResponse ¶
type VirtualMachineTemplatesClientDeleteResponse struct { }
VirtualMachineTemplatesClientDeleteResponse contains the response from method VirtualMachineTemplatesClient.Delete.
type VirtualMachineTemplatesClientGetOptions ¶
type VirtualMachineTemplatesClientGetOptions struct { }
VirtualMachineTemplatesClientGetOptions contains the optional parameters for the VirtualMachineTemplatesClient.Get method.
type VirtualMachineTemplatesClientGetResponse ¶
type VirtualMachineTemplatesClientGetResponse struct {
VirtualMachineTemplate
}
VirtualMachineTemplatesClientGetResponse contains the response from method VirtualMachineTemplatesClient.Get.
type VirtualMachineTemplatesClientListByResourceGroupOptions ¶
type VirtualMachineTemplatesClientListByResourceGroupOptions struct { }
VirtualMachineTemplatesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachineTemplatesClient.ListByResourceGroup method.
type VirtualMachineTemplatesClientListByResourceGroupResponse ¶
type VirtualMachineTemplatesClientListByResourceGroupResponse struct {
VirtualMachineTemplateListResult
}
VirtualMachineTemplatesClientListByResourceGroupResponse contains the response from method VirtualMachineTemplatesClient.ListByResourceGroup.
type VirtualMachineTemplatesClientListBySubscriptionOptions ¶
type VirtualMachineTemplatesClientListBySubscriptionOptions struct { }
VirtualMachineTemplatesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachineTemplatesClient.ListBySubscription method.
type VirtualMachineTemplatesClientListBySubscriptionResponse ¶
type VirtualMachineTemplatesClientListBySubscriptionResponse struct {
VirtualMachineTemplateListResult
}
VirtualMachineTemplatesClientListBySubscriptionResponse contains the response from method VirtualMachineTemplatesClient.ListBySubscription.
type VirtualMachineTemplatesClientUpdateResponse ¶
type VirtualMachineTemplatesClientUpdateResponse struct {
VirtualMachineTemplate
}
VirtualMachineTemplatesClientUpdateResponse contains the response from method VirtualMachineTemplatesClient.Update.
type VirtualMachineUpdate ¶
type VirtualMachineUpdate struct { // Defines the resource properties. Properties *VirtualMachineUpdateProperties `json:"properties,omitempty"` // Gets or sets the Resource tags. Tags map[string]*string `json:"tags,omitempty"` }
VirtualMachineUpdate - Defines the virtualMachineUpdate.
func (VirtualMachineUpdate) MarshalJSON ¶
func (v VirtualMachineUpdate) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineUpdate.
type VirtualMachineUpdateProperties ¶
type VirtualMachineUpdateProperties struct { // Availability Sets in vm. AvailabilitySets []*AvailabilitySetListItem `json:"availabilitySets,omitempty"` // Defines the resource properties. HardwareProfile *HardwareProfileUpdate `json:"hardwareProfile,omitempty"` // Defines the resource properties. NetworkProfile *NetworkProfileUpdate `json:"networkProfile,omitempty"` // Defines the resource properties. StorageProfile *StorageProfileUpdate `json:"storageProfile,omitempty"` }
VirtualMachineUpdateProperties - Defines the resource properties.
func (VirtualMachineUpdateProperties) MarshalJSON ¶
func (v VirtualMachineUpdateProperties) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualMachineUpdateProperties.
type VirtualMachinesClient ¶
type VirtualMachinesClient struct {
// contains filtered or unexported fields
}
VirtualMachinesClient contains the methods for the VirtualMachines group. Don't use this type directly, use NewVirtualMachinesClient() instead.
func NewVirtualMachinesClient ¶
func NewVirtualMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualMachinesClient, error)
NewVirtualMachinesClient creates a new instance of VirtualMachinesClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VirtualMachinesClient) BeginCreateCheckpoint ¶
func (client *VirtualMachinesClient) BeginCreateCheckpoint(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginCreateCheckpointOptions) (*runtime.Poller[VirtualMachinesClientCreateCheckpointResponse], error)
BeginCreateCheckpoint - Creates a checkpoint in virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientBeginCreateCheckpointOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateCheckpoint method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateCheckpointVirtualMachine.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateCheckpoint(ctx, "testrg", "DemoVM", &armscvmm.VirtualMachinesClientBeginCreateCheckpointOptions{Body: &armscvmm.VirtualMachineCreateCheckpoint{ Name: to.Ptr("Demo Checkpoint name"), Description: to.Ptr("Demo Checkpoint description"), }, }) 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 (*VirtualMachinesClient) BeginCreateOrUpdate ¶
func (client *VirtualMachinesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, body VirtualMachine, options *VirtualMachinesClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualMachinesClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Creates Or Updates virtual machines deployed on scvmm fabric. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. body - Request payload. options - VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateVirtualMachine.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "DemoVM", armscvmm.VirtualMachine{ ExtendedLocation: &armscvmm.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armscvmm.VirtualMachineProperties{ CloudID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/Clouds/HRCloud"), HardwareProfile: &armscvmm.HardwareProfile{ CPUCount: to.Ptr[int32](4), MemoryMB: to.Ptr[int32](4096), }, TemplateID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VirtualMachineTemplates/HRVirtualMachineTemplate"), VmmServerID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) BeginDelete ¶
func (client *VirtualMachinesClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginDeleteOptions) (*runtime.Poller[VirtualMachinesClientDeleteResponse], error)
BeginDelete - Deletes a VirtualMachine deployed on ScVmm fabric. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "DemoVM", &armscvmm.VirtualMachinesClientBeginDeleteOptions{Retain: nil, Force: 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 (*VirtualMachinesClient) BeginDeleteCheckpoint ¶
func (client *VirtualMachinesClient) BeginDeleteCheckpoint(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginDeleteCheckpointOptions) (*runtime.Poller[VirtualMachinesClientDeleteCheckpointResponse], error)
BeginDeleteCheckpoint - Deletes a checkpoint in virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientBeginDeleteCheckpointOptions contains the optional parameters for the VirtualMachinesClient.BeginDeleteCheckpoint method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteCheckpointVirtualMachine.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDeleteCheckpoint(ctx, "testrg", "DemoVM", &armscvmm.VirtualMachinesClientBeginDeleteCheckpointOptions{Body: &armscvmm.VirtualMachineDeleteCheckpoint{ ID: to.Ptr("Demo CheckpointID"), }, }) 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 (*VirtualMachinesClient) BeginRestart ¶
func (client *VirtualMachinesClient) BeginRestart(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginRestartOptions) (*runtime.Poller[VirtualMachinesClientRestartResponse], error)
BeginRestart - Restart virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/RestartVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRestart(ctx, "testrg", "DemoVM", 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 (*VirtualMachinesClient) BeginRestoreCheckpoint ¶
func (client *VirtualMachinesClient) BeginRestoreCheckpoint(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginRestoreCheckpointOptions) (*runtime.Poller[VirtualMachinesClientRestoreCheckpointResponse], error)
BeginRestoreCheckpoint - Restores to a checkpoint in virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientBeginRestoreCheckpointOptions contains the optional parameters for the VirtualMachinesClient.BeginRestoreCheckpoint method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/RestoreCheckpointVirtualMachine.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginRestoreCheckpoint(ctx, "testrg", "DemoVM", &armscvmm.VirtualMachinesClientBeginRestoreCheckpointOptions{Body: &armscvmm.VirtualMachineRestoreCheckpoint{ ID: to.Ptr("Demo CheckpointID"), }, }) 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 (*VirtualMachinesClient) BeginStart ¶
func (client *VirtualMachinesClient) BeginStart(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginStartOptions) (*runtime.Poller[VirtualMachinesClientStartResponse], error)
BeginStart - Start virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/StartVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStart(ctx, "testrg", "DemoVM", 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 (*VirtualMachinesClient) BeginStop ¶
func (client *VirtualMachinesClient) BeginStop(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientBeginStopOptions) (*runtime.Poller[VirtualMachinesClientStopResponse], error)
BeginStop - Stop virtual machine. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/StopVirtualMachine.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginStop(ctx, "testrg", "DemoVM", &armscvmm.VirtualMachinesClientBeginStopOptions{Body: &armscvmm.StopVirtualMachineOptions{ SkipShutdown: to.Ptr(true), }, }) 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 (*VirtualMachinesClient) BeginUpdate ¶
func (client *VirtualMachinesClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualMachineName string, body VirtualMachineUpdate, options *VirtualMachinesClientBeginUpdateOptions) (*runtime.Poller[VirtualMachinesClientUpdateResponse], error)
BeginUpdate - Updates the VirtualMachines resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. body - VirtualMachines patch payload. options - VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/UpdateVirtualMachine.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testrg", "DemoVM", armscvmm.VirtualMachineUpdate{ Properties: &armscvmm.VirtualMachineUpdateProperties{ HardwareProfile: &armscvmm.HardwareProfileUpdate{ CPUCount: to.Ptr[int32](4), MemoryMB: to.Ptr[int32](4096), }, NetworkProfile: &armscvmm.NetworkProfileUpdate{ NetworkInterfaces: []*armscvmm.NetworkInterfacesUpdate{ { Name: to.Ptr("test"), IPv4AddressType: to.Ptr(armscvmm.AllocationMethodDynamic), IPv6AddressType: to.Ptr(armscvmm.AllocationMethodDynamic), MacAddressType: to.Ptr(armscvmm.AllocationMethodStatic), }}, }, StorageProfile: &armscvmm.StorageProfileUpdate{ Disks: []*armscvmm.VirtualDiskUpdate{ { Name: to.Ptr("test"), DiskSizeGB: to.Ptr[int32](10), }}, }, }, Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) Get ¶
func (client *VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, virtualMachineName string, options *VirtualMachinesClientGetOptions) (VirtualMachinesClientGetResponse, error)
Get - Implements VirtualMachine GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualMachineName - Name of the VirtualMachine. options - VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/GetVirtualMachine.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "DemoVM", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualMachinesClient) NewListByResourceGroupPager ¶
func (client *VirtualMachinesClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualMachinesClientListByResourceGroupOptions) *runtime.Pager[VirtualMachinesClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of VirtualMachines in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. options - VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVirtualMachinesByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualMachinesClient) NewListBySubscriptionPager ¶
func (client *VirtualMachinesClient) NewListBySubscriptionPager(options *VirtualMachinesClientListBySubscriptionOptions) *runtime.Pager[VirtualMachinesClientListBySubscriptionResponse]
NewListBySubscriptionPager - List of VirtualMachines in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview options - VirtualMachinesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachinesClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVirtualMachinesBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualMachinesClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VirtualMachinesClientBeginCreateCheckpointOptions ¶
type VirtualMachinesClientBeginCreateCheckpointOptions struct { // Virtualmachine create checkpoint action payload. Body *VirtualMachineCreateCheckpoint // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginCreateCheckpointOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateCheckpoint method.
type VirtualMachinesClientBeginCreateOrUpdateOptions ¶
type VirtualMachinesClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginCreateOrUpdate method.
type VirtualMachinesClientBeginDeleteCheckpointOptions ¶
type VirtualMachinesClientBeginDeleteCheckpointOptions struct { // Virtualmachine delete checkpoint action payload. Body *VirtualMachineDeleteCheckpoint // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginDeleteCheckpointOptions contains the optional parameters for the VirtualMachinesClient.BeginDeleteCheckpoint method.
type VirtualMachinesClientBeginDeleteOptions ¶
type VirtualMachinesClientBeginDeleteOptions struct { // Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. Force *bool // Resumes the LRO from the provided token. ResumeToken string // Whether to just disable the VM from azure and retain the VM in the VMM. Retain *bool }
VirtualMachinesClientBeginDeleteOptions contains the optional parameters for the VirtualMachinesClient.BeginDelete method.
type VirtualMachinesClientBeginRestartOptions ¶
type VirtualMachinesClientBeginRestartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginRestartOptions contains the optional parameters for the VirtualMachinesClient.BeginRestart method.
type VirtualMachinesClientBeginRestoreCheckpointOptions ¶
type VirtualMachinesClientBeginRestoreCheckpointOptions struct { // Virtualmachine restore checkpoint action payload. Body *VirtualMachineRestoreCheckpoint // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginRestoreCheckpointOptions contains the optional parameters for the VirtualMachinesClient.BeginRestoreCheckpoint method.
type VirtualMachinesClientBeginStartOptions ¶
type VirtualMachinesClientBeginStartOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStartOptions contains the optional parameters for the VirtualMachinesClient.BeginStart method.
type VirtualMachinesClientBeginStopOptions ¶
type VirtualMachinesClientBeginStopOptions struct { // Virtualmachine stop action payload. Body *StopVirtualMachineOptions // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginStopOptions contains the optional parameters for the VirtualMachinesClient.BeginStop method.
type VirtualMachinesClientBeginUpdateOptions ¶
type VirtualMachinesClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualMachinesClientBeginUpdateOptions contains the optional parameters for the VirtualMachinesClient.BeginUpdate method.
type VirtualMachinesClientCreateCheckpointResponse ¶
type VirtualMachinesClientCreateCheckpointResponse struct { }
VirtualMachinesClientCreateCheckpointResponse contains the response from method VirtualMachinesClient.CreateCheckpoint.
type VirtualMachinesClientCreateOrUpdateResponse ¶
type VirtualMachinesClientCreateOrUpdateResponse struct {
VirtualMachine
}
VirtualMachinesClientCreateOrUpdateResponse contains the response from method VirtualMachinesClient.CreateOrUpdate.
type VirtualMachinesClientDeleteCheckpointResponse ¶
type VirtualMachinesClientDeleteCheckpointResponse struct { }
VirtualMachinesClientDeleteCheckpointResponse contains the response from method VirtualMachinesClient.DeleteCheckpoint.
type VirtualMachinesClientDeleteResponse ¶
type VirtualMachinesClientDeleteResponse struct { }
VirtualMachinesClientDeleteResponse contains the response from method VirtualMachinesClient.Delete.
type VirtualMachinesClientGetOptions ¶
type VirtualMachinesClientGetOptions struct { }
VirtualMachinesClientGetOptions contains the optional parameters for the VirtualMachinesClient.Get method.
type VirtualMachinesClientGetResponse ¶
type VirtualMachinesClientGetResponse struct {
VirtualMachine
}
VirtualMachinesClientGetResponse contains the response from method VirtualMachinesClient.Get.
type VirtualMachinesClientListByResourceGroupOptions ¶
type VirtualMachinesClientListByResourceGroupOptions struct { }
VirtualMachinesClientListByResourceGroupOptions contains the optional parameters for the VirtualMachinesClient.ListByResourceGroup method.
type VirtualMachinesClientListByResourceGroupResponse ¶
type VirtualMachinesClientListByResourceGroupResponse struct {
VirtualMachineListResult
}
VirtualMachinesClientListByResourceGroupResponse contains the response from method VirtualMachinesClient.ListByResourceGroup.
type VirtualMachinesClientListBySubscriptionOptions ¶
type VirtualMachinesClientListBySubscriptionOptions struct { }
VirtualMachinesClientListBySubscriptionOptions contains the optional parameters for the VirtualMachinesClient.ListBySubscription method.
type VirtualMachinesClientListBySubscriptionResponse ¶
type VirtualMachinesClientListBySubscriptionResponse struct {
VirtualMachineListResult
}
VirtualMachinesClientListBySubscriptionResponse contains the response from method VirtualMachinesClient.ListBySubscription.
type VirtualMachinesClientRestartResponse ¶
type VirtualMachinesClientRestartResponse struct { }
VirtualMachinesClientRestartResponse contains the response from method VirtualMachinesClient.Restart.
type VirtualMachinesClientRestoreCheckpointResponse ¶
type VirtualMachinesClientRestoreCheckpointResponse struct { }
VirtualMachinesClientRestoreCheckpointResponse contains the response from method VirtualMachinesClient.RestoreCheckpoint.
type VirtualMachinesClientStartResponse ¶
type VirtualMachinesClientStartResponse struct { }
VirtualMachinesClientStartResponse contains the response from method VirtualMachinesClient.Start.
type VirtualMachinesClientStopResponse ¶
type VirtualMachinesClientStopResponse struct { }
VirtualMachinesClientStopResponse contains the response from method VirtualMachinesClient.Stop.
type VirtualMachinesClientUpdateResponse ¶
type VirtualMachinesClientUpdateResponse struct {
VirtualMachine
}
VirtualMachinesClientUpdateResponse contains the response from method VirtualMachinesClient.Update.
type VirtualNetwork ¶
type VirtualNetwork struct { // REQUIRED; The extended location. ExtendedLocation *ExtendedLocation `json:"extendedLocation,omitempty"` // REQUIRED; Gets or sets the location. Location *string `json:"location,omitempty"` // REQUIRED; Resource properties. Properties *VirtualNetworkProperties `json:"properties,omitempty"` // Resource tags Tags map[string]*string `json:"tags,omitempty"` // READ-ONLY; Resource Id ID *string `json:"id,omitempty" azure:"ro"` // READ-ONLY; Resource Name Name *string `json:"name,omitempty" azure:"ro"` // READ-ONLY; The system data. SystemData *SystemData `json:"systemData,omitempty" azure:"ro"` // READ-ONLY; Resource Type Type *string `json:"type,omitempty" azure:"ro"` }
VirtualNetwork - The VirtualNetworks resource definition.
func (VirtualNetwork) MarshalJSON ¶
func (v VirtualNetwork) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetwork.
type VirtualNetworkInventoryItem ¶
type VirtualNetworkInventoryItem struct { // REQUIRED; They inventory type. InventoryType *InventoryType `json:"inventoryType,omitempty"` // READ-ONLY; Gets the Managed Object name in VMM for the inventory item. InventoryItemName *string `json:"inventoryItemName,omitempty" azure:"ro"` // READ-ONLY; Gets the tracked resource id corresponding to the inventory resource. ManagedResourceID *string `json:"managedResourceId,omitempty" azure:"ro"` // READ-ONLY; Gets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` // READ-ONLY; Gets the UUID (which is assigned by VMM) for the inventory item. UUID *string `json:"uuid,omitempty" azure:"ro"` }
VirtualNetworkInventoryItem - The Virtual network inventory item.
func (*VirtualNetworkInventoryItem) GetInventoryItemProperties ¶
func (v *VirtualNetworkInventoryItem) GetInventoryItemProperties() *InventoryItemProperties
GetInventoryItemProperties implements the InventoryItemPropertiesClassification interface for type VirtualNetworkInventoryItem.
func (VirtualNetworkInventoryItem) MarshalJSON ¶
func (v VirtualNetworkInventoryItem) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaller interface for type VirtualNetworkInventoryItem.
func (*VirtualNetworkInventoryItem) UnmarshalJSON ¶
func (v *VirtualNetworkInventoryItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaller interface for type VirtualNetworkInventoryItem.
type VirtualNetworkListResult ¶
type VirtualNetworkListResult struct { // Url to follow for getting next page of resources. NextLink *string `json:"nextLink,omitempty"` // List of VirtualNetworks. Value []*VirtualNetwork `json:"value,omitempty"` }
VirtualNetworkListResult - List of VirtualNetworks.
type VirtualNetworkProperties ¶
type VirtualNetworkProperties struct { // Gets or sets the inventory Item ID for the resource. InventoryItemID *string `json:"inventoryItemId,omitempty"` // Unique ID of the virtual network. UUID *string `json:"uuid,omitempty"` // ARM Id of the vmmServer resource in which this resource resides. VmmServerID *string `json:"vmmServerId,omitempty"` // READ-ONLY; Name of the virtual network in vmmServer. NetworkName *string `json:"networkName,omitempty" azure:"ro"` // READ-ONLY; Gets or sets the provisioning state. ProvisioningState *string `json:"provisioningState,omitempty" azure:"ro"` }
VirtualNetworkProperties - Defines the resource properties.
type VirtualNetworksClient ¶
type VirtualNetworksClient struct {
// contains filtered or unexported fields
}
VirtualNetworksClient contains the methods for the VirtualNetworks group. Don't use this type directly, use NewVirtualNetworksClient() instead.
func NewVirtualNetworksClient ¶
func NewVirtualNetworksClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VirtualNetworksClient, error)
NewVirtualNetworksClient creates a new instance of VirtualNetworksClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VirtualNetworksClient) BeginCreateOrUpdate ¶
func (client *VirtualNetworksClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, body VirtualNetwork, options *VirtualNetworksClientBeginCreateOrUpdateOptions) (*runtime.Poller[VirtualNetworksClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Onboards the ScVmm virtual network as an Azure virtual network resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualNetworkName - Name of the VirtualNetwork. body - Request payload. options - VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateVirtualNetwork.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "HRVirtualNetwork", armscvmm.VirtualNetwork{ ExtendedLocation: &armscvmm.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armscvmm.VirtualNetworkProperties{ UUID: to.Ptr("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"), VmmServerID: to.Ptr("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer"), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworksClient) BeginDelete ¶
func (client *VirtualNetworksClient) BeginDelete(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientBeginDeleteOptions) (*runtime.Poller[VirtualNetworksClientDeleteResponse], error)
BeginDelete - Deregisters the ScVmm virtual network from Azure. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualNetworkName - Name of the VirtualNetwork. options - VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "HRVirtualNetwork", &armscvmm.VirtualNetworksClientBeginDeleteOptions{Force: 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 (*VirtualNetworksClient) BeginUpdate ¶
func (client *VirtualNetworksClient) BeginUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, body ResourcePatch, options *VirtualNetworksClientBeginUpdateOptions) (*runtime.Poller[VirtualNetworksClientUpdateResponse], error)
BeginUpdate - Updates the VirtualNetworks resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualNetworkName - Name of the VirtualNetwork. body - VirtualNetworks patch payload. options - VirtualNetworksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/UpdateVirtualNetwork.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testrg", "HRVirtualNetwork", armscvmm.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworksClient) Get ¶
func (client *VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, options *VirtualNetworksClientGetOptions) (VirtualNetworksClientGetResponse, error)
Get - Implements VirtualNetwork GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. virtualNetworkName - Name of the VirtualNetwork. options - VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/GetVirtualNetwork.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "HRVirtualNetwork", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VirtualNetworksClient) NewListByResourceGroupPager ¶
func (client *VirtualNetworksClient) NewListByResourceGroupPager(resourceGroupName string, options *VirtualNetworksClientListByResourceGroupOptions) *runtime.Pager[VirtualNetworksClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of VirtualNetworks in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. options - VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVirtualNetworksByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VirtualNetworksClient) NewListBySubscriptionPager ¶
func (client *VirtualNetworksClient) NewListBySubscriptionPager(options *VirtualNetworksClientListBySubscriptionOptions) *runtime.Pager[VirtualNetworksClientListBySubscriptionResponse]
NewListBySubscriptionPager - List of VirtualNetworks in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview options - VirtualNetworksClientListBySubscriptionOptions contains the optional parameters for the VirtualNetworksClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVirtualNetworksBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVirtualNetworksClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VirtualNetworksClientBeginCreateOrUpdateOptions ¶
type VirtualNetworksClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworksClientBeginCreateOrUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginCreateOrUpdate method.
type VirtualNetworksClientBeginDeleteOptions ¶
type VirtualNetworksClientBeginDeleteOptions struct { // Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworksClientBeginDeleteOptions contains the optional parameters for the VirtualNetworksClient.BeginDelete method.
type VirtualNetworksClientBeginUpdateOptions ¶
type VirtualNetworksClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VirtualNetworksClientBeginUpdateOptions contains the optional parameters for the VirtualNetworksClient.BeginUpdate method.
type VirtualNetworksClientCreateOrUpdateResponse ¶
type VirtualNetworksClientCreateOrUpdateResponse struct {
VirtualNetwork
}
VirtualNetworksClientCreateOrUpdateResponse contains the response from method VirtualNetworksClient.CreateOrUpdate.
type VirtualNetworksClientDeleteResponse ¶
type VirtualNetworksClientDeleteResponse struct { }
VirtualNetworksClientDeleteResponse contains the response from method VirtualNetworksClient.Delete.
type VirtualNetworksClientGetOptions ¶
type VirtualNetworksClientGetOptions struct { }
VirtualNetworksClientGetOptions contains the optional parameters for the VirtualNetworksClient.Get method.
type VirtualNetworksClientGetResponse ¶
type VirtualNetworksClientGetResponse struct {
VirtualNetwork
}
VirtualNetworksClientGetResponse contains the response from method VirtualNetworksClient.Get.
type VirtualNetworksClientListByResourceGroupOptions ¶
type VirtualNetworksClientListByResourceGroupOptions struct { }
VirtualNetworksClientListByResourceGroupOptions contains the optional parameters for the VirtualNetworksClient.ListByResourceGroup method.
type VirtualNetworksClientListByResourceGroupResponse ¶
type VirtualNetworksClientListByResourceGroupResponse struct {
VirtualNetworkListResult
}
VirtualNetworksClientListByResourceGroupResponse contains the response from method VirtualNetworksClient.ListByResourceGroup.
type VirtualNetworksClientListBySubscriptionOptions ¶
type VirtualNetworksClientListBySubscriptionOptions struct { }
VirtualNetworksClientListBySubscriptionOptions contains the optional parameters for the VirtualNetworksClient.ListBySubscription method.
type VirtualNetworksClientListBySubscriptionResponse ¶
type VirtualNetworksClientListBySubscriptionResponse struct {
VirtualNetworkListResult
}
VirtualNetworksClientListBySubscriptionResponse contains the response from method VirtualNetworksClient.ListBySubscription.
type VirtualNetworksClientUpdateResponse ¶
type VirtualNetworksClientUpdateResponse struct {
VirtualNetwork
}
VirtualNetworksClientUpdateResponse contains the response from method VirtualNetworksClient.Update.
type VmmServersClient ¶
type VmmServersClient struct {
// contains filtered or unexported fields
}
VmmServersClient contains the methods for the VmmServers group. Don't use this type directly, use NewVmmServersClient() instead.
func NewVmmServersClient ¶
func NewVmmServersClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*VmmServersClient, error)
NewVmmServersClient creates a new instance of VmmServersClient with the specified values. subscriptionID - The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). credential - used to authorize requests. Usually a credential from azidentity. options - pass nil to accept the default values.
func (*VmmServersClient) BeginCreateOrUpdate ¶
func (client *VmmServersClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, vmmServerName string, body VMMServer, options *VmmServersClientBeginCreateOrUpdateOptions) (*runtime.Poller[VmmServersClientCreateOrUpdateResponse], error)
BeginCreateOrUpdate - Onboards the SCVMM fabric as an Azure VmmServer resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. body - Request payload. options - VmmServersClientBeginCreateOrUpdateOptions contains the optional parameters for the VmmServersClient.BeginCreateOrUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/CreateVMMServer.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVmmServersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginCreateOrUpdate(ctx, "testrg", "ContosoVMMServer", armscvmm.VMMServer{ ExtendedLocation: &armscvmm.ExtendedLocation{ Name: to.Ptr("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.Arc/customLocations/contoso"), Type: to.Ptr("customLocation"), }, Location: to.Ptr("East US"), Properties: &armscvmm.VMMServerProperties{ Credentials: &armscvmm.VMMServerPropertiesCredentials{ Password: to.Ptr("password"), Username: to.Ptr("testuser"), }, Fqdn: to.Ptr("VMM.contoso.com"), Port: to.Ptr[int32](1234), }, }, 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) } // TODO: use response item _ = res }
Output:
func (*VmmServersClient) BeginDelete ¶
func (client *VmmServersClient) BeginDelete(ctx context.Context, resourceGroupName string, vmmServerName string, options *VmmServersClientBeginDeleteOptions) (*runtime.Poller[VmmServersClientDeleteResponse], error)
BeginDelete - Deboards the SCVMM fabric from Azure. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. options - VmmServersClientBeginDeleteOptions contains the optional parameters for the VmmServersClient.BeginDelete method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/DeleteVMMServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVmmServersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginDelete(ctx, "testrg", "ContosoVMMServer", &armscvmm.VmmServersClientBeginDeleteOptions{Force: 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 (*VmmServersClient) BeginUpdate ¶
func (client *VmmServersClient) BeginUpdate(ctx context.Context, resourceGroupName string, vmmServerName string, body ResourcePatch, options *VmmServersClientBeginUpdateOptions) (*runtime.Poller[VmmServersClientUpdateResponse], error)
BeginUpdate - Updates the VmmServers resource. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. body - VmmServers patch payload. options - VmmServersClientBeginUpdateOptions contains the optional parameters for the VmmServersClient.BeginUpdate method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/UpdateVMMServer.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/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVmmServersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } poller, err := client.BeginUpdate(ctx, "testrg", "ContosoVMMServer", armscvmm.ResourcePatch{ Tags: map[string]*string{ "tag1": to.Ptr("value1"), "tag2": to.Ptr("value2"), }, }, nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } res, err := poller.PollUntilDone(ctx, nil) if err != nil { log.Fatalf("failed to pull the result: %v", err) } // TODO: use response item _ = res }
Output:
func (*VmmServersClient) Get ¶
func (client *VmmServersClient) Get(ctx context.Context, resourceGroupName string, vmmServerName string, options *VmmServersClientGetOptions) (VmmServersClientGetResponse, error)
Get - Implements VMMServer GET method. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. vmmServerName - Name of the VMMServer. options - VmmServersClientGetOptions contains the optional parameters for the VmmServersClient.Get method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/GetVMMServer.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVmmServersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } res, err := client.Get(ctx, "testrg", "ContosoVMMServer", nil) if err != nil { log.Fatalf("failed to finish the request: %v", err) } // TODO: use response item _ = res }
Output:
func (*VmmServersClient) NewListByResourceGroupPager ¶
func (client *VmmServersClient) NewListByResourceGroupPager(resourceGroupName string, options *VmmServersClientListByResourceGroupOptions) *runtime.Pager[VmmServersClientListByResourceGroupResponse]
NewListByResourceGroupPager - List of VmmServers in a resource group. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview resourceGroupName - The name of the resource group. options - VmmServersClientListByResourceGroupOptions contains the optional parameters for the VmmServersClient.ListByResourceGroup method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVMMServersByResourceGroup.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVmmServersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListByResourceGroupPager("testrg", nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
func (*VmmServersClient) NewListBySubscriptionPager ¶
func (client *VmmServersClient) NewListBySubscriptionPager(options *VmmServersClientListBySubscriptionOptions) *runtime.Pager[VmmServersClientListBySubscriptionResponse]
NewListBySubscriptionPager - List of VmmServers in a subscription. If the operation fails it returns an *azcore.ResponseError type. Generated from API version 2020-06-05-preview options - VmmServersClientListBySubscriptionOptions contains the optional parameters for the VmmServersClient.ListBySubscription method.
Example ¶
Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVMMServersBySubscription.json
package main import ( "context" "log" "github.com/Azure/azure-sdk-for-go/sdk/azidentity" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/scvmm/armscvmm" ) func main() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { log.Fatalf("failed to obtain a credential: %v", err) } ctx := context.Background() client, err := armscvmm.NewVmmServersClient("fd3c3665-1729-4b7b-9a38-238e83b0f98b", cred, nil) if err != nil { log.Fatalf("failed to create client: %v", err) } pager := client.NewListBySubscriptionPager(nil) for pager.More() { nextResult, err := pager.NextPage(ctx) if err != nil { log.Fatalf("failed to advance page: %v", err) } for _, v := range nextResult.Value { // TODO: use page item _ = v } } }
Output:
type VmmServersClientBeginCreateOrUpdateOptions ¶
type VmmServersClientBeginCreateOrUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VmmServersClientBeginCreateOrUpdateOptions contains the optional parameters for the VmmServersClient.BeginCreateOrUpdate method.
type VmmServersClientBeginDeleteOptions ¶
type VmmServersClientBeginDeleteOptions struct { // Forces the resource to be deleted from azure. The corresponding CR would be attempted to be deleted too. Force *bool // Resumes the LRO from the provided token. ResumeToken string }
VmmServersClientBeginDeleteOptions contains the optional parameters for the VmmServersClient.BeginDelete method.
type VmmServersClientBeginUpdateOptions ¶
type VmmServersClientBeginUpdateOptions struct { // Resumes the LRO from the provided token. ResumeToken string }
VmmServersClientBeginUpdateOptions contains the optional parameters for the VmmServersClient.BeginUpdate method.
type VmmServersClientCreateOrUpdateResponse ¶
type VmmServersClientCreateOrUpdateResponse struct {
VMMServer
}
VmmServersClientCreateOrUpdateResponse contains the response from method VmmServersClient.CreateOrUpdate.
type VmmServersClientDeleteResponse ¶
type VmmServersClientDeleteResponse struct { }
VmmServersClientDeleteResponse contains the response from method VmmServersClient.Delete.
type VmmServersClientGetOptions ¶
type VmmServersClientGetOptions struct { }
VmmServersClientGetOptions contains the optional parameters for the VmmServersClient.Get method.
type VmmServersClientGetResponse ¶
type VmmServersClientGetResponse struct {
VMMServer
}
VmmServersClientGetResponse contains the response from method VmmServersClient.Get.
type VmmServersClientListByResourceGroupOptions ¶
type VmmServersClientListByResourceGroupOptions struct { }
VmmServersClientListByResourceGroupOptions contains the optional parameters for the VmmServersClient.ListByResourceGroup method.
type VmmServersClientListByResourceGroupResponse ¶
type VmmServersClientListByResourceGroupResponse struct {
VMMServerListResult
}
VmmServersClientListByResourceGroupResponse contains the response from method VmmServersClient.ListByResourceGroup.
type VmmServersClientListBySubscriptionOptions ¶
type VmmServersClientListBySubscriptionOptions struct { }
VmmServersClientListBySubscriptionOptions contains the optional parameters for the VmmServersClient.ListBySubscription method.
type VmmServersClientListBySubscriptionResponse ¶
type VmmServersClientListBySubscriptionResponse struct {
VMMServerListResult
}
VmmServersClientListBySubscriptionResponse contains the response from method VmmServersClient.ListBySubscription.
type VmmServersClientUpdateResponse ¶
type VmmServersClientUpdateResponse struct {
VMMServer
}
VmmServersClientUpdateResponse contains the response from method VmmServersClient.Update.
Source Files ¶
- build.go
- zz_generated_availabilitysets_client.go
- zz_generated_clouds_client.go
- zz_generated_constants.go
- zz_generated_inventoryitems_client.go
- zz_generated_models.go
- zz_generated_models_serde.go
- zz_generated_operations_client.go
- zz_generated_polymorphic_helpers.go
- zz_generated_response_types.go
- zz_generated_time_rfc3339.go
- zz_generated_virtualmachines_client.go
- zz_generated_virtualmachinetemplates_client.go
- zz_generated_virtualnetworks_client.go
- zz_generated_vmmservers_client.go