virtualmachines

package
v0.20240516.1080701 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/hdinsight/2021-06-01/virtualmachines Documentation

The virtualmachines SDK allows for interaction with the Azure Resource Manager Service hdinsight (API Version 2021-06-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/hdinsight/2021-06-01/virtualmachines"

Client Initialization

client := virtualmachines.NewVirtualMachinesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachinesClient.ListHosts

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

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

Example Usage: VirtualMachinesClient.RestartHosts

ctx := context.TODO()
id := commonids.NewHDInsightClusterID("12345678-1234-9876-4563-123456789012", "example-resource-group", "clusterValue")
var payload []string

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostInfo

type HostInfo struct {
	EffectiveDiskEncryptionKeyUrl *string `json:"effectiveDiskEncryptionKeyUrl,omitempty"`
	Fqdn                          *string `json:"fqdn,omitempty"`
	Name                          *string `json:"name,omitempty"`
}

type ListHostsOperationResponse

type ListHostsOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]HostInfo
}

type RestartHostsOperationResponse

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

type VirtualMachinesClient

type VirtualMachinesClient struct {
	Client *resourcemanager.Client
}

func NewVirtualMachinesClientWithBaseURI

func NewVirtualMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachinesClient, error)

func (VirtualMachinesClient) ListHosts

ListHosts ...

func (VirtualMachinesClient) RestartHosts

RestartHosts ...

func (VirtualMachinesClient) RestartHostsThenPoll

func (c VirtualMachinesClient) RestartHostsThenPoll(ctx context.Context, id commonids.HDInsightClusterId, input []string) error

RestartHostsThenPoll performs RestartHosts then polls until it's completed

Jump to

Keyboard shortcuts

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