machineextensions

package
v0.20240125.1170241 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := machineextensions.NewMachineExtensionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MachineExtensionsClient.CreateOrUpdate

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

payload := machineextensions.MachineExtension{
	// ...
}


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

Example Usage: MachineExtensionsClient.Delete

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

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

Example Usage: MachineExtensionsClient.Get

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

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: MachineExtensionsClient.List

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

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

Example Usage: MachineExtensionsClient.Update

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

payload := machineextensions.MachineExtensionUpdate{
	// ...
}


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

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 GetOperationResponse

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

type ListCompleteResult

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

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        *[]MachineExtension
}

type MachineExtension

type MachineExtension struct {
	Id         *string                     `json:"id,omitempty"`
	Location   *string                     `json:"location,omitempty"`
	Name       *string                     `json:"name,omitempty"`
	Properties *MachineExtensionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData      `json:"systemData,omitempty"`
	Tags       *map[string]string          `json:"tags,omitempty"`
	Type       *string                     `json:"type,omitempty"`
}

type MachineExtensionInstanceView

type MachineExtensionInstanceView struct {
	Name               *string                             `json:"name,omitempty"`
	Status             *MachineExtensionInstanceViewStatus `json:"status,omitempty"`
	Type               *string                             `json:"type,omitempty"`
	TypeHandlerVersion *string                             `json:"typeHandlerVersion,omitempty"`
}

type MachineExtensionInstanceViewStatus

type MachineExtensionInstanceViewStatus 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 (*MachineExtensionInstanceViewStatus) GetTimeAsTime

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

func (*MachineExtensionInstanceViewStatus) SetTimeAsTime

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

type MachineExtensionOperationPredicate

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

func (MachineExtensionOperationPredicate) Matches

type MachineExtensionProperties

type MachineExtensionProperties struct {
	AutoUpgradeMinorVersion *bool                         `json:"autoUpgradeMinorVersion,omitempty"`
	EnableAutomaticUpgrade  *bool                         `json:"enableAutomaticUpgrade,omitempty"`
	ForceUpdateTag          *string                       `json:"forceUpdateTag,omitempty"`
	InstanceView            *MachineExtensionInstanceView `json:"instanceView,omitempty"`
	ProtectedSettings       *interface{}                  `json:"protectedSettings,omitempty"`
	ProvisioningState       *string                       `json:"provisioningState,omitempty"`
	Publisher               *string                       `json:"publisher,omitempty"`
	Settings                *interface{}                  `json:"settings,omitempty"`
	Type                    *string                       `json:"type,omitempty"`
	TypeHandlerVersion      *string                       `json:"typeHandlerVersion,omitempty"`
}

type MachineExtensionUpdate

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

type MachineExtensionUpdateProperties

type MachineExtensionUpdateProperties 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"`
	Type                    *string      `json:"type,omitempty"`
	TypeHandlerVersion      *string      `json:"typeHandlerVersion,omitempty"`
}

type MachineExtensionsClient

type MachineExtensionsClient struct {
	Client *resourcemanager.Client
}

func NewMachineExtensionsClientWithBaseURI

func NewMachineExtensionsClientWithBaseURI(sdkApi sdkEnv.Api) (*MachineExtensionsClient, error)

func (MachineExtensionsClient) CreateOrUpdate

CreateOrUpdate ...

func (MachineExtensionsClient) CreateOrUpdateThenPoll

func (c MachineExtensionsClient) CreateOrUpdateThenPoll(ctx context.Context, id ExtensionId, input MachineExtension) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (MachineExtensionsClient) Delete

Delete ...

func (MachineExtensionsClient) DeleteThenPoll

func (c MachineExtensionsClient) DeleteThenPoll(ctx context.Context, id ExtensionId) error

DeleteThenPoll performs Delete then polls until it's completed

func (MachineExtensionsClient) Get

Get ...

func (MachineExtensionsClient) List

List ...

func (MachineExtensionsClient) ListComplete

ListComplete retrieves all the results into a single object

func (MachineExtensionsClient) ListCompleteMatchingPredicate

func (c MachineExtensionsClient) ListCompleteMatchingPredicate(ctx context.Context, id VirtualMachineId, options ListOperationOptions, predicate MachineExtensionOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (MachineExtensionsClient) Update

Update ...

func (MachineExtensionsClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

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

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