availabilitysets

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/availabilitysets Documentation

The availabilitysets SDK allows for interaction with Azure Resource Manager compute (API Version 2021-07-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/compute/2021-07-01/availabilitysets"

Client Initialization

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

Example Usage: AvailabilitySetsClient.CreateOrUpdate

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

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 := commonids.NewAvailabilitySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "availabilitySetName")

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 := commonids.NewAvailabilitySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "availabilitySetName")

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 := commonids.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 := commonids.NewAvailabilitySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "availabilitySetName")

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 := commonids.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.ResourceSkusList

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

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

Example Usage: AvailabilitySetsClient.Update

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

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 PossibleValuesForExtendedLocationType

func PossibleValuesForExtendedLocationType() []string

func PossibleValuesForResourceSkuCapacityScaleType

func PossibleValuesForResourceSkuCapacityScaleType() []string

func PossibleValuesForResourceSkuRestrictionsReasonCode

func PossibleValuesForResourceSkuRestrictionsReasonCode() []string

func PossibleValuesForResourceSkuRestrictionsType

func PossibleValuesForResourceSkuRestrictionsType() []string

func PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []string

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

ResourceSkusList ...

func (AvailabilitySetsClient) ResourceSkusListComplete

ResourceSkusListComplete retrieves all the results into a single object

func (AvailabilitySetsClient) ResourceSkusListCompleteMatchingPredicate

func (c AvailabilitySetsClient) ResourceSkusListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, options ResourceSkusListOperationOptions, predicate ResourceSkuOperationPredicate) (result ResourceSkusListCompleteResult, err error)

ResourceSkusListCompleteMatchingPredicate 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 ExtendedLocationType

type ExtendedLocationType string
const (
	ExtendedLocationTypeEdgeZone ExtendedLocationType = "EdgeZone"
)

func (*ExtendedLocationType) UnmarshalJSON

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

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 {
	LatestHttpResponse *http.Response
	Items              []AvailabilitySet
}

type ListBySubscriptionCustomPager

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

type ListBySubscriptionOperationOptions

type ListBySubscriptionOperationOptions struct {
	Expand *string
}

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

func (ListBySubscriptionOperationOptions) ToHeaders

func (ListBySubscriptionOperationOptions) ToOData

func (ListBySubscriptionOperationOptions) ToQuery

type ListBySubscriptionOperationResponse

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

type ListCompleteResult

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

type ListCustomPager

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

type ListOperationResponse

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

type ResourceSku

type ResourceSku struct {
	ApiVersions  *[]string                  `json:"apiVersions,omitempty"`
	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
	Capacity     *ResourceSkuCapacity       `json:"capacity,omitempty"`
	Costs        *[]ResourceSkuCosts        `json:"costs,omitempty"`
	Family       *string                    `json:"family,omitempty"`
	Kind         *string                    `json:"kind,omitempty"`
	LocationInfo *[]ResourceSkuLocationInfo `json:"locationInfo,omitempty"`
	Locations    *[]string                  `json:"locations,omitempty"`
	Name         *string                    `json:"name,omitempty"`
	ResourceType *string                    `json:"resourceType,omitempty"`
	Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
	Size         *string                    `json:"size,omitempty"`
	Tier         *string                    `json:"tier,omitempty"`
}

type ResourceSkuCapabilities

type ResourceSkuCapabilities struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

type ResourceSkuCapacity

type ResourceSkuCapacity struct {
	Default   *int64                        `json:"default,omitempty"`
	Maximum   *int64                        `json:"maximum,omitempty"`
	Minimum   *int64                        `json:"minimum,omitempty"`
	ScaleType *ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
}

type ResourceSkuCapacityScaleType

type ResourceSkuCapacityScaleType string
const (
	ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic"
	ResourceSkuCapacityScaleTypeManual    ResourceSkuCapacityScaleType = "Manual"
	ResourceSkuCapacityScaleTypeNone      ResourceSkuCapacityScaleType = "None"
)

func (*ResourceSkuCapacityScaleType) UnmarshalJSON

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

type ResourceSkuCosts

type ResourceSkuCosts struct {
	ExtendedUnit *string `json:"extendedUnit,omitempty"`
	MeterID      *string `json:"meterID,omitempty"`
	Quantity     *int64  `json:"quantity,omitempty"`
}

type ResourceSkuLocationInfo

type ResourceSkuLocationInfo struct {
	ExtendedLocations *[]string                 `json:"extendedLocations,omitempty"`
	Location          *string                   `json:"location,omitempty"`
	Type              *ExtendedLocationType     `json:"type,omitempty"`
	ZoneDetails       *[]ResourceSkuZoneDetails `json:"zoneDetails,omitempty"`
	Zones             *zones.Schema             `json:"zones,omitempty"`
}

type ResourceSkuOperationPredicate

type ResourceSkuOperationPredicate struct {
	Family       *string
	Kind         *string
	Name         *string
	ResourceType *string
	Size         *string
	Tier         *string
}

func (ResourceSkuOperationPredicate) Matches

type ResourceSkuRestrictionInfo

type ResourceSkuRestrictionInfo struct {
	Locations *[]string     `json:"locations,omitempty"`
	Zones     *zones.Schema `json:"zones,omitempty"`
}

type ResourceSkuRestrictions

type ResourceSkuRestrictions struct {
	ReasonCode      *ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"`
	RestrictionInfo *ResourceSkuRestrictionInfo        `json:"restrictionInfo,omitempty"`
	Type            *ResourceSkuRestrictionsType       `json:"type,omitempty"`
	Values          *[]string                          `json:"values,omitempty"`
}

type ResourceSkuRestrictionsReasonCode

type ResourceSkuRestrictionsReasonCode string
const (
	ResourceSkuRestrictionsReasonCodeNotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription"
	ResourceSkuRestrictionsReasonCodeQuotaId                     ResourceSkuRestrictionsReasonCode = "QuotaId"
)

func (*ResourceSkuRestrictionsReasonCode) UnmarshalJSON

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

type ResourceSkuRestrictionsType

type ResourceSkuRestrictionsType string
const (
	ResourceSkuRestrictionsTypeLocation ResourceSkuRestrictionsType = "Location"
	ResourceSkuRestrictionsTypeZone     ResourceSkuRestrictionsType = "Zone"
)

func (*ResourceSkuRestrictionsType) UnmarshalJSON

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

type ResourceSkuZoneDetails

type ResourceSkuZoneDetails struct {
	Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"`
	Name         *[]string                  `json:"name,omitempty"`
}

type ResourceSkusListCompleteResult

type ResourceSkusListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ResourceSku
}

type ResourceSkusListCustomPager

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

type ResourceSkusListOperationOptions

type ResourceSkusListOperationOptions struct {
	Filter                   *string
	IncludeExtendedLocations *string
}

func DefaultResourceSkusListOperationOptions

func DefaultResourceSkusListOperationOptions() ResourceSkusListOperationOptions

func (ResourceSkusListOperationOptions) ToHeaders

func (ResourceSkusListOperationOptions) ToOData

func (ResourceSkusListOperationOptions) ToQuery

type ResourceSkusListOperationResponse

type ResourceSkusListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ResourceSku
}

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

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