guestagents

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 14 Imported by: 0

README

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

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

Client Initialization

client := guestagents.NewGuestAgentsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: GuestAgentsClient.Create

ctx := context.TODO()
id := guestagents.NewGuestAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue", "guestAgentValue")

payload := guestagents.GuestAgent{
	// ...
}


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

Example Usage: GuestAgentsClient.Delete

ctx := context.TODO()
id := guestagents.NewGuestAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue", "guestAgentValue")

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

Example Usage: GuestAgentsClient.Get

ctx := context.TODO()
id := guestagents.NewGuestAgentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineValue", "guestAgentValue")

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: GuestAgentsClient.ListByVM

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningAction

func PossibleValuesForProvisioningAction() []string

func ValidateGuestAgentID

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

ValidateGuestAgentID checks that 'input' can be parsed as a Guest Agent ID

func ValidateVirtualMachineID

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

ValidateVirtualMachineID checks that 'input' can be parsed as a Virtual Machine ID

Types

type CreateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type GuestAgent

type GuestAgent struct {
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties GuestAgentProperties   `json:"properties"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type GuestAgentId

type GuestAgentId struct {
	SubscriptionId     string
	ResourceGroupName  string
	VirtualMachineName string
	GuestAgentName     string
}

GuestAgentId is a struct representing the Resource ID for a Guest Agent

func NewGuestAgentID

func NewGuestAgentID(subscriptionId string, resourceGroupName string, virtualMachineName string, guestAgentName string) GuestAgentId

NewGuestAgentID returns a new GuestAgentId struct

func ParseGuestAgentID

func ParseGuestAgentID(input string) (*GuestAgentId, error)

ParseGuestAgentID parses 'input' into a GuestAgentId

func ParseGuestAgentIDInsensitively

func ParseGuestAgentIDInsensitively(input string) (*GuestAgentId, error)

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

func (GuestAgentId) ID

func (id GuestAgentId) ID() string

ID returns the formatted Guest Agent ID

func (GuestAgentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Guest Agent ID

func (GuestAgentId) String

func (id GuestAgentId) String() string

String returns a human-readable description of this Guest Agent ID

type GuestAgentOperationPredicate

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

func (GuestAgentOperationPredicate) Matches

func (p GuestAgentOperationPredicate) Matches(input GuestAgent) bool

type GuestAgentProperties

type GuestAgentProperties struct {
	Credentials        *GuestCredential        `json:"credentials,omitempty"`
	CustomResourceName *string                 `json:"customResourceName,omitempty"`
	HTTPProxyConfig    *HTTPProxyConfiguration `json:"httpProxyConfig,omitempty"`
	ProvisioningAction *ProvisioningAction     `json:"provisioningAction,omitempty"`
	ProvisioningState  *string                 `json:"provisioningState,omitempty"`
	Status             *string                 `json:"status,omitempty"`
	Statuses           *[]ResourceStatus       `json:"statuses,omitempty"`
	Uuid               *string                 `json:"uuid,omitempty"`
}

type GuestAgentsClient

type GuestAgentsClient struct {
	Client *resourcemanager.Client
}

func NewGuestAgentsClientWithBaseURI

func NewGuestAgentsClientWithBaseURI(api environments.Api) (*GuestAgentsClient, error)

func (GuestAgentsClient) Create

func (c GuestAgentsClient) Create(ctx context.Context, id GuestAgentId, input GuestAgent) (result CreateOperationResponse, err error)

Create ...

func (GuestAgentsClient) CreateThenPoll

func (c GuestAgentsClient) CreateThenPoll(ctx context.Context, id GuestAgentId, input GuestAgent) error

CreateThenPoll performs Create then polls until it's completed

func (GuestAgentsClient) Delete

Delete ...

func (GuestAgentsClient) DeleteThenPoll

func (c GuestAgentsClient) DeleteThenPoll(ctx context.Context, id GuestAgentId) error

DeleteThenPoll performs Delete then polls until it's completed

func (GuestAgentsClient) Get

Get ...

func (GuestAgentsClient) ListByVM

ListByVM ...

func (GuestAgentsClient) ListByVMComplete

ListByVMComplete retrieves all the results into a single object

func (GuestAgentsClient) ListByVMCompleteMatchingPredicate

func (c GuestAgentsClient) ListByVMCompleteMatchingPredicate(ctx context.Context, id VirtualMachineId, predicate GuestAgentOperationPredicate) (result ListByVMCompleteResult, err error)

ListByVMCompleteMatchingPredicate retrieves all the results and then applies the predicate

type GuestCredential

type GuestCredential struct {
	Password *string `json:"password,omitempty"`
	Username *string `json:"username,omitempty"`
}

type HTTPProxyConfiguration

type HTTPProxyConfiguration struct {
	HTTPSProxy *string `json:"httpsProxy,omitempty"`
}

type ListByVMCompleteResult

type ListByVMCompleteResult struct {
	Items []GuestAgent
}

type ListByVMOperationResponse

type ListByVMOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]GuestAgent
}

type ProvisioningAction

type ProvisioningAction string
const (
	ProvisioningActionInstall   ProvisioningAction = "install"
	ProvisioningActionRepair    ProvisioningAction = "repair"
	ProvisioningActionUninstall ProvisioningAction = "uninstall"
)

func (*ProvisioningAction) UnmarshalJSON

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

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 VirtualMachineId

type VirtualMachineId struct {
	SubscriptionId     string
	ResourceGroupName  string
	VirtualMachineName string
}

VirtualMachineId is a struct representing the Resource ID for a Virtual Machine

func NewVirtualMachineID

func NewVirtualMachineID(subscriptionId string, resourceGroupName string, virtualMachineName string) VirtualMachineId

NewVirtualMachineID returns a new VirtualMachineId struct

func ParseVirtualMachineID

func ParseVirtualMachineID(input string) (*VirtualMachineId, error)

ParseVirtualMachineID parses 'input' into a VirtualMachineId

func ParseVirtualMachineIDInsensitively

func ParseVirtualMachineIDInsensitively(input string) (*VirtualMachineId, error)

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

func (VirtualMachineId) ID

func (id VirtualMachineId) ID() string

ID returns the formatted Virtual Machine ID

func (VirtualMachineId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Virtual Machine ID

func (VirtualMachineId) String

func (id VirtualMachineId) String() string

String returns a human-readable description of this Virtual Machine ID

Jump to

Keyboard shortcuts

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