hosts

package
v0.20221013.1053940 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/connectedvmware/2022-01-10-preview/hosts Documentation

The hosts SDK allows for interaction with the Azure Resource Manager Service connectedvmware (API Version 2022-01-10-preview).

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/connectedvmware/2022-01-10-preview/hosts"

Client Initialization

client := hosts.NewHostsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HostsClient.Create

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

payload := hosts.Host{
	// ...
}


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

Example Usage: HostsClient.Delete

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

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

Example Usage: HostsClient.Get

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

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: HostsClient.List

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

// 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: HostsClient.ListByResourceGroup

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

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

Example Usage: HostsClient.Update

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

payload := hosts.ResourcePatch{
	// ...
}


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 ValidateHostID

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

ValidateHostID checks that 'input' can be parsed as a Host ID

Types

type CreateOperationResponse

type CreateOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type DeleteOperationOptions

type DeleteOperationOptions struct {
	Force *bool
}

func DefaultDeleteOperationOptions

func DefaultDeleteOperationOptions() DeleteOperationOptions

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       polling.LongRunningPoller
	HttpResponse *http.Response
}

type ExtendedLocation

type ExtendedLocation struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type GetOperationResponse

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

type Host

type Host struct {
	ExtendedLocation *ExtendedLocation      `json:"extendedLocation,omitempty"`
	Id               *string                `json:"id,omitempty"`
	Kind             *string                `json:"kind,omitempty"`
	Location         string                 `json:"location"`
	Name             *string                `json:"name,omitempty"`
	Properties       HostProperties         `json:"properties"`
	SystemData       *systemdata.SystemData `json:"systemData,omitempty"`
	Tags             *map[string]string     `json:"tags,omitempty"`
	Type             *string                `json:"type,omitempty"`
}

type HostId

type HostId struct {
	SubscriptionId    string
	ResourceGroupName string
	HostName          string
}

HostId is a struct representing the Resource ID for a Host

func NewHostID

func NewHostID(subscriptionId string, resourceGroupName string, hostName string) HostId

NewHostID returns a new HostId struct

func ParseHostID

func ParseHostID(input string) (*HostId, error)

ParseHostID parses 'input' into a HostId

func ParseHostIDInsensitively

func ParseHostIDInsensitively(input string) (*HostId, error)

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

func (HostId) ID

func (id HostId) ID() string

ID returns the formatted Host ID

func (HostId) Segments

func (id HostId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Host ID

func (HostId) String

func (id HostId) String() string

String returns a human-readable description of this Host ID

type HostOperationPredicate

type HostOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (HostOperationPredicate) Matches

func (p HostOperationPredicate) Matches(input Host) bool

type HostProperties

type HostProperties struct {
	CustomResourceName *string           `json:"customResourceName,omitempty"`
	InventoryItemId    *string           `json:"inventoryItemId,omitempty"`
	MoName             *string           `json:"moName,omitempty"`
	MoRefId            *string           `json:"moRefId,omitempty"`
	ProvisioningState  *string           `json:"provisioningState,omitempty"`
	Statuses           *[]ResourceStatus `json:"statuses,omitempty"`
	Uuid               *string           `json:"uuid,omitempty"`
	VCenterId          *string           `json:"vCenterId,omitempty"`
}

type HostsClient

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

func NewHostsClientWithBaseURI

func NewHostsClientWithBaseURI(endpoint string) HostsClient

func (HostsClient) Create

func (c HostsClient) Create(ctx context.Context, id HostId, input Host) (result CreateOperationResponse, err error)

Create ...

func (HostsClient) CreateThenPoll

func (c HostsClient) CreateThenPoll(ctx context.Context, id HostId, input Host) error

CreateThenPoll performs Create then polls until it's completed

func (HostsClient) Delete

func (c HostsClient) Delete(ctx context.Context, id HostId, options DeleteOperationOptions) (result DeleteOperationResponse, err error)

Delete ...

func (HostsClient) DeleteThenPoll

func (c HostsClient) DeleteThenPoll(ctx context.Context, id HostId, options DeleteOperationOptions) error

DeleteThenPoll performs Delete then polls until it's completed

func (HostsClient) Get

func (c HostsClient) Get(ctx context.Context, id HostId) (result GetOperationResponse, err error)

Get ...

func (HostsClient) List

List ...

func (HostsClient) ListByResourceGroup

ListByResourceGroup ...

func (HostsClient) ListByResourceGroupComplete

ListByResourceGroupComplete retrieves all of the results into a single object

func (HostsClient) ListByResourceGroupCompleteMatchingPredicate

func (c HostsClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate HostOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (HostsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (HostsClient) ListCompleteMatchingPredicate

func (c HostsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate HostOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (HostsClient) Update

func (c HostsClient) Update(ctx context.Context, id HostId, input ResourcePatch) (result UpdateOperationResponse, err error)

Update ...

type ListByResourceGroupCompleteResult

type ListByResourceGroupCompleteResult struct {
	Items []Host
}

type ListByResourceGroupOperationResponse

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

func (ListByResourceGroupOperationResponse) HasMore

func (ListByResourceGroupOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []Host
}

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type ResourcePatch

type ResourcePatch struct {
	Tags *map[string]string `json:"tags,omitempty"`
}

type ResourceStatus

type ResourceStatus struct {
	LastUpdatedAt *string `json:"lastUpdatedAt,omitempty"`
	Message       *string `json:"message,omitempty"`
	Reason        *string `json:"reason,omitempty"`
	Severity      *string `json:"severity,omitempty"`
	Status        *string `json:"status,omitempty"`
	Type          *string `json:"type,omitempty"`
}

func (*ResourceStatus) GetLastUpdatedAtAsTime

func (o *ResourceStatus) GetLastUpdatedAtAsTime() (*time.Time, error)

func (*ResourceStatus) SetLastUpdatedAtAsTime

func (o *ResourceStatus) SetLastUpdatedAtAsTime(input time.Time)

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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