hypervhost

package
v0.20240313.1132601 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-01-01/hypervhost Documentation

The hypervhost SDK allows for interaction with the Azure Resource Manager Service migrate (API Version 2020-01-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/migrate/2020-01-01/hypervhost"

Client Initialization

client := hypervhost.NewHyperVHostClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HyperVHostClient.GetAllHostsInSite

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

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

Example Usage: HyperVHostClient.GetHost

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

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

Example Usage: HyperVHostClient.PutHost

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

payload := hypervhost.HyperVHost{
	// ...
}


read, err := client.PutHost(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

func ValidateHyperVSiteID

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

ValidateHyperVSiteID checks that 'input' can be parsed as a Hyper V Site ID

Types

type GetAllHostsInSiteCompleteResult

type GetAllHostsInSiteCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []HyperVHost
}

type GetAllHostsInSiteOperationOptions

type GetAllHostsInSiteOperationOptions struct {
	Filter *string
}

func DefaultGetAllHostsInSiteOperationOptions

func DefaultGetAllHostsInSiteOperationOptions() GetAllHostsInSiteOperationOptions

func (GetAllHostsInSiteOperationOptions) ToHeaders

func (GetAllHostsInSiteOperationOptions) ToOData

func (GetAllHostsInSiteOperationOptions) ToQuery

type GetAllHostsInSiteOperationResponse

type GetAllHostsInSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]HyperVHost
}

type GetHostOperationResponse

type GetHostOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HyperVHost
}

type HealthErrorDetails

type HealthErrorDetails struct {
	Code              *string            `json:"code,omitempty"`
	Id                *int64             `json:"id,omitempty"`
	Message           *string            `json:"message,omitempty"`
	MessageParameters *map[string]string `json:"messageParameters,omitempty"`
	PossibleCauses    *string            `json:"possibleCauses,omitempty"`
	RecommendedAction *string            `json:"recommendedAction,omitempty"`
	Severity          *string            `json:"severity,omitempty"`
	Source            *string            `json:"source,omitempty"`
	SummaryMessage    *string            `json:"summaryMessage,omitempty"`
}

type HostId

type HostId struct {
	SubscriptionId    string
	ResourceGroupName string
	HyperVSiteName    string
	HostName          string
}

HostId is a struct representing the Resource ID for a Host

func NewHostID

func NewHostID(subscriptionId string, resourceGroupName string, hyperVSiteName 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) FromParseResult

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

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 HyperVHost

type HyperVHost struct {
	Id         *string               `json:"id,omitempty"`
	Name       *string               `json:"name,omitempty"`
	Properties *HyperVHostProperties `json:"properties,omitempty"`
	Type       *string               `json:"type,omitempty"`
}

type HyperVHostClient

type HyperVHostClient struct {
	Client *resourcemanager.Client
}

func NewHyperVHostClientWithBaseURI

func NewHyperVHostClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVHostClient, error)

func (HyperVHostClient) GetAllHostsInSite

GetAllHostsInSite ...

func (HyperVHostClient) GetAllHostsInSiteComplete

GetAllHostsInSiteComplete retrieves all the results into a single object

func (HyperVHostClient) GetAllHostsInSiteCompleteMatchingPredicate

func (c HyperVHostClient) GetAllHostsInSiteCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, options GetAllHostsInSiteOperationOptions, predicate HyperVHostOperationPredicate) (result GetAllHostsInSiteCompleteResult, err error)

GetAllHostsInSiteCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HyperVHostClient) GetHost

func (c HyperVHostClient) GetHost(ctx context.Context, id HostId) (result GetHostOperationResponse, err error)

GetHost ...

func (HyperVHostClient) PutHost

func (c HyperVHostClient) PutHost(ctx context.Context, id HostId, input HyperVHost) (result PutHostOperationResponse, err error)

PutHost ...

type HyperVHostOperationPredicate

type HyperVHostOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (HyperVHostOperationPredicate) Matches

func (p HyperVHostOperationPredicate) Matches(input HyperVHost) bool

type HyperVHostProperties

type HyperVHostProperties struct {
	CreatedTimestamp *string               `json:"createdTimestamp,omitempty"`
	Errors           *[]HealthErrorDetails `json:"errors,omitempty"`
	Fqdn             *string               `json:"fqdn,omitempty"`
	RunAsAccountId   *string               `json:"runAsAccountId,omitempty"`
	UpdatedTimestamp *string               `json:"updatedTimestamp,omitempty"`
	Version          *string               `json:"version,omitempty"`
}

type HyperVSiteId

type HyperVSiteId struct {
	SubscriptionId    string
	ResourceGroupName string
	HyperVSiteName    string
}

HyperVSiteId is a struct representing the Resource ID for a Hyper V Site

func NewHyperVSiteID

func NewHyperVSiteID(subscriptionId string, resourceGroupName string, hyperVSiteName string) HyperVSiteId

NewHyperVSiteID returns a new HyperVSiteId struct

func ParseHyperVSiteID

func ParseHyperVSiteID(input string) (*HyperVSiteId, error)

ParseHyperVSiteID parses 'input' into a HyperVSiteId

func ParseHyperVSiteIDInsensitively

func ParseHyperVSiteIDInsensitively(input string) (*HyperVSiteId, error)

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

func (*HyperVSiteId) FromParseResult

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

func (HyperVSiteId) ID

func (id HyperVSiteId) ID() string

ID returns the formatted Hyper V Site ID

func (HyperVSiteId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Hyper V Site ID

func (HyperVSiteId) String

func (id HyperVSiteId) String() string

String returns a human-readable description of this Hyper V Site ID

type PutHostOperationResponse

type PutHostOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

Jump to

Keyboard shortcuts

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