machineextensions

package
v0.20240731.1212841 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MPL-2.0 Imports: 15 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machineextensions Documentation

The machineextensions SDK allows for interaction with the Azure Resource Manager Service hybridcompute (API Version 2022-11-10).

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/hybridcompute/2022-11-10/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", "machineValue", "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", "machineValue", "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", "machineValue", "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.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue")

// 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", "machineValue", "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 ValidateMachineID

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

ValidateMachineID checks that 'input' can be parsed as a 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
	MachineName       string
	ExtensionName     string
}

ExtensionId is a struct representing the Resource ID for a Extension

func NewExtensionID

func NewExtensionID(subscriptionId string, resourceGroupName string, machineName 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 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        *[]MachineExtension
}

type MachineExtension

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

type MachineId struct {
	SubscriptionId    string
	ResourceGroupName string
	MachineName       string
}

MachineId is a struct representing the Resource ID for a Machine

func NewMachineID

func NewMachineID(subscriptionId string, resourceGroupName string, machineName string) MachineId

NewMachineID returns a new MachineId struct

func ParseMachineID

func ParseMachineID(input string) (*MachineId, error)

ParseMachineID parses 'input' into a MachineId

func ParseMachineIDInsensitively

func ParseMachineIDInsensitively(input string) (*MachineId, error)

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

func (*MachineId) FromParseResult

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

func (MachineId) ID

func (id MachineId) ID() string

ID returns the formatted Machine ID

func (MachineId) Segments

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

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

func (MachineId) String

func (id MachineId) String() string

String returns a human-readable description of this Machine ID

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
}

Jump to

Keyboard shortcuts

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