hypervcluster

package
v0.20240320.1000025 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/migrate/2020-07-07/hypervcluster Documentation

The hypervcluster SDK allows for interaction with the Azure Resource Manager Service migrate (API Version 2020-07-07).

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-07-07/hypervcluster"

Client Initialization

client := hypervcluster.NewHyperVClusterClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: HyperVClusterClient.GetAllClustersInSite

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

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

Example Usage: HyperVClusterClient.GetCluster

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

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

Example Usage: HyperVClusterClient.PutCluster

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

payload := hypervcluster.HyperVCluster{
	// ...
}


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

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

ValidateClusterID checks that 'input' can be parsed as a Cluster 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 ClusterId

type ClusterId struct {
	SubscriptionId    string
	ResourceGroupName string
	HyperVSiteName    string
	ClusterName       string
}

ClusterId is a struct representing the Resource ID for a Cluster

func NewClusterID

func NewClusterID(subscriptionId string, resourceGroupName string, hyperVSiteName string, clusterName string) ClusterId

NewClusterID returns a new ClusterId struct

func ParseClusterID

func ParseClusterID(input string) (*ClusterId, error)

ParseClusterID parses 'input' into a ClusterId

func ParseClusterIDInsensitively

func ParseClusterIDInsensitively(input string) (*ClusterId, error)

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

func (*ClusterId) FromParseResult

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

func (ClusterId) ID

func (id ClusterId) ID() string

ID returns the formatted Cluster ID

func (ClusterId) Segments

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

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

func (ClusterId) String

func (id ClusterId) String() string

String returns a human-readable description of this Cluster ID

type GetAllClustersInSiteCompleteResult

type GetAllClustersInSiteCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []HyperVCluster
}

type GetAllClustersInSiteOperationOptions

type GetAllClustersInSiteOperationOptions struct {
	Filter *string
}

func DefaultGetAllClustersInSiteOperationOptions

func DefaultGetAllClustersInSiteOperationOptions() GetAllClustersInSiteOperationOptions

func (GetAllClustersInSiteOperationOptions) ToHeaders

func (GetAllClustersInSiteOperationOptions) ToOData

func (GetAllClustersInSiteOperationOptions) ToQuery

type GetAllClustersInSiteOperationResponse

type GetAllClustersInSiteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]HyperVCluster
}

type GetClusterOperationResponse

type GetClusterOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *HyperVCluster
}

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 HyperVCluster

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

type HyperVClusterClient

type HyperVClusterClient struct {
	Client *resourcemanager.Client
}

func NewHyperVClusterClientWithBaseURI

func NewHyperVClusterClientWithBaseURI(sdkApi sdkEnv.Api) (*HyperVClusterClient, error)

func (HyperVClusterClient) GetAllClustersInSite

GetAllClustersInSite ...

func (HyperVClusterClient) GetAllClustersInSiteComplete

GetAllClustersInSiteComplete retrieves all the results into a single object

func (HyperVClusterClient) GetAllClustersInSiteCompleteMatchingPredicate

func (c HyperVClusterClient) GetAllClustersInSiteCompleteMatchingPredicate(ctx context.Context, id HyperVSiteId, options GetAllClustersInSiteOperationOptions, predicate HyperVClusterOperationPredicate) (result GetAllClustersInSiteCompleteResult, err error)

GetAllClustersInSiteCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (HyperVClusterClient) GetCluster

func (c HyperVClusterClient) GetCluster(ctx context.Context, id ClusterId) (result GetClusterOperationResponse, err error)

GetCluster ...

func (HyperVClusterClient) PutCluster

func (c HyperVClusterClient) PutCluster(ctx context.Context, id ClusterId, input HyperVCluster) (result PutClusterOperationResponse, err error)

PutCluster ...

type HyperVClusterOperationPredicate

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

func (HyperVClusterOperationPredicate) Matches

type HyperVClusterProperties

type HyperVClusterProperties struct {
	CreatedTimestamp *string               `json:"createdTimestamp,omitempty"`
	Errors           *[]HealthErrorDetails `json:"errors,omitempty"`
	Fqdn             *string               `json:"fqdn,omitempty"`
	FunctionalLevel  *int64                `json:"functionalLevel,omitempty"`
	HostFqdnList     *[]string             `json:"hostFqdnList,omitempty"`
	RunAsAccountId   *string               `json:"runAsAccountId,omitempty"`
	Status           *string               `json:"status,omitempty"`
	UpdatedTimestamp *string               `json:"updatedTimestamp,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 PutClusterOperationResponse

type PutClusterOperationResponse 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