capacityreservation

package
v0.20230109.1102005 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/capacityreservation Documentation

The capacityreservation SDK allows for interaction with the Azure Resource Manager Service compute (API Version 2022-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/2022-03-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 autorest.Client
	// contains filtered or unexported fields
}

func NewCapacityReservationClientWithBaseURI

func NewCapacityReservationClientWithBaseURI(endpoint string) CapacityReservationClient

func (CapacityReservationClient) ListByCapacityReservationGroup

ListByCapacityReservationGroup ...

func (CapacityReservationClient) ListByCapacityReservationGroupComplete

ListByCapacityReservationGroupComplete retrieves all of the results into a single object

func (CapacityReservationClient) ListByCapacityReservationGroupCompleteMatchingPredicate

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

ListByCapacityReservationGroupCompleteMatchingPredicate retrieves all of the results and then applied 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) 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"`
	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 {
	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 {
	Items []CapacityReservation
}

type ListByCapacityReservationGroupOperationResponse

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

func (ListByCapacityReservationGroupOperationResponse) HasMore

func (ListByCapacityReservationGroupOperationResponse) LoadMore

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

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