virtualmachines

package
v0.20240122.1074123 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/virtualmachines Documentation

The virtualmachines SDK allows for interaction with the Azure Resource Manager Service vmware (API Version 2023-03-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2023-03-01/virtualmachines"

Client Initialization

client := virtualmachines.NewVirtualMachinesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachinesClient.Get

ctx := context.TODO()
id := virtualmachines.NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue", "virtualMachineIdValue")

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

Example Usage: VirtualMachinesClient.List

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

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: VirtualMachinesClient.RestrictMovement

ctx := context.TODO()
id := virtualmachines.NewVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "privateCloudValue", "clusterValue", "virtualMachineIdValue")

payload := virtualmachines.VirtualMachineRestrictMovement{
	// ...
}


if err := client.RestrictMovementThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForVirtualMachineRestrictMovementState

func PossibleValuesForVirtualMachineRestrictMovementState() []string

func ValidateClusterID

func ValidateClusterID(input interface{}, key string) (warnings []string, errors []error)

ValidateClusterID checks that 'input' can be parsed as a Cluster ID

func ValidateVirtualMachineID

func ValidateVirtualMachineID(input interface{}, key string) (warnings []string, errors []error)

ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID

Types

type ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, privateCloudName string, clusterName string) ClusterId

NewClusterID returns a new ClusterId struct

func ParseClusterID

func ParseClusterID(input string) (*ClusterId, error)

ParseClusterID parses 'input' into a ClusterId

func ParseClusterIDInsensitively

func ParseClusterIDInsensitively(input string) (*ClusterId, error)

ParseClusterIDInsensitively parses 'input' case-insensitively into a ClusterId note: this method should only be used for API response data and not user input

func (*ClusterId) FromParseResult added in v0.20231127.1171502

func (id *ClusterId) FromParseResult(input resourceids.ParseResult) error

func (ClusterId) ID

func (id ClusterId) ID() string

ID returns the formatted Cluster ID

func (ClusterId) Segments

func (id ClusterId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Cluster ID

func (ClusterId) String

func (id ClusterId) String() string

String returns a human-readable description of this Cluster ID

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachine
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []VirtualMachine
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualMachine
}

type RestrictMovementOperationResponse

type RestrictMovementOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type VirtualMachine

type VirtualMachine struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *VirtualMachineProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type VirtualMachineId

type VirtualMachineId struct {
	SubscriptionId    string
	ResourceGroupName string
	PrivateCloudName  string
	ClusterName       string
	VirtualMachineId  string
}

VirtualMachineId is a struct representing the Resource ID for a Virtual Machine

func NewVirtualMachineID

func NewVirtualMachineID(subscriptionId string, resourceGroupName string, privateCloudName string, clusterName string, virtualMachineId string) VirtualMachineId

NewVirtualMachineID returns a new VirtualMachineId struct

func ParseVirtualMachineID

func ParseVirtualMachineID(input string) (*VirtualMachineId, error)

ParseVirtualMachineID parses 'input' into a VirtualMachineId

func ParseVirtualMachineIDInsensitively

func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error)

ParseVirtualMachineIDInsensitively parses 'input' case-insensitively into a VirtualMachineId note: this method should only be used for API response data and not user input

func (*VirtualMachineId) FromParseResult added in v0.20231127.1171502

func (id *VirtualMachineId) FromParseResult(input resourceids.ParseResult) error

func (VirtualMachineId) ID

func (id VirtualMachineId) ID() string

ID returns the formatted Virtual Machine ID

func (VirtualMachineId) Segments

func (id VirtualMachineId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Virtual Machine ID

func (VirtualMachineId) String

func (id VirtualMachineId) String() string

String returns a human-readable description of this Virtual Machine ID

type VirtualMachineOperationPredicate

type VirtualMachineOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (VirtualMachineOperationPredicate) Matches

type VirtualMachineProperties

type VirtualMachineProperties struct {
	DisplayName      *string                              `json:"displayName,omitempty"`
	FolderPath       *string                              `json:"folderPath,omitempty"`
	MoRefId          *string                              `json:"moRefId,omitempty"`
	RestrictMovement *VirtualMachineRestrictMovementState `json:"restrictMovement,omitempty"`
}

type VirtualMachineRestrictMovement

type VirtualMachineRestrictMovement struct {
	RestrictMovement *VirtualMachineRestrictMovementState `json:"restrictMovement,omitempty"`
}

type VirtualMachineRestrictMovementState

type VirtualMachineRestrictMovementState string
const (
	VirtualMachineRestrictMovementStateDisabled VirtualMachineRestrictMovementState = "Disabled"
	VirtualMachineRestrictMovementStateEnabled  VirtualMachineRestrictMovementState = "Enabled"
)

func (*VirtualMachineRestrictMovementState) UnmarshalJSON

func (s *VirtualMachineRestrictMovementState) UnmarshalJSON(bytes []byte) error

type VirtualMachinesClient

type VirtualMachinesClient struct {
	Client *resourcemanager.Client
}

func NewVirtualMachinesClientWithBaseURI

func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error)

func (VirtualMachinesClient) Get

Get ...

func (VirtualMachinesClient) List

List ...

func (VirtualMachinesClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualMachinesClient) ListCompleteMatchingPredicate

func (c VirtualMachinesClient) ListCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate VirtualMachineOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualMachinesClient) RestrictMovement

RestrictMovement ...

func (VirtualMachinesClient) RestrictMovementThenPoll

RestrictMovementThenPoll performs RestrictMovement then polls until it's completed

Jump to

Keyboard shortcuts

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