guestagents

package
v0.20240304.1112406 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-09-01-preview/guestagents Documentation

The guestagents SDK allows for interaction with the Azure Resource Manager Service azurestackhci (API Version 2023-09-01-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/azurestackhci/2023-09-01-preview/guestagents"

Client Initialization

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

Example Usage: GuestAgentsClient.GuestAgentCreate

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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


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

Example Usage: GuestAgentsClient.GuestAgentDelete

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: GuestAgentsClient.GuestAgentGet

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: GuestAgentsClient.List

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForProvisioningAction

func PossibleValuesForProvisioningAction() []string

Types

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 GuestAgentCreateOperationResponse

type GuestAgentCreateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GuestAgent
}

type GuestAgentDeleteOperationResponse

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

type GuestAgentGetOperationResponse

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

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"`
	ProvisioningAction *ProvisioningAction `json:"provisioningAction,omitempty"`
	ProvisioningState  *string             `json:"provisioningState,omitempty"`
	Status             *string             `json:"status,omitempty"`
}

type GuestAgentsClient

type GuestAgentsClient struct {
	Client *resourcemanager.Client
}

func NewGuestAgentsClientWithBaseURI

func NewGuestAgentsClientWithBaseURI(sdkApi sdkEnv.Api) (*GuestAgentsClient, error)

func (GuestAgentsClient) GuestAgentCreate

func (c GuestAgentsClient) GuestAgentCreate(ctx context.Context, id commonids.ScopeId, input GuestAgent) (result GuestAgentCreateOperationResponse, err error)

GuestAgentCreate ...

func (GuestAgentsClient) GuestAgentCreateThenPoll

func (c GuestAgentsClient) GuestAgentCreateThenPoll(ctx context.Context, id commonids.ScopeId, input GuestAgent) error

GuestAgentCreateThenPoll performs GuestAgentCreate then polls until it's completed

func (GuestAgentsClient) GuestAgentDelete

func (c GuestAgentsClient) GuestAgentDelete(ctx context.Context, id commonids.ScopeId) (result GuestAgentDeleteOperationResponse, err error)

GuestAgentDelete ...

func (GuestAgentsClient) GuestAgentDeleteThenPoll

func (c GuestAgentsClient) GuestAgentDeleteThenPoll(ctx context.Context, id commonids.ScopeId) error

GuestAgentDeleteThenPoll performs GuestAgentDelete then polls until it's completed

func (GuestAgentsClient) GuestAgentGet

GuestAgentGet ...

func (GuestAgentsClient) List

List ...

func (GuestAgentsClient) ListComplete

ListComplete retrieves all the results into a single object

func (GuestAgentsClient) ListCompleteMatchingPredicate

func (c GuestAgentsClient) ListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate GuestAgentOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate 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 ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []GuestAgent
}

type ListOperationResponse

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

Jump to

Keyboard shortcuts

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