machines

package
v0.20230530.1074937 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-03-10/machines Documentation

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

Client Initialization

client := machines.NewMachinesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: MachinesClient.CreateOrUpdate

ctx := context.TODO()
id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue")

payload := machines.Machine{
	// ...
}


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

Example Usage: MachinesClient.Delete

ctx := context.TODO()
id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue")

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

Example Usage: MachinesClient.Get

ctx := context.TODO()
id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue")

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

Example Usage: MachinesClient.ListByResourceGroup

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

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

Example Usage: MachinesClient.ListBySubscription

ctx := context.TODO()
id := machines.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

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

Example Usage: MachinesClient.Update

ctx := context.TODO()
id := machines.NewMachineID("12345678-1234-9876-4563-123456789012", "example-resource-group", "machineValue")

payload := machines.MachineUpdate{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForAssessmentModeTypes

func PossibleValuesForAssessmentModeTypes() []string

func PossibleValuesForInstanceViewTypes

func PossibleValuesForInstanceViewTypes() []string

func PossibleValuesForPatchModeTypes

func PossibleValuesForPatchModeTypes() []string

func PossibleValuesForStatusLevelTypes

func PossibleValuesForStatusLevelTypes() []string

func PossibleValuesForStatusTypes

func PossibleValuesForStatusTypes() []string

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 AgentConfiguration

type AgentConfiguration struct {
	ExtensionsAllowList       *[]ConfigurationExtension `json:"extensionsAllowList,omitempty"`
	ExtensionsBlockList       *[]ConfigurationExtension `json:"extensionsBlockList,omitempty"`
	ExtensionsEnabled         *string                   `json:"extensionsEnabled,omitempty"`
	GuestConfigurationEnabled *string                   `json:"guestConfigurationEnabled,omitempty"`
	IncomingConnectionsPorts  *[]string                 `json:"incomingConnectionsPorts,omitempty"`
	ProxyBypass               *[]string                 `json:"proxyBypass,omitempty"`
	ProxyUrl                  *string                   `json:"proxyUrl,omitempty"`
}

type AssessmentModeTypes

type AssessmentModeTypes string
const (
	AssessmentModeTypesAutomaticByPlatform AssessmentModeTypes = "AutomaticByPlatform"
	AssessmentModeTypesImageDefault        AssessmentModeTypes = "ImageDefault"
)

type CloudMetadata

type CloudMetadata struct {
	Provider *string `json:"provider,omitempty"`
}

type ConfigurationExtension

type ConfigurationExtension struct {
	Publisher *string `json:"publisher,omitempty"`
	Type      *string `json:"type,omitempty"`
}

type CreateOrUpdateOperationResponse added in v0.20221024.1162143

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Machine
}

type DeleteOperationResponse added in v0.20221024.1162143

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	Info *interface{} `json:"info,omitempty"`
	Type *string      `json:"type,omitempty"`
}

type ErrorDetail

type ErrorDetail struct {
	AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
	Code           *string                `json:"code,omitempty"`
	Details        *[]ErrorDetail         `json:"details,omitempty"`
	Message        *string                `json:"message,omitempty"`
	Target         *string                `json:"target,omitempty"`
}

type GetOperationOptions added in v0.20221024.1162143

type GetOperationOptions struct {
	Expand *InstanceViewTypes
}

func DefaultGetOperationOptions added in v0.20221024.1162143

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse added in v0.20221024.1162143

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *Machine
}

type InstanceViewTypes

type InstanceViewTypes string
const (
	InstanceViewTypesInstanceView InstanceViewTypes = "instanceView"
)

type ListByResourceGroupCompleteResult added in v0.20221024.1162143

type ListByResourceGroupCompleteResult struct {
	Items []Machine
}

type ListByResourceGroupOperationResponse added in v0.20221024.1162143

type ListByResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Machine
	// contains filtered or unexported fields
}

func (ListByResourceGroupOperationResponse) HasMore added in v0.20221024.1162143

func (ListByResourceGroupOperationResponse) LoadMore added in v0.20221024.1162143

type ListBySubscriptionCompleteResult added in v0.20221024.1162143

type ListBySubscriptionCompleteResult struct {
	Items []Machine
}

type ListBySubscriptionOperationResponse added in v0.20221024.1162143

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]Machine
	// contains filtered or unexported fields
}

func (ListBySubscriptionOperationResponse) HasMore added in v0.20221024.1162143

func (ListBySubscriptionOperationResponse) LoadMore added in v0.20221024.1162143

type LocationData

type LocationData struct {
	City            *string `json:"city,omitempty"`
	CountryOrRegion *string `json:"countryOrRegion,omitempty"`
	District        *string `json:"district,omitempty"`
	Name            string  `json:"name"`
}

type Machine

type Machine struct {
	Id         *string                  `json:"id,omitempty"`
	Identity   *identity.SystemAssigned `json:"identity,omitempty"`
	Location   string                   `json:"location"`
	Name       *string                  `json:"name,omitempty"`
	Properties *MachineProperties       `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 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) 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 MachineOperationPredicate

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

func (MachineOperationPredicate) Matches

func (p MachineOperationPredicate) Matches(input Machine) bool

type MachineProperties

type MachineProperties struct {
	AdFqdn                     *string                         `json:"adFqdn,omitempty"`
	AgentConfiguration         *AgentConfiguration             `json:"agentConfiguration,omitempty"`
	AgentVersion               *string                         `json:"agentVersion,omitempty"`
	ClientPublicKey            *string                         `json:"clientPublicKey,omitempty"`
	CloudMetadata              *CloudMetadata                  `json:"cloudMetadata,omitempty"`
	DetectedProperties         *map[string]string              `json:"detectedProperties,omitempty"`
	DisplayName                *string                         `json:"displayName,omitempty"`
	DnsFqdn                    *string                         `json:"dnsFqdn,omitempty"`
	DomainName                 *string                         `json:"domainName,omitempty"`
	ErrorDetails               *[]ErrorDetail                  `json:"errorDetails,omitempty"`
	Extensions                 *[]MachineExtensionInstanceView `json:"extensions,omitempty"`
	LastStatusChange           *string                         `json:"lastStatusChange,omitempty"`
	LocationData               *LocationData                   `json:"locationData,omitempty"`
	MachineFqdn                *string                         `json:"machineFqdn,omitempty"`
	MssqlDiscovered            *string                         `json:"mssqlDiscovered,omitempty"`
	OsName                     *string                         `json:"osName,omitempty"`
	OsProfile                  *OSProfile                      `json:"osProfile,omitempty"`
	OsSku                      *string                         `json:"osSku,omitempty"`
	OsType                     *string                         `json:"osType,omitempty"`
	OsVersion                  *string                         `json:"osVersion,omitempty"`
	ParentClusterResourceId    *string                         `json:"parentClusterResourceId,omitempty"`
	PrivateLinkScopeResourceId *string                         `json:"privateLinkScopeResourceId,omitempty"`
	ProvisioningState          *string                         `json:"provisioningState,omitempty"`
	ServiceStatuses            *ServiceStatuses                `json:"serviceStatuses,omitempty"`
	Status                     *StatusTypes                    `json:"status,omitempty"`
	VMId                       *string                         `json:"vmId,omitempty"`
	VMUuid                     *string                         `json:"vmUuid,omitempty"`
}

func (*MachineProperties) GetLastStatusChangeAsTime

func (o *MachineProperties) GetLastStatusChangeAsTime() (*time.Time, error)

func (*MachineProperties) SetLastStatusChangeAsTime

func (o *MachineProperties) SetLastStatusChangeAsTime(input time.Time)

type MachineUpdate

type MachineUpdate struct {
	Identity   *identity.SystemAssigned `json:"identity,omitempty"`
	Properties *MachineUpdateProperties `json:"properties,omitempty"`
	Tags       *map[string]string       `json:"tags,omitempty"`
}

type MachineUpdateProperties

type MachineUpdateProperties struct {
	CloudMetadata              *CloudMetadata `json:"cloudMetadata,omitempty"`
	LocationData               *LocationData  `json:"locationData,omitempty"`
	OsProfile                  *OSProfile     `json:"osProfile,omitempty"`
	ParentClusterResourceId    *string        `json:"parentClusterResourceId,omitempty"`
	PrivateLinkScopeResourceId *string        `json:"privateLinkScopeResourceId,omitempty"`
}

type MachinesClient

type MachinesClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewMachinesClientWithBaseURI

func NewMachinesClientWithBaseURI(endpoint string) MachinesClient

func (MachinesClient) CreateOrUpdate added in v0.20221024.1162143

func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input Machine) (result CreateOrUpdateOperationResponse, err error)

CreateOrUpdate ...

func (MachinesClient) Delete added in v0.20221024.1162143

func (c MachinesClient) Delete(ctx context.Context, id MachineId) (result DeleteOperationResponse, err error)

Delete ...

func (MachinesClient) Get added in v0.20221024.1162143

Get ...

func (MachinesClient) ListByResourceGroup added in v0.20221024.1162143

ListByResourceGroup ...

func (MachinesClient) ListByResourceGroupComplete added in v0.20221024.1162143

ListByResourceGroupComplete retrieves all of the results into a single object

func (MachinesClient) ListByResourceGroupCompleteMatchingPredicate added in v0.20221024.1162143

func (c MachinesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MachineOperationPredicate) (resp ListByResourceGroupCompleteResult, err error)

ListByResourceGroupCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (MachinesClient) ListBySubscription added in v0.20221024.1162143

ListBySubscription ...

func (MachinesClient) ListBySubscriptionComplete added in v0.20221024.1162143

ListBySubscriptionComplete retrieves all of the results into a single object

func (MachinesClient) ListBySubscriptionCompleteMatchingPredicate added in v0.20221024.1162143

func (c MachinesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MachineOperationPredicate) (resp ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (MachinesClient) Update added in v0.20221024.1162143

func (c MachinesClient) Update(ctx context.Context, id MachineId, input MachineUpdate) (result UpdateOperationResponse, err error)

Update ...

type OSProfile

type OSProfile struct {
	ComputerName         *string                        `json:"computerName,omitempty"`
	LinuxConfiguration   *OSProfileLinuxConfiguration   `json:"linuxConfiguration,omitempty"`
	WindowsConfiguration *OSProfileWindowsConfiguration `json:"windowsConfiguration,omitempty"`
}

type OSProfileLinuxConfiguration

type OSProfileLinuxConfiguration struct {
	PatchSettings *PatchSettings `json:"patchSettings,omitempty"`
}

type OSProfileWindowsConfiguration

type OSProfileWindowsConfiguration struct {
	PatchSettings *PatchSettings `json:"patchSettings,omitempty"`
}

type PatchModeTypes

type PatchModeTypes string
const (
	PatchModeTypesAutomaticByOS       PatchModeTypes = "AutomaticByOS"
	PatchModeTypesAutomaticByPlatform PatchModeTypes = "AutomaticByPlatform"
	PatchModeTypesImageDefault        PatchModeTypes = "ImageDefault"
	PatchModeTypesManual              PatchModeTypes = "Manual"
)

type PatchSettings

type PatchSettings struct {
	AssessmentMode *AssessmentModeTypes `json:"assessmentMode,omitempty"`
	PatchMode      *PatchModeTypes      `json:"patchMode,omitempty"`
}

type ServiceStatus

type ServiceStatus struct {
	StartupType *string `json:"startupType,omitempty"`
	Status      *string `json:"status,omitempty"`
}

type ServiceStatuses

type ServiceStatuses struct {
	ExtensionService          *ServiceStatus `json:"extensionService,omitempty"`
	GuestConfigurationService *ServiceStatus `json:"guestConfigurationService,omitempty"`
}

type StatusLevelTypes

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

type StatusTypes

type StatusTypes string
const (
	StatusTypesConnected    StatusTypes = "Connected"
	StatusTypesDisconnected StatusTypes = "Disconnected"
	StatusTypesError        StatusTypes = "Error"
)

type UpdateOperationResponse added in v0.20221024.1162143

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *Machine
}

Jump to

Keyboard shortcuts

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