virtualmachinescalesetvmruncommands

package
v0.20241206.1180327 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2024-03-01/virtualmachinescalesetvmruncommands Documentation

The virtualmachinescalesetvmruncommands SDK allows for interaction with Azure Resource Manager compute (API Version 2024-03-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/compute/2024-03-01/virtualmachinescalesetvmruncommands"

Client Initialization

client := virtualmachinescalesetvmruncommands.NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachineScaleSetVMRunCommandsClient.CreateOrUpdate

ctx := context.TODO()
id := virtualmachinescalesetvmruncommands.NewVirtualMachineScaleSetVirtualMachineRunCommandID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetName", "instanceId", "runCommandName")

payload := virtualmachinescalesetvmruncommands.VirtualMachineRunCommand{
	// ...
}


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

Example Usage: VirtualMachineScaleSetVMRunCommandsClient.Delete

ctx := context.TODO()
id := virtualmachinescalesetvmruncommands.NewVirtualMachineScaleSetVirtualMachineRunCommandID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetName", "instanceId", "runCommandName")

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

Example Usage: VirtualMachineScaleSetVMRunCommandsClient.Get

ctx := context.TODO()
id := virtualmachinescalesetvmruncommands.NewVirtualMachineScaleSetVirtualMachineRunCommandID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetName", "instanceId", "runCommandName")

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

Example Usage: VirtualMachineScaleSetVMRunCommandsClient.List

ctx := context.TODO()
id := virtualmachinescalesetvmruncommands.NewVirtualMachineScaleSetVirtualMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetName", "instanceId")

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

Example Usage: VirtualMachineScaleSetVMRunCommandsClient.Update

ctx := context.TODO()
id := virtualmachinescalesetvmruncommands.NewVirtualMachineScaleSetVirtualMachineRunCommandID("12345678-1234-9876-4563-123456789012", "example-resource-group", "virtualMachineScaleSetName", "instanceId", "runCommandName")

payload := virtualmachinescalesetvmruncommands.VirtualMachineRunCommandUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForExecutionState

func PossibleValuesForExecutionState() []string

func PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []string

func ValidateVirtualMachineScaleSetVirtualMachineID

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

ValidateVirtualMachineScaleSetVirtualMachineID checks that 'input' can be parsed as a Virtual Machine Scale Set Virtual Machine ID

func ValidateVirtualMachineScaleSetVirtualMachineRunCommandID

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

ValidateVirtualMachineScaleSetVirtualMachineRunCommandID checks that 'input' can be parsed as a Virtual Machine Scale Set Virtual Machine Run Command ID

Types

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineRunCommand
}

type DeleteOperationResponse

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

type ExecutionState

type ExecutionState string
const (
	ExecutionStateCanceled  ExecutionState = "Canceled"
	ExecutionStateFailed    ExecutionState = "Failed"
	ExecutionStatePending   ExecutionState = "Pending"
	ExecutionStateRunning   ExecutionState = "Running"
	ExecutionStateSucceeded ExecutionState = "Succeeded"
	ExecutionStateTimedOut  ExecutionState = "TimedOut"
	ExecutionStateUnknown   ExecutionState = "Unknown"
)

func (*ExecutionState) UnmarshalJSON

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

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders

func (o GetOperationOptions) ToHeaders() *client.Headers

func (GetOperationOptions) ToOData

func (o GetOperationOptions) ToOData() *odata.Query

func (GetOperationOptions) ToQuery

func (o GetOperationOptions) ToQuery() *client.QueryParams

type GetOperationResponse

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

type InstanceViewStatus

type InstanceViewStatus struct {
	Code          *string           `json:"code,omitempty"`
	DisplayStatus *string           `json:"displayStatus,omitempty"`
	Level         *StatusLevelTypes `json:"level,omitempty"`
	Message       *string           `json:"message,omitempty"`
	Time          *string           `json:"time,omitempty"`
}

func (*InstanceViewStatus) GetTimeAsTime

func (o *InstanceViewStatus) GetTimeAsTime() (*time.Time, error)

func (*InstanceViewStatus) SetTimeAsTime

func (o *InstanceViewStatus) SetTimeAsTime(input time.Time)

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Expand *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]VirtualMachineRunCommand
}

type RunCommandInputParameter

type RunCommandInputParameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type RunCommandManagedIdentity

type RunCommandManagedIdentity struct {
	ClientId *string `json:"clientId,omitempty"`
	ObjectId *string `json:"objectId,omitempty"`
}

type StatusLevelTypes

type StatusLevelTypes string
const (
	StatusLevelTypesError   StatusLevelTypes = "Error"
	StatusLevelTypesInfo    StatusLevelTypes = "Info"
	StatusLevelTypesWarning StatusLevelTypes = "Warning"
)

func (*StatusLevelTypes) UnmarshalJSON

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineRunCommand
}

type VirtualMachineRunCommand

type VirtualMachineRunCommand struct {
	Id         *string                             `json:"id,omitempty"`
	Location   string                              `json:"location"`
	Name       *string                             `json:"name,omitempty"`
	Properties *VirtualMachineRunCommandProperties `json:"properties,omitempty"`
	Tags       *map[string]string                  `json:"tags,omitempty"`
	Type       *string                             `json:"type,omitempty"`
}

type VirtualMachineRunCommandInstanceView

type VirtualMachineRunCommandInstanceView struct {
	EndTime          *string               `json:"endTime,omitempty"`
	Error            *string               `json:"error,omitempty"`
	ExecutionMessage *string               `json:"executionMessage,omitempty"`
	ExecutionState   *ExecutionState       `json:"executionState,omitempty"`
	ExitCode         *int64                `json:"exitCode,omitempty"`
	Output           *string               `json:"output,omitempty"`
	StartTime        *string               `json:"startTime,omitempty"`
	Statuses         *[]InstanceViewStatus `json:"statuses,omitempty"`
}

func (*VirtualMachineRunCommandInstanceView) GetEndTimeAsTime

func (o *VirtualMachineRunCommandInstanceView) GetEndTimeAsTime() (*time.Time, error)

func (*VirtualMachineRunCommandInstanceView) GetStartTimeAsTime

func (o *VirtualMachineRunCommandInstanceView) GetStartTimeAsTime() (*time.Time, error)

func (*VirtualMachineRunCommandInstanceView) SetEndTimeAsTime

func (o *VirtualMachineRunCommandInstanceView) SetEndTimeAsTime(input time.Time)

func (*VirtualMachineRunCommandInstanceView) SetStartTimeAsTime

func (o *VirtualMachineRunCommandInstanceView) SetStartTimeAsTime(input time.Time)

type VirtualMachineRunCommandOperationPredicate

type VirtualMachineRunCommandOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (VirtualMachineRunCommandOperationPredicate) Matches

type VirtualMachineRunCommandProperties

type VirtualMachineRunCommandProperties struct {
	AsyncExecution                  *bool                                 `json:"asyncExecution,omitempty"`
	ErrorBlobManagedIdentity        *RunCommandManagedIdentity            `json:"errorBlobManagedIdentity,omitempty"`
	ErrorBlobUri                    *string                               `json:"errorBlobUri,omitempty"`
	InstanceView                    *VirtualMachineRunCommandInstanceView `json:"instanceView,omitempty"`
	OutputBlobManagedIdentity       *RunCommandManagedIdentity            `json:"outputBlobManagedIdentity,omitempty"`
	OutputBlobUri                   *string                               `json:"outputBlobUri,omitempty"`
	Parameters                      *[]RunCommandInputParameter           `json:"parameters,omitempty"`
	ProtectedParameters             *[]RunCommandInputParameter           `json:"protectedParameters,omitempty"`
	ProvisioningState               *string                               `json:"provisioningState,omitempty"`
	RunAsPassword                   *string                               `json:"runAsPassword,omitempty"`
	RunAsUser                       *string                               `json:"runAsUser,omitempty"`
	Source                          *VirtualMachineRunCommandScriptSource `json:"source,omitempty"`
	TimeoutInSeconds                *int64                                `json:"timeoutInSeconds,omitempty"`
	TreatFailureAsDeploymentFailure *bool                                 `json:"treatFailureAsDeploymentFailure,omitempty"`
}

type VirtualMachineRunCommandScriptSource

type VirtualMachineRunCommandScriptSource struct {
	CommandId                *string                    `json:"commandId,omitempty"`
	Script                   *string                    `json:"script,omitempty"`
	ScriptUri                *string                    `json:"scriptUri,omitempty"`
	ScriptUriManagedIdentity *RunCommandManagedIdentity `json:"scriptUriManagedIdentity,omitempty"`
}

type VirtualMachineRunCommandUpdate

type VirtualMachineRunCommandUpdate struct {
	Properties *VirtualMachineRunCommandProperties `json:"properties,omitempty"`
	Tags       *map[string]string                  `json:"tags,omitempty"`
}

type VirtualMachineScaleSetVMRunCommandsClient

type VirtualMachineScaleSetVMRunCommandsClient struct {
	Client *resourcemanager.Client
}

func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI

func NewVirtualMachineScaleSetVMRunCommandsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineScaleSetVMRunCommandsClient, error)

func (VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualMachineScaleSetVMRunCommandsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualMachineScaleSetVMRunCommandsClient) Delete

Delete ...

func (VirtualMachineScaleSetVMRunCommandsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualMachineScaleSetVMRunCommandsClient) Get

Get ...

func (VirtualMachineScaleSetVMRunCommandsClient) List

List ...

func (VirtualMachineScaleSetVMRunCommandsClient) ListComplete

ListComplete retrieves all the results into a single object

func (VirtualMachineScaleSetVMRunCommandsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (VirtualMachineScaleSetVMRunCommandsClient) Update

Update ...

func (VirtualMachineScaleSetVMRunCommandsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type VirtualMachineScaleSetVirtualMachineId

type VirtualMachineScaleSetVirtualMachineId struct {
	SubscriptionId             string
	ResourceGroupName          string
	VirtualMachineScaleSetName string
	InstanceId                 string
}

VirtualMachineScaleSetVirtualMachineId is a struct representing the Resource ID for a Virtual Machine Scale Set Virtual Machine

func NewVirtualMachineScaleSetVirtualMachineID

func NewVirtualMachineScaleSetVirtualMachineID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string, instanceId string) VirtualMachineScaleSetVirtualMachineId

NewVirtualMachineScaleSetVirtualMachineID returns a new VirtualMachineScaleSetVirtualMachineId struct

func ParseVirtualMachineScaleSetVirtualMachineID

func ParseVirtualMachineScaleSetVirtualMachineID(input string) (*VirtualMachineScaleSetVirtualMachineId, error)

ParseVirtualMachineScaleSetVirtualMachineID parses 'input' into a VirtualMachineScaleSetVirtualMachineId

func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively

func ParseVirtualMachineScaleSetVirtualMachineIDInsensitively(input string) (*VirtualMachineScaleSetVirtualMachineId, error)

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

func (*VirtualMachineScaleSetVirtualMachineId) FromParseResult

func (VirtualMachineScaleSetVirtualMachineId) ID

ID returns the formatted Virtual Machine Scale Set Virtual Machine ID

func (VirtualMachineScaleSetVirtualMachineId) Segments

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

func (VirtualMachineScaleSetVirtualMachineId) String

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

type VirtualMachineScaleSetVirtualMachineRunCommandId

type VirtualMachineScaleSetVirtualMachineRunCommandId struct {
	SubscriptionId             string
	ResourceGroupName          string
	VirtualMachineScaleSetName string
	InstanceId                 string
	RunCommandName             string
}

VirtualMachineScaleSetVirtualMachineRunCommandId is a struct representing the Resource ID for a Virtual Machine Scale Set Virtual Machine Run Command

func NewVirtualMachineScaleSetVirtualMachineRunCommandID

func NewVirtualMachineScaleSetVirtualMachineRunCommandID(subscriptionId string, resourceGroupName string, virtualMachineScaleSetName string, instanceId string, runCommandName string) VirtualMachineScaleSetVirtualMachineRunCommandId

NewVirtualMachineScaleSetVirtualMachineRunCommandID returns a new VirtualMachineScaleSetVirtualMachineRunCommandId struct

func ParseVirtualMachineScaleSetVirtualMachineRunCommandID

func ParseVirtualMachineScaleSetVirtualMachineRunCommandID(input string) (*VirtualMachineScaleSetVirtualMachineRunCommandId, error)

ParseVirtualMachineScaleSetVirtualMachineRunCommandID parses 'input' into a VirtualMachineScaleSetVirtualMachineRunCommandId

func ParseVirtualMachineScaleSetVirtualMachineRunCommandIDInsensitively

func ParseVirtualMachineScaleSetVirtualMachineRunCommandIDInsensitively(input string) (*VirtualMachineScaleSetVirtualMachineRunCommandId, error)

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

func (*VirtualMachineScaleSetVirtualMachineRunCommandId) FromParseResult

func (VirtualMachineScaleSetVirtualMachineRunCommandId) ID

ID returns the formatted Virtual Machine Scale Set Virtual Machine Run Command ID

func (VirtualMachineScaleSetVirtualMachineRunCommandId) Segments

Segments returns a slice of Resource ID Segments which comprise this Virtual Machine Scale Set Virtual Machine Run Command ID

func (VirtualMachineScaleSetVirtualMachineRunCommandId) String

String returns a human-readable description of this Virtual Machine Scale Set Virtual Machine Run Command ID

Jump to

Keyboard shortcuts

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