placementpolicies

package
v0.20230117.1125206 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/vmware/2021-12-01/placementpolicies Documentation

The placementpolicies SDK allows for interaction with the Azure Resource Manager Service vmware (API Version 2021-12-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/2021-12-01/placementpolicies"

Client Initialization

client := placementpolicies.NewPlacementPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PlacementPoliciesClient.CreateOrUpdate

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

payload := placementpolicies.PlacementPolicy{
	// ...
}


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

Example Usage: PlacementPoliciesClient.Delete

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

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

Example Usage: PlacementPoliciesClient.Get

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

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: PlacementPoliciesClient.List

ctx := context.TODO()
id := placementpolicies.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: PlacementPoliciesClient.Update

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

payload := placementpolicies.PlacementPolicyUpdate{
	// ...
}


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

Example Usage: PlacementPoliciesClient.VirtualMachinesRestrictMovement

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

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


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAffinityType

func PossibleValuesForAffinityType() []string

func PossibleValuesForPlacementPolicyProvisioningState

func PossibleValuesForPlacementPolicyProvisioningState() []string

func PossibleValuesForPlacementPolicyState

func PossibleValuesForPlacementPolicyState() []string

func PossibleValuesForPlacementPolicyType

func PossibleValuesForPlacementPolicyType() []string

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 ValidatePlacementPolicyID

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

ValidatePlacementPolicyID checks that 'input' can be parsed as a Placement Policy 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 AffinityType

type AffinityType string
const (
	AffinityTypeAffinity     AffinityType = "Affinity"
	AffinityTypeAntiAffinity AffinityType = "AntiAffinity"
)

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) 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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *PlacementPolicy
}

type ListCompleteResult

type ListCompleteResult struct {
	Items []PlacementPolicy
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]PlacementPolicy
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type PlacementPoliciesClient

type PlacementPoliciesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewPlacementPoliciesClientWithBaseURI

func NewPlacementPoliciesClientWithBaseURI(endpoint string) PlacementPoliciesClient

func (PlacementPoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (PlacementPoliciesClient) CreateOrUpdateThenPoll

func (c PlacementPoliciesClient) CreateOrUpdateThenPoll(ctx context.Context, id PlacementPolicyId, input PlacementPolicy) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (PlacementPoliciesClient) Delete

Delete ...

func (PlacementPoliciesClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (PlacementPoliciesClient) Get

Get ...

func (PlacementPoliciesClient) List

List ...

func (PlacementPoliciesClient) ListComplete

ListComplete retrieves all of the results into a single object

func (PlacementPoliciesClient) ListCompleteMatchingPredicate

func (c PlacementPoliciesClient) ListCompleteMatchingPredicate(ctx context.Context, id ClusterId, predicate PlacementPolicyOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (PlacementPoliciesClient) Update

Update ...

func (PlacementPoliciesClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

func (PlacementPoliciesClient) VirtualMachinesRestrictMovement

VirtualMachinesRestrictMovement ...

func (PlacementPoliciesClient) VirtualMachinesRestrictMovementThenPoll

func (c PlacementPoliciesClient) VirtualMachinesRestrictMovementThenPoll(ctx context.Context, id VirtualMachineId, input VirtualMachineRestrictMovement) error

VirtualMachinesRestrictMovementThenPoll performs VirtualMachinesRestrictMovement then polls until it's completed

type PlacementPolicy

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

func (*PlacementPolicy) UnmarshalJSON

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

type PlacementPolicyId

type PlacementPolicyId struct {
	SubscriptionId      string
	ResourceGroupName   string
	PrivateCloudName    string
	ClusterName         string
	PlacementPolicyName string
}

PlacementPolicyId is a struct representing the Resource ID for a Placement Policy

func NewPlacementPolicyID

func NewPlacementPolicyID(subscriptionId string, resourceGroupName string, privateCloudName string, clusterName string, placementPolicyName string) PlacementPolicyId

NewPlacementPolicyID returns a new PlacementPolicyId struct

func ParsePlacementPolicyID

func ParsePlacementPolicyID(input string) (*PlacementPolicyId, error)

ParsePlacementPolicyID parses 'input' into a PlacementPolicyId

func ParsePlacementPolicyIDInsensitively

func ParsePlacementPolicyIDInsensitively(input string) (*PlacementPolicyId, error)

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

func (PlacementPolicyId) ID

func (id PlacementPolicyId) ID() string

ID returns the formatted Placement Policy ID

func (PlacementPolicyId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Placement Policy ID

func (PlacementPolicyId) String

func (id PlacementPolicyId) String() string

String returns a human-readable description of this Placement Policy ID

type PlacementPolicyOperationPredicate

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

func (PlacementPolicyOperationPredicate) Matches

type PlacementPolicyProperties

type PlacementPolicyProperties interface {
}

type PlacementPolicyProvisioningState

type PlacementPolicyProvisioningState string
const (
	PlacementPolicyProvisioningStateBuilding  PlacementPolicyProvisioningState = "Building"
	PlacementPolicyProvisioningStateDeleting  PlacementPolicyProvisioningState = "Deleting"
	PlacementPolicyProvisioningStateFailed    PlacementPolicyProvisioningState = "Failed"
	PlacementPolicyProvisioningStateSucceeded PlacementPolicyProvisioningState = "Succeeded"
	PlacementPolicyProvisioningStateUpdating  PlacementPolicyProvisioningState = "Updating"
)

type PlacementPolicyState

type PlacementPolicyState string
const (
	PlacementPolicyStateDisabled PlacementPolicyState = "Disabled"
	PlacementPolicyStateEnabled  PlacementPolicyState = "Enabled"
)

type PlacementPolicyType

type PlacementPolicyType string
const (
	PlacementPolicyTypeVMHost PlacementPolicyType = "VmHost"
	PlacementPolicyTypeVMVM   PlacementPolicyType = "VmVm"
)

type PlacementPolicyUpdate

type PlacementPolicyUpdate struct {
	Properties *PlacementPolicyUpdateProperties `json:"properties,omitempty"`
}

type PlacementPolicyUpdateProperties

type PlacementPolicyUpdateProperties struct {
	HostMembers *[]string             `json:"hostMembers,omitempty"`
	State       *PlacementPolicyState `json:"state,omitempty"`
	VMMembers   *[]string             `json:"vmMembers,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type VMHostPlacementPolicyProperties added in v0.20221130.1084848

type VMHostPlacementPolicyProperties struct {
	AffinityType AffinityType `json:"affinityType"`
	HostMembers  []string     `json:"hostMembers"`
	VMMembers    []string     `json:"vmMembers"`

	// Fields inherited from PlacementPolicyProperties
	DisplayName       *string                           `json:"displayName,omitempty"`
	ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"`
	State             *PlacementPolicyState             `json:"state,omitempty"`
}

func (VMHostPlacementPolicyProperties) MarshalJSON added in v0.20221130.1084848

func (s VMHostPlacementPolicyProperties) MarshalJSON() ([]byte, error)

type VMVMPlacementPolicyProperties added in v0.20221130.1084848

type VMVMPlacementPolicyProperties struct {
	AffinityType AffinityType `json:"affinityType"`
	VMMembers    []string     `json:"vmMembers"`

	// Fields inherited from PlacementPolicyProperties
	DisplayName       *string                           `json:"displayName,omitempty"`
	ProvisioningState *PlacementPolicyProvisioningState `json:"provisioningState,omitempty"`
	State             *PlacementPolicyState             `json:"state,omitempty"`
}

func (VMVMPlacementPolicyProperties) MarshalJSON added in v0.20221130.1084848

func (s VMVMPlacementPolicyProperties) MarshalJSON() ([]byte, error)

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) 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 VirtualMachineRestrictMovement

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

type VirtualMachineRestrictMovementState

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

type VirtualMachinesRestrictMovementOperationResponse

type VirtualMachinesRestrictMovementOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

Jump to

Keyboard shortcuts

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