capacityreservation

package
v0.20240903.1131440 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-07-01/capacityreservation Documentation

The capacityreservation SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2024-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-sdk/resource-manager/compute/2024-07-01/capacityreservation"

Client Initialization

client := capacityreservation.NewCapacityReservationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CapacityReservationClient.ListByCapacityReservationGroup

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []string

func ValidateCapacityReservationGroupID

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

ValidateCapacityReservationGroupID checks that 'input' can be parsed as a Capacity Reservation Group ID

Types

type CapacityReservation

type CapacityReservation struct {
	Id         *string                        `json:"id,omitempty"`
	Location   string                         `json:"location"`
	Name       *string                        `json:"name,omitempty"`
	Properties *CapacityReservationProperties `json:"properties,omitempty"`
	Sku        Sku                            `json:"sku"`
	Tags       *map[string]string             `json:"tags,omitempty"`
	Type       *string                        `json:"type,omitempty"`
	Zones      *zones.Schema                  `json:"zones,omitempty"`
}

type CapacityReservationClient

type CapacityReservationClient struct {
	Client *resourcemanager.Client
}

func NewCapacityReservationClientWithBaseURI

func NewCapacityReservationClientWithBaseURI(sdkApi sdkEnv.Api) (*CapacityReservationClient, error)

func (CapacityReservationClient) ListByCapacityReservationGroup

ListByCapacityReservationGroup ...

func (CapacityReservationClient) ListByCapacityReservationGroupComplete

ListByCapacityReservationGroupComplete retrieves all the results into a single object

func (CapacityReservationClient) ListByCapacityReservationGroupCompleteMatchingPredicate

func (c CapacityReservationClient) ListByCapacityReservationGroupCompleteMatchingPredicate(ctx context.Context, id CapacityReservationGroupId, predicate CapacityReservationOperationPredicate) (result ListByCapacityReservationGroupCompleteResult, err error)

ListByCapacityReservationGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate

type CapacityReservationGroupId

type CapacityReservationGroupId struct {
	SubscriptionId               string
	ResourceGroupName            string
	CapacityReservationGroupName string
}

CapacityReservationGroupId is a struct representing the Resource ID for a Capacity Reservation Group

func NewCapacityReservationGroupID

func NewCapacityReservationGroupID(subscriptionId string, resourceGroupName string, capacityReservationGroupName string) CapacityReservationGroupId

NewCapacityReservationGroupID returns a new CapacityReservationGroupId struct

func ParseCapacityReservationGroupID

func ParseCapacityReservationGroupID(input string) (*CapacityReservationGroupId, error)

ParseCapacityReservationGroupID parses 'input' into a CapacityReservationGroupId

func ParseCapacityReservationGroupIDInsensitively

func ParseCapacityReservationGroupIDInsensitively(input string) (*CapacityReservationGroupId, error)

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

func (*CapacityReservationGroupId) FromParseResult

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

func (CapacityReservationGroupId) ID

ID returns the formatted Capacity Reservation Group ID

func (CapacityReservationGroupId) Segments

Segments returns a slice of Resource ID Segments which comprise this Capacity Reservation Group ID

func (CapacityReservationGroupId) String

func (id CapacityReservationGroupId) String() string

String returns a human-readable description of this Capacity Reservation Group ID

type CapacityReservationInstanceView

type CapacityReservationInstanceView struct {
	Statuses        *[]InstanceViewStatus           `json:"statuses,omitempty"`
	UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"`
}

type CapacityReservationOperationPredicate

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

func (CapacityReservationOperationPredicate) Matches

type CapacityReservationProperties

type CapacityReservationProperties struct {
	InstanceView              *CapacityReservationInstanceView `json:"instanceView,omitempty"`
	PlatformFaultDomainCount  *int64                           `json:"platformFaultDomainCount,omitempty"`
	ProvisioningState         *string                          `json:"provisioningState,omitempty"`
	ProvisioningTime          *string                          `json:"provisioningTime,omitempty"`
	ReservationId             *string                          `json:"reservationId,omitempty"`
	TimeCreated               *string                          `json:"timeCreated,omitempty"`
	VirtualMachinesAssociated *[]SubResourceReadOnly           `json:"virtualMachinesAssociated,omitempty"`
}

func (*CapacityReservationProperties) GetProvisioningTimeAsTime

func (o *CapacityReservationProperties) GetProvisioningTimeAsTime() (*time.Time, error)

func (*CapacityReservationProperties) GetTimeCreatedAsTime

func (o *CapacityReservationProperties) GetTimeCreatedAsTime() (*time.Time, error)

func (*CapacityReservationProperties) SetProvisioningTimeAsTime

func (o *CapacityReservationProperties) SetProvisioningTimeAsTime(input time.Time)

func (*CapacityReservationProperties) SetTimeCreatedAsTime

func (o *CapacityReservationProperties) SetTimeCreatedAsTime(input time.Time)

type CapacityReservationUtilization

type CapacityReservationUtilization struct {
	CurrentCapacity          *int64                 `json:"currentCapacity,omitempty"`
	VirtualMachinesAllocated *[]SubResourceReadOnly `json:"virtualMachinesAllocated,omitempty"`
}

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 ListByCapacityReservationGroupCompleteResult

type ListByCapacityReservationGroupCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CapacityReservation
}

type ListByCapacityReservationGroupCustomPager

type ListByCapacityReservationGroupCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type ListByCapacityReservationGroupOperationResponse

type ListByCapacityReservationGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CapacityReservation
}

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 SubResourceReadOnly

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

Jump to

Keyboard shortcuts

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