virtualmachineextensions

package
v0.20231019.1113326 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2022-03-01/virtualmachineextensions Documentation

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

Client Initialization

client := virtualmachineextensions.NewVirtualMachineExtensionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: VirtualMachineExtensionsClient.CreateOrUpdate

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

payload := virtualmachineextensions.VirtualMachineExtension{
	// ...
}


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

Example Usage: VirtualMachineExtensionsClient.Delete

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

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

Example Usage: VirtualMachineExtensionsClient.Get

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

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

Example Usage: VirtualMachineExtensionsClient.List

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

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

Example Usage: VirtualMachineExtensionsClient.Update

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

payload := virtualmachineextensions.VirtualMachineExtensionUpdate{
	// ...
}


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 PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []string

func ValidateExtensionID

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

ValidateExtensionID checks that 'input' can be parsed as a Extension 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 CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse 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 ExtensionId

type ExtensionId struct {
	SubscriptionId     string
	ResourceGroupName  string
	VirtualMachineName string
	ExtensionName      string
}

ExtensionId is a struct representing the Resource ID for a Extension

func NewExtensionID

func NewExtensionID(subscriptionId string, resourceGroupName string, virtualMachineName string, extensionName string) ExtensionId

NewExtensionID returns a new ExtensionId struct

func ParseExtensionID

func ParseExtensionID(input string) (*ExtensionId, error)

ParseExtensionID parses 'input' into a ExtensionId

func ParseExtensionIDInsensitively

func ParseExtensionIDInsensitively(input string) (*ExtensionId, error)

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

func (ExtensionId) ID

func (id ExtensionId) ID() string

ID returns the formatted Extension ID

func (ExtensionId) Segments

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

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

func (ExtensionId) String

func (id ExtensionId) String() string

String returns a human-readable description of this Extension ID

type GetOperationOptions

type GetOperationOptions struct {
	Expand *string
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

func (GetOperationOptions) ToHeaders added in v0.20230808.1103829

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

func (GetOperationOptions) ToOData added in v0.20230808.1103829

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

func (GetOperationOptions) ToQuery added in v0.20230808.1103829

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

type GetOperationResponse

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

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 KeyVaultSecretReference

type KeyVaultSecretReference struct {
	SecretUrl   string      `json:"secretUrl"`
	SourceVault SubResource `json:"sourceVault"`
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230808.1103829

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

func (ListOperationOptions) ToOData added in v0.20230808.1103829

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

func (ListOperationOptions) ToQuery added in v0.20230808.1103829

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *VirtualMachineExtensionsListResult
}

type StatusLevelTypes

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

func (*StatusLevelTypes) UnmarshalJSON added in v0.20230808.1103829

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

type SubResource

type SubResource struct {
	Id *string `json:"id,omitempty"`
}

type UpdateOperationResponse

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

type VirtualMachineExtension

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

type VirtualMachineExtensionInstanceView

type VirtualMachineExtensionInstanceView struct {
	Name               *string               `json:"name,omitempty"`
	Statuses           *[]InstanceViewStatus `json:"statuses,omitempty"`
	Substatuses        *[]InstanceViewStatus `json:"substatuses,omitempty"`
	Type               *string               `json:"type,omitempty"`
	TypeHandlerVersion *string               `json:"typeHandlerVersion,omitempty"`
}

type VirtualMachineExtensionProperties

type VirtualMachineExtensionProperties struct {
	AutoUpgradeMinorVersion       *bool                                `json:"autoUpgradeMinorVersion,omitempty"`
	EnableAutomaticUpgrade        *bool                                `json:"enableAutomaticUpgrade,omitempty"`
	ForceUpdateTag                *string                              `json:"forceUpdateTag,omitempty"`
	InstanceView                  *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
	ProtectedSettings             *interface{}                         `json:"protectedSettings,omitempty"`
	ProtectedSettingsFromKeyVault *KeyVaultSecretReference             `json:"protectedSettingsFromKeyVault,omitempty"`
	ProvisioningState             *string                              `json:"provisioningState,omitempty"`
	Publisher                     *string                              `json:"publisher,omitempty"`
	Settings                      *interface{}                         `json:"settings,omitempty"`
	SuppressFailures              *bool                                `json:"suppressFailures,omitempty"`
	Type                          *string                              `json:"type,omitempty"`
	TypeHandlerVersion            *string                              `json:"typeHandlerVersion,omitempty"`
}

type VirtualMachineExtensionUpdate

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

type VirtualMachineExtensionUpdateProperties

type VirtualMachineExtensionUpdateProperties struct {
	AutoUpgradeMinorVersion       *bool                    `json:"autoUpgradeMinorVersion,omitempty"`
	EnableAutomaticUpgrade        *bool                    `json:"enableAutomaticUpgrade,omitempty"`
	ForceUpdateTag                *string                  `json:"forceUpdateTag,omitempty"`
	ProtectedSettings             *interface{}             `json:"protectedSettings,omitempty"`
	ProtectedSettingsFromKeyVault *KeyVaultSecretReference `json:"protectedSettingsFromKeyVault,omitempty"`
	Publisher                     *string                  `json:"publisher,omitempty"`
	Settings                      *interface{}             `json:"settings,omitempty"`
	SuppressFailures              *bool                    `json:"suppressFailures,omitempty"`
	Type                          *string                  `json:"type,omitempty"`
	TypeHandlerVersion            *string                  `json:"typeHandlerVersion,omitempty"`
}

type VirtualMachineExtensionsClient

type VirtualMachineExtensionsClient struct {
	Client *resourcemanager.Client
}

func NewVirtualMachineExtensionsClientWithBaseURI

func NewVirtualMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*VirtualMachineExtensionsClient, error)

func (VirtualMachineExtensionsClient) CreateOrUpdate

CreateOrUpdate ...

func (VirtualMachineExtensionsClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (VirtualMachineExtensionsClient) Delete

Delete ...

func (VirtualMachineExtensionsClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (VirtualMachineExtensionsClient) Get

Get ...

func (VirtualMachineExtensionsClient) List

List ...

func (VirtualMachineExtensionsClient) Update

Update ...

func (VirtualMachineExtensionsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type VirtualMachineExtensionsListResult

type VirtualMachineExtensionsListResult struct {
	Value *[]VirtualMachineExtension `json:"value,omitempty"`
}

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