README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-10/machines
Documentation
The machines
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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/hybridcompute/2022-11-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 := commonids.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 := commonids.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 ¶
- func PossibleValuesForAgentConfigurationMode() []string
- func PossibleValuesForAssessmentModeTypes() []string
- func PossibleValuesForInstanceViewTypes() []string
- func PossibleValuesForPatchModeTypes() []string
- func PossibleValuesForStatusLevelTypes() []string
- func PossibleValuesForStatusTypes() []string
- func ValidateMachineID(input interface{}, key string) (warnings []string, errors []error)
- type AgentConfiguration
- type AgentConfigurationMode
- type AssessmentModeTypes
- type CloudMetadata
- type ConfigurationExtension
- type CreateOrUpdateOperationResponse
- type DeleteOperationResponse
- type ErrorAdditionalInfo
- type ErrorDetail
- type GetOperationOptions
- type GetOperationResponse
- type InstanceViewTypes
- type ListByResourceGroupCompleteResult
- type ListByResourceGroupOperationResponse
- type ListBySubscriptionCompleteResult
- type ListBySubscriptionOperationResponse
- type LocationData
- type Machine
- type MachineExtension
- type MachineExtensionInstanceView
- type MachineExtensionInstanceViewStatus
- type MachineExtensionProperties
- type MachineId
- type MachineOperationPredicate
- type MachineProperties
- type MachineUpdate
- type MachineUpdateProperties
- type MachinesClient
- func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input Machine) (result CreateOrUpdateOperationResponse, err error)
- func (c MachinesClient) Delete(ctx context.Context, id MachineId) (result DeleteOperationResponse, err error)
- func (c MachinesClient) Get(ctx context.Context, id MachineId, options GetOperationOptions) (result GetOperationResponse, err error)
- func (c MachinesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
- func (c MachinesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
- func (c MachinesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, ...) (result ListByResourceGroupCompleteResult, err error)
- func (c MachinesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
- func (c MachinesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
- func (c MachinesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, ...) (result ListBySubscriptionCompleteResult, err error)
- func (c MachinesClient) Update(ctx context.Context, id MachineId, input MachineUpdate) (result UpdateOperationResponse, err error)
- type OSProfile
- type OSProfileLinuxConfiguration
- type OSProfileWindowsConfiguration
- type PatchModeTypes
- type PatchSettings
- type ServiceStatus
- type ServiceStatuses
- type StatusLevelTypes
- type StatusTypes
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PossibleValuesForAgentConfigurationMode ¶
func PossibleValuesForAgentConfigurationMode() []string
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 ¶
ValidateMachineID checks that 'input' can be parsed as a Machine ID
Types ¶
type AgentConfiguration ¶
type AgentConfiguration struct { ConfigMode *AgentConfigurationMode `json:"configMode,omitempty"` 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 AgentConfigurationMode ¶
type AgentConfigurationMode string
const ( AgentConfigurationModeFull AgentConfigurationMode = "full" AgentConfigurationModeMonitor AgentConfigurationMode = "monitor" )
func (*AgentConfigurationMode) UnmarshalJSON ¶
func (s *AgentConfigurationMode) UnmarshalJSON(bytes []byte) error
type AssessmentModeTypes ¶
type AssessmentModeTypes string
const ( AssessmentModeTypesAutomaticByPlatform AssessmentModeTypes = "AutomaticByPlatform" AssessmentModeTypesImageDefault AssessmentModeTypes = "ImageDefault" )
func (*AssessmentModeTypes) UnmarshalJSON ¶
func (s *AssessmentModeTypes) UnmarshalJSON(bytes []byte) error
type CloudMetadata ¶
type CloudMetadata struct {
Provider *string `json:"provider,omitempty"`
}
type ConfigurationExtension ¶
type DeleteOperationResponse ¶
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 ¶
type GetOperationOptions struct {
Expand *InstanceViewTypes
}
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 InstanceViewTypes ¶
type InstanceViewTypes string
const (
InstanceViewTypesInstanceView InstanceViewTypes = "instanceView"
)
func (*InstanceViewTypes) UnmarshalJSON ¶
func (s *InstanceViewTypes) UnmarshalJSON(bytes []byte) error
type LocationData ¶
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"` Resources *[]MachineExtension `json:"resources,omitempty"` SystemData *systemdata.SystemData `json:"systemData,omitempty"` Tags *map[string]string `json:"tags,omitempty"` Type *string `json:"type,omitempty"` }
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 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 MachineId ¶
MachineId is a struct representing the Resource ID for a Machine
func NewMachineID ¶
NewMachineID returns a new MachineId struct
func ParseMachineID ¶
ParseMachineID parses 'input' into a MachineId
func ParseMachineIDInsensitively ¶
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) Segments ¶
func (id MachineId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Machine ID
type MachineOperationPredicate ¶
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 *resourcemanager.Client
}
func NewMachinesClientWithBaseURI ¶
func NewMachinesClientWithBaseURI(sdkApi sdkEnv.Api) (*MachinesClient, error)
func (MachinesClient) CreateOrUpdate ¶
func (c MachinesClient) CreateOrUpdate(ctx context.Context, id MachineId, input Machine) (result CreateOrUpdateOperationResponse, err error)
CreateOrUpdate ...
func (MachinesClient) Delete ¶
func (c MachinesClient) Delete(ctx context.Context, id MachineId) (result DeleteOperationResponse, err error)
Delete ...
func (MachinesClient) Get ¶
func (c MachinesClient) Get(ctx context.Context, id MachineId, options GetOperationOptions) (result GetOperationResponse, err error)
Get ...
func (MachinesClient) ListByResourceGroup ¶
func (c MachinesClient) ListByResourceGroup(ctx context.Context, id commonids.ResourceGroupId) (result ListByResourceGroupOperationResponse, err error)
ListByResourceGroup ...
func (MachinesClient) ListByResourceGroupComplete ¶
func (c MachinesClient) ListByResourceGroupComplete(ctx context.Context, id commonids.ResourceGroupId) (ListByResourceGroupCompleteResult, error)
ListByResourceGroupComplete retrieves all the results into a single object
func (MachinesClient) ListByResourceGroupCompleteMatchingPredicate ¶
func (c MachinesClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.ResourceGroupId, predicate MachineOperationPredicate) (result ListByResourceGroupCompleteResult, err error)
ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (MachinesClient) ListBySubscription ¶
func (c MachinesClient) ListBySubscription(ctx context.Context, id commonids.SubscriptionId) (result ListBySubscriptionOperationResponse, err error)
ListBySubscription ...
func (MachinesClient) ListBySubscriptionComplete ¶
func (c MachinesClient) ListBySubscriptionComplete(ctx context.Context, id commonids.SubscriptionId) (ListBySubscriptionCompleteResult, error)
ListBySubscriptionComplete retrieves all the results into a single object
func (MachinesClient) ListBySubscriptionCompleteMatchingPredicate ¶
func (c MachinesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id commonids.SubscriptionId, predicate MachineOperationPredicate) (result ListBySubscriptionCompleteResult, err error)
ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate
func (MachinesClient) Update ¶
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" )
func (*PatchModeTypes) UnmarshalJSON ¶
func (s *PatchModeTypes) UnmarshalJSON(bytes []byte) error
type PatchSettings ¶
type PatchSettings struct { AssessmentMode *AssessmentModeTypes `json:"assessmentMode,omitempty"` PatchMode *PatchModeTypes `json:"patchMode,omitempty"` }
type ServiceStatus ¶
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" )
func (*StatusLevelTypes) UnmarshalJSON ¶
func (s *StatusLevelTypes) UnmarshalJSON(bytes []byte) error
type StatusTypes ¶
type StatusTypes string
const ( StatusTypesConnected StatusTypes = "Connected" StatusTypesDisconnected StatusTypes = "Disconnected" StatusTypesError StatusTypes = "Error" )
func (*StatusTypes) UnmarshalJSON ¶
func (s *StatusTypes) UnmarshalJSON(bytes []byte) error
Source Files ¶
- client.go
- constants.go
- id_machine.go
- method_createorupdate.go
- method_delete.go
- method_get.go
- method_listbyresourcegroup.go
- method_listbysubscription.go
- method_update.go
- model_agentconfiguration.go
- model_cloudmetadata.go
- model_configurationextension.go
- model_erroradditionalinfo.go
- model_errordetail.go
- model_locationdata.go
- model_machine.go
- model_machineextension.go
- model_machineextensioninstanceview.go
- model_machineextensioninstanceviewstatus.go
- model_machineextensionproperties.go
- model_machineproperties.go
- model_machineupdate.go
- model_machineupdateproperties.go
- model_osprofile.go
- model_osprofilelinuxconfiguration.go
- model_osprofilewindowsconfiguration.go
- model_patchsettings.go
- model_servicestatus.go
- model_servicestatuses.go
- predicates.go
- version.go