availabilitysets

package
v0.20231207.1005044 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2023-03-01/availabilitysets Documentation

The availabilitysets SDK allows for interaction with the Azure Resource Manager Service compute (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/compute/2023-03-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{
	// ...
}


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

Example Usage: AvailabilitySetsClient.Delete

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

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

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

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

// 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: AvailabilitySetsClient.ListAvailableSizes

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

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

Example Usage: AvailabilitySetsClient.ListBySubscription

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

// alternatively `client.ListBySubscription(ctx, id, availabilitysets.DefaultListBySubscriptionOperationOptions())` can be used to do batched pagination
items, err := client.ListBySubscriptionComplete(ctx, id, availabilitysets.DefaultListBySubscriptionOperationOptions())
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.AvailabilitySetUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []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 {
	Id         *string                    `json:"id,omitempty"`
	Location   string                     `json:"location"`
	Name       *string                    `json:"name,omitempty"`
	Properties *AvailabilitySetProperties `json:"properties,omitempty"`
	Sku        *Sku                       `json:"sku,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 added in v0.20231127.1171502

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 {
	PlatformFaultDomainCount  *int64                `json:"platformFaultDomainCount,omitempty"`
	PlatformUpdateDomainCount *int64                `json:"platformUpdateDomainCount,omitempty"`
	ProximityPlacementGroup   *SubResource          `json:"proximityPlacementGroup,omitempty"`
	Statuses                  *[]InstanceViewStatus `json:"statuses,omitempty"`
	VirtualMachines           *[]SubResource        `json:"virtualMachines,omitempty"`
}

type AvailabilitySetUpdate

type AvailabilitySetUpdate struct {
	Properties *AvailabilitySetProperties `json:"properties,omitempty"`
	Sku        *Sku                       `json:"sku,omitempty"`
	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) Delete

Delete ...

func (AvailabilitySetsClient) Get

Get ...

func (AvailabilitySetsClient) List

List ...

func (AvailabilitySetsClient) ListAvailableSizes

ListAvailableSizes ...

func (AvailabilitySetsClient) ListBySubscription

ListBySubscription ...

func (AvailabilitySetsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (AvailabilitySetsClient) ListBySubscriptionCompleteMatchingPredicate

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AvailabilitySetsClient) ListComplete

ListComplete retrieves all the results into a single object

func (AvailabilitySetsClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (AvailabilitySetsClient) Update

Update ...

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type InstanceViewStatus

type InstanceViewStatus struct {
	Code          *string           `json:"code,omitempty"`
	DisplayStatus *string           `json:"displayStatus,omitempty"`
	Level         *StatusLevelTypes `json:"level,omitempty"`
	Message       *string           `json:"message,omitempty"`
	Time          *string           `json:"time,omitempty"`
}

func (*InstanceViewStatus) GetTimeAsTime

func (o *InstanceViewStatus) GetTimeAsTime() (*time.Time, error)

func (*InstanceViewStatus) SetTimeAsTime

func (o *InstanceViewStatus) SetTimeAsTime(input time.Time)

type ListAvailableSizesOperationResponse

type ListAvailableSizesOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineSizeListResult
}

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []AvailabilitySet
}

type ListBySubscriptionOperationOptions

type ListBySubscriptionOperationOptions struct {
	Expand *string
}

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

func (ListBySubscriptionOperationOptions) ToHeaders added in v0.20230808.1103829

func (ListBySubscriptionOperationOptions) ToOData added in v0.20230808.1103829

func (ListBySubscriptionOperationOptions) ToQuery added in v0.20230808.1103829

type ListBySubscriptionOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []AvailabilitySet
}

type ListOperationResponse

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

type Sku

type Sku struct {
	Capacity *int64  `json:"capacity,omitempty"`
	Name     *string `json:"name,omitempty"`
	Tier     *string `json:"tier,omitempty"`
}

type StatusLevelTypes

type StatusLevelTypes string
const (
	StatusLevelTypesError   StatusLevelTypes = "Error"
	StatusLevelTypesInfo    StatusLevelTypes = "Info"
	StatusLevelTypesWarning StatusLevelTypes = "Warning"
)

func (*StatusLevelTypes) UnmarshalJSON added in v0.20230808.1103829

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

type SubResource

type SubResource struct {
	Id *string `json:"id,omitempty"`
}

type UpdateOperationResponse

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

type VirtualMachineSize

type VirtualMachineSize struct {
	MaxDataDiskCount     *int64  `json:"maxDataDiskCount,omitempty"`
	MemoryInMB           *int64  `json:"memoryInMB,omitempty"`
	Name                 *string `json:"name,omitempty"`
	NumberOfCores        *int64  `json:"numberOfCores,omitempty"`
	OsDiskSizeInMB       *int64  `json:"osDiskSizeInMB,omitempty"`
	ResourceDiskSizeInMB *int64  `json:"resourceDiskSizeInMB,omitempty"`
}

type VirtualMachineSizeListResult

type VirtualMachineSizeListResult struct {
	Value *[]VirtualMachineSize `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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