virtualmachineextensions

package
v0.20240927.1005214 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/compute/2021-07-01/virtualmachineextensions Documentation

The virtualmachineextensions SDK allows for interaction with Azure Resource Manager compute (API Version 2021-07-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/2021-07-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", "virtualMachineName", "vmExtensionName")

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", "virtualMachineName", "vmExtensionName")

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", "virtualMachineName", "vmExtensionName")

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", "virtualMachineName")

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", "virtualMachineName", "vmExtensionName")

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
	Model        *VirtualMachineExtension
}

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) FromParseResult

func (id *ExtensionId) FromParseResult(input resourceids.ParseResult) error

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

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        *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 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        *VirtualMachineExtensionsListResult
}

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        *VirtualMachineExtension
}

type VirtualMachineExtension

type VirtualMachineExtension struct {
	Id         *string                            `json:"id,omitempty"`
	Location   string                             `json:"location"`
	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"`
	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"`
	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) FromParseResult

func (id *VirtualMachineId) FromParseResult(input resourceids.ParseResult) error

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