dedicatedhosts

package
v0.20240927.1005214 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

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

The dedicatedhosts 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/dedicatedhosts"

Client Initialization

client := dedicatedhosts.NewDedicatedHostsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: DedicatedHostsClient.CreateOrUpdate

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

payload := dedicatedhosts.DedicatedHost{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: DedicatedHostsClient.Delete

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

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: DedicatedHostsClient.Get

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

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

Example Usage: DedicatedHostsClient.Update

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

payload := dedicatedhosts.DedicatedHostUpdate{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForDedicatedHostLicenseTypes

func PossibleValuesForDedicatedHostLicenseTypes() []string

func PossibleValuesForInstanceViewTypes

func PossibleValuesForInstanceViewTypes() []string

func PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []string

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DedicatedHost
}

type DedicatedHost

type DedicatedHost struct {
	Id         *string                  `json:"id,omitempty"`
	Location   string                   `json:"location"`
	Name       *string                  `json:"name,omitempty"`
	Properties *DedicatedHostProperties `json:"properties,omitempty"`
	Sku        Sku                      `json:"sku"`
	Tags       *map[string]string       `json:"tags,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type DedicatedHostAllocatableVM

type DedicatedHostAllocatableVM struct {
	Count  *float64 `json:"count,omitempty"`
	VMSize *string  `json:"vmSize,omitempty"`
}

type DedicatedHostAvailableCapacity

type DedicatedHostAvailableCapacity struct {
	AllocatableVMs *[]DedicatedHostAllocatableVM `json:"allocatableVMs,omitempty"`
}

type DedicatedHostInstanceView

type DedicatedHostInstanceView struct {
	AssetId           *string                         `json:"assetId,omitempty"`
	AvailableCapacity *DedicatedHostAvailableCapacity `json:"availableCapacity,omitempty"`
	Statuses          *[]InstanceViewStatus           `json:"statuses,omitempty"`
}

type DedicatedHostLicenseTypes

type DedicatedHostLicenseTypes string
const (
	DedicatedHostLicenseTypesNone                   DedicatedHostLicenseTypes = "None"
	DedicatedHostLicenseTypesWindowsServerHybrid    DedicatedHostLicenseTypes = "Windows_Server_Hybrid"
	DedicatedHostLicenseTypesWindowsServerPerpetual DedicatedHostLicenseTypes = "Windows_Server_Perpetual"
)

func (*DedicatedHostLicenseTypes) UnmarshalJSON

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

type DedicatedHostProperties

type DedicatedHostProperties struct {
	AutoReplaceOnFailure *bool                      `json:"autoReplaceOnFailure,omitempty"`
	HostId               *string                    `json:"hostId,omitempty"`
	InstanceView         *DedicatedHostInstanceView `json:"instanceView,omitempty"`
	LicenseType          *DedicatedHostLicenseTypes `json:"licenseType,omitempty"`
	PlatformFaultDomain  *int64                     `json:"platformFaultDomain,omitempty"`
	ProvisioningState    *string                    `json:"provisioningState,omitempty"`
	ProvisioningTime     *string                    `json:"provisioningTime,omitempty"`
	VirtualMachines      *[]SubResourceReadOnly     `json:"virtualMachines,omitempty"`
}

func (*DedicatedHostProperties) GetProvisioningTimeAsTime

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

func (*DedicatedHostProperties) SetProvisioningTimeAsTime

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

type DedicatedHostUpdate

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

type DedicatedHostsClient

type DedicatedHostsClient struct {
	Client *resourcemanager.Client
}

func NewDedicatedHostsClientWithBaseURI

func NewDedicatedHostsClientWithBaseURI(sdkApi sdkEnv.Api) (*DedicatedHostsClient, error)

func (DedicatedHostsClient) CreateOrUpdate

CreateOrUpdate ...

func (DedicatedHostsClient) CreateOrUpdateThenPoll

func (c DedicatedHostsClient) CreateOrUpdateThenPoll(ctx context.Context, id commonids.DedicatedHostId, input DedicatedHost) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (DedicatedHostsClient) Delete

Delete ...

func (DedicatedHostsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (DedicatedHostsClient) Get

Get ...

func (DedicatedHostsClient) Update

Update ...

func (DedicatedHostsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type DeleteOperationResponse

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *InstanceViewTypes
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

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 InstanceViewTypes

type InstanceViewTypes string
const (
	InstanceViewTypesInstanceView InstanceViewTypes = "instanceView"
	InstanceViewTypesUserData     InstanceViewTypes = "userData"
)

func (*InstanceViewTypes) UnmarshalJSON

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

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *DedicatedHost
}

Jump to

Keyboard shortcuts

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