capacityreservationgroups

package
v0.20230712.1163130 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

The capacityreservationgroups SDK allows for interaction with the Azure Resource Manager Service 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-sdk/resource-manager/compute/2021-07-01/capacityreservationgroups"

Client Initialization

client := capacityreservationgroups.NewCapacityReservationGroupsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CapacityReservationGroupsClient.CreateOrUpdate

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

payload := capacityreservationgroups.CapacityReservationGroup{
	// ...
}


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: CapacityReservationGroupsClient.Delete

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

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: CapacityReservationGroupsClient.Get

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

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

Example Usage: CapacityReservationGroupsClient.ListByResourceGroup

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

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

Example Usage: CapacityReservationGroupsClient.ListBySubscription

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

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

Example Usage: CapacityReservationGroupsClient.Update

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

payload := capacityreservationgroups.CapacityReservationGroupUpdate{
	// ...
}


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 PossibleValuesForCapacityReservationGroupInstanceViewTypes

func PossibleValuesForCapacityReservationGroupInstanceViewTypes() []string

func PossibleValuesForExpandTypesForGetCapacityReservationGroups

func PossibleValuesForExpandTypesForGetCapacityReservationGroups() []string

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 CapacityReservationGroup

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

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 CapacityReservationGroupInstanceView

type CapacityReservationGroupInstanceView struct {
	CapacityReservations *[]CapacityReservationInstanceViewWithName `json:"capacityReservations,omitempty"`
}

type CapacityReservationGroupInstanceViewTypes

type CapacityReservationGroupInstanceViewTypes string
const (
	CapacityReservationGroupInstanceViewTypesInstanceView CapacityReservationGroupInstanceViewTypes = "instanceView"
)

type CapacityReservationGroupOperationPredicate

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

func (CapacityReservationGroupOperationPredicate) Matches

type CapacityReservationGroupProperties

type CapacityReservationGroupProperties struct {
	CapacityReservations      *[]SubResourceReadOnly                `json:"capacityReservations,omitempty"`
	InstanceView              *CapacityReservationGroupInstanceView `json:"instanceView,omitempty"`
	VirtualMachinesAssociated *[]SubResourceReadOnly                `json:"virtualMachinesAssociated,omitempty"`
}

type CapacityReservationGroupUpdate

type CapacityReservationGroupUpdate struct {
	Properties *CapacityReservationGroupProperties `json:"properties,omitempty"`
	Tags       *map[string]string                  `json:"tags,omitempty"`
}

type CapacityReservationGroupsClient

type CapacityReservationGroupsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewCapacityReservationGroupsClientWithBaseURI

func NewCapacityReservationGroupsClientWithBaseURI(endpoint string) CapacityReservationGroupsClient

func (CapacityReservationGroupsClient) CreateOrUpdate

CreateOrUpdate ...

func (CapacityReservationGroupsClient) Delete

Delete ...

func (CapacityReservationGroupsClient) Get

Get ...

func (CapacityReservationGroupsClient) ListByResourceGroup

ListByResourceGroup ...

func (CapacityReservationGroupsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (CapacityReservationGroupsClient) ListByResourceGroupCompleteMatchingPredicate

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (CapacityReservationGroupsClient) ListBySubscription

ListBySubscription ...

func (CapacityReservationGroupsClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all of the results into a single object

func (CapacityReservationGroupsClient) ListBySubscriptionCompleteMatchingPredicate

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (CapacityReservationGroupsClient) Update

Update ...

type CapacityReservationInstanceViewWithName

type CapacityReservationInstanceViewWithName struct {
	Name            *string                         `json:"name,omitempty"`
	Statuses        *[]InstanceViewStatus           `json:"statuses,omitempty"`
	UtilizationInfo *CapacityReservationUtilization `json:"utilizationInfo,omitempty"`
}

type CapacityReservationUtilization

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

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *CapacityReservationGroup
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type ExpandTypesForGetCapacityReservationGroups

type ExpandTypesForGetCapacityReservationGroups string
const (
	ExpandTypesForGetCapacityReservationGroupsVirtualMachineScaleSetVMsRef ExpandTypesForGetCapacityReservationGroups = "virtualMachineScaleSetVMs/$ref"
	ExpandTypesForGetCapacityReservationGroupsVirtualMachinesRef           ExpandTypesForGetCapacityReservationGroups = "virtualMachines/$ref"
)

type GetOperationOptions

type GetOperationOptions struct {
	Expand *CapacityReservationGroupInstanceViewTypes
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *CapacityReservationGroup
}

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 ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []CapacityReservationGroup
}

type ListByResourceGroupOperationOptions

type ListByResourceGroupOperationOptions struct {
	Expand *ExpandTypesForGetCapacityReservationGroups
}

func DefaultListByResourceGroupOperationOptions

func DefaultListByResourceGroupOperationOptions() ListByResourceGroupOperationOptions

type ListByResourceGroupOperationResponse

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

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	Items []CapacityReservationGroup
}

type ListBySubscriptionOperationOptions

type ListBySubscriptionOperationOptions struct {
	Expand *ExpandTypesForGetCapacityReservationGroups
}

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

type ListBySubscriptionOperationResponse

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

func (ListBySubscriptionOperationResponse) HasMore

func (ListBySubscriptionOperationResponse) LoadMore

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"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *CapacityReservationGroup
}

Jump to

Keyboard shortcuts

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