availabilitysets

package
v0.20240731.1212841 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets Documentation

The availabilitysets SDK allows for interaction with the Azure Resource Manager Service systemcentervirtualmachinemanager (API Version 2024-06-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/systemcentervirtualmachinemanager/2024-06-01/availabilitysets"

Client Initialization

client := availabilitysets.NewAvailabilitySetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AvailabilitySetsClient.CreateOrUpdate

ctx := context.TODO()
id := availabilitysets.NewAvailabilitySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "availabilitySetValue")

payload := availabilitysets.AvailabilitySet{
	// ...
}


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

Example Usage: AvailabilitySetsClient.Delete

ctx := context.TODO()
id := availabilitysets.NewAvailabilitySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "availabilitySetValue")

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

Example Usage: AvailabilitySetsClient.Get

ctx := context.TODO()
id := availabilitysets.NewAvailabilitySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "availabilitySetValue")

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: AvailabilitySetsClient.ListByResourceGroup

ctx := context.TODO()
id := commonids.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

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

Example Usage: AvailabilitySetsClient.ListBySubscription

ctx := context.TODO()
id := commonids.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: AvailabilitySetsClient.Update

ctx := context.TODO()
id := availabilitysets.NewAvailabilitySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "availabilitySetValue")

payload := availabilitysets.AvailabilitySetTagsUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForForceDelete

func PossibleValuesForForceDelete() []string

func PossibleValuesForProvisioningState

func PossibleValuesForProvisioningState() []string

func ValidateAvailabilitySetID

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

ValidateAvailabilitySetID checks that 'input' can be parsed as a Availability Set ID

Types

type AvailabilitySet

type AvailabilitySet struct {
	ExtendedLocation ExtendedLocation           `json:"extendedLocation"`
	Id               *string                    `json:"id,omitempty"`
	Location         string                     `json:"location"`
	Name             *string                    `json:"name,omitempty"`
	Properties       *AvailabilitySetProperties `json:"properties,omitempty"`
	SystemData       *systemdata.SystemData     `json:"systemData,omitempty"`
	Tags             *map[string]string         `json:"tags,omitempty"`
	Type             *string                    `json:"type,omitempty"`
}

type AvailabilitySetId

type AvailabilitySetId struct {
	SubscriptionId      string
	ResourceGroupName   string
	AvailabilitySetName string
}

AvailabilitySetId is a struct representing the Resource ID for a Availability Set

func NewAvailabilitySetID

func NewAvailabilitySetID(subscriptionId string, resourceGroupName string, availabilitySetName string) AvailabilitySetId

NewAvailabilitySetID returns a new AvailabilitySetId struct

func ParseAvailabilitySetID

func ParseAvailabilitySetID(input string) (*AvailabilitySetId, error)

ParseAvailabilitySetID parses 'input' into a AvailabilitySetId

func ParseAvailabilitySetIDInsensitively

func ParseAvailabilitySetIDInsensitively(input string) (*AvailabilitySetId, error)

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

func (*AvailabilitySetId) FromParseResult

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

func (AvailabilitySetId) ID

func (id AvailabilitySetId) ID() string

ID returns the formatted Availability Set ID

func (AvailabilitySetId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Availability Set ID

func (AvailabilitySetId) String

func (id AvailabilitySetId) String() string

String returns a human-readable description of this Availability Set ID

type AvailabilitySetOperationPredicate

type AvailabilitySetOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (AvailabilitySetOperationPredicate) Matches

type AvailabilitySetProperties

type AvailabilitySetProperties struct {
	AvailabilitySetName *string            `json:"availabilitySetName,omitempty"`
	ProvisioningState   *ProvisioningState `json:"provisioningState,omitempty"`
	VMmServerId         *string            `json:"vmmServerId,omitempty"`
}

type AvailabilitySetTagsUpdate

type AvailabilitySetTagsUpdate struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type AvailabilitySetsClient

type AvailabilitySetsClient struct {
	Client *resourcemanager.Client
}

func NewAvailabilitySetsClientWithBaseURI

func NewAvailabilitySetsClientWithBaseURI(sdkApi sdkEnv.Api) (*AvailabilitySetsClient, error)

func (AvailabilitySetsClient) CreateOrUpdate

CreateOrUpdate ...

func (AvailabilitySetsClient) CreateOrUpdateThenPoll

func (c AvailabilitySetsClient) CreateOrUpdateThenPoll(ctx context.Context, id AvailabilitySetId, input AvailabilitySet) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (AvailabilitySetsClient) Delete

Delete ...

func (AvailabilitySetsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (AvailabilitySetsClient) Get

Get ...

func (AvailabilitySetsClient) ListByResourceGroup

ListByResourceGroup ...

func (AvailabilitySetsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all the results into a single object

func (AvailabilitySetsClient) ListByResourceGroupCompleteMatchingPredicate

func (c AvailabilitySetsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate AvailabilitySetOperationPredicate) (result ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AvailabilitySetsClient) ListBySubscription

ListBySubscription ...

func (AvailabilitySetsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (AvailabilitySetsClient) ListBySubscriptionCompleteMatchingPredicate

func (c AvailabilitySetsClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate AvailabilitySetOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AvailabilitySetsClient) Update

Update ...

func (AvailabilitySetsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AvailabilitySet
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *ForceDelete
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

func (DeleteOperationOptions) ToHeaders

func (o DeleteOperationOptions) ToHeaders() *client.Headers

func (DeleteOperationOptions) ToOData

func (o DeleteOperationOptions) ToOData() *odata.Query

func (DeleteOperationOptions) ToQuery

type DeleteOperationResponse

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

type ExtendedLocation

type ExtendedLocation struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type ForceDelete

type ForceDelete string
const (
	ForceDeleteFalse ForceDelete = "false"
	ForceDeleteTrue  ForceDelete = "true"
)

func (*ForceDelete) UnmarshalJSON

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

type GetOperationResponse

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

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AvailabilitySet
}

type ListByResourceGroupCustomPager

type ListByResourceGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListByResourceGroupCustomPager) NextPageLink() *odata.Link

type ListByResourceGroupOperationResponse

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AvailabilitySet
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AvailabilitySet
}

type ListBySubscriptionCustomPager

type ListBySubscriptionCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListBySubscriptionCustomPager) NextPageLink() *odata.Link

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AvailabilitySet
}

type ProvisioningState

type ProvisioningState string
const (
	ProvisioningStateAccepted     ProvisioningState = "Accepted"
	ProvisioningStateCanceled     ProvisioningState = "Canceled"
	ProvisioningStateCreated      ProvisioningState = "Created"
	ProvisioningStateDeleting     ProvisioningState = "Deleting"
	ProvisioningStateFailed       ProvisioningState = "Failed"
	ProvisioningStateProvisioning ProvisioningState = "Provisioning"
	ProvisioningStateSucceeded    ProvisioningState = "Succeeded"
	ProvisioningStateUpdating     ProvisioningState = "Updating"
)

func (*ProvisioningState) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AvailabilitySet
}

Jump to

Keyboard shortcuts

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