armhybridcompute

package module
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 14 Imported by: 0

README

Azure Hybrid Compute Module for Go

PkgGoDev

The armhybridcompute module provides operations for working with Azure Hybrid Compute.

Source code

Getting started

Prerequisites

  • an Azure subscription
  • Go 1.18 or above (You could download and install the latest version of Go from here. It will replace the existing Go on your machine. If you want to install multiple Go versions on the same machine, you could refer this doc.)

Install the package

This project uses Go modules for versioning and dependency management.

Install the Azure Hybrid Compute module:

go get github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute/v2

Authorization

When creating a client, you will need to provide a credential for authenticating with Azure Hybrid Compute. The azidentity module provides facilities for various ways of authenticating with Azure including client/secret, certificate, managed identity, and more.

cred, err := azidentity.NewDefaultAzureCredential(nil)

For more information on authentication, please see the documentation for azidentity at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity.

Client Factory

Azure Hybrid Compute module consists of one or more clients. We provide a client factory which could be used to create any client in this module.

clientFactory, err := armhybridcompute.NewClientFactory(<subscription ID>, cred, nil)

You can use ClientOptions in package github.com/Azure/azure-sdk-for-go/sdk/azcore/arm to set endpoint to connect with public and sovereign clouds as well as Azure Stack. For more information, please see the documentation for azcore at pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azcore.

options := arm.ClientOptions {
    ClientOptions: azcore.ClientOptions {
        Cloud: cloud.AzureChina,
    },
}
clientFactory, err := armhybridcompute.NewClientFactory(<subscription ID>, cred, &options)

Clients

A client groups a set of related APIs, providing access to its functionality. Create one or more clients to access the APIs you require using client factory.

client := clientFactory.NewExtensionMetadataClient()

Fakes

The fake package contains types used for constructing in-memory fake servers used in unit tests. This allows writing tests to cover various success/error conditions without the need for connecting to a live service.

Please see https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/samples/fakes for details and examples on how to use fakes.

Provide Feedback

If you encounter bugs or have suggestions, please open an issue and assign the Hybrid Compute label.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfiguration

type AgentConfiguration struct {
	// READ-ONLY; Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension allowlists
	// and guest configuration, maintained by Microsoft.
	ConfigMode *AgentConfigurationMode

	// READ-ONLY; Array of extensions that are allowed to be installed or updated.
	ExtensionsAllowList []*ConfigurationExtension

	// READ-ONLY; Array of extensions that are blocked (cannot be installed or updated)
	ExtensionsBlockList []*ConfigurationExtension

	// READ-ONLY; Specifies whether the extension service is enabled or disabled.
	ExtensionsEnabled *string

	// READ-ONLY; Specified whether the guest configuration service is enabled or disabled.
	GuestConfigurationEnabled *string

	// READ-ONLY; Specifies the list of ports that the agent will be able to listen on.
	IncomingConnectionsPorts []*string

	// READ-ONLY; List of service names which should not use the specified proxy server.
	ProxyBypass []*string

	// READ-ONLY; Specifies the URL of the proxy to be used.
	ProxyURL *string
}

AgentConfiguration - Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM.

func (AgentConfiguration) MarshalJSON

func (a AgentConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AgentConfiguration.

func (*AgentConfiguration) UnmarshalJSON

func (a *AgentConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AgentConfiguration.

type AgentConfigurationMode

type AgentConfigurationMode string

AgentConfigurationMode - Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension allowlists and guest configuration, maintained by Microsoft.

const (
	AgentConfigurationModeFull    AgentConfigurationMode = "full"
	AgentConfigurationModeMonitor AgentConfigurationMode = "monitor"
)

func PossibleAgentConfigurationModeValues

func PossibleAgentConfigurationModeValues() []AgentConfigurationMode

PossibleAgentConfigurationModeValues returns the possible values for the AgentConfigurationMode const type.

type AgentUpgrade

type AgentUpgrade struct {
	// The correlation ID passed in from RSM per upgrade.
	CorrelationID *string

	// Specifies the version info w.r.t AgentUpgrade for the machine.
	DesiredVersion *string

	// Specifies if RSM should try to upgrade this machine
	EnableAutomaticUpgrade *bool

	// READ-ONLY; Specifies the version of the last attempt
	LastAttemptDesiredVersion *string

	// READ-ONLY; Failure message of last upgrade attempt if any.
	LastAttemptMessage *string

	// READ-ONLY; Specifies the status of Agent Upgrade.
	LastAttemptStatus *LastAttemptStatusEnum

	// READ-ONLY; Timestamp of last upgrade attempt
	LastAttemptTimestamp *time.Time
}

AgentUpgrade - The info w.r.t Agent Upgrade.

func (AgentUpgrade) MarshalJSON

func (a AgentUpgrade) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AgentUpgrade.

func (*AgentUpgrade) UnmarshalJSON

func (a *AgentUpgrade) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AgentUpgrade.

type ArcKindEnum

type ArcKindEnum string

ArcKindEnum - Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.

const (
	ArcKindEnumAVS    ArcKindEnum = "AVS"
	ArcKindEnumAWS    ArcKindEnum = "AWS"
	ArcKindEnumEPS    ArcKindEnum = "EPS"
	ArcKindEnumGCP    ArcKindEnum = "GCP"
	ArcKindEnumHCI    ArcKindEnum = "HCI"
	ArcKindEnumSCVMM  ArcKindEnum = "SCVMM"
	ArcKindEnumVMware ArcKindEnum = "VMware"
)

func PossibleArcKindEnumValues

func PossibleArcKindEnumValues() []ArcKindEnum

PossibleArcKindEnumValues returns the possible values for the ArcKindEnum const type.

type AssessmentModeTypes

type AssessmentModeTypes string

AssessmentModeTypes - Specifies the assessment mode.

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

func PossibleAssessmentModeTypesValues

func PossibleAssessmentModeTypesValues() []AssessmentModeTypes

PossibleAssessmentModeTypesValues returns the possible values for the AssessmentModeTypes const type.

type AvailablePatchCountByClassification

type AvailablePatchCountByClassification struct {
	// READ-ONLY; Number of critical patches available for installation.
	Critical *int32

	// READ-ONLY; Number of definition patches available for installation.
	Definition *int32

	// READ-ONLY; Number of feature pack patches available for installation.
	FeaturePack *int32

	// READ-ONLY; Number of other patches available for installation.
	Other *int32

	// READ-ONLY; Number of security patches available for installation.
	Security *int32

	// READ-ONLY; Number of service pack patches available for installation.
	ServicePack *int32

	// READ-ONLY; Number of tools patches available for installation.
	Tools *int32

	// READ-ONLY; Number of update Rollup patches available for installation.
	UpdateRollup *int32

	// READ-ONLY; Number of updates category patches available for installation.
	Updates *int32
}

AvailablePatchCountByClassification - Summarization of patches available for installation on the machine by classification.

func (AvailablePatchCountByClassification) MarshalJSON

func (a AvailablePatchCountByClassification) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type AvailablePatchCountByClassification.

func (*AvailablePatchCountByClassification) UnmarshalJSON

func (a *AvailablePatchCountByClassification) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type AvailablePatchCountByClassification.

type ClientFactory

type ClientFactory struct {
	// contains filtered or unexported fields
}

ClientFactory is a client factory used to create any client in this module. Don't use this type directly, use NewClientFactory instead.

func NewClientFactory

func NewClientFactory(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ClientFactory, error)

NewClientFactory creates a new instance of ClientFactory with the specified values. The parameter values will be propagated to any client created from this factory.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ClientFactory) NewExtensionMetadataClient

func (c *ClientFactory) NewExtensionMetadataClient() *ExtensionMetadataClient

NewExtensionMetadataClient creates a new instance of ExtensionMetadataClient.

func (*ClientFactory) NewMachineExtensionsClient

func (c *ClientFactory) NewMachineExtensionsClient() *MachineExtensionsClient

NewMachineExtensionsClient creates a new instance of MachineExtensionsClient.

func (*ClientFactory) NewMachineRunCommandsClient

func (c *ClientFactory) NewMachineRunCommandsClient() *MachineRunCommandsClient

NewMachineRunCommandsClient creates a new instance of MachineRunCommandsClient.

func (*ClientFactory) NewMachinesClient

func (c *ClientFactory) NewMachinesClient() *MachinesClient

NewMachinesClient creates a new instance of MachinesClient.

func (*ClientFactory) NewManagementClient

func (c *ClientFactory) NewManagementClient() *ManagementClient

NewManagementClient creates a new instance of ManagementClient.

func (*ClientFactory) NewNetworkProfileClient

func (c *ClientFactory) NewNetworkProfileClient() *NetworkProfileClient

NewNetworkProfileClient creates a new instance of NetworkProfileClient.

func (*ClientFactory) NewOperationsClient

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewPrivateLinkScopesClient

func (c *ClientFactory) NewPrivateLinkScopesClient() *PrivateLinkScopesClient

NewPrivateLinkScopesClient creates a new instance of PrivateLinkScopesClient.

type CloudMetadata

type CloudMetadata struct {
	// READ-ONLY; Specifies the cloud provider (Azure/AWS/GCP…).
	Provider *string
}

CloudMetadata - The metadata of the cloud environment (Azure/GCP/AWS/OCI…).

func (CloudMetadata) MarshalJSON

func (c CloudMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type CloudMetadata.

func (*CloudMetadata) UnmarshalJSON

func (c *CloudMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type CloudMetadata.

type ConfigurationExtension

type ConfigurationExtension struct {
	// READ-ONLY; Publisher of the extension.
	Publisher *string

	// READ-ONLY; Type of the extension.
	Type *string
}

ConfigurationExtension - Describes properties that can identify extensions.

func (ConfigurationExtension) MarshalJSON

func (c ConfigurationExtension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConfigurationExtension.

func (*ConfigurationExtension) UnmarshalJSON

func (c *ConfigurationExtension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConfigurationExtension.

type ConnectionDetail

type ConnectionDetail struct {
	// READ-ONLY; The private endpoint connection group id
	GroupID *string

	// READ-ONLY; Azure resource Id
	ID *string

	// READ-ONLY; The private endpoint connection link identifier
	LinkIdentifier *string

	// READ-ONLY; The private endpoint connection member name
	MemberName *string

	// READ-ONLY; The private endpoint connection private ip address
	PrivateIPAddress *string
}

func (ConnectionDetail) MarshalJSON

func (c ConnectionDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ConnectionDetail.

func (*ConnectionDetail) UnmarshalJSON

func (c *ConnectionDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ConnectionDetail.

type CreatedByType

type CreatedByType string

CreatedByType - The type of identity that created the resource.

const (
	CreatedByTypeApplication     CreatedByType = "Application"
	CreatedByTypeKey             CreatedByType = "Key"
	CreatedByTypeManagedIdentity CreatedByType = "ManagedIdentity"
	CreatedByTypeUser            CreatedByType = "User"
)

func PossibleCreatedByTypeValues

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns the possible values for the CreatedByType const type.

type ErrorAdditionalInfo

type ErrorAdditionalInfo struct {
	// READ-ONLY; The additional info.
	Info any

	// READ-ONLY; The additional info type.
	Type *string
}

ErrorAdditionalInfo - The resource management error additional info.

func (ErrorAdditionalInfo) MarshalJSON

func (e ErrorAdditionalInfo) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON

func (e *ErrorAdditionalInfo) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorAdditionalInfo.

type ErrorDetail

type ErrorDetail struct {
	// READ-ONLY; The error additional info.
	AdditionalInfo []*ErrorAdditionalInfo

	// READ-ONLY; The error code.
	Code *string

	// READ-ONLY; The error details.
	Details []*ErrorDetail

	// READ-ONLY; The error message.
	Message *string

	// READ-ONLY; The error target.
	Target *string
}

ErrorDetail - The error detail.

func (ErrorDetail) MarshalJSON

func (e ErrorDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ErrorDetail.

func (*ErrorDetail) UnmarshalJSON

func (e *ErrorDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type EsuEligibility

type EsuEligibility string

EsuEligibility - The ESU eligibility.

const (
	EsuEligibilityEligible   EsuEligibility = "Eligible"
	EsuEligibilityIneligible EsuEligibility = "Ineligible"
	EsuEligibilityUnknown    EsuEligibility = "Unknown"
)

func PossibleEsuEligibilityValues

func PossibleEsuEligibilityValues() []EsuEligibility

PossibleEsuEligibilityValues returns the possible values for the EsuEligibility const type.

type EsuKey

type EsuKey struct {
	// The current status of the license profile key.
	LicenseStatus *string

	// SKU number.
	SKU *string
}

EsuKey - ESU key

func (EsuKey) MarshalJSON

func (e EsuKey) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type EsuKey.

func (*EsuKey) UnmarshalJSON

func (e *EsuKey) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type EsuKey.

type EsuKeyState

type EsuKeyState string

EsuKeyState - The ESU key state.

const (
	EsuKeyStateActive   EsuKeyState = "Active"
	EsuKeyStateInactive EsuKeyState = "Inactive"
)

func PossibleEsuKeyStateValues

func PossibleEsuKeyStateValues() []EsuKeyState

PossibleEsuKeyStateValues returns the possible values for the EsuKeyState const type.

type EsuServerType

type EsuServerType string

EsuServerType - The server types for Esu.

const (
	EsuServerTypeDatacenter EsuServerType = "Datacenter"
	EsuServerTypeStandard   EsuServerType = "Standard"
)

func PossibleEsuServerTypeValues

func PossibleEsuServerTypeValues() []EsuServerType

PossibleEsuServerTypeValues returns the possible values for the EsuServerType const type.

type ExecutionState

type ExecutionState string

ExecutionState - Script execution status.

const (
	ExecutionStateCanceled  ExecutionState = "Canceled"
	ExecutionStateFailed    ExecutionState = "Failed"
	ExecutionStatePending   ExecutionState = "Pending"
	ExecutionStateRunning   ExecutionState = "Running"
	ExecutionStateSucceeded ExecutionState = "Succeeded"
	ExecutionStateTimedOut  ExecutionState = "TimedOut"
	ExecutionStateUnknown   ExecutionState = "Unknown"
)

func PossibleExecutionStateValues

func PossibleExecutionStateValues() []ExecutionState

PossibleExecutionStateValues returns the possible values for the ExecutionState const type.

type ExtensionMetadataClient

type ExtensionMetadataClient struct {
	// contains filtered or unexported fields
}

ExtensionMetadataClient contains the methods for the ExtensionMetadata group. Don't use this type directly, use NewExtensionMetadataClient() instead.

func NewExtensionMetadataClient

func NewExtensionMetadataClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ExtensionMetadataClient, error)

NewExtensionMetadataClient creates a new instance of ExtensionMetadataClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ExtensionMetadataClient) Get

func (client *ExtensionMetadataClient) Get(ctx context.Context, location string, publisher string, extensionType string, version string, options *ExtensionMetadataClientGetOptions) (ExtensionMetadataClientGetResponse, error)

Get - Gets an Extension Metadata based on location, publisher, extensionType and version If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • location - The location of the Extension being received.
  • publisher - The publisher of the Extension being received.
  • extensionType - The extensionType of the Extension being received.
  • version - The version of the Extension being received.
  • options - ExtensionMetadataClientGetOptions contains the optional parameters for the ExtensionMetadataClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/ExtensionMetadata_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewExtensionMetadataClient().Get(ctx, "EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", "1.9.1", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ExtensionValue = armhybridcompute.ExtensionValue{
// 	ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Providers/Microsoft.HybridCompute/locations/eastus/publishers/microsoft.azure.monitor/extensionTypes/azuremonitorlinuxagent/versions/1.9.1"),
// 	Properties: &armhybridcompute.ExtensionValueProperties{
// 		ExtensionType: to.Ptr("azuremonitorlinuxagent"),
// 		Publisher: to.Ptr("microsoft.azure.monitor"),
// 		Version: to.Ptr("1.9.1"),
// 	},
// }
Output:

func (*ExtensionMetadataClient) NewListPager

func (client *ExtensionMetadataClient) NewListPager(location string, publisher string, extensionType string, options *ExtensionMetadataClientListOptions) *runtime.Pager[ExtensionMetadataClientListResponse]

NewListPager - Gets all Extension versions based on location, publisher, extensionType

Generated from API version 2023-10-03-preview

  • location - The location of the Extension being received.
  • publisher - The publisher of the Extension being received.
  • extensionType - The extensionType of the Extension being received.
  • options - ExtensionMetadataClientListOptions contains the optional parameters for the ExtensionMetadataClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/ExtensionMetadata_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewExtensionMetadataClient().NewListPager("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.ExtensionValueListResult = armhybridcompute.ExtensionValueListResult{
	// 	Value: []*armhybridcompute.ExtensionValue{
	// 		{
	// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Providers/Microsoft.HybridCompute/locations/eastus/publishers/microsoft.azure.monitor/extensionTypes/azuremonitorlinuxagent/versions/1.9.1"),
	// 			Properties: &armhybridcompute.ExtensionValueProperties{
	// 				ExtensionType: to.Ptr("azuremonitorlinuxagent"),
	// 				Publisher: to.Ptr("microsoft.azure.monitor"),
	// 				Version: to.Ptr("1.9.1"),
	// 			},
	// 		},
	// 		{
	// 			ID: to.Ptr("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/Providers/Microsoft.HybridCompute/locations/eastus/publishers/microsoft.azure.monitor/extensionTypes/azuremonitorlinuxagent/versions/1.9.2"),
	// 			Properties: &armhybridcompute.ExtensionValueProperties{
	// 				ExtensionType: to.Ptr("azuremonitorlinuxagent"),
	// 				Publisher: to.Ptr("microsoft.azure.monitor"),
	// 				Version: to.Ptr("1.9.2"),
	// 			},
	// 	}},
	// }
}
Output:

type ExtensionMetadataClientGetOptions

type ExtensionMetadataClientGetOptions struct {
}

ExtensionMetadataClientGetOptions contains the optional parameters for the ExtensionMetadataClient.Get method.

type ExtensionMetadataClientGetResponse

type ExtensionMetadataClientGetResponse struct {
	// Describes a Extension Metadata
	ExtensionValue
}

ExtensionMetadataClientGetResponse contains the response from method ExtensionMetadataClient.Get.

type ExtensionMetadataClientListOptions

type ExtensionMetadataClientListOptions struct {
}

ExtensionMetadataClientListOptions contains the optional parameters for the ExtensionMetadataClient.NewListPager method.

type ExtensionMetadataClientListResponse

type ExtensionMetadataClientListResponse struct {
	// The List Extension Metadata response.
	ExtensionValueListResult
}

ExtensionMetadataClientListResponse contains the response from method ExtensionMetadataClient.NewListPager.

type ExtensionTargetProperties

type ExtensionTargetProperties struct {
	// Properties for the specified Extension to Upgrade.
	TargetVersion *string
}

ExtensionTargetProperties - Describes the Machine Extension Target Version Properties

func (ExtensionTargetProperties) MarshalJSON

func (e ExtensionTargetProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExtensionTargetProperties.

func (*ExtensionTargetProperties) UnmarshalJSON

func (e *ExtensionTargetProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionTargetProperties.

type ExtensionValue

type ExtensionValue struct {
	// The single extension based on search criteria
	Properties *ExtensionValueProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ExtensionValue - Describes a Extension Metadata

func (ExtensionValue) MarshalJSON

func (e ExtensionValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExtensionValue.

func (*ExtensionValue) UnmarshalJSON

func (e *ExtensionValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionValue.

type ExtensionValueListResult

type ExtensionValueListResult struct {
	// READ-ONLY; The list of extension metadata
	Value []*ExtensionValue
}

ExtensionValueListResult - The List Extension Metadata response.

func (ExtensionValueListResult) MarshalJSON

func (e ExtensionValueListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExtensionValueListResult.

func (*ExtensionValueListResult) UnmarshalJSON

func (e *ExtensionValueListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionValueListResult.

type ExtensionValueProperties

type ExtensionValueProperties struct {
	// READ-ONLY; The type of the Extension being received.
	ExtensionType *string

	// READ-ONLY; The publisher of the Extension being received.
	Publisher *string

	// READ-ONLY; The version of the Extension being received.
	Version *string
}

ExtensionValueProperties - Describes Extension Metadata properties

func (ExtensionValueProperties) MarshalJSON

func (e ExtensionValueProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExtensionValueProperties.

func (*ExtensionValueProperties) UnmarshalJSON

func (e *ExtensionValueProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionValueProperties.

type ExtensionsResourceStatus

type ExtensionsResourceStatus struct {
	// The status code.
	Code *string

	// The short localizable label for the status.
	DisplayStatus *string

	// The level code.
	Level *ExtensionsStatusLevelTypes

	// The detailed status message, including for alerts and error messages.
	Message *string

	// The time of the status.
	Time *time.Time
}

ExtensionsResourceStatus - Instance view status.

func (ExtensionsResourceStatus) MarshalJSON

func (e ExtensionsResourceStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ExtensionsResourceStatus.

func (*ExtensionsResourceStatus) UnmarshalJSON

func (e *ExtensionsResourceStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionsResourceStatus.

type ExtensionsStatusLevelTypes

type ExtensionsStatusLevelTypes string

ExtensionsStatusLevelTypes - The level code.

const (
	ExtensionsStatusLevelTypesError   ExtensionsStatusLevelTypes = "Error"
	ExtensionsStatusLevelTypesInfo    ExtensionsStatusLevelTypes = "Info"
	ExtensionsStatusLevelTypesWarning ExtensionsStatusLevelTypes = "Warning"
)

func PossibleExtensionsStatusLevelTypesValues

func PossibleExtensionsStatusLevelTypesValues() []ExtensionsStatusLevelTypes

PossibleExtensionsStatusLevelTypesValues returns the possible values for the ExtensionsStatusLevelTypes const type.

type IPAddress

type IPAddress struct {
	// Represents the IP Address.
	Address *string

	// Represents the Ip Address Version.
	IPAddressVersion *string

	// READ-ONLY; The subnet to which this IP address belongs.
	Subnet *Subnet
}

IPAddress - Describes properties of the IP address.

func (IPAddress) MarshalJSON

func (i IPAddress) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type IPAddress.

func (*IPAddress) UnmarshalJSON

func (i *IPAddress) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type IPAddress.

type Identity

type Identity struct {
	// The identity type.
	Type *string

	// READ-ONLY; The principal ID of resource identity.
	PrincipalID *string

	// READ-ONLY; The tenant ID of resource.
	TenantID *string
}

Identity for the resource.

func (Identity) MarshalJSON

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON

func (i *Identity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type LastAttemptStatusEnum

type LastAttemptStatusEnum string

LastAttemptStatusEnum - Specifies the status of Agent Upgrade.

const (
	LastAttemptStatusEnumFailed  LastAttemptStatusEnum = "Failed"
	LastAttemptStatusEnumSuccess LastAttemptStatusEnum = "Success"
)

func PossibleLastAttemptStatusEnumValues

func PossibleLastAttemptStatusEnumValues() []LastAttemptStatusEnum

PossibleLastAttemptStatusEnumValues returns the possible values for the LastAttemptStatusEnum const type.

type License

type License struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Hybrid Compute License properties
	Properties *LicenseProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

License - Describes a license in a hybrid machine.

func (License) MarshalJSON

func (l License) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type License.

func (*License) UnmarshalJSON

func (l *License) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type License.

type LicenseAssignmentState

type LicenseAssignmentState string

LicenseAssignmentState - Describes the license assignment state (Assigned or NotAssigned).

const (
	LicenseAssignmentStateAssigned    LicenseAssignmentState = "Assigned"
	LicenseAssignmentStateNotAssigned LicenseAssignmentState = "NotAssigned"
)

func PossibleLicenseAssignmentStateValues

func PossibleLicenseAssignmentStateValues() []LicenseAssignmentState

PossibleLicenseAssignmentStateValues returns the possible values for the LicenseAssignmentState const type.

type LicenseCoreType

type LicenseCoreType string

LicenseCoreType - Describes the license core type (pCore or vCore).

const (
	LicenseCoreTypePCore LicenseCoreType = "pCore"
	LicenseCoreTypeVCore LicenseCoreType = "vCore"
)

func PossibleLicenseCoreTypeValues

func PossibleLicenseCoreTypeValues() []LicenseCoreType

PossibleLicenseCoreTypeValues returns the possible values for the LicenseCoreType const type.

type LicenseDetails

type LicenseDetails struct {
	// Describes the edition of the license. The values are either Standard or Datacenter.
	Edition *LicenseEdition

	// Describes the number of processors.
	Processors *int32

	// Describes the state of the license.
	State *LicenseState

	// Describes the license target server.
	Target *LicenseTarget

	// Describes the license core type (pCore or vCore).
	Type *LicenseCoreType

	// READ-ONLY; Describes the number of assigned licenses.
	AssignedLicenses *int32

	// READ-ONLY; Describes the immutable id.
	ImmutableID *string
}

LicenseDetails - Describes the properties of a License.

func (LicenseDetails) MarshalJSON

func (l LicenseDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LicenseDetails.

func (*LicenseDetails) UnmarshalJSON

func (l *LicenseDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LicenseDetails.

type LicenseEdition

type LicenseEdition string

LicenseEdition - Describes the edition of the license. The values are either Standard or Datacenter.

const (
	LicenseEditionDatacenter LicenseEdition = "Datacenter"
	LicenseEditionStandard   LicenseEdition = "Standard"
)

func PossibleLicenseEditionValues

func PossibleLicenseEditionValues() []LicenseEdition

PossibleLicenseEditionValues returns the possible values for the LicenseEdition const type.

type LicenseProfileArmProductProfileProperties

type LicenseProfileArmProductProfileProperties struct {
	// The list of product features.
	ProductFeatures []*ProductFeature

	// Indicates the product type of the license.
	ProductType *LicenseProfileProductType

	// Indicates the subscription status of the product.
	SubscriptionStatus *LicenseProfileSubscriptionStatus

	// READ-ONLY; The timestamp in UTC when the billing starts.
	BillingStartDate *time.Time

	// READ-ONLY; The timestamp in UTC when the user disenrolled the feature.
	DisenrollmentDate *time.Time

	// READ-ONLY; The timestamp in UTC when the user enrolls the feature.
	EnrollmentDate *time.Time
}

LicenseProfileArmProductProfileProperties - Describes the properties of a Product License Profile ARM model.

func (LicenseProfileArmProductProfileProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type LicenseProfileArmProductProfileProperties.

func (*LicenseProfileArmProductProfileProperties) UnmarshalJSON

func (l *LicenseProfileArmProductProfileProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LicenseProfileArmProductProfileProperties.

type LicenseProfileMachineInstanceView

type LicenseProfileMachineInstanceView struct {
	// Properties for the Machine ESU profile.
	EsuProfile *LicenseProfileMachineInstanceViewEsuProperties

	// READ-ONLY; Indicates the license channel.
	LicenseChannel *string

	// READ-ONLY; Indicates the license status of the OS.
	LicenseStatus *LicenseStatus

	// READ-ONLY; Hybrid Compute Product Profile properties
	ProductProfile *LicenseProfileArmProductProfileProperties

	// READ-ONLY
	SoftwareAssurance *LicenseProfileMachineInstanceViewSoftwareAssurance
}

LicenseProfileMachineInstanceView - License Profile Instance View in Machine Properties.

func (LicenseProfileMachineInstanceView) MarshalJSON

func (l LicenseProfileMachineInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LicenseProfileMachineInstanceView.

func (*LicenseProfileMachineInstanceView) UnmarshalJSON

func (l *LicenseProfileMachineInstanceView) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LicenseProfileMachineInstanceView.

type LicenseProfileMachineInstanceViewEsuProperties

type LicenseProfileMachineInstanceViewEsuProperties struct {
	// The assigned license resource.
	AssignedLicense *License

	// Describes the license assignment state (Assigned or NotAssigned).
	LicenseAssignmentState *LicenseAssignmentState

	// READ-ONLY; The guid id of the license.
	AssignedLicenseImmutableID *string

	// READ-ONLY; Indicates the eligibility state of Esu.
	EsuEligibility *EsuEligibility

	// READ-ONLY; Indicates whether there is an ESU Key currently active for the machine.
	EsuKeyState *EsuKeyState

	// READ-ONLY; The list of ESU keys.
	EsuKeys []*EsuKey

	// READ-ONLY; The type of the Esu servers.
	ServerType *EsuServerType
}

LicenseProfileMachineInstanceViewEsuProperties - Properties for the Machine ESU profile.

func (LicenseProfileMachineInstanceViewEsuProperties) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type LicenseProfileMachineInstanceViewEsuProperties.

func (*LicenseProfileMachineInstanceViewEsuProperties) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type LicenseProfileMachineInstanceViewEsuProperties.

type LicenseProfileMachineInstanceViewSoftwareAssurance

type LicenseProfileMachineInstanceViewSoftwareAssurance struct {
	// Specifies if this machine is licensed as part of a Software Assurance agreement.
	SoftwareAssuranceCustomer *bool
}

func (LicenseProfileMachineInstanceViewSoftwareAssurance) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type LicenseProfileMachineInstanceViewSoftwareAssurance.

func (*LicenseProfileMachineInstanceViewSoftwareAssurance) UnmarshalJSON

UnmarshalJSON implements the json.Unmarshaller interface for type LicenseProfileMachineInstanceViewSoftwareAssurance.

type LicenseProfileProductType

type LicenseProfileProductType string

LicenseProfileProductType - The product type of the license.

const (
	LicenseProfileProductTypeWindowsIoTEnterprise LicenseProfileProductType = "WindowsIoTEnterprise"
	LicenseProfileProductTypeWindowsServer        LicenseProfileProductType = "WindowsServer"
)

func PossibleLicenseProfileProductTypeValues

func PossibleLicenseProfileProductTypeValues() []LicenseProfileProductType

PossibleLicenseProfileProductTypeValues returns the possible values for the LicenseProfileProductType const type.

type LicenseProfileSubscriptionStatus

type LicenseProfileSubscriptionStatus string

LicenseProfileSubscriptionStatus - Subscription status of the OS or Product feature.

const (
	LicenseProfileSubscriptionStatusDisabled LicenseProfileSubscriptionStatus = "Disabled"
	LicenseProfileSubscriptionStatusEnabled  LicenseProfileSubscriptionStatus = "Enabled"
	LicenseProfileSubscriptionStatusEnabling LicenseProfileSubscriptionStatus = "Enabling"
	LicenseProfileSubscriptionStatusUnknown  LicenseProfileSubscriptionStatus = "Unknown"
)

func PossibleLicenseProfileSubscriptionStatusValues

func PossibleLicenseProfileSubscriptionStatusValues() []LicenseProfileSubscriptionStatus

PossibleLicenseProfileSubscriptionStatusValues returns the possible values for the LicenseProfileSubscriptionStatus const type.

type LicenseProperties

type LicenseProperties struct {
	// Describes the properties of a License.
	LicenseDetails *LicenseDetails

	// The type of the license resource.
	LicenseType *LicenseType

	// Describes the tenant id.
	TenantID *string

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *ProvisioningState
}

LicenseProperties - Describes the properties of a License Profile.

func (LicenseProperties) MarshalJSON

func (l LicenseProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LicenseProperties.

func (*LicenseProperties) UnmarshalJSON

func (l *LicenseProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LicenseProperties.

type LicenseState

type LicenseState string

LicenseState - Describes the state of the license.

const (
	LicenseStateActivated   LicenseState = "Activated"
	LicenseStateDeactivated LicenseState = "Deactivated"
)

func PossibleLicenseStateValues

func PossibleLicenseStateValues() []LicenseState

PossibleLicenseStateValues returns the possible values for the LicenseState const type.

type LicenseStatus

type LicenseStatus string

LicenseStatus - The license status.

const (
	LicenseStatusExtendedGrace   LicenseStatus = "ExtendedGrace"
	LicenseStatusLicensed        LicenseStatus = "Licensed"
	LicenseStatusNonGenuineGrace LicenseStatus = "NonGenuineGrace"
	LicenseStatusNotification    LicenseStatus = "Notification"
	LicenseStatusOOBGrace        LicenseStatus = "OOBGrace"
	LicenseStatusOOTGrace        LicenseStatus = "OOTGrace"
	LicenseStatusUnlicensed      LicenseStatus = "Unlicensed"
)

func PossibleLicenseStatusValues

func PossibleLicenseStatusValues() []LicenseStatus

PossibleLicenseStatusValues returns the possible values for the LicenseStatus const type.

type LicenseTarget

type LicenseTarget string

LicenseTarget - Describes the license target server.

const (
	LicenseTargetWindowsServer2012   LicenseTarget = "Windows Server 2012"
	LicenseTargetWindowsServer2012R2 LicenseTarget = "Windows Server 2012 R2"
)

func PossibleLicenseTargetValues

func PossibleLicenseTargetValues() []LicenseTarget

PossibleLicenseTargetValues returns the possible values for the LicenseTarget const type.

type LicenseType

type LicenseType string

LicenseType - The type of the license resource.

const (
	LicenseTypeESU LicenseType = "ESU"
)

func PossibleLicenseTypeValues

func PossibleLicenseTypeValues() []LicenseType

PossibleLicenseTypeValues returns the possible values for the LicenseType const type.

type LinuxParameters

type LinuxParameters struct {
	// The update classifications to select when installing patches for Linux.
	ClassificationsToInclude []*VMGuestPatchClassificationLinux

	// packages to exclude in the patch operation. Format: packageName_packageVersion
	PackageNameMasksToExclude []*string

	// packages to include in the patch operation. Format: packageName_packageVersion
	PackageNameMasksToInclude []*string
}

LinuxParameters - Input for InstallPatches on a Linux VM, as directly received by the API

func (LinuxParameters) MarshalJSON

func (l LinuxParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LinuxParameters.

func (*LinuxParameters) UnmarshalJSON

func (l *LinuxParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LinuxParameters.

type LocationData

type LocationData struct {
	// REQUIRED; A canonical name for the geographic or physical location.
	Name *string

	// The city or locality where the resource is located.
	City *string

	// The country or region where the resource is located
	CountryOrRegion *string

	// The district, state, or province where the resource is located.
	District *string
}

LocationData - Metadata pertaining to the geographic location of the resource.

func (LocationData) MarshalJSON

func (l LocationData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type LocationData.

func (*LocationData) UnmarshalJSON

func (l *LocationData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type LocationData.

type Machine

type Machine struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Identity for the resource.
	Identity *Identity

	// Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.
	Kind *ArcKindEnum

	// Hybrid Compute Machine properties
	Properties *MachineProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; The list of extensions affiliated to the machine
	Resources []*MachineExtension

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Machine - Describes a hybrid machine.

func (Machine) MarshalJSON

func (m Machine) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Machine.

func (*Machine) UnmarshalJSON

func (m *Machine) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Machine.

type MachineAssessPatchesResult

type MachineAssessPatchesResult struct {
	// Summarization of patches available for installation on the machine by classification.
	AvailablePatchCountByClassification *AvailablePatchCountByClassification

	// READ-ONLY; The activity ID of the operation that produced this result.
	AssessmentActivityID *string

	// READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
	ErrorDetails *ErrorDetail

	// READ-ONLY; The UTC timestamp when the operation finished.
	LastModifiedDateTime *time.Time

	// READ-ONLY; The operating system type of the machine.
	OSType *OsType

	// READ-ONLY; Specifies the patch service used for the operation.
	PatchServiceUsed *PatchServiceUsed

	// READ-ONLY; The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete
	// installation but the reboot has not yet occurred.
	RebootPending *bool

	// READ-ONLY; The UTC timestamp when the operation began.
	StartDateTime *time.Time

	// READ-ONLY; Indicates if operation was triggered by user or by platform.
	StartedBy *PatchOperationStartedBy

	// READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
	// At that point it will become "Unknown", "Failed", "Succeeded", or
	// "CompletedWithWarnings."
	Status *PatchOperationStatus
}

MachineAssessPatchesResult - Describes the properties of an AssessPatches result.

func (MachineAssessPatchesResult) MarshalJSON

func (m MachineAssessPatchesResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineAssessPatchesResult.

func (*MachineAssessPatchesResult) UnmarshalJSON

func (m *MachineAssessPatchesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineAssessPatchesResult.

type MachineExtension

type MachineExtension struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Describes Machine Extension Properties.
	Properties *MachineExtensionProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

MachineExtension - Describes a Machine Extension.

func (MachineExtension) MarshalJSON

func (m MachineExtension) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtension.

func (*MachineExtension) UnmarshalJSON

func (m *MachineExtension) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtension.

type MachineExtensionInstanceView

type MachineExtensionInstanceView struct {
	// The machine extension name.
	Name *string

	// Instance view status.
	Status *MachineExtensionInstanceViewStatus

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string

	// Specifies the version of the script handler.
	TypeHandlerVersion *string
}

MachineExtensionInstanceView - Describes the Machine Extension Instance View.

func (MachineExtensionInstanceView) MarshalJSON

func (m MachineExtensionInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtensionInstanceView.

func (*MachineExtensionInstanceView) UnmarshalJSON

func (m *MachineExtensionInstanceView) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionInstanceView.

type MachineExtensionInstanceViewStatus

type MachineExtensionInstanceViewStatus struct {
	// The status code.
	Code *string

	// The short localizable label for the status.
	DisplayStatus *string

	// The level code.
	Level *StatusLevelTypes

	// The detailed status message, including for alerts and error messages.
	Message *string

	// The time of the status.
	Time *time.Time
}

MachineExtensionInstanceViewStatus - Instance view status.

func (MachineExtensionInstanceViewStatus) MarshalJSON

func (m MachineExtensionInstanceViewStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtensionInstanceViewStatus.

func (*MachineExtensionInstanceViewStatus) UnmarshalJSON

func (m *MachineExtensionInstanceViewStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionInstanceViewStatus.

type MachineExtensionProperties

type MachineExtensionProperties struct {
	// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
	// however, the extension will not upgrade minor versions unless redeployed, even
	// with this property set to true.
	AutoUpgradeMinorVersion *bool

	// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.
	EnableAutomaticUpgrade *bool

	// How the extension handler should be forced to update even if the extension configuration has not changed.
	ForceUpdateTag *string

	// The machine extension instance view.
	InstanceView *MachineExtensionInstanceView

	// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
	ProtectedSettings map[string]any

	// The name of the extension handler publisher.
	Publisher *string

	// Json formatted public settings for the extension.
	Settings map[string]any

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string

	// Specifies the version of the script handler.
	TypeHandlerVersion *string

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string
}

MachineExtensionProperties - Describes the properties of a Machine Extension.

func (MachineExtensionProperties) MarshalJSON

func (m MachineExtensionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtensionProperties.

func (*MachineExtensionProperties) UnmarshalJSON

func (m *MachineExtensionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionProperties.

type MachineExtensionUpdate

type MachineExtensionUpdate struct {
	// Describes Machine Extension Update Properties.
	Properties *MachineExtensionUpdateProperties

	// Resource tags
	Tags map[string]*string
}

MachineExtensionUpdate - Describes a Machine Extension Update.

func (MachineExtensionUpdate) MarshalJSON

func (m MachineExtensionUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtensionUpdate.

func (*MachineExtensionUpdate) UnmarshalJSON

func (m *MachineExtensionUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionUpdate.

type MachineExtensionUpdateProperties

type MachineExtensionUpdateProperties struct {
	// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed,
	// however, the extension will not upgrade minor versions unless redeployed, even
	// with this property set to true.
	AutoUpgradeMinorVersion *bool

	// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available.
	EnableAutomaticUpgrade *bool

	// How the extension handler should be forced to update even if the extension configuration has not changed.
	ForceUpdateTag *string

	// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.
	ProtectedSettings map[string]any

	// The name of the extension handler publisher.
	Publisher *string

	// Json formatted public settings for the extension.
	Settings map[string]any

	// Specifies the type of the extension; an example is "CustomScriptExtension".
	Type *string

	// Specifies the version of the script handler.
	TypeHandlerVersion *string
}

MachineExtensionUpdateProperties - Describes the properties of a Machine Extension.

func (MachineExtensionUpdateProperties) MarshalJSON

func (m MachineExtensionUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtensionUpdateProperties.

func (*MachineExtensionUpdateProperties) UnmarshalJSON

func (m *MachineExtensionUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionUpdateProperties.

type MachineExtensionUpgrade

type MachineExtensionUpgrade struct {
	// Describes the Extension Target Properties.
	ExtensionTargets map[string]*ExtensionTargetProperties
}

MachineExtensionUpgrade - Describes the Machine Extension Upgrade Properties.

func (MachineExtensionUpgrade) MarshalJSON

func (m MachineExtensionUpgrade) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtensionUpgrade.

func (*MachineExtensionUpgrade) UnmarshalJSON

func (m *MachineExtensionUpgrade) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionUpgrade.

type MachineExtensionsClient

type MachineExtensionsClient struct {
	// contains filtered or unexported fields
}

MachineExtensionsClient contains the methods for the MachineExtensions group. Don't use this type directly, use NewMachineExtensionsClient() instead.

func NewMachineExtensionsClient

func NewMachineExtensionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MachineExtensionsClient, error)

NewMachineExtensionsClient creates a new instance of MachineExtensionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MachineExtensionsClient) BeginCreateOrUpdate

func (client *MachineExtensionsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, machineName string, extensionName string, extensionParameters MachineExtension, options *MachineExtensionsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MachineExtensionsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - The operation to create or update the extension. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the machine where the extension should be created or updated.
  • extensionName - The name of the machine extension.
  • extensionParameters - Parameters supplied to the Create Machine Extension operation.
  • options - MachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewMachineExtensionsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myMachine", "CustomScriptExtension", armhybridcompute.MachineExtension{
	Location: to.Ptr("eastus2euap"),
	Properties: &armhybridcompute.MachineExtensionProperties{
		Type:      to.Ptr("CustomScriptExtension"),
		Publisher: to.Ptr("Microsoft.Compute"),
		Settings: map[string]any{
			"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\"",
		},
		TypeHandlerVersion: to.Ptr("1.10"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MachineExtension = armhybridcompute.MachineExtension{
// 	Name: to.Ptr("CustomScriptExtension"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines/extensions"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/Extensions/CustomScriptExtension"),
// 	Location: to.Ptr("eastus2euap"),
// 	Properties: &armhybridcompute.MachineExtensionProperties{
// 		Type: to.Ptr("string"),
// 		AutoUpgradeMinorVersion: to.Ptr(false),
// 		InstanceView: &armhybridcompute.MachineExtensionInstanceView{
// 			Name: to.Ptr("CustomScriptExtension"),
// 			Type: to.Ptr("CustomScriptExtension"),
// 			Status: &armhybridcompute.MachineExtensionInstanceViewStatus{
// 				Code: to.Ptr("success"),
// 				Level: to.Ptr(armhybridcompute.StatusLevelTypes("Information")),
// 				Message: to.Ptr("Finished executing command, StdOut: , StdErr:"),
// 				Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-08T20:42:10.999Z"); return t}()),
// 			},
// 			TypeHandlerVersion: to.Ptr("1.10.3"),
// 		},
// 		ProtectedSettings: map[string]any{
// 		},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		Publisher: to.Ptr("Microsoft.Compute"),
// 		Settings: map[string]any{
// 			"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\"",
// 		},
// 		TypeHandlerVersion: to.Ptr("1.10.3"),
// 	},
// }
Output:

func (*MachineExtensionsClient) BeginDelete

func (client *MachineExtensionsClient) BeginDelete(ctx context.Context, resourceGroupName string, machineName string, extensionName string, options *MachineExtensionsClientBeginDeleteOptions) (*runtime.Poller[MachineExtensionsClientDeleteResponse], error)

BeginDelete - The operation to delete the extension. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the machine where the extension should be deleted.
  • extensionName - The name of the machine extension.
  • options - MachineExtensionsClientBeginDeleteOptions contains the optional parameters for the MachineExtensionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewMachineExtensionsClient().BeginDelete(ctx, "myResourceGroup", "myMachine", "MMA", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*MachineExtensionsClient) BeginUpdate

func (client *MachineExtensionsClient) BeginUpdate(ctx context.Context, resourceGroupName string, machineName string, extensionName string, extensionParameters MachineExtensionUpdate, options *MachineExtensionsClientBeginUpdateOptions) (*runtime.Poller[MachineExtensionsClientUpdateResponse], error)

BeginUpdate - The operation to create or update the extension. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the machine where the extension should be created or updated.
  • extensionName - The name of the machine extension.
  • extensionParameters - Parameters supplied to the Create Machine Extension operation.
  • options - MachineExtensionsClientBeginUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewMachineExtensionsClient().BeginUpdate(ctx, "myResourceGroup", "myMachine", "CustomScriptExtension", armhybridcompute.MachineExtensionUpdate{
	Properties: &armhybridcompute.MachineExtensionUpdateProperties{
		Type:                   to.Ptr("CustomScriptExtension"),
		EnableAutomaticUpgrade: to.Ptr(true),
		Publisher:              to.Ptr("Microsoft.Compute"),
		Settings: map[string]any{
			"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -lt 100 }\"",
		},
		TypeHandlerVersion: to.Ptr("1.10"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MachineExtension = armhybridcompute.MachineExtension{
// 	Name: to.Ptr("CustomScriptExtension"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines/extensions"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/Extensions/CustomScriptExtension"),
// 	Location: to.Ptr("eastus2euap"),
// 	Properties: &armhybridcompute.MachineExtensionProperties{
// 		Type: to.Ptr("string"),
// 		AutoUpgradeMinorVersion: to.Ptr(false),
// 		EnableAutomaticUpgrade: to.Ptr(true),
// 		InstanceView: &armhybridcompute.MachineExtensionInstanceView{
// 			Name: to.Ptr("CustomScriptExtension"),
// 			Type: to.Ptr("CustomScriptExtension"),
// 			Status: &armhybridcompute.MachineExtensionInstanceViewStatus{
// 				Code: to.Ptr("success"),
// 				Level: to.Ptr(armhybridcompute.StatusLevelTypes("Information")),
// 				Message: to.Ptr("Finished executing command, StdOut: , StdErr:"),
// 				Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-01-08T20:42:10.999Z"); return t}()),
// 			},
// 			TypeHandlerVersion: to.Ptr("1.10.3"),
// 		},
// 		ProtectedSettings: map[string]any{
// 		},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		Publisher: to.Ptr("Microsoft.Compute"),
// 		Settings: map[string]any{
// 			"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\"",
// 		},
// 		TypeHandlerVersion: to.Ptr("1.10.3"),
// 	},
// }
Output:

func (*MachineExtensionsClient) Get

func (client *MachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, machineName string, extensionName string, options *MachineExtensionsClientGetOptions) (MachineExtensionsClientGetResponse, error)

Get - The operation to get the extension. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the machine containing the extension.
  • extensionName - The name of the machine extension.
  • options - MachineExtensionsClientGetOptions contains the optional parameters for the MachineExtensionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMachineExtensionsClient().Get(ctx, "myResourceGroup", "myMachine", "CustomScriptExtension", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MachineExtension = armhybridcompute.MachineExtension{
// 	Name: to.Ptr("CustomScriptExtension"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines/extensions"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/Extensions/CustomScriptExtension"),
// 	Location: to.Ptr("eastus2euap"),
// 	Properties: &armhybridcompute.MachineExtensionProperties{
// 		Type: to.Ptr("string"),
// 		AutoUpgradeMinorVersion: to.Ptr(false),
// 		InstanceView: &armhybridcompute.MachineExtensionInstanceView{
// 			Name: to.Ptr("CustomScriptExtension"),
// 			Type: to.Ptr("CustomScriptExtension"),
// 			Status: &armhybridcompute.MachineExtensionInstanceViewStatus{
// 				Code: to.Ptr("success"),
// 				DisplayStatus: to.Ptr("Provisioning succeeded"),
// 				Level: to.Ptr(armhybridcompute.StatusLevelTypes("Information")),
// 				Message: to.Ptr("Finished executing command, StdOut: , StdErr:"),
// 				Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-08-08T20:42:10.999Z"); return t}()),
// 			},
// 			TypeHandlerVersion: to.Ptr("1.10.3"),
// 		},
// 		ProtectedSettings: map[string]any{
// 		},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		Publisher: to.Ptr("Microsoft.Compute"),
// 		Settings: map[string]any{
// 			"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\"",
// 		},
// 		TypeHandlerVersion: to.Ptr("1.10.3"),
// 	},
// }
Output:

func (*MachineExtensionsClient) NewListPager

func (client *MachineExtensionsClient) NewListPager(resourceGroupName string, machineName string, options *MachineExtensionsClientListOptions) *runtime.Pager[MachineExtensionsClientListResponse]

NewListPager - The operation to get all extensions of a non-Azure machine

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the machine containing the extension.
  • options - MachineExtensionsClientListOptions contains the optional parameters for the MachineExtensionsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewMachineExtensionsClient().NewListPager("myResourceGroup", "myMachine", &armhybridcompute.MachineExtensionsClientListOptions{Expand: nil})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MachineExtensionsListResult = armhybridcompute.MachineExtensionsListResult{
	// 	Value: []*armhybridcompute.MachineExtension{
	// 		{
	// 			Name: to.Ptr("CustomScriptExtension"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/machines/extensions"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/Extensions/CustomScriptExtension"),
	// 			Location: to.Ptr("eastus2euap"),
	// 			Properties: &armhybridcompute.MachineExtensionProperties{
	// 				Type: to.Ptr("CustomScriptExtension"),
	// 				AutoUpgradeMinorVersion: to.Ptr(false),
	// 				InstanceView: &armhybridcompute.MachineExtensionInstanceView{
	// 					Name: to.Ptr("CustomScriptExtension"),
	// 					Type: to.Ptr("CustomScriptExtension"),
	// 					Status: &armhybridcompute.MachineExtensionInstanceViewStatus{
	// 						Code: to.Ptr("success"),
	// 						DisplayStatus: to.Ptr("Provisioning succeeded"),
	// 						Level: to.Ptr(armhybridcompute.StatusLevelTypes("Information")),
	// 						Message: to.Ptr("formattedMessage: Finished executing command, StdOut: , StdErr: "),
	// 						Time: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2020-08-13T17:18:57.405Z"); return t}()),
	// 					},
	// 					TypeHandlerVersion: to.Ptr("1.10.3"),
	// 				},
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				Publisher: to.Ptr("Microsoft.Compute"),
	// 				Settings: map[string]any{
	// 					"commandToExecute": "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\"",
	// 				},
	// 				TypeHandlerVersion: to.Ptr("1.10.3"),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("winosupdateextension"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/machines/extensions"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/Extensions/winosupdateextension"),
	// 			Location: to.Ptr("eastus2euap"),
	// 			Properties: &armhybridcompute.MachineExtensionProperties{
	// 				Type: to.Ptr("windowsosupdateextension"),
	// 				AutoUpgradeMinorVersion: to.Ptr(false),
	// 				InstanceView: &armhybridcompute.MachineExtensionInstanceView{
	// 					Name: to.Ptr("winosupdateextension"),
	// 					Type: to.Ptr("windowsosupdateextension"),
	// 					Status: &armhybridcompute.MachineExtensionInstanceViewStatus{
	// 					},
	// 					TypeHandlerVersion: to.Ptr("1.0.0.0"),
	// 				},
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				Publisher: to.Ptr("microsoft.softwareupdatemanagement.test"),
	// 				Settings: map[string]any{
	// 				},
	// 				TypeHandlerVersion: to.Ptr("1.0.0.0"),
	// 			},
	// 	}},
	// }
}
Output:

type MachineExtensionsClientBeginCreateOrUpdateOptions

type MachineExtensionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MachineExtensionsClientBeginCreateOrUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginCreateOrUpdate method.

type MachineExtensionsClientBeginDeleteOptions

type MachineExtensionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MachineExtensionsClientBeginDeleteOptions contains the optional parameters for the MachineExtensionsClient.BeginDelete method.

type MachineExtensionsClientBeginUpdateOptions

type MachineExtensionsClientBeginUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MachineExtensionsClientBeginUpdateOptions contains the optional parameters for the MachineExtensionsClient.BeginUpdate method.

type MachineExtensionsClientCreateOrUpdateResponse

type MachineExtensionsClientCreateOrUpdateResponse struct {
	// Describes a Machine Extension.
	MachineExtension
}

MachineExtensionsClientCreateOrUpdateResponse contains the response from method MachineExtensionsClient.BeginCreateOrUpdate.

type MachineExtensionsClientDeleteResponse

type MachineExtensionsClientDeleteResponse struct {
}

MachineExtensionsClientDeleteResponse contains the response from method MachineExtensionsClient.BeginDelete.

type MachineExtensionsClientGetOptions

type MachineExtensionsClientGetOptions struct {
}

MachineExtensionsClientGetOptions contains the optional parameters for the MachineExtensionsClient.Get method.

type MachineExtensionsClientGetResponse

type MachineExtensionsClientGetResponse struct {
	// Describes a Machine Extension.
	MachineExtension
}

MachineExtensionsClientGetResponse contains the response from method MachineExtensionsClient.Get.

type MachineExtensionsClientListOptions

type MachineExtensionsClientListOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

MachineExtensionsClientListOptions contains the optional parameters for the MachineExtensionsClient.NewListPager method.

type MachineExtensionsClientListResponse

type MachineExtensionsClientListResponse struct {
	// Describes the Machine Extensions List Result.
	MachineExtensionsListResult
}

MachineExtensionsClientListResponse contains the response from method MachineExtensionsClient.NewListPager.

type MachineExtensionsClientUpdateResponse

type MachineExtensionsClientUpdateResponse struct {
	// Describes a Machine Extension.
	MachineExtension
}

MachineExtensionsClientUpdateResponse contains the response from method MachineExtensionsClient.BeginUpdate.

type MachineExtensionsListResult

type MachineExtensionsListResult struct {
	// The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions.
	NextLink *string

	// The list of extensions
	Value []*MachineExtension
}

MachineExtensionsListResult - Describes the Machine Extensions List Result.

func (MachineExtensionsListResult) MarshalJSON

func (m MachineExtensionsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineExtensionsListResult.

func (*MachineExtensionsListResult) UnmarshalJSON

func (m *MachineExtensionsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionsListResult.

type MachineInstallPatchesParameters

type MachineInstallPatchesParameters struct {
	// REQUIRED; Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string
	// such as PT4H (4 hours)
	MaximumDuration *string

	// REQUIRED; Defines when it is acceptable to reboot a VM during a software update operation.
	RebootSetting *VMGuestPatchRebootSetting

	// Input for InstallPatches on a Linux VM, as directly received by the API
	LinuxParameters *LinuxParameters

	// Input for InstallPatches on a Windows VM, as directly received by the API
	WindowsParameters *WindowsParameters
}

MachineInstallPatchesParameters - Input for InstallPatches as directly received by the API

func (MachineInstallPatchesParameters) MarshalJSON

func (m MachineInstallPatchesParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineInstallPatchesParameters.

func (*MachineInstallPatchesParameters) UnmarshalJSON

func (m *MachineInstallPatchesParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineInstallPatchesParameters.

type MachineInstallPatchesResult

type MachineInstallPatchesResult struct {
	// READ-ONLY; The errors that were encountered during execution of the operation. The details array contains the list of them.
	ErrorDetails *ErrorDetail

	// READ-ONLY; The number of patches that were not installed due to the user blocking their installation.
	ExcludedPatchCount *int32

	// READ-ONLY; The number of patches that could not be installed due to some issue. See errors for details.
	FailedPatchCount *int32

	// READ-ONLY; The activity ID of the operation that produced this result.
	InstallationActivityID *string

	// READ-ONLY; The number of patches successfully installed.
	InstalledPatchCount *int32

	// READ-ONLY; The UTC timestamp when the operation finished.
	LastModifiedDateTime *time.Time

	// READ-ONLY; Whether the operation ran out of time before it completed all its intended actions.
	MaintenanceWindowExceeded *bool

	// READ-ONLY; The number of patches that were detected as available for install, but did not meet the operation's criteria.
	NotSelectedPatchCount *int32

	// READ-ONLY; The operating system type of the machine.
	OSType *OsType

	// READ-ONLY; Specifies the patch service used for the operation.
	PatchServiceUsed *PatchServiceUsed

	// READ-ONLY; The number of patches that were identified as meeting the installation criteria, but were not able to be installed.
	// Typically this happens when maintenanceWindowExceeded == true.
	PendingPatchCount *int32

	// READ-ONLY; The reboot state of the VM following completion of the operation.
	RebootStatus *VMGuestPatchRebootStatus

	// READ-ONLY; The UTC timestamp when the operation began.
	StartDateTime *time.Time

	// READ-ONLY; Indicates if operation was triggered by user or by platform.
	StartedBy *PatchOperationStartedBy

	// READ-ONLY; The overall success or failure status of the operation. It remains "InProgress" until the operation completes.
	// At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings."
	Status *PatchOperationStatus
}

MachineInstallPatchesResult - The result summary of an installation operation.

func (MachineInstallPatchesResult) MarshalJSON

func (m MachineInstallPatchesResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineInstallPatchesResult.

func (*MachineInstallPatchesResult) UnmarshalJSON

func (m *MachineInstallPatchesResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineInstallPatchesResult.

type MachineListResult

type MachineListResult struct {
	// REQUIRED; The list of hybrid machines.
	Value []*Machine

	// The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid machines.
	NextLink *string
}

MachineListResult - The List hybrid machine operation response.

func (MachineListResult) MarshalJSON

func (m MachineListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineListResult.

func (*MachineListResult) UnmarshalJSON

func (m *MachineListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineListResult.

type MachineProperties

type MachineProperties struct {
	// The info of the machine w.r.t Agent Upgrade
	AgentUpgrade *AgentUpgrade

	// Public Key that the client provides to be used during initial resource onboarding
	ClientPublicKey *string

	// The metadata of the cloud environment (Azure/GCP/AWS/OCI…).
	CloudMetadata *CloudMetadata

	// Machine Extensions information (deprecated field)
	Extensions []*MachineExtensionInstanceView

	// Specifies the License related properties for a machine.
	LicenseProfile *LicenseProfileMachineInstanceView

	// Metadata pertaining to the geographic location of the resource.
	LocationData *LocationData

	// Specifies whether any MS SQL instance is discovered on the machine.
	MssqlDiscovered *string

	// Specifies the operating system settings for the hybrid machine.
	OSProfile *OSProfile

	// The type of Operating System (windows/linux).
	OSType *string

	// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
	ParentClusterResourceID *string

	// The resource id of the private link scope this machine is assigned to, if any.
	PrivateLinkScopeResourceID *string

	// Statuses of dependent services that are reported back to ARM.
	ServiceStatuses *ServiceStatuses

	// Specifies the hybrid machine unique ID.
	VMID *string

	// READ-ONLY; Specifies the AD fully qualified display name.
	AdFqdn *string

	// READ-ONLY; Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM.
	AgentConfiguration *AgentConfiguration

	// READ-ONLY; The hybrid machine agent full version.
	AgentVersion *string

	// READ-ONLY; Specifies the DNS fully qualified display name.
	DNSFqdn *string

	// READ-ONLY; Detected properties from the machine.
	DetectedProperties map[string]*string

	// READ-ONLY; Specifies the hybrid machine display name.
	DisplayName *string

	// READ-ONLY; Specifies the Windows domain name.
	DomainName *string

	// READ-ONLY; Details about the error state.
	ErrorDetails []*ErrorDetail

	// READ-ONLY; The time of the last status change.
	LastStatusChange *time.Time

	// READ-ONLY; Specifies the hybrid machine FQDN.
	MachineFqdn *string

	// READ-ONLY; Information about the network the machine is on.
	NetworkProfile *NetworkProfile

	// READ-ONLY; The edition of the Operating System.
	OSEdition *string

	// READ-ONLY; The Operating System running on the hybrid machine.
	OSName *string

	// READ-ONLY; Specifies the Operating System product SKU.
	OSSKU *string

	// READ-ONLY; The version of Operating System running on the hybrid machine.
	OSVersion *string

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string

	// READ-ONLY; The status of the hybrid machine agent.
	Status *StatusTypes

	// READ-ONLY; Specifies the Arc Machine's unique SMBIOS ID
	VMUUID *string
}

MachineProperties - Describes the properties of a hybrid machine.

func (MachineProperties) MarshalJSON

func (m MachineProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineProperties.

func (*MachineProperties) UnmarshalJSON

func (m *MachineProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineProperties.

type MachineRunCommand

type MachineRunCommand struct {
	// REQUIRED; The geo-location where the resource lives
	Location *string

	// Describes Run Command Properties
	Properties *MachineRunCommandProperties

	// Resource tags.
	Tags map[string]*string

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

MachineRunCommand - Describes a Run Command

func (MachineRunCommand) MarshalJSON

func (m MachineRunCommand) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineRunCommand.

func (*MachineRunCommand) UnmarshalJSON

func (m *MachineRunCommand) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineRunCommand.

type MachineRunCommandInstanceView

type MachineRunCommandInstanceView struct {
	// Script end time.
	EndTime *time.Time

	// Script error stream.
	Error *string

	// Communicate script configuration errors or execution messages.
	ExecutionMessage *string

	// Script execution status.
	ExecutionState *ExecutionState

	// Exit code returned from script execution.
	ExitCode *int32

	// Script output stream.
	Output *string

	// Script start time.
	StartTime *time.Time

	// The status information.
	Statuses []*ExtensionsResourceStatus
}

MachineRunCommandInstanceView - The instance view of a machine run command.

func (MachineRunCommandInstanceView) MarshalJSON

func (m MachineRunCommandInstanceView) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineRunCommandInstanceView.

func (*MachineRunCommandInstanceView) UnmarshalJSON

func (m *MachineRunCommandInstanceView) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineRunCommandInstanceView.

type MachineRunCommandProperties

type MachineRunCommandProperties struct {
	// Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
	AsyncExecution *bool

	// User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned
	// identity. Make sure managed identity has been given access to blob's
	// container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it
	// under VM's identity. For more info on managed identity and Run Command, refer
	// https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
	ErrorBlobManagedIdentity *RunCommandManagedIdentity

	// Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write
	// access OR use managed identity to provide the VM access to the blob. Refer
	// errorBlobManagedIdentity parameter.
	ErrorBlobURI *string

	// User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned
	// identity. Make sure managed identity has been given access to blob's
	// container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it
	// under VM's identity. For more info on managed identity and Run Command, refer
	// https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
	OutputBlobManagedIdentity *RunCommandManagedIdentity

	// Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create,
	// write access OR use managed identity to provide the VM access to the blob. Refer
	// outputBlobManagedIdentity parameter.
	OutputBlobURI *string

	// The parameters used by the script.
	Parameters []*RunCommandInputParameter

	// The parameters used by the script.
	ProtectedParameters []*RunCommandInputParameter

	// Specifies the user account password on the machine when executing the run command.
	RunAsPassword *string

	// Specifies the user account on the machine when executing the run command.
	RunAsUser *string

	// The source of the run command script.
	Source *MachineRunCommandScriptSource

	// The timeout in seconds to execute the run command.
	TimeoutInSeconds *int32

	// READ-ONLY; The machine run command instance view.
	InstanceView *MachineRunCommandInstanceView

	// READ-ONLY; The provisioning state, which only appears in the response.
	ProvisioningState *string
}

MachineRunCommandProperties - Describes the properties of a run command.

func (MachineRunCommandProperties) MarshalJSON

func (m MachineRunCommandProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineRunCommandProperties.

func (*MachineRunCommandProperties) UnmarshalJSON

func (m *MachineRunCommandProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineRunCommandProperties.

type MachineRunCommandScriptSource

type MachineRunCommandScriptSource struct {
	// Specifies the commandId of predefined built-in script.
	CommandID *string

	// Specifies the script content to be executed on the machine.
	Script *string

	// Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
	ScriptURI *string

	// User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case
	// of system-assigned identity. Make sure the Azure storage blob exists, and managed
	// identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned
	// identity, make sure you add it under VM's identity. For more info on
	// managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.
	ScriptURIManagedIdentity *RunCommandManagedIdentity
}

MachineRunCommandScriptSource - Describes the script sources for run command. Use only one of script, scriptUri, commandId.

func (MachineRunCommandScriptSource) MarshalJSON

func (m MachineRunCommandScriptSource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineRunCommandScriptSource.

func (*MachineRunCommandScriptSource) UnmarshalJSON

func (m *MachineRunCommandScriptSource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineRunCommandScriptSource.

type MachineRunCommandsClient

type MachineRunCommandsClient struct {
	// contains filtered or unexported fields
}

MachineRunCommandsClient contains the methods for the MachineRunCommands group. Don't use this type directly, use NewMachineRunCommandsClient() instead.

func NewMachineRunCommandsClient

func NewMachineRunCommandsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MachineRunCommandsClient, error)

NewMachineRunCommandsClient creates a new instance of MachineRunCommandsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MachineRunCommandsClient) BeginCreateOrUpdate

func (client *MachineRunCommandsClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, machineName string, runCommandName string, runCommandProperties MachineRunCommand, options *MachineRunCommandsClientBeginCreateOrUpdateOptions) (*runtime.Poller[MachineRunCommandsClientCreateOrUpdateResponse], error)

BeginCreateOrUpdate - The operation to create or update a run command. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • runCommandName - The name of the run command.
  • runCommandProperties - Parameters supplied to the Create Run Command.
  • options - MachineRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the MachineRunCommandsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/runCommand/RunCommands_CreateOrUpdate.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewMachineRunCommandsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myMachine", "myRunCommand", armhybridcompute.MachineRunCommand{
	Location: to.Ptr("eastus2"),
	Properties: &armhybridcompute.MachineRunCommandProperties{
		AsyncExecution: to.Ptr(false),
		ErrorBlobURI:   to.Ptr("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"),
		OutputBlobURI:  to.Ptr("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"),
		Parameters: []*armhybridcompute.RunCommandInputParameter{
			{
				Name:  to.Ptr("param1"),
				Value: to.Ptr("value1"),
			},
			{
				Name:  to.Ptr("param2"),
				Value: to.Ptr("value2"),
			}},
		RunAsPassword: to.Ptr("<runAsPassword>"),
		RunAsUser:     to.Ptr("user1"),
		Source: &armhybridcompute.MachineRunCommandScriptSource{
			Script: to.Ptr("Write-Host Hello World!"),
		},
		TimeoutInSeconds: to.Ptr[int32](3600),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MachineRunCommand = armhybridcompute.MachineRunCommand{
// 	Name: to.Ptr("myRunCommand"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines/runcommands"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/runcommands/myRunCommand"),
// 	Location: to.Ptr("eastus2"),
// 	Properties: &armhybridcompute.MachineRunCommandProperties{
// 		AsyncExecution: to.Ptr(false),
// 		ErrorBlobURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"),
// 		OutputBlobURI: to.Ptr("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"),
// 		Parameters: []*armhybridcompute.RunCommandInputParameter{
// 			{
// 				Name: to.Ptr("param1"),
// 				Value: to.Ptr("value1"),
// 			},
// 			{
// 				Name: to.Ptr("param2"),
// 				Value: to.Ptr("value2"),
// 		}},
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		RunAsUser: to.Ptr("user1"),
// 		Source: &armhybridcompute.MachineRunCommandScriptSource{
// 			Script: to.Ptr("Write-Host Hello World!"),
// 		},
// 		TimeoutInSeconds: to.Ptr[int32](3600),
// 	},
// }
Output:

func (*MachineRunCommandsClient) BeginDelete

func (client *MachineRunCommandsClient) BeginDelete(ctx context.Context, resourceGroupName string, machineName string, runCommandName string, options *MachineRunCommandsClientBeginDeleteOptions) (*runtime.Poller[MachineRunCommandsClientDeleteResponse], error)

BeginDelete - The operation to delete a run command. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • runCommandName - The name of the run command.
  • options - MachineRunCommandsClientBeginDeleteOptions contains the optional parameters for the MachineRunCommandsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/runCommand/RunCommands_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewMachineRunCommandsClient().BeginDelete(ctx, "myResourceGroup", "myMachine", "myRunCommand", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*MachineRunCommandsClient) Get

func (client *MachineRunCommandsClient) Get(ctx context.Context, resourceGroupName string, machineName string, runCommandName string, options *MachineRunCommandsClientGetOptions) (MachineRunCommandsClientGetResponse, error)

Get - The operation to get a run command. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • runCommandName - The name of the run command.
  • options - MachineRunCommandsClientGetOptions contains the optional parameters for the MachineRunCommandsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/runCommand/RunCommands_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMachineRunCommandsClient().Get(ctx, "myResourceGroup", "myMachine", "myRunCommand", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MachineRunCommand = armhybridcompute.MachineRunCommand{
// 	Name: to.Ptr("myRunCommand"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines/runcommands"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/runcommands/myRunCommand"),
// 	Location: to.Ptr("eastus2"),
// 	Tags: map[string]*string{
// 		"tag1": to.Ptr("value1"),
// 		"tag2": to.Ptr("value2"),
// 	},
// 	Properties: &armhybridcompute.MachineRunCommandProperties{
// 		AsyncExecution: to.Ptr(false),
// 		InstanceView: &armhybridcompute.MachineRunCommandInstanceView{
// 			EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-15T20:48:41.464Z"); return t}()),
// 			Error: to.Ptr(""),
// 			ExecutionMessage: to.Ptr(""),
// 			ExecutionState: to.Ptr(armhybridcompute.ExecutionStateSucceeded),
// 			ExitCode: to.Ptr[int32](0),
Output:

func (*MachineRunCommandsClient) NewListPager

func (client *MachineRunCommandsClient) NewListPager(resourceGroupName string, machineName string, options *MachineRunCommandsClientListOptions) *runtime.Pager[MachineRunCommandsClientListResponse]

NewListPager - The operation to get all the run commands of a non-Azure machine.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • options - MachineRunCommandsClientListOptions contains the optional parameters for the MachineRunCommandsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/runCommand/RunCommands_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewMachineRunCommandsClient().NewListPager("myResourceGroup", "myMachine", &armhybridcompute.MachineRunCommandsClientListOptions{Expand: nil})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MachineRunCommandsListResult = armhybridcompute.MachineRunCommandsListResult{
	// 	Value: []*armhybridcompute.MachineRunCommand{
	// 		{
	// 			Name: to.Ptr("myRunCommand_1"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/machines/runcommands"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/runcommands/myRunCommand_1"),
	// 			Location: to.Ptr("eastus2"),
	// 			Properties: &armhybridcompute.MachineRunCommandProperties{
	// 				AsyncExecution: to.Ptr(false),
	// 				InstanceView: &armhybridcompute.MachineRunCommandInstanceView{
	// 					EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-15T20:48:41.464Z"); return t}()),
	// 					Error: to.Ptr(""),
	// 					ExecutionMessage: to.Ptr(""),
	// 					ExecutionState: to.Ptr(armhybridcompute.ExecutionStateSucceeded),
	// 					ExitCode: to.Ptr[int32](0),
	// 					Output: to.Ptr("Hello World"),
	// 					StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-15T20:48:41.464Z"); return t}()),
	// 				},
	// 				Parameters: []*armhybridcompute.RunCommandInputParameter{
	// 					{
	// 						Name: to.Ptr("param1"),
	// 						Value: to.Ptr("value1"),
	// 					},
	// 					{
	// 						Name: to.Ptr("param2"),
	// 						Value: to.Ptr("value2"),
	// 				}},
	// 				ProtectedParameters: []*armhybridcompute.RunCommandInputParameter{
	// 				},
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				RunAsUser: to.Ptr("user1"),
	// 				Source: &armhybridcompute.MachineRunCommandScriptSource{
	// 					Script: to.Ptr("Write-Host Hello World!"),
	// 				},
	// 				TimeoutInSeconds: to.Ptr[int32](3600),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("myRunCommand_2"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/machines/runcommands"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Machines/myMachine/runcommands/myRunCommand_2"),
	// 			Location: to.Ptr("eastus2"),
	// 			Properties: &armhybridcompute.MachineRunCommandProperties{
	// 				AsyncExecution: to.Ptr(false),
	// 				InstanceView: &armhybridcompute.MachineRunCommandInstanceView{
	// 					EndTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-06-15T20:48:41.464Z"); return t}()),
	// 					Error: to.Ptr(""),
	// 					ExecutionMessage: to.Ptr(""),
	// 					ExecutionState: to.Ptr(armhybridcompute.ExecutionStateSucceeded),
	// 					ExitCode: to.Ptr[int32](0),
	
Output:

type MachineRunCommandsClientBeginCreateOrUpdateOptions

type MachineRunCommandsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MachineRunCommandsClientBeginCreateOrUpdateOptions contains the optional parameters for the MachineRunCommandsClient.BeginCreateOrUpdate method.

type MachineRunCommandsClientBeginDeleteOptions

type MachineRunCommandsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MachineRunCommandsClientBeginDeleteOptions contains the optional parameters for the MachineRunCommandsClient.BeginDelete method.

type MachineRunCommandsClientCreateOrUpdateResponse

type MachineRunCommandsClientCreateOrUpdateResponse struct {
	// Describes a Run Command
	MachineRunCommand
}

MachineRunCommandsClientCreateOrUpdateResponse contains the response from method MachineRunCommandsClient.BeginCreateOrUpdate.

type MachineRunCommandsClientDeleteResponse

type MachineRunCommandsClientDeleteResponse struct {
}

MachineRunCommandsClientDeleteResponse contains the response from method MachineRunCommandsClient.BeginDelete.

type MachineRunCommandsClientGetOptions

type MachineRunCommandsClientGetOptions struct {
}

MachineRunCommandsClientGetOptions contains the optional parameters for the MachineRunCommandsClient.Get method.

type MachineRunCommandsClientGetResponse

type MachineRunCommandsClientGetResponse struct {
	// Describes a Run Command
	MachineRunCommand
}

MachineRunCommandsClientGetResponse contains the response from method MachineRunCommandsClient.Get.

type MachineRunCommandsClientListOptions

type MachineRunCommandsClientListOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

MachineRunCommandsClientListOptions contains the optional parameters for the MachineRunCommandsClient.NewListPager method.

type MachineRunCommandsClientListResponse

type MachineRunCommandsClientListResponse struct {
	// Describes the Run Commands List Result.
	MachineRunCommandsListResult
}

MachineRunCommandsClientListResponse contains the response from method MachineRunCommandsClient.NewListPager.

type MachineRunCommandsListResult

type MachineRunCommandsListResult struct {
	// The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands.
	NextLink *string

	// The list of run commands
	Value []*MachineRunCommand
}

MachineRunCommandsListResult - Describes the Run Commands List Result.

func (MachineRunCommandsListResult) MarshalJSON

func (m MachineRunCommandsListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineRunCommandsListResult.

func (*MachineRunCommandsListResult) UnmarshalJSON

func (m *MachineRunCommandsListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineRunCommandsListResult.

type MachineUpdate

type MachineUpdate struct {
	// Identity for the resource.
	Identity *Identity

	// Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.
	Kind *ArcKindEnum

	// Hybrid Compute Machine properties
	Properties *MachineUpdateProperties

	// Resource tags
	Tags map[string]*string
}

MachineUpdate - Describes a hybrid machine Update.

func (MachineUpdate) MarshalJSON

func (m MachineUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineUpdate.

func (*MachineUpdate) UnmarshalJSON

func (m *MachineUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineUpdate.

type MachineUpdateProperties

type MachineUpdateProperties struct {
	// The info of the machine w.r.t Agent Upgrade
	AgentUpgrade *AgentUpgrade

	// The metadata of the cloud environment (Azure/GCP/AWS/OCI…).
	CloudMetadata *CloudMetadata

	// Metadata pertaining to the geographic location of the resource.
	LocationData *LocationData

	// Specifies the operating system settings for the hybrid machine.
	OSProfile *OSProfile

	// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
	ParentClusterResourceID *string

	// The resource id of the private link scope this machine is assigned to, if any.
	PrivateLinkScopeResourceID *string
}

MachineUpdateProperties - Describes the ARM updatable properties of a hybrid machine.

func (MachineUpdateProperties) MarshalJSON

func (m MachineUpdateProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type MachineUpdateProperties.

func (*MachineUpdateProperties) UnmarshalJSON

func (m *MachineUpdateProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type MachineUpdateProperties.

type MachinesClient

type MachinesClient struct {
	// contains filtered or unexported fields
}

MachinesClient contains the methods for the Machines group. Don't use this type directly, use NewMachinesClient() instead.

func NewMachinesClient

func NewMachinesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*MachinesClient, error)

NewMachinesClient creates a new instance of MachinesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*MachinesClient) BeginAssessPatches

func (client *MachinesClient) BeginAssessPatches(ctx context.Context, resourceGroupName string, name string, options *MachinesClientBeginAssessPatchesOptions) (*runtime.Poller[MachinesClientAssessPatchesResponse], error)

BeginAssessPatches - The operation to assess patches on a hybrid machine identity in Azure. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group.
  • name - The name of the hybrid machine.
  • options - MachinesClientBeginAssessPatchesOptions contains the optional parameters for the MachinesClient.BeginAssessPatches method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machine_AssessPatches.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewMachinesClient().BeginAssessPatches(ctx, "myResourceGroupName", "myMachineName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MachineAssessPatchesResult = armhybridcompute.MachineAssessPatchesResult{
// 	AssessmentActivityID: to.Ptr("68f8b292-dfc2-4646-9781-33cc88631968"),
// 	AvailablePatchCountByClassification: &armhybridcompute.AvailablePatchCountByClassification{
// 		Critical: to.Ptr[int32](0),
// 		Definition: to.Ptr[int32](0),
// 		FeaturePack: to.Ptr[int32](0),
// 		Security: to.Ptr[int32](0),
// 		ServicePack: to.Ptr[int32](0),
// 		Tools: to.Ptr[int32](0),
// 		UpdateRollup: to.Ptr[int32](1),
// 		Updates: to.Ptr[int32](1),
// 	},
// 	LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-22T02:16:06.974Z"); return t}()),
// 	OSType: to.Ptr(armhybridcompute.OsTypeWindows),
// 	RebootPending: to.Ptr(true),
// 	StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-22T02:15:20.934Z"); return t}()),
// 	StartedBy: to.Ptr(armhybridcompute.PatchOperationStartedByUser),
// 	Status: to.Ptr(armhybridcompute.PatchOperationStatusSucceeded),
// }
Output:

func (*MachinesClient) BeginInstallPatches

func (client *MachinesClient) BeginInstallPatches(ctx context.Context, resourceGroupName string, name string, installPatchesInput MachineInstallPatchesParameters, options *MachinesClientBeginInstallPatchesOptions) (*runtime.Poller[MachinesClientInstallPatchesResponse], error)

BeginInstallPatches - The operation to install patches on a hybrid machine identity in Azure. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group.
  • name - The name of the hybrid machine.
  • installPatchesInput - Input for InstallPatches as directly received by the API
  • options - MachinesClientBeginInstallPatchesOptions contains the optional parameters for the MachinesClient.BeginInstallPatches method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machine_InstallPatches.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewMachinesClient().BeginInstallPatches(ctx, "myResourceGroupName", "myMachineName", armhybridcompute.MachineInstallPatchesParameters{
	MaximumDuration: to.Ptr("PT4H"),
	RebootSetting:   to.Ptr(armhybridcompute.VMGuestPatchRebootSettingIfRequired),
	WindowsParameters: &armhybridcompute.WindowsParameters{
		ClassificationsToInclude: []*armhybridcompute.VMGuestPatchClassificationWindows{
			to.Ptr(armhybridcompute.VMGuestPatchClassificationWindowsCritical),
			to.Ptr(armhybridcompute.VMGuestPatchClassificationWindowsSecurity)},
		MaxPatchPublishDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-19T02:36:43.053Z"); return t }()),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.MachineInstallPatchesResult = armhybridcompute.MachineInstallPatchesResult{
// 	ExcludedPatchCount: to.Ptr[int32](0),
// 	FailedPatchCount: to.Ptr[int32](0),
// 	InstallationActivityID: to.Ptr("68f8b292-dfc2-4646-9781-33cc88631968"),
// 	InstalledPatchCount: to.Ptr[int32](3),
// 	LastModifiedDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-22T02:16:06.974Z"); return t}()),
// 	MaintenanceWindowExceeded: to.Ptr(false),
// 	NotSelectedPatchCount: to.Ptr[int32](0),
// 	OSType: to.Ptr(armhybridcompute.OsTypeWindows),
// 	PendingPatchCount: to.Ptr[int32](2),
// 	RebootStatus: to.Ptr(armhybridcompute.VMGuestPatchRebootStatusCompleted),
// 	StartDateTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-08-22T02:15:06.974Z"); return t}()),
// 	StartedBy: to.Ptr(armhybridcompute.PatchOperationStartedByUser),
// 	Status: to.Ptr(armhybridcompute.PatchOperationStatusSucceeded),
// }
Output:

func (*MachinesClient) Delete

func (client *MachinesClient) Delete(ctx context.Context, resourceGroupName string, machineName string, options *MachinesClientDeleteOptions) (MachinesClientDeleteResponse, error)

Delete - The operation to delete a hybrid machine. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • options - MachinesClientDeleteOptions contains the optional parameters for the MachinesClient.Delete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
_, err = clientFactory.NewMachinesClient().Delete(ctx, "myResourceGroup", "myMachine", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
Output:

func (*MachinesClient) Get

func (client *MachinesClient) Get(ctx context.Context, resourceGroupName string, machineName string, options *MachinesClientGetOptions) (MachinesClientGetResponse, error)

Get - Retrieves information about the model view or the instance view of a hybrid machine. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • options - MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method.
Example (GetMachine)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMachinesClient().Get(ctx, "myResourceGroup", "myMachine", &armhybridcompute.MachinesClientGetOptions{Expand: nil})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Machine = armhybridcompute.Machine{
// 	Name: to.Ptr("myMachine"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/machines/myMachine"),
// 	Location: to.Ptr("eastus2euap"),
// 	Identity: &armhybridcompute.Identity{
// 		Type: to.Ptr("SystemAssigned"),
// 		PrincipalID: to.Ptr("string"),
// 		TenantID: to.Ptr("string"),
// 	},
// 	Properties: &armhybridcompute.MachineProperties{
// 		AgentConfiguration: &armhybridcompute.AgentConfiguration{
// 			ConfigMode: to.Ptr(armhybridcompute.AgentConfigurationModeFull),
// 			ExtensionsEnabled: to.Ptr("true"),
// 			GuestConfigurationEnabled: to.Ptr("true"),
// 			IncomingConnectionsPorts: []*string{
// 				to.Ptr("22"),
// 				to.Ptr("23")},
// 				ProxyBypass: []*string{
// 					to.Ptr("proxy1"),
// 					to.Ptr("proxy2")},
// 					ProxyURL: to.Ptr("https://test.test"),
// 				},
// 				ClientPublicKey: to.Ptr("string"),
// 				DetectedProperties: map[string]*string{
// 					"cloudprovider": to.Ptr("N/A"),
// 					"manufacturer": to.Ptr("Microsoft Corporation"),
// 					"model": to.Ptr("Virtual Machine"),
// 				},
// 				LicenseProfile: &armhybridcompute.LicenseProfileMachineInstanceView{
// 					EsuProfile: &armhybridcompute.LicenseProfileMachineInstanceViewEsuProperties{
// 						EsuKeys: []*armhybridcompute.EsuKey{
// 							{
// 								LicenseStatus: to.Ptr("licenseStatus1"),
// 								SKU: to.Ptr("skuNumber1"),
// 							},
// 							{
// 								LicenseStatus: to.Ptr("licenseStatus2"),
// 								SKU: to.Ptr("skuNumber2"),
// 						}},
// 						EsuEligibility: to.Ptr(armhybridcompute.EsuEligibilityIneligible),
// 						EsuKeyState: to.Ptr(armhybridcompute.EsuKeyStateInactive),
// 						ServerType: to.Ptr(armhybridcompute.EsuServerTypeStandard),
// 						LicenseAssignmentState: to.Ptr(armhybridcompute.LicenseAssignmentStateAssigned),
// 					},
// 					LicenseChannel: to.Ptr("PSG"),
// 					LicenseStatus: to.Ptr(armhybridcompute.LicenseStatusLicensed),
// 					ProductProfile: &armhybridcompute.LicenseProfileArmProductProfileProperties{
// 						BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 						DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
// 						EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 						ProductFeatures: []*armhybridcompute.ProductFeature{
// 							{
// 								Name: to.Ptr("HotPatching"),
// 								BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 								DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
// 								EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 								SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
// 						}},
// 						ProductType: to.Ptr(armhybridcompute.LicenseProfileProductTypeWindowsServer),
// 						SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
// 					},
// 					SoftwareAssurance: &armhybridcompute.LicenseProfileMachineInstanceViewSoftwareAssurance{
// 						SoftwareAssuranceCustomer: to.Ptr(true),
// 					},
// 				},
// 				LocationData: &armhybridcompute.LocationData{
// 					Name: to.Ptr("Redmond"),
// 					City: to.Ptr("redmond"),
// 					CountryOrRegion: to.Ptr("usa"),
// 				},
// 				MssqlDiscovered: to.Ptr("false"),
// 				NetworkProfile: &armhybridcompute.NetworkProfile{
// 					NetworkInterfaces: []*armhybridcompute.NetworkInterface{
// 						{
// 							IPAddresses: []*armhybridcompute.IPAddress{
// 								{
// 									Address: to.Ptr("192.168.12.345"),
// 									IPAddressVersion: to.Ptr("IPv4"),
// 									Subnet: &armhybridcompute.Subnet{
// 										AddressPrefix: to.Ptr("192.168.12.0/24"),
// 									},
// 							}},
// 						},
// 						{
// 							IPAddresses: []*armhybridcompute.IPAddress{
// 								{
// 									Address: to.Ptr("1001:0:34aa:5000:1234:aaaa:bbbb:cccc"),
// 									IPAddressVersion: to.Ptr("IPv6"),
// 									Subnet: &armhybridcompute.Subnet{
// 										AddressPrefix: to.Ptr("1001:0:34aa:5000::/64"),
// 									},
// 							}},
// 					}},
// 				},
// 				OSEdition: to.Ptr("Standard"),
// 				OSProfile: &armhybridcompute.OSProfile{
// 					LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
// 						PatchSettings: &armhybridcompute.PatchSettings{
// 						},
// 					},
// 					WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
// 						PatchSettings: &armhybridcompute.PatchSettings{
// 						},
// 					},
// 				},
// 				ParentClusterResourceID: to.Ptr("{AzureStackHCIResourceId}"),
// 				PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
// 				ProvisioningState: to.Ptr("Succeeded"),
// 				ServiceStatuses: &armhybridcompute.ServiceStatuses{
// 					ExtensionService: &armhybridcompute.ServiceStatus{
// 						StartupType: to.Ptr("Automatic"),
// 						Status: to.Ptr("Running"),
// 					},
// 					GuestConfigurationService: &armhybridcompute.ServiceStatus{
// 						StartupType: to.Ptr("Automatic"),
// 						Status: to.Ptr("Running"),
// 					},
// 				},
// 				VMID: to.Ptr("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
// 			},
// 			Resources: []*armhybridcompute.MachineExtension{
// 			},
// 		}
Output:

Example (GetMachineWithLicenseProfileInstanceView)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMachinesClient().Get(ctx, "myResourceGroup", "myMachine", &armhybridcompute.MachinesClientGetOptions{Expand: to.Ptr("instanceView")})
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Machine = armhybridcompute.Machine{
// 	Name: to.Ptr("myMachine"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/machines/myMachine"),
// 	Location: to.Ptr("eastus2euap"),
// 	Identity: &armhybridcompute.Identity{
// 		Type: to.Ptr("SystemAssigned"),
// 		PrincipalID: to.Ptr("string"),
// 		TenantID: to.Ptr("string"),
// 	},
// 	Properties: &armhybridcompute.MachineProperties{
// 		AgentConfiguration: &armhybridcompute.AgentConfiguration{
// 			ConfigMode: to.Ptr(armhybridcompute.AgentConfigurationModeFull),
// 			ExtensionsEnabled: to.Ptr("true"),
// 			GuestConfigurationEnabled: to.Ptr("true"),
// 			IncomingConnectionsPorts: []*string{
// 				to.Ptr("22"),
// 				to.Ptr("23")},
// 				ProxyBypass: []*string{
// 					to.Ptr("proxy1"),
// 					to.Ptr("proxy2")},
// 					ProxyURL: to.Ptr("https://test.test"),
// 				},
// 				ClientPublicKey: to.Ptr("string"),
// 				DetectedProperties: map[string]*string{
// 					"cloudprovider": to.Ptr("N/A"),
// 					"manufacturer": to.Ptr("Microsoft Corporation"),
// 					"model": to.Ptr("Virtual Machine"),
// 				},
// 				LicenseProfile: &armhybridcompute.LicenseProfileMachineInstanceView{
// 					EsuProfile: &armhybridcompute.LicenseProfileMachineInstanceViewEsuProperties{
// 						EsuKeys: []*armhybridcompute.EsuKey{
// 							{
// 								LicenseStatus: to.Ptr("licenseStatus1"),
// 								SKU: to.Ptr("skuNumber1"),
// 							},
// 							{
// 								LicenseStatus: to.Ptr("licenseStatus2"),
// 								SKU: to.Ptr("skuNumber2"),
// 						}},
// 						EsuEligibility: to.Ptr(armhybridcompute.EsuEligibilityIneligible),
// 						EsuKeyState: to.Ptr(armhybridcompute.EsuKeyStateInactive),
// 						ServerType: to.Ptr(armhybridcompute.EsuServerTypeStandard),
// 						AssignedLicense: &armhybridcompute.License{
// 							Name: to.Ptr("{licenseName}"),
// 							Type: to.Ptr("Microsoft.HybridCompute/licenses"),
// 							ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/Licenses/{licenseName}"),
// 							Location: to.Ptr("eastus2euap"),
// 							Properties: &armhybridcompute.LicenseProperties{
// 								LicenseDetails: &armhybridcompute.LicenseDetails{
// 									Type: to.Ptr(armhybridcompute.LicenseCoreTypePCore),
// 									AssignedLicenses: to.Ptr[int32](8),
// 									Edition: to.Ptr(armhybridcompute.LicenseEditionDatacenter),
// 									ImmutableID: to.Ptr("<generated Guid>"),
// 									Processors: to.Ptr[int32](6),
// 									State: to.Ptr(armhybridcompute.LicenseStateActivated),
// 									Target: to.Ptr(armhybridcompute.LicenseTargetWindowsServer2012),
// 								},
// 								LicenseType: to.Ptr(armhybridcompute.LicenseTypeESU),
// 								TenantID: to.Ptr("{tenandId}"),
// 							},
// 						},
// 						LicenseAssignmentState: to.Ptr(armhybridcompute.LicenseAssignmentStateAssigned),
// 					},
// 					LicenseChannel: to.Ptr("PSG"),
// 					LicenseStatus: to.Ptr(armhybridcompute.LicenseStatusLicensed),
// 					ProductProfile: &armhybridcompute.LicenseProfileArmProductProfileProperties{
// 						BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 						DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
// 						EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 						ProductFeatures: []*armhybridcompute.ProductFeature{
// 							{
// 								Name: to.Ptr("HotPatching"),
// 								BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 								DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
// 								EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 								SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
// 						}},
// 						ProductType: to.Ptr(armhybridcompute.LicenseProfileProductTypeWindowsServer),
// 						SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
// 					},
// 					SoftwareAssurance: &armhybridcompute.LicenseProfileMachineInstanceViewSoftwareAssurance{
// 						SoftwareAssuranceCustomer: to.Ptr(true),
// 					},
// 				},
// 				LocationData: &armhybridcompute.LocationData{
// 					Name: to.Ptr("Redmond"),
// 					City: to.Ptr("redmond"),
// 					CountryOrRegion: to.Ptr("usa"),
// 				},
// 				MssqlDiscovered: to.Ptr("false"),
// 				NetworkProfile: &armhybridcompute.NetworkProfile{
// 					NetworkInterfaces: []*armhybridcompute.NetworkInterface{
// 						{
// 							IPAddresses: []*armhybridcompute.IPAddress{
// 								{
// 									Address: to.Ptr("192.168.12.345"),
// 									IPAddressVersion: to.Ptr("IPv4"),
// 									Subnet: &armhybridcompute.Subnet{
// 										AddressPrefix: to.Ptr("192.168.12.0/24"),
// 									},
// 							}},
// 						},
// 						{
// 							IPAddresses: []*armhybridcompute.IPAddress{
// 								{
// 									Address: to.Ptr("1001:0:34aa:5000:1234:aaaa:bbbb:cccc"),
// 									IPAddressVersion: to.Ptr("IPv6"),
// 									Subnet: &armhybridcompute.Subnet{
// 										AddressPrefix: to.Ptr("1001:0:34aa:5000::/64"),
// 									},
// 							}},
// 					}},
// 				},
// 				OSEdition: to.Ptr("Standard"),
// 				OSProfile: &armhybridcompute.OSProfile{
// 					LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
// 						PatchSettings: &armhybridcompute.PatchSettings{
// 						},
// 					},
// 					WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
// 						PatchSettings: &armhybridcompute.PatchSettings{
// 						},
// 					},
// 				},
// 				ParentClusterResourceID: to.Ptr("{AzureStackHCIResourceId}"),
// 				PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
// 				ProvisioningState: to.Ptr("Succeeded"),
// 				ServiceStatuses: &armhybridcompute.ServiceStatuses{
// 					ExtensionService: &armhybridcompute.ServiceStatus{
// 						StartupType: to.Ptr("Automatic"),
// 						Status: to.Ptr("Running"),
// 					},
// 					GuestConfigurationService: &armhybridcompute.ServiceStatus{
// 						StartupType: to.Ptr("Automatic"),
// 						Status: to.Ptr("Running"),
// 					},
// 				},
// 				VMID: to.Ptr("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
// 			},
// 			Resources: []*armhybridcompute.MachineExtension{
// 			},
// 		}
Output:

func (*MachinesClient) NewListByResourceGroupPager

func (client *MachinesClient) NewListByResourceGroupPager(resourceGroupName string, options *MachinesClientListByResourceGroupOptions) *runtime.Pager[MachinesClientListByResourceGroupResponse]

NewListByResourceGroupPager - Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get the next page of hybrid machines.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - MachinesClientListByResourceGroupOptions contains the optional parameters for the MachinesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewMachinesClient().NewListByResourceGroupPager("myResourceGroup", &armhybridcompute.MachinesClientListByResourceGroupOptions{Expand: nil})
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MachineListResult = armhybridcompute.MachineListResult{
	// 	Value: []*armhybridcompute.Machine{
	// 		{
	// 			Name: to.Ptr("myMachine"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/machines"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/machines/myMachine"),
	// 			Location: to.Ptr("eastus2euap"),
	// 			Identity: &armhybridcompute.Identity{
	// 				Type: to.Ptr("SystemAssigned"),
	// 				PrincipalID: to.Ptr("f7a068cc-b0b8-46e8-a203-22f301a62a8f"),
	// 				TenantID: to.Ptr("c4098cc-91b8-46c2-a205-d82ab1a62a8f"),
	// 			},
	// 			Properties: &armhybridcompute.MachineProperties{
	// 				AgentConfiguration: &armhybridcompute.AgentConfiguration{
	// 					ConfigMode: to.Ptr(armhybridcompute.AgentConfigurationModeFull),
	// 					ExtensionsEnabled: to.Ptr("true"),
	// 					GuestConfigurationEnabled: to.Ptr("true"),
	// 					IncomingConnectionsPorts: []*string{
	// 						to.Ptr("22"),
	// 						to.Ptr("23")},
	// 						ProxyBypass: []*string{
	// 							to.Ptr("proxy1"),
	// 							to.Ptr("proxy2")},
	// 							ProxyURL: to.Ptr("https://test.test"),
	// 						},
	// 						ClientPublicKey: to.Ptr("string"),
	// 						DetectedProperties: map[string]*string{
	// 							"cloudprovider": to.Ptr("N/A"),
	// 							"manufacturer": to.Ptr("Microsoft Corporation"),
	// 							"model": to.Ptr("Virtual Machine"),
	// 						},
	// 						LicenseProfile: &armhybridcompute.LicenseProfileMachineInstanceView{
	// 							EsuProfile: &armhybridcompute.LicenseProfileMachineInstanceViewEsuProperties{
	// 								EsuKeys: []*armhybridcompute.EsuKey{
	// 									{
	// 										LicenseStatus: to.Ptr("licenseStatus1"),
	// 										SKU: to.Ptr("skuNumber1"),
	// 									},
	// 									{
	// 										LicenseStatus: to.Ptr("licenseStatus2"),
	// 										SKU: to.Ptr("skuNumber2"),
	// 								}},
	// 								EsuEligibility: to.Ptr(armhybridcompute.EsuEligibilityIneligible),
	// 								EsuKeyState: to.Ptr(armhybridcompute.EsuKeyStateInactive),
	// 								ServerType: to.Ptr(armhybridcompute.EsuServerTypeStandard),
	// 								LicenseAssignmentState: to.Ptr(armhybridcompute.LicenseAssignmentStateAssigned),
	// 							},
	// 							LicenseChannel: to.Ptr("PSG"),
	// 							LicenseStatus: to.Ptr(armhybridcompute.LicenseStatusLicensed),
	// 							ProductProfile: &armhybridcompute.LicenseProfileArmProductProfileProperties{
	// 								BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 								DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 								EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 								ProductFeatures: []*armhybridcompute.ProductFeature{
	// 									{
	// 										Name: to.Ptr("HotPatching"),
	// 										BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 										EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 								}},
	// 								ProductType: to.Ptr(armhybridcompute.LicenseProfileProductTypeWindowsServer),
	// 								SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 							},
	// 							SoftwareAssurance: &armhybridcompute.LicenseProfileMachineInstanceViewSoftwareAssurance{
	// 								SoftwareAssuranceCustomer: to.Ptr(true),
	// 							},
	// 						},
	// 						LocationData: &armhybridcompute.LocationData{
	// 							Name: to.Ptr("Redmond"),
	// 						},
	// 						MssqlDiscovered: to.Ptr("false"),
	// 						OSEdition: to.Ptr("Standard"),
	// 						OSProfile: &armhybridcompute.OSProfile{
	// 							LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
	// 								PatchSettings: &armhybridcompute.PatchSettings{
	// 								},
	// 							},
	// 							WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
	// 								PatchSettings: &armhybridcompute.PatchSettings{
	// 								},
	// 							},
	// 						},
	// 						PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						VMID: to.Ptr("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("myMachine2"),
	// 					Type: to.Ptr("Microsoft.HybridCompute/machines"),
	// 					ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/machines/myMachine2"),
	// 					Location: to.Ptr("westus2"),
	// 					Identity: &armhybridcompute.Identity{
	// 						Type: to.Ptr("SystemAssigned"),
	// 						PrincipalID: to.Ptr("e7a068cc-b0b8-46e8-a203-22f301a62a8f"),
	// 						TenantID: to.Ptr("c4098cc-91b8-46c2-a205-d82ab1a62a8f"),
	// 					},
	// 					Properties: &armhybridcompute.MachineProperties{
	// 						AgentConfiguration: &armhybridcompute.AgentConfiguration{
	// 							ConfigMode: to.Ptr(armhybridcompute.AgentConfigurationModeFull),
	// 							ExtensionsEnabled: to.Ptr("true"),
	// 							GuestConfigurationEnabled: to.Ptr("true"),
	// 							IncomingConnectionsPorts: []*string{
	// 								to.Ptr("22"),
	// 								to.Ptr("23")},
	// 								ProxyBypass: []*string{
	// 									to.Ptr("proxy1"),
	// 									to.Ptr("proxy2")},
	// 									ProxyURL: to.Ptr("https://test.test"),
	// 								},
	// 								ClientPublicKey: to.Ptr("string"),
	// 								DetectedProperties: map[string]*string{
	// 									"cloudprovider": to.Ptr("N/A"),
	// 									"manufacturer": to.Ptr("Microsoft Corporation"),
	// 									"model": to.Ptr("Surfacebook"),
	// 								},
	// 								LicenseProfile: &armhybridcompute.LicenseProfileMachineInstanceView{
	// 									EsuProfile: &armhybridcompute.LicenseProfileMachineInstanceViewEsuProperties{
	// 										EsuKeys: []*armhybridcompute.EsuKey{
	// 											{
	// 												LicenseStatus: to.Ptr("licenseStatus1"),
	// 												SKU: to.Ptr("skuNumber1"),
	// 											},
	// 											{
	// 												LicenseStatus: to.Ptr("licenseStatus2"),
	// 												SKU: to.Ptr("skuNumber2"),
	// 										}},
	// 										EsuEligibility: to.Ptr(armhybridcompute.EsuEligibilityIneligible),
	// 										EsuKeyState: to.Ptr(armhybridcompute.EsuKeyStateInactive),
	// 										ServerType: to.Ptr(armhybridcompute.EsuServerTypeStandard),
	// 										LicenseAssignmentState: to.Ptr(armhybridcompute.LicenseAssignmentStateAssigned),
	// 									},
	// 									LicenseChannel: to.Ptr("PSG"),
	// 									LicenseStatus: to.Ptr(armhybridcompute.LicenseStatusLicensed),
	// 									ProductProfile: &armhybridcompute.LicenseProfileArmProductProfileProperties{
	// 										BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 										EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										ProductFeatures: []*armhybridcompute.ProductFeature{
	// 											{
	// 												Name: to.Ptr("HotPatching"),
	// 												BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 												DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 												EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 												SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 										}},
	// 										ProductType: to.Ptr(armhybridcompute.LicenseProfileProductTypeWindowsServer),
	// 										SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 									},
	// 									SoftwareAssurance: &armhybridcompute.LicenseProfileMachineInstanceViewSoftwareAssurance{
	// 										SoftwareAssuranceCustomer: to.Ptr(true),
	// 									},
	// 								},
	// 								LocationData: &armhybridcompute.LocationData{
	// 									Name: to.Ptr("Redmond"),
	// 								},
	// 								MssqlDiscovered: to.Ptr("true"),
	// 								OSEdition: to.Ptr("Standard"),
	// 								OSProfile: &armhybridcompute.OSProfile{
	// 									LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
	// 										PatchSettings: &armhybridcompute.PatchSettings{
	// 										},
	// 									},
	// 									WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
	// 										PatchSettings: &armhybridcompute.PatchSettings{
	// 										},
	// 									},
	// 								},
	// 								ParentClusterResourceID: to.Ptr("{AzureStackHCIResourceId}"),
	// 								PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
	// 								ProvisioningState: to.Ptr("Succeeded"),
	// 								VMID: to.Ptr("a4a098cc-b0b8-46e8-a205-62f301a62a8f"),
	// 							},
	// 					}},
	// 				}
}
Output:

func (*MachinesClient) NewListBySubscriptionPager

NewListBySubscriptionPager - Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the next page of hybrid machines.

Generated from API version 2023-10-03-preview

  • options - MachinesClientListBySubscriptionOptions contains the optional parameters for the MachinesClient.NewListBySubscriptionPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_ListBySubscription.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewMachinesClient().NewListBySubscriptionPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.MachineListResult = armhybridcompute.MachineListResult{
	// 	Value: []*armhybridcompute.Machine{
	// 		{
	// 			Name: to.Ptr("myMachine"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/machines"),
	// 			ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/machines/myMachine"),
	// 			Location: to.Ptr("eastus2euap"),
	// 			Identity: &armhybridcompute.Identity{
	// 				Type: to.Ptr("SystemAssigned"),
	// 				PrincipalID: to.Ptr("string"),
	// 				TenantID: to.Ptr("string"),
	// 			},
	// 			Properties: &armhybridcompute.MachineProperties{
	// 				AgentConfiguration: &armhybridcompute.AgentConfiguration{
	// 					ConfigMode: to.Ptr(armhybridcompute.AgentConfigurationModeFull),
	// 					ExtensionsEnabled: to.Ptr("true"),
	// 					GuestConfigurationEnabled: to.Ptr("true"),
	// 					IncomingConnectionsPorts: []*string{
	// 						to.Ptr("22"),
	// 						to.Ptr("23")},
	// 						ProxyBypass: []*string{
	// 							to.Ptr("proxy1"),
	// 							to.Ptr("proxy2")},
	// 							ProxyURL: to.Ptr("https://test.test"),
	// 						},
	// 						ClientPublicKey: to.Ptr("string"),
	// 						DetectedProperties: map[string]*string{
	// 							"cloudprovider": to.Ptr("N/A"),
	// 							"manufacturer": to.Ptr("Microsoft Corporation"),
	// 							"model": to.Ptr("Virtual Machine"),
	// 						},
	// 						LicenseProfile: &armhybridcompute.LicenseProfileMachineInstanceView{
	// 							EsuProfile: &armhybridcompute.LicenseProfileMachineInstanceViewEsuProperties{
	// 								EsuKeys: []*armhybridcompute.EsuKey{
	// 									{
	// 										LicenseStatus: to.Ptr("licenseStatus1"),
	// 										SKU: to.Ptr("skuNumber1"),
	// 									},
	// 									{
	// 										LicenseStatus: to.Ptr("licenseStatus2"),
	// 										SKU: to.Ptr("skuNumber2"),
	// 								}},
	// 								EsuEligibility: to.Ptr(armhybridcompute.EsuEligibilityIneligible),
	// 								EsuKeyState: to.Ptr(armhybridcompute.EsuKeyStateInactive),
	// 								ServerType: to.Ptr(armhybridcompute.EsuServerTypeStandard),
	// 								LicenseAssignmentState: to.Ptr(armhybridcompute.LicenseAssignmentStateAssigned),
	// 							},
	// 							LicenseChannel: to.Ptr("PSG"),
	// 							LicenseStatus: to.Ptr(armhybridcompute.LicenseStatusLicensed),
	// 							ProductProfile: &armhybridcompute.LicenseProfileArmProductProfileProperties{
	// 								BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 								DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 								EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 								ProductFeatures: []*armhybridcompute.ProductFeature{
	// 									{
	// 										Name: to.Ptr("HotPatching"),
	// 										BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 										EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 								}},
	// 								ProductType: to.Ptr(armhybridcompute.LicenseProfileProductTypeWindowsServer),
	// 								SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 							},
	// 							SoftwareAssurance: &armhybridcompute.LicenseProfileMachineInstanceViewSoftwareAssurance{
	// 								SoftwareAssuranceCustomer: to.Ptr(true),
	// 							},
	// 						},
	// 						LocationData: &armhybridcompute.LocationData{
	// 							Name: to.Ptr("Redmond"),
	// 						},
	// 						MssqlDiscovered: to.Ptr("false"),
	// 						OSEdition: to.Ptr("Standard"),
	// 						OSProfile: &armhybridcompute.OSProfile{
	// 							LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
	// 								PatchSettings: &armhybridcompute.PatchSettings{
	// 								},
	// 							},
	// 							WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
	// 								PatchSettings: &armhybridcompute.PatchSettings{
	// 								},
	// 							},
	// 						},
	// 						PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 						VMID: to.Ptr("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
	// 					},
	// 				},
	// 				{
	// 					Name: to.Ptr("myMachine2"),
	// 					Type: to.Ptr("Microsoft.HybridCompute/machines"),
	// 					ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.HybridCompute/machines/myMachine2"),
	// 					Location: to.Ptr("westus2"),
	// 					Identity: &armhybridcompute.Identity{
	// 						Type: to.Ptr("SystemAssigned"),
	// 						PrincipalID: to.Ptr("e7a068cc-b0b8-46e8-a203-22f301a62a8f"),
	// 						TenantID: to.Ptr("c4098cc-91b8-46c2-a205-d82ab1a62a8f"),
	// 					},
	// 					Properties: &armhybridcompute.MachineProperties{
	// 						AgentConfiguration: &armhybridcompute.AgentConfiguration{
	// 							ConfigMode: to.Ptr(armhybridcompute.AgentConfigurationModeFull),
	// 							ExtensionsEnabled: to.Ptr("true"),
	// 							GuestConfigurationEnabled: to.Ptr("true"),
	// 							IncomingConnectionsPorts: []*string{
	// 								to.Ptr("22"),
	// 								to.Ptr("23")},
	// 								ProxyBypass: []*string{
	// 									to.Ptr("proxy1"),
	// 									to.Ptr("proxy2")},
	// 									ProxyURL: to.Ptr("https://test.test"),
	// 								},
	// 								ClientPublicKey: to.Ptr("string"),
	// 								DetectedProperties: map[string]*string{
	// 									"cloudprovider": to.Ptr("N/A"),
	// 									"manufacturer": to.Ptr("Microsoft Corporation"),
	// 									"model": to.Ptr("Surfacebook"),
	// 								},
	// 								LicenseProfile: &armhybridcompute.LicenseProfileMachineInstanceView{
	// 									EsuProfile: &armhybridcompute.LicenseProfileMachineInstanceViewEsuProperties{
	// 										EsuKeys: []*armhybridcompute.EsuKey{
	// 											{
	// 												LicenseStatus: to.Ptr("licenseStatus1"),
	// 												SKU: to.Ptr("skuNumber1"),
	// 											},
	// 											{
	// 												LicenseStatus: to.Ptr("licenseStatus2"),
	// 												SKU: to.Ptr("skuNumber2"),
	// 										}},
	// 										EsuEligibility: to.Ptr(armhybridcompute.EsuEligibilityIneligible),
	// 										EsuKeyState: to.Ptr(armhybridcompute.EsuKeyStateInactive),
	// 										ServerType: to.Ptr(armhybridcompute.EsuServerTypeStandard),
	// 										LicenseAssignmentState: to.Ptr(armhybridcompute.LicenseAssignmentStateAssigned),
	// 									},
	// 									LicenseChannel: to.Ptr("PSG"),
	// 									LicenseStatus: to.Ptr(armhybridcompute.LicenseStatusLicensed),
	// 									ProductProfile: &armhybridcompute.LicenseProfileArmProductProfileProperties{
	// 										BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 										EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 										ProductFeatures: []*armhybridcompute.ProductFeature{
	// 											{
	// 												Name: to.Ptr("HotPatching"),
	// 												BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 												DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
	// 												EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
	// 												SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 										}},
	// 										ProductType: to.Ptr(armhybridcompute.LicenseProfileProductTypeWindowsServer),
	// 										SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
	// 									},
	// 									SoftwareAssurance: &armhybridcompute.LicenseProfileMachineInstanceViewSoftwareAssurance{
	// 										SoftwareAssuranceCustomer: to.Ptr(true),
	// 									},
	// 								},
	// 								LocationData: &armhybridcompute.LocationData{
	// 									Name: to.Ptr("Redmond"),
	// 								},
	// 								MssqlDiscovered: to.Ptr("true"),
	// 								OSEdition: to.Ptr("Standard"),
	// 								OSProfile: &armhybridcompute.OSProfile{
	// 									LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
	// 										PatchSettings: &armhybridcompute.PatchSettings{
	// 										},
	// 									},
	// 									WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
	// 										PatchSettings: &armhybridcompute.PatchSettings{
	// 										},
	// 									},
	// 								},
	// 								ParentClusterResourceID: to.Ptr("{AzureStackHCIResourceId}"),
	// 								ProvisioningState: to.Ptr("Succeeded"),
	// 								VMID: to.Ptr("a4a098cc-b0b8-46e8-a205-62f301a62a8f"),
	// 							},
	// 					}},
	// 				}
}
Output:

func (*MachinesClient) Update

func (client *MachinesClient) Update(ctx context.Context, resourceGroupName string, machineName string, parameters MachineUpdate, options *MachinesClientUpdateOptions) (MachinesClientUpdateResponse, error)

Update - The operation to update a hybrid machine. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • parameters - Parameters supplied to the Update hybrid machine operation.
  • options - MachinesClientUpdateOptions contains the optional parameters for the MachinesClient.Update method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewMachinesClient().Update(ctx, "myResourceGroup", "myMachine", armhybridcompute.MachineUpdate{
	Identity: &armhybridcompute.Identity{
		Type: to.Ptr("SystemAssigned"),
	},
	Properties: &armhybridcompute.MachineUpdateProperties{
		LocationData: &armhybridcompute.LocationData{
			Name: to.Ptr("Redmond"),
		},
		OSProfile: &armhybridcompute.OSProfile{
			LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
				PatchSettings: &armhybridcompute.PatchSettings{
					AssessmentMode: to.Ptr(armhybridcompute.AssessmentModeTypesImageDefault),
					PatchMode:      to.Ptr(armhybridcompute.PatchModeTypesManual),
				},
			},
			WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
				PatchSettings: &armhybridcompute.PatchSettings{
					AssessmentMode: to.Ptr(armhybridcompute.AssessmentModeTypesImageDefault),
					PatchMode:      to.Ptr(armhybridcompute.PatchModeTypesManual),
				},
			},
		},
		ParentClusterResourceID:    to.Ptr("{AzureStackHCIResourceId}"),
		PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Machine = armhybridcompute.Machine{
// 	Name: to.Ptr("myMachine"),
// 	Type: to.Ptr("Microsoft.HybridCompute/machines"),
// 	ID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/machines/myMachine"),
// 	Location: to.Ptr("eastus2euap"),
// 	Identity: &armhybridcompute.Identity{
// 		Type: to.Ptr("SystemAssigned"),
// 		PrincipalID: to.Ptr("string"),
// 		TenantID: to.Ptr("string"),
// 	},
// 	Properties: &armhybridcompute.MachineProperties{
// 		ClientPublicKey: to.Ptr("string"),
// 		LicenseProfile: &armhybridcompute.LicenseProfileMachineInstanceView{
// 			EsuProfile: &armhybridcompute.LicenseProfileMachineInstanceViewEsuProperties{
// 				EsuKeys: []*armhybridcompute.EsuKey{
// 					{
// 						LicenseStatus: to.Ptr("licenseStatus1"),
// 						SKU: to.Ptr("skuNumber1"),
// 					},
// 					{
// 						LicenseStatus: to.Ptr("licenseStatus2"),
// 						SKU: to.Ptr("skuNumber2"),
// 				}},
// 				EsuEligibility: to.Ptr(armhybridcompute.EsuEligibilityIneligible),
// 				EsuKeyState: to.Ptr(armhybridcompute.EsuKeyStateInactive),
// 				ServerType: to.Ptr(armhybridcompute.EsuServerTypeStandard),
// 				LicenseAssignmentState: to.Ptr(armhybridcompute.LicenseAssignmentStateAssigned),
// 			},
// 			LicenseChannel: to.Ptr("PSG"),
// 			LicenseStatus: to.Ptr(armhybridcompute.LicenseStatusLicensed),
// 			ProductProfile: &armhybridcompute.LicenseProfileArmProductProfileProperties{
// 				BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 				DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
// 				EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 				ProductFeatures: []*armhybridcompute.ProductFeature{
// 					{
// 						Name: to.Ptr("HotPatching"),
// 						BillingStartDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 						DisenrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-11-05T20:36:49.745Z"); return t}()),
// 						EnrollmentDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2023-10-05T20:36:49.745Z"); return t}()),
// 						SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
// 				}},
// 				ProductType: to.Ptr(armhybridcompute.LicenseProfileProductTypeWindowsServer),
// 				SubscriptionStatus: to.Ptr(armhybridcompute.LicenseProfileSubscriptionStatusEnabled),
// 			},
// 			SoftwareAssurance: &armhybridcompute.LicenseProfileMachineInstanceViewSoftwareAssurance{
// 				SoftwareAssuranceCustomer: to.Ptr(true),
// 			},
// 		},
// 		LocationData: &armhybridcompute.LocationData{
// 			Name: to.Ptr("Redmond"),
// 		},
// 		OSEdition: to.Ptr("Standard"),
// 		OSProfile: &armhybridcompute.OSProfile{
// 			LinuxConfiguration: &armhybridcompute.OSProfileLinuxConfiguration{
// 				PatchSettings: &armhybridcompute.PatchSettings{
// 					AssessmentMode: to.Ptr(armhybridcompute.AssessmentModeTypesImageDefault),
// 					PatchMode: to.Ptr(armhybridcompute.PatchModeTypesManual),
// 				},
// 			},
// 			WindowsConfiguration: &armhybridcompute.OSProfileWindowsConfiguration{
// 				PatchSettings: &armhybridcompute.PatchSettings{
// 					AssessmentMode: to.Ptr(armhybridcompute.AssessmentModeTypesImageDefault),
// 					PatchMode: to.Ptr(armhybridcompute.PatchModeTypesManual),
// 				},
// 			},
// 		},
// 		ParentClusterResourceID: to.Ptr("{AzureStackHCIResourceId}"),
// 		PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		VMID: to.Ptr("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
// 	},
// }
Output:

type MachinesClientAssessPatchesResponse

type MachinesClientAssessPatchesResponse struct {
	// Describes the properties of an AssessPatches result.
	MachineAssessPatchesResult
}

MachinesClientAssessPatchesResponse contains the response from method MachinesClient.BeginAssessPatches.

type MachinesClientBeginAssessPatchesOptions

type MachinesClientBeginAssessPatchesOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MachinesClientBeginAssessPatchesOptions contains the optional parameters for the MachinesClient.BeginAssessPatches method.

type MachinesClientBeginInstallPatchesOptions

type MachinesClientBeginInstallPatchesOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

MachinesClientBeginInstallPatchesOptions contains the optional parameters for the MachinesClient.BeginInstallPatches method.

type MachinesClientDeleteOptions

type MachinesClientDeleteOptions struct {
}

MachinesClientDeleteOptions contains the optional parameters for the MachinesClient.Delete method.

type MachinesClientDeleteResponse

type MachinesClientDeleteResponse struct {
}

MachinesClientDeleteResponse contains the response from method MachinesClient.Delete.

type MachinesClientGetOptions

type MachinesClientGetOptions struct {
	// The expand expression to apply on the operation.
	Expand *string
}

MachinesClientGetOptions contains the optional parameters for the MachinesClient.Get method.

type MachinesClientGetResponse

type MachinesClientGetResponse struct {
	// Describes a hybrid machine.
	Machine
}

MachinesClientGetResponse contains the response from method MachinesClient.Get.

type MachinesClientInstallPatchesResponse

type MachinesClientInstallPatchesResponse struct {
	// The result summary of an installation operation.
	MachineInstallPatchesResult
}

MachinesClientInstallPatchesResponse contains the response from method MachinesClient.BeginInstallPatches.

type MachinesClientListByResourceGroupOptions

type MachinesClientListByResourceGroupOptions struct {
	// Expands referenced resources.
	Expand *string
}

MachinesClientListByResourceGroupOptions contains the optional parameters for the MachinesClient.NewListByResourceGroupPager method.

type MachinesClientListByResourceGroupResponse

type MachinesClientListByResourceGroupResponse struct {
	// The List hybrid machine operation response.
	MachineListResult
}

MachinesClientListByResourceGroupResponse contains the response from method MachinesClient.NewListByResourceGroupPager.

type MachinesClientListBySubscriptionOptions

type MachinesClientListBySubscriptionOptions struct {
}

MachinesClientListBySubscriptionOptions contains the optional parameters for the MachinesClient.NewListBySubscriptionPager method.

type MachinesClientListBySubscriptionResponse

type MachinesClientListBySubscriptionResponse struct {
	// The List hybrid machine operation response.
	MachineListResult
}

MachinesClientListBySubscriptionResponse contains the response from method MachinesClient.NewListBySubscriptionPager.

type MachinesClientUpdateOptions

type MachinesClientUpdateOptions struct {
}

MachinesClientUpdateOptions contains the optional parameters for the MachinesClient.Update method.

type MachinesClientUpdateResponse

type MachinesClientUpdateResponse struct {
	// Describes a hybrid machine.
	Machine
}

MachinesClientUpdateResponse contains the response from method MachinesClient.Update.

type ManagementClient

type ManagementClient struct {
	// contains filtered or unexported fields
}

ManagementClient contains the methods for the HybridComputeManagementClient group. Don't use this type directly, use NewManagementClient() instead.

func NewManagementClient

func NewManagementClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*ManagementClient, error)

NewManagementClient creates a new instance of ManagementClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*ManagementClient) BeginUpgradeExtensions

func (client *ManagementClient) BeginUpgradeExtensions(ctx context.Context, resourceGroupName string, machineName string, extensionUpgradeParameters MachineExtensionUpgrade, options *ManagementClientBeginUpgradeExtensionsOptions) (*runtime.Poller[ManagementClientUpgradeExtensionsResponse], error)

BeginUpgradeExtensions - The operation to Upgrade Machine Extensions. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • extensionUpgradeParameters - Parameters supplied to the Upgrade Extensions operation.
  • options - ManagementClientBeginUpgradeExtensionsOptions contains the optional parameters for the ManagementClient.BeginUpgradeExtensions method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extensions_Upgrade.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewManagementClient().BeginUpgradeExtensions(ctx, "myResourceGroup", "myMachine", armhybridcompute.MachineExtensionUpgrade{
	ExtensionTargets: map[string]*armhybridcompute.ExtensionTargetProperties{
		"Microsoft.Azure.Monitoring": {
			TargetVersion: to.Ptr("2.0"),
		},
		"Microsoft.Compute.CustomScriptExtension": {
			TargetVersion: to.Ptr("1.10"),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

type ManagementClientBeginUpgradeExtensionsOptions

type ManagementClientBeginUpgradeExtensionsOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

ManagementClientBeginUpgradeExtensionsOptions contains the optional parameters for the ManagementClient.BeginUpgradeExtensions method.

type ManagementClientUpgradeExtensionsResponse

type ManagementClientUpgradeExtensionsResponse struct {
}

ManagementClientUpgradeExtensionsResponse contains the response from method ManagementClient.BeginUpgradeExtensions.

type NetworkInterface

type NetworkInterface struct {
	// The list of IP addresses in this interface.
	IPAddresses []*IPAddress
}

NetworkInterface - Describes a network interface.

func (NetworkInterface) MarshalJSON

func (n NetworkInterface) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkInterface.

func (*NetworkInterface) UnmarshalJSON

func (n *NetworkInterface) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkInterface.

type NetworkProfile

type NetworkProfile struct {
	// The list of network interfaces.
	NetworkInterfaces []*NetworkInterface
}

NetworkProfile - Describes the network information on this machine.

func (NetworkProfile) MarshalJSON

func (n NetworkProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type NetworkProfile.

func (*NetworkProfile) UnmarshalJSON

func (n *NetworkProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type NetworkProfile.

type NetworkProfileClient

type NetworkProfileClient struct {
	// contains filtered or unexported fields
}

NetworkProfileClient contains the methods for the NetworkProfile group. Don't use this type directly, use NewNetworkProfileClient() instead.

func NewNetworkProfileClient

func NewNetworkProfileClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*NetworkProfileClient, error)

NewNetworkProfileClient creates a new instance of NetworkProfileClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*NetworkProfileClient) Get

func (client *NetworkProfileClient) Get(ctx context.Context, resourceGroupName string, machineName string, options *NetworkProfileClientGetOptions) (NetworkProfileClientGetResponse, error)

Get - The operation to get network information of hybrid machine If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the hybrid machine.
  • options - NetworkProfileClientGetOptions contains the optional parameters for the NetworkProfileClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/NetworkProfile_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewNetworkProfileClient().Get(ctx, "myResourceGroup", "myMachine", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.NetworkProfile = armhybridcompute.NetworkProfile{
// 	NetworkInterfaces: []*armhybridcompute.NetworkInterface{
// 		{
// 			IPAddresses: []*armhybridcompute.IPAddress{
// 				{
// 					Address: to.Ptr("192.168.12.345"),
// 					IPAddressVersion: to.Ptr("IPv4"),
// 					Subnet: &armhybridcompute.Subnet{
// 						AddressPrefix: to.Ptr("192.168.12.0/24"),
// 					},
// 			}},
// 		},
// 		{
// 			IPAddresses: []*armhybridcompute.IPAddress{
// 				{
// 					Address: to.Ptr("1001:0:34aa:5000:1234:aaaa:bbbb:cccc"),
// 					IPAddressVersion: to.Ptr("IPv6"),
// 					Subnet: &armhybridcompute.Subnet{
// 						AddressPrefix: to.Ptr("1001:0:34aa:5000::/64"),
// 					},
// 			}},
// 	}},
// }
Output:

type NetworkProfileClientGetOptions

type NetworkProfileClientGetOptions struct {
}

NetworkProfileClientGetOptions contains the optional parameters for the NetworkProfileClient.Get method.

type NetworkProfileClientGetResponse

type NetworkProfileClientGetResponse struct {
	// Describes the network information on this machine.
	NetworkProfile
}

NetworkProfileClientGetResponse contains the response from method NetworkProfileClient.Get.

type OSProfile

type OSProfile struct {
	// Specifies the linux configuration for update management.
	LinuxConfiguration *OSProfileLinuxConfiguration

	// Specifies the windows configuration for update management.
	WindowsConfiguration *OSProfileWindowsConfiguration

	// READ-ONLY; Specifies the host OS name of the hybrid machine.
	ComputerName *string
}

OSProfile - Specifies the operating system settings for the hybrid machine.

func (OSProfile) MarshalJSON

func (o OSProfile) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OSProfile.

func (*OSProfile) UnmarshalJSON

func (o *OSProfile) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OSProfile.

type OSProfileLinuxConfiguration

type OSProfileLinuxConfiguration struct {
	// Specifies the patch settings.
	PatchSettings *PatchSettings
}

OSProfileLinuxConfiguration - Specifies the linux configuration for update management.

func (OSProfileLinuxConfiguration) MarshalJSON

func (o OSProfileLinuxConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OSProfileLinuxConfiguration.

func (*OSProfileLinuxConfiguration) UnmarshalJSON

func (o *OSProfileLinuxConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OSProfileLinuxConfiguration.

type OSProfileWindowsConfiguration

type OSProfileWindowsConfiguration struct {
	// Specifies the patch settings.
	PatchSettings *PatchSettings
}

OSProfileWindowsConfiguration - Specifies the windows configuration for update management.

func (OSProfileWindowsConfiguration) MarshalJSON

func (o OSProfileWindowsConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OSProfileWindowsConfiguration.

func (*OSProfileWindowsConfiguration) UnmarshalJSON

func (o *OSProfileWindowsConfiguration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OSProfileWindowsConfiguration.

type OperationListResult

type OperationListResult struct {
	// READ-ONLY; The list of compute operations
	Value []*OperationValue
}

OperationListResult - The List Compute Operation operation response.

func (OperationListResult) MarshalJSON

func (o OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationListResult.

func (*OperationListResult) UnmarshalJSON

func (o *OperationListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationListResult.

type OperationValue

type OperationValue struct {
	// Display properties
	Display *OperationValueDisplay

	// READ-ONLY; This property indicates if the operation is an action or a data action
	IsDataAction *bool

	// READ-ONLY; The name of the compute operation.
	Name *string

	// READ-ONLY; The origin of the compute operation.
	Origin *string
}

OperationValue - Describes the properties of a Compute Operation value.

func (OperationValue) MarshalJSON

func (o OperationValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationValue.

func (*OperationValue) UnmarshalJSON

func (o *OperationValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationValue.

type OperationValueDisplay

type OperationValueDisplay struct {
	// READ-ONLY; The description of the operation.
	Description *string

	// READ-ONLY; The display name of the compute operation.
	Operation *string

	// READ-ONLY; The resource provider for the operation.
	Provider *string

	// READ-ONLY; The display name of the resource the operation applies to.
	Resource *string
}

OperationValueDisplay - Describes the properties of a Hybrid Compute Operation Value Display.

func (OperationValueDisplay) MarshalJSON

func (o OperationValueDisplay) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type OperationValueDisplay.

func (*OperationValueDisplay) UnmarshalJSON

func (o *OperationValueDisplay) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type OperationValueDisplay.

type OperationsClient

type OperationsClient struct {
	// contains filtered or unexported fields
}

OperationsClient contains the methods for the Operations group. Don't use this type directly, use NewOperationsClient() instead.

func NewOperationsClient

func NewOperationsClient(credential azcore.TokenCredential, options *arm.ClientOptions) (*OperationsClient, error)

NewOperationsClient creates a new instance of OperationsClient with the specified values.

  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*OperationsClient) NewListPager

NewListPager - Gets a list of hybrid compute operations.

Generated from API version 2023-10-03-preview

  • options - OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/Operations_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewOperationsClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.OperationListResult = armhybridcompute.OperationListResult{
	// 	Value: []*armhybridcompute.OperationValue{
	// 		{
	// 			Name: to.Ptr("Microsoft.HybridCompute/operations/read"),
	// 			Display: &armhybridcompute.OperationValueDisplay{
	// 				Description: to.Ptr("Read all Operations for Azure Arc for Servers"),
	// 				Operation: to.Ptr("Read all Operations"),
	// 				Provider: to.Ptr("Microsoft HybridCompute"),
	// 				Resource: to.Ptr("Microsoft.HybridCompute Resource Provider"),
	// 			},
	// 			IsDataAction: to.Ptr(true),
	// 			Origin: to.Ptr("user,system"),
	// 		},
	// 		{
	// 			Name: to.Ptr("Microsoft.HybridCompute/register/action"),
	// 			Display: &armhybridcompute.OperationValueDisplay{
	// 				Description: to.Ptr("Registers the subscription for the Microsoft.HybridCompute Resource Provider"),
	// 				Operation: to.Ptr("Register Subscription for Azure Arc for Servers"),
	// 				Provider: to.Ptr("Microsoft HybridCompute"),
	// 				Resource: to.Ptr("Microsoft.HybridCompute Resource Provider"),
	// 			},
	// 			IsDataAction: to.Ptr(true),
	// 			Origin: to.Ptr("user,system"),
	// 	}},
	// }
}
Output:

type OperationsClientListOptions

type OperationsClientListOptions struct {
}

OperationsClientListOptions contains the optional parameters for the OperationsClient.NewListPager method.

type OperationsClientListResponse

type OperationsClientListResponse struct {
	// The List Compute Operation operation response.
	OperationListResult
}

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type OsType

type OsType string

OsType - The operating system type of the machine.

const (
	OsTypeLinux   OsType = "Linux"
	OsTypeWindows OsType = "Windows"
)

func PossibleOsTypeValues

func PossibleOsTypeValues() []OsType

PossibleOsTypeValues returns the possible values for the OsType const type.

type PatchModeTypes

type PatchModeTypes string

PatchModeTypes - Specifies the patch mode.

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

func PossiblePatchModeTypesValues

func PossiblePatchModeTypesValues() []PatchModeTypes

PossiblePatchModeTypesValues returns the possible values for the PatchModeTypes const type.

type PatchOperationStartedBy

type PatchOperationStartedBy string

PatchOperationStartedBy - Indicates if operation was triggered by user or by platform.

const (
	PatchOperationStartedByPlatform PatchOperationStartedBy = "Platform"
	PatchOperationStartedByUser     PatchOperationStartedBy = "User"
)

func PossiblePatchOperationStartedByValues

func PossiblePatchOperationStartedByValues() []PatchOperationStartedBy

PossiblePatchOperationStartedByValues returns the possible values for the PatchOperationStartedBy const type.

type PatchOperationStatus

type PatchOperationStatus string

PatchOperationStatus - The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings."

const (
	PatchOperationStatusCompletedWithWarnings PatchOperationStatus = "CompletedWithWarnings"
	PatchOperationStatusFailed                PatchOperationStatus = "Failed"
	PatchOperationStatusInProgress            PatchOperationStatus = "InProgress"
	PatchOperationStatusSucceeded             PatchOperationStatus = "Succeeded"
	PatchOperationStatusUnknown               PatchOperationStatus = "Unknown"
)

func PossiblePatchOperationStatusValues

func PossiblePatchOperationStatusValues() []PatchOperationStatus

PossiblePatchOperationStatusValues returns the possible values for the PatchOperationStatus const type.

type PatchServiceUsed

type PatchServiceUsed string

PatchServiceUsed - Specifies the patch service used for the operation.

const (
	PatchServiceUsedAPT     PatchServiceUsed = "APT"
	PatchServiceUsedUnknown PatchServiceUsed = "Unknown"
	PatchServiceUsedWU      PatchServiceUsed = "WU"
	PatchServiceUsedWUWSUS  PatchServiceUsed = "WU_WSUS"
	PatchServiceUsedYUM     PatchServiceUsed = "YUM"
	PatchServiceUsedZypper  PatchServiceUsed = "Zypper"
)

func PossiblePatchServiceUsedValues

func PossiblePatchServiceUsedValues() []PatchServiceUsed

PossiblePatchServiceUsedValues returns the possible values for the PatchServiceUsed const type.

type PatchSettings

type PatchSettings struct {
	// Specifies the assessment mode.
	AssessmentMode *AssessmentModeTypes

	// Specifies the patch mode.
	PatchMode *PatchModeTypes
}

PatchSettings - Specifies the patch settings.

func (PatchSettings) MarshalJSON

func (p PatchSettings) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PatchSettings.

func (*PatchSettings) UnmarshalJSON

func (p *PatchSettings) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PatchSettings.

type PrivateEndpointConnection

type PrivateEndpointConnection struct {
	// Resource properties.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateEndpointConnection - A private endpoint connection

func (PrivateEndpointConnection) MarshalJSON

func (p PrivateEndpointConnection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnection.

func (*PrivateEndpointConnection) UnmarshalJSON

func (p *PrivateEndpointConnection) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnection.

type PrivateEndpointConnectionDataModel

type PrivateEndpointConnectionDataModel struct {
	// The Private Endpoint Connection properties.
	Properties *PrivateEndpointConnectionProperties

	// READ-ONLY; The ARM Resource Id of the Private Endpoint.
	ID *string

	// READ-ONLY; The Name of the Private Endpoint.
	Name *string

	// READ-ONLY; Azure resource type
	Type *string
}

PrivateEndpointConnectionDataModel - The Data Model for a Private Endpoint Connection associated with a Private Link Scope

func (PrivateEndpointConnectionDataModel) MarshalJSON

func (p PrivateEndpointConnectionDataModel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionDataModel.

func (*PrivateEndpointConnectionDataModel) UnmarshalJSON

func (p *PrivateEndpointConnectionDataModel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionDataModel.

type PrivateEndpointConnectionListResult

type PrivateEndpointConnectionListResult struct {
	// READ-ONLY; Link to retrieve next page of results.
	NextLink *string

	// READ-ONLY; Array of results.
	Value []*PrivateEndpointConnection
}

PrivateEndpointConnectionListResult - A list of private endpoint connections.

func (PrivateEndpointConnectionListResult) MarshalJSON

func (p PrivateEndpointConnectionListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionListResult.

func (*PrivateEndpointConnectionListResult) UnmarshalJSON

func (p *PrivateEndpointConnectionListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionListResult.

type PrivateEndpointConnectionProperties

type PrivateEndpointConnectionProperties struct {
	// Private endpoint which the connection belongs to.
	PrivateEndpoint *PrivateEndpointProperty

	// Connection state of the private endpoint connection.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionStateProperty

	// READ-ONLY; List of group IDs.
	GroupIDs []*string

	// READ-ONLY; State of the private endpoint connection.
	ProvisioningState *string
}

PrivateEndpointConnectionProperties - Properties of a private endpoint connection.

func (PrivateEndpointConnectionProperties) MarshalJSON

func (p PrivateEndpointConnectionProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON

func (p *PrivateEndpointConnectionProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointConnectionProperties.

type PrivateEndpointConnectionsClient

type PrivateEndpointConnectionsClient struct {
	// contains filtered or unexported fields
}

PrivateEndpointConnectionsClient contains the methods for the PrivateEndpointConnections group. Don't use this type directly, use NewPrivateEndpointConnectionsClient() instead.

func NewPrivateEndpointConnectionsClient

func NewPrivateEndpointConnectionsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateEndpointConnectionsClient, error)

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateEndpointConnectionsClient) BeginCreateOrUpdate

BeginCreateOrUpdate - Approve or reject a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • privateEndpointConnectionName - The name of the private endpoint connection.
  • options - PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginCreateOrUpdate(ctx, "myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", armhybridcompute.PrivateEndpointConnection{
	Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
		PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
			Description: to.Ptr("Approved by johndoe@contoso.com"),
			Status:      to.Ptr("Approved"),
		},
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnection = armhybridcompute.PrivateEndpointConnection{
// 	Name: to.Ptr("private-endpoint-connection-name"),
// 	Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
// 	Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
// 		GroupIDs: []*string{
// 			to.Ptr("hybridcompute")},
// 			PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
// 				ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
// 			},
// 			PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
// 				Description: to.Ptr("Approved by johndoe@contoso.com"),
// 				ActionsRequired: to.Ptr("None"),
// 				Status: to.Ptr("Approved"),
// 			},
// 			ProvisioningState: to.Ptr("Succeeded"),
// 		},
// 	}
Output:

func (*PrivateEndpointConnectionsClient) BeginDelete

func (client *PrivateEndpointConnectionsClient) BeginDelete(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientBeginDeleteOptions) (*runtime.Poller[PrivateEndpointConnectionsClientDeleteResponse], error)

BeginDelete - Deletes a private endpoint connection with a given name. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • privateEndpointConnectionName - The name of the private endpoint connection.
  • options - PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateEndpointConnectionsClient().BeginDelete(ctx, "myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*PrivateEndpointConnectionsClient) Get

func (client *PrivateEndpointConnectionsClient) Get(ctx context.Context, resourceGroupName string, scopeName string, privateEndpointConnectionName string, options *PrivateEndpointConnectionsClientGetOptions) (PrivateEndpointConnectionsClientGetResponse, error)

Get - Gets a private endpoint connection. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • privateEndpointConnectionName - The name of the private endpoint connection.
  • options - PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateEndpointConnectionsClient().Get(ctx, "myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateEndpointConnection = armhybridcompute.PrivateEndpointConnection{
// 	Name: to.Ptr("private-endpoint-connection-name"),
// 	Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
// 	Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
// 		GroupIDs: []*string{
// 			to.Ptr("hybridcompute")},
// 			PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
// 				ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
// 			},
// 			PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
// 				Description: to.Ptr("Auto-approved"),
// 				ActionsRequired: to.Ptr("None"),
// 				Status: to.Ptr("Approved"),
// 			},
// 			ProvisioningState: to.Ptr("Succeeded"),
// 		},
// 	}
Output:

func (*PrivateEndpointConnectionsClient) NewListByPrivateLinkScopePager

NewListByPrivateLinkScopePager - Gets all private endpoint connections on a private link scope.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • options - PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByPrivateLinkScopePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateEndpointConnectionsClient().NewListByPrivateLinkScopePager("myResourceGroup", "myPrivateLinkScope", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.PrivateEndpointConnectionListResult = armhybridcompute.PrivateEndpointConnectionListResult{
	// 	Value: []*armhybridcompute.PrivateEndpointConnection{
	// 		{
	// 			Name: to.Ptr("private-endpoint-connection-name"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name-2"),
	// 			Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
	// 				GroupIDs: []*string{
	// 					to.Ptr("hybridcompute")},
	// 					PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
	// 						ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
	// 					},
	// 					PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
	// 						Description: to.Ptr("Auto-approved"),
	// 						ActionsRequired: to.Ptr("None"),
	// 						Status: to.Ptr("Approved"),
	// 					},
	// 					ProvisioningState: to.Ptr("Succeeded"),
	// 				},
	// 			},
	// 			{
	// 				Name: to.Ptr("private-endpoint-connection-name-2"),
	// 				Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
	// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name-2"),
	// 				Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
	// 					GroupIDs: []*string{
	// 						to.Ptr("hybridcompute")},
	// 						PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
	// 							ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name-2"),
	// 						},
	// 						PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
	// 							Description: to.Ptr("Please approve my connection."),
	// 							ActionsRequired: to.Ptr("None"),
	// 							Status: to.Ptr("Pending"),
	// 						},
	// 						ProvisioningState: to.Ptr("Succeeded"),
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions

type PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginCreateOrUpdateOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginCreateOrUpdate method.

type PrivateEndpointConnectionsClientBeginDeleteOptions

type PrivateEndpointConnectionsClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateEndpointConnectionsClientBeginDeleteOptions contains the optional parameters for the PrivateEndpointConnectionsClient.BeginDelete method.

type PrivateEndpointConnectionsClientCreateOrUpdateResponse

type PrivateEndpointConnectionsClientCreateOrUpdateResponse struct {
	// A private endpoint connection
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions

type PrivateEndpointConnectionsClientGetOptions struct {
}

PrivateEndpointConnectionsClientGetOptions contains the optional parameters for the PrivateEndpointConnectionsClient.Get method.

type PrivateEndpointConnectionsClientGetResponse

type PrivateEndpointConnectionsClientGetResponse struct {
	// A private endpoint connection
	PrivateEndpointConnection
}

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions

type PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions struct {
}

PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateEndpointConnectionsClient.NewListByPrivateLinkScopePager method.

type PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse

type PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse struct {
	// A list of private endpoint connections.
	PrivateEndpointConnectionListResult
}

PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse contains the response from method PrivateEndpointConnectionsClient.NewListByPrivateLinkScopePager.

type PrivateEndpointProperty

type PrivateEndpointProperty struct {
	// Resource id of the private endpoint.
	ID *string
}

PrivateEndpointProperty - Private endpoint which the connection belongs to.

func (PrivateEndpointProperty) MarshalJSON

func (p PrivateEndpointProperty) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty.

func (*PrivateEndpointProperty) UnmarshalJSON

func (p *PrivateEndpointProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateEndpointProperty.

type PrivateLinkResource

type PrivateLinkResource struct {
	// Resource properties.
	Properties *PrivateLinkResourceProperties

	// READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string

	// READ-ONLY; The name of the resource
	Name *string

	// READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
	SystemData *SystemData

	// READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

PrivateLinkResource - A private link resource

func (PrivateLinkResource) MarshalJSON

func (p PrivateLinkResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResource.

func (*PrivateLinkResource) UnmarshalJSON

func (p *PrivateLinkResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResource.

type PrivateLinkResourceListResult

type PrivateLinkResourceListResult struct {
	// READ-ONLY; Link to retrieve next page of results.
	NextLink *string

	// READ-ONLY; Array of results.
	Value []*PrivateLinkResource
}

PrivateLinkResourceListResult - A list of private link resources

func (PrivateLinkResourceListResult) MarshalJSON

func (p PrivateLinkResourceListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceListResult.

func (*PrivateLinkResourceListResult) UnmarshalJSON

func (p *PrivateLinkResourceListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceListResult.

type PrivateLinkResourceProperties

type PrivateLinkResourceProperties struct {
	// READ-ONLY; The private link resource group id.
	GroupID *string

	// READ-ONLY; The private link resource required member names.
	RequiredMembers []*string

	// READ-ONLY; Required DNS zone names of the the private link resource.
	RequiredZoneNames []*string
}

PrivateLinkResourceProperties - Properties of a private link resource.

func (PrivateLinkResourceProperties) MarshalJSON

func (p PrivateLinkResourceProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkResourceProperties.

func (*PrivateLinkResourceProperties) UnmarshalJSON

func (p *PrivateLinkResourceProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkResourceProperties.

type PrivateLinkResourcesClient

type PrivateLinkResourcesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkResourcesClient contains the methods for the PrivateLinkResources group. Don't use this type directly, use NewPrivateLinkResourcesClient() instead.

func NewPrivateLinkResourcesClient

func NewPrivateLinkResourcesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkResourcesClient, error)

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkResourcesClient) Get

Get - Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • groupName - The name of the private link resource.
  • options - PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkResourcesClient().Get(ctx, "myResourceGroup", "myPrivateLinkScope", "hybridcompute", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkResource = armhybridcompute.PrivateLinkResource{
// 	Name: to.Ptr("hybridcompute"),
// 	Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateLinkResources"),
// 	ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateLinkResources/hybridcompute"),
// 	Properties: &armhybridcompute.PrivateLinkResourceProperties{
// 		GroupID: to.Ptr("hybridcompute"),
// 		RequiredMembers: []*string{
// 			to.Ptr("HybridCompute.Server"),
// 			to.Ptr("HybridCompute.K8sConfiguration"),
// 			to.Ptr("GuestConfig.DP")},
// 			RequiredZoneNames: []*string{
// 				to.Ptr("privatelink.his.arc.azure.com"),
// 				to.Ptr("privatelink.kubernetesconfiguration.azure.com"),
// 				to.Ptr("privatelink.Guestconfiguration.azure.com")},
// 			},
// 		}
Output:

func (*PrivateLinkResourcesClient) NewListByPrivateLinkScopePager

NewListByPrivateLinkScopePager - Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • options - PrivateLinkResourcesClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByPrivateLinkScopePager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateLinkResourcesClient().NewListByPrivateLinkScopePager("myResourceGroup", "myPrivateLinkScope", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.PrivateLinkResourceListResult = armhybridcompute.PrivateLinkResourceListResult{
	// 	Value: []*armhybridcompute.PrivateLinkResource{
	// 		{
	// 			Name: to.Ptr("hybridcompute"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateLinkResources"),
	// 			ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateLinkResources/hybridcompute"),
	// 			Properties: &armhybridcompute.PrivateLinkResourceProperties{
	// 				GroupID: to.Ptr("hybridcompute"),
	// 				RequiredMembers: []*string{
	// 					to.Ptr("HybridCompute.ServerDP"),
	// 					to.Ptr("HybridCompute.K8sConfigurationDP"),
	// 					to.Ptr("HybridCompute.GuestConfigDP")},
	// 					RequiredZoneNames: []*string{
	// 						to.Ptr("privatelink.his.arc.azure.com"),
	// 						to.Ptr("privatelink.kubernetesconfiguration.azure.com"),
	// 						to.Ptr("privatelink.Guestconfiguration.azure.com")},
	// 					},
	// 			}},
	// 		}
}
Output:

type PrivateLinkResourcesClientGetOptions

type PrivateLinkResourcesClientGetOptions struct {
}

PrivateLinkResourcesClientGetOptions contains the optional parameters for the PrivateLinkResourcesClient.Get method.

type PrivateLinkResourcesClientGetResponse

type PrivateLinkResourcesClientGetResponse struct {
	// A private link resource
	PrivateLinkResource
}

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListByPrivateLinkScopeOptions

type PrivateLinkResourcesClientListByPrivateLinkScopeOptions struct {
}

PrivateLinkResourcesClientListByPrivateLinkScopeOptions contains the optional parameters for the PrivateLinkResourcesClient.NewListByPrivateLinkScopePager method.

type PrivateLinkResourcesClientListByPrivateLinkScopeResponse

type PrivateLinkResourcesClientListByPrivateLinkScopeResponse struct {
	// A list of private link resources
	PrivateLinkResourceListResult
}

PrivateLinkResourcesClientListByPrivateLinkScopeResponse contains the response from method PrivateLinkResourcesClient.NewListByPrivateLinkScopePager.

type PrivateLinkScope

type PrivateLinkScope struct {
	// REQUIRED; Resource location
	Location *string

	// Properties that define a Azure Arc PrivateLinkScope resource.
	Properties *PrivateLinkScopeProperties

	// Resource tags
	Tags map[string]*string

	// READ-ONLY; Azure resource Id
	ID *string

	// READ-ONLY; Azure resource name
	Name *string

	// READ-ONLY; The system meta data relating to this resource.
	SystemData *SystemData

	// READ-ONLY; Azure resource type
	Type *string
}

PrivateLinkScope - An Azure Arc PrivateLinkScope definition.

func (PrivateLinkScope) MarshalJSON

func (p PrivateLinkScope) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScope.

func (*PrivateLinkScope) UnmarshalJSON

func (p *PrivateLinkScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScope.

type PrivateLinkScopeListResult

type PrivateLinkScopeListResult struct {
	// REQUIRED; List of Azure Arc PrivateLinkScope definitions.
	Value []*PrivateLinkScope

	// The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the
	// result set.
	NextLink *string
}

PrivateLinkScopeListResult - Describes the list of Azure Arc PrivateLinkScope resources.

func (PrivateLinkScopeListResult) MarshalJSON

func (p PrivateLinkScopeListResult) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopeListResult.

func (*PrivateLinkScopeListResult) UnmarshalJSON

func (p *PrivateLinkScopeListResult) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScopeListResult.

type PrivateLinkScopeProperties

type PrivateLinkScopeProperties struct {
	// Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints.
	PublicNetworkAccess *PublicNetworkAccessType

	// READ-ONLY; The collection of associated Private Endpoint Connections.
	PrivateEndpointConnections []*PrivateEndpointConnectionDataModel

	// READ-ONLY; The Guid id of the private link scope.
	PrivateLinkScopeID *string

	// READ-ONLY; Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it
	// is defined. Users cannot change this value but are able to read from it. Values will include
	// Provisioning ,Succeeded, Canceled and Failed.
	ProvisioningState *string
}

PrivateLinkScopeProperties - Properties that define a Azure Arc PrivateLinkScope resource.

func (PrivateLinkScopeProperties) MarshalJSON

func (p PrivateLinkScopeProperties) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopeProperties.

func (*PrivateLinkScopeProperties) UnmarshalJSON

func (p *PrivateLinkScopeProperties) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScopeProperties.

type PrivateLinkScopeValidationDetails

type PrivateLinkScopeValidationDetails struct {
	// List of Private Endpoint Connection details.
	ConnectionDetails []*ConnectionDetail

	// Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints.
	PublicNetworkAccess *PublicNetworkAccessType

	// READ-ONLY; Azure resource Id
	ID *string
}

func (PrivateLinkScopeValidationDetails) MarshalJSON

func (p PrivateLinkScopeValidationDetails) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopeValidationDetails.

func (*PrivateLinkScopeValidationDetails) UnmarshalJSON

func (p *PrivateLinkScopeValidationDetails) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScopeValidationDetails.

type PrivateLinkScopesClient

type PrivateLinkScopesClient struct {
	// contains filtered or unexported fields
}

PrivateLinkScopesClient contains the methods for the PrivateLinkScopes group. Don't use this type directly, use NewPrivateLinkScopesClient() instead.

func NewPrivateLinkScopesClient

func NewPrivateLinkScopesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*PrivateLinkScopesClient, error)

NewPrivateLinkScopesClient creates a new instance of PrivateLinkScopesClient with the specified values.

  • subscriptionID - The ID of the target subscription.
  • credential - used to authorize requests. Usually a credential from azidentity.
  • options - pass nil to accept the default values.

func (*PrivateLinkScopesClient) BeginDelete

BeginDelete - Deletes a Azure Arc PrivateLinkScope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • options - PrivateLinkScopesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkScopesClient.BeginDelete method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewPrivateLinkScopesClient().BeginDelete(ctx, "my-resource-group", "my-privatelinkscope", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
_, err = poller.PollUntilDone(ctx, nil)
if err != nil {
	log.Fatalf("failed to pull the result: %v", err)
}
Output:

func (*PrivateLinkScopesClient) CreateOrUpdate

CreateOrUpdate - Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • parameters - Properties that need to be specified to create or update a Azure Arc for Servers and Clusters PrivateLinkScope.
  • options - PrivateLinkScopesClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkScopesClient.CreateOrUpdate method.
Example (PrivateLinkScopeCreate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkScopesClient().CreateOrUpdate(ctx, "my-resource-group", "my-privatelinkscope", armhybridcompute.PrivateLinkScope{
	Location: to.Ptr("westus"),
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkScope = armhybridcompute.PrivateLinkScope{
// 	Name: to.Ptr("my-privatelinkscope"),
// 	Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-privatelinkscope"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armhybridcompute.PrivateLinkScopeProperties{
// 		PrivateEndpointConnections: []*armhybridcompute.PrivateEndpointConnectionDataModel{
// 			{
// 				Name: to.Ptr("private-endpoint-connection-name"),
// 				Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
// 				Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
// 						ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
// 					},
// 					PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
// 						Description: to.Ptr("Auto-approved"),
// 						ActionsRequired: to.Ptr("None"),
// 						Status: to.Ptr("Approved"),
// 					},
// 					ProvisioningState: to.Ptr("Succeeded"),
// 				},
// 		}},
// 		PrivateLinkScopeID: to.Ptr("e5dc51d3-92ed-4d7e-947a-775ea79b4919"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
// 	},
// }
Output:

Example (PrivateLinkScopeUpdate)

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkScopesClient().CreateOrUpdate(ctx, "my-resource-group", "my-privatelinkscope", armhybridcompute.PrivateLinkScope{
	Location: to.Ptr("westus"),
	Tags: map[string]*string{
		"Tag1": to.Ptr("Value1"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkScope = armhybridcompute.PrivateLinkScope{
// 	Name: to.Ptr("my-privatelinkscope"),
// 	Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridCompute/privateLinkScopes/my-privatelinkscope"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 		"Tag1": to.Ptr("Value1"),
// 	},
// 	Properties: &armhybridcompute.PrivateLinkScopeProperties{
// 		PrivateEndpointConnections: []*armhybridcompute.PrivateEndpointConnectionDataModel{
// 			{
// 				Name: to.Ptr("private-endpoint-connection-name"),
// 				Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
// 				Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
// 						ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
// 					},
// 					PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
// 						Description: to.Ptr("Auto-approved"),
// 						ActionsRequired: to.Ptr("None"),
// 						Status: to.Ptr("Approved"),
// 					},
// 					ProvisioningState: to.Ptr("Succeeded"),
// 				},
// 		}},
// 		PrivateLinkScopeID: to.Ptr("e5dc51d3-92ed-4d7e-947a-775ea79b4919"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
// 	},
// }
Output:

func (*PrivateLinkScopesClient) Get

Get - Returns a Azure Arc PrivateLinkScope. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • options - PrivateLinkScopesClientGetOptions contains the optional parameters for the PrivateLinkScopesClient.Get method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkScopesClient().Get(ctx, "my-resource-group", "my-privatelinkscope", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkScope = armhybridcompute.PrivateLinkScope{
// 	Name: to.Ptr("my-privatelinkscope"),
// 	Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-privatelinkscope"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 	},
// 	Properties: &armhybridcompute.PrivateLinkScopeProperties{
// 		PrivateEndpointConnections: []*armhybridcompute.PrivateEndpointConnectionDataModel{
// 			{
// 				Name: to.Ptr("private-endpoint-connection-name"),
// 				Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
// 				Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
// 						ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
// 					},
// 					PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
// 						Description: to.Ptr("Auto-approved"),
// 						ActionsRequired: to.Ptr("None"),
// 						Status: to.Ptr("Approved"),
// 					},
// 					ProvisioningState: to.Ptr("Succeeded"),
// 				},
// 		}},
// 		PrivateLinkScopeID: to.Ptr("f5dc51d3-92ed-4d7e-947a-775ea79b4919"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
// 	},
// }
Output:

func (*PrivateLinkScopesClient) GetValidationDetails

GetValidationDetails - Returns a Azure Arc PrivateLinkScope's validation details. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • location - The location of the target resource.
  • privateLinkScopeID - The id (Guid) of the Azure Arc PrivateLinkScope resource.
  • options - PrivateLinkScopesClientGetValidationDetailsOptions contains the optional parameters for the PrivateLinkScopesClient.GetValidationDetails method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkScopesClient().GetValidationDetails(ctx, "wus2", "f5dc51d3-92ed-4d7e-947a-775ea79b4919", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkScopeValidationDetails = armhybridcompute.PrivateLinkScopeValidationDetails{
// 	ConnectionDetails: []*armhybridcompute.ConnectionDetail{
// 		{
// 			GroupID: to.Ptr("groupId"),
// 			ID: to.Ptr("id"),
// 			LinkIdentifier: to.Ptr("linkId"),
// 			MemberName: to.Ptr("memberName"),
// 			PrivateIPAddress: to.Ptr("ip"),
// 	}},
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-privatelinkscope"),
// 	PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
// }
Output:

func (*PrivateLinkScopesClient) GetValidationDetailsForMachine

GetValidationDetailsForMachine - Returns a Azure Arc PrivateLinkScope's validation details for a given machine. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • machineName - The name of the target machine to get the private link scope validation details for.
  • options - PrivateLinkScopesClientGetValidationDetailsForMachineOptions contains the optional parameters for the PrivateLinkScopesClient.GetValidationDetailsForMachine method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkScopesClient().GetValidationDetailsForMachine(ctx, "my-resource-group", "machineName", nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkScopeValidationDetails = armhybridcompute.PrivateLinkScopeValidationDetails{
// 	ConnectionDetails: []*armhybridcompute.ConnectionDetail{
// 		{
// 			GroupID: to.Ptr("groupId"),
// 			ID: to.Ptr("id"),
// 			LinkIdentifier: to.Ptr("linkId"),
// 			MemberName: to.Ptr("memberName"),
// 			PrivateIPAddress: to.Ptr("ip"),
// 	}},
// 	ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-privatelinkscope"),
// 	PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
// }
Output:

func (*PrivateLinkScopesClient) NewListByResourceGroupPager

NewListByResourceGroupPager - Gets a list of Azure Arc PrivateLinkScopes within a resource group.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • options - PrivateLinkScopesClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkScopesClient.NewListByResourceGroupPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateLinkScopesClient().NewListByResourceGroupPager("my-resource-group", nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.PrivateLinkScopeListResult = armhybridcompute.PrivateLinkScopeListResult{
	// 	Value: []*armhybridcompute.PrivateLinkScope{
	// 		{
	// 			Name: to.Ptr("my-privatelinkscope"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
	// 			ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-privatelinkscope"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Properties: &armhybridcompute.PrivateLinkScopeProperties{
	// 				PrivateEndpointConnections: []*armhybridcompute.PrivateEndpointConnectionDataModel{
	// 					{
	// 						Name: to.Ptr("private-endpoint-connection-name"),
	// 						Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
	// 						Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
	// 								ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
	// 								Description: to.Ptr("Auto-approved"),
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr("Approved"),
	// 							},
	// 							ProvisioningState: to.Ptr("Succeeded"),
	// 						},
	// 				}},
	// 				PrivateLinkScopeID: to.Ptr("f5dc51d3-92ed-4d7e-947a-775ea79b4919"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("my-other-privatelinkscope"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
	// 			ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-other-privatelinkscope"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Properties: &armhybridcompute.PrivateLinkScopeProperties{
	// 				PrivateEndpointConnections: []*armhybridcompute.PrivateEndpointConnectionDataModel{
	// 					{
	// 						Name: to.Ptr("private-endpoint-connection-name"),
	// 						Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
	// 						Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
	// 								ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
	// 								Description: to.Ptr("Auto-approved"),
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr("Approved"),
	// 							},
	// 							ProvisioningState: to.Ptr("Succeeded"),
	// 						},
	// 				}},
	// 				PrivateLinkScopeID: to.Ptr("a5dc51d3-92ed-4d7e-947a-775ea79b4919"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
	// 			},
	// 	}},
	// }
}
Output:

func (*PrivateLinkScopesClient) NewListPager

NewListPager - Gets a list of all Azure Arc PrivateLinkScopes within a subscription.

Generated from API version 2023-10-03-preview

  • options - PrivateLinkScopesClientListOptions contains the optional parameters for the PrivateLinkScopesClient.NewListPager method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_List.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
pager := clientFactory.NewPrivateLinkScopesClient().NewListPager(nil)
for pager.More() {
	page, err := pager.NextPage(ctx)
	if err != nil {
		log.Fatalf("failed to advance page: %v", err)
	}
	for _, v := range page.Value {
		// You could use page here. We use blank identifier for just demo purposes.
		_ = v
	}
	// If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
	// page.PrivateLinkScopeListResult = armhybridcompute.PrivateLinkScopeListResult{
	// 	Value: []*armhybridcompute.PrivateLinkScope{
	// 		{
	// 			Name: to.Ptr("my-privatelinkscope"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
	// 			ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-privatelinkscope"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Properties: &armhybridcompute.PrivateLinkScopeProperties{
	// 				PrivateLinkScopeID: to.Ptr("e5dc51d3-92ed-4d7e-947a-775ea79b4919"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
	// 			},
	// 		},
	// 		{
	// 			Name: to.Ptr("my-other-privatelinkscope"),
	// 			Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
	// 			ID: to.Ptr("/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4919/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-other-privatelinkscope"),
	// 			Location: to.Ptr("westus"),
	// 			Tags: map[string]*string{
	// 			},
	// 			Properties: &armhybridcompute.PrivateLinkScopeProperties{
	// 				PrivateEndpointConnections: []*armhybridcompute.PrivateEndpointConnectionDataModel{
	// 					{
	// 						Name: to.Ptr("private-endpoint-connection-name"),
	// 						Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
	// 						ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
	// 						Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
	// 							PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
	// 								ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
	// 							},
	// 							PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
	// 								Description: to.Ptr("Auto-approved"),
	// 								ActionsRequired: to.Ptr("None"),
	// 								Status: to.Ptr("Approved"),
	// 							},
	// 							ProvisioningState: to.Ptr("Succeeded"),
	// 						},
	// 				}},
	// 				PrivateLinkScopeID: to.Ptr("f5dc51d3-92ed-4d7e-947a-775ea79b4919"),
	// 				ProvisioningState: to.Ptr("Succeeded"),
	// 				PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
	// 			},
	// 	}},
	// }
}
Output:

func (*PrivateLinkScopesClient) UpdateTags

func (client *PrivateLinkScopesClient) UpdateTags(ctx context.Context, resourceGroupName string, scopeName string, privateLinkScopeTags TagsResource, options *PrivateLinkScopesClientUpdateTagsOptions) (PrivateLinkScopesClientUpdateTagsResponse, error)

UpdateTags - Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2023-10-03-preview

  • resourceGroupName - The name of the resource group. The name is case insensitive.
  • scopeName - The name of the Azure Arc PrivateLinkScope resource.
  • privateLinkScopeTags - Updated tag information to set into the PrivateLinkScope instance.
  • options - PrivateLinkScopesClientUpdateTagsOptions contains the optional parameters for the PrivateLinkScopesClient.UpdateTags method.
Example

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/71a0c7adf2a6e169ab9a33c7cf36bb93db083e86/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json

cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
	log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armhybridcompute.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
	log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewPrivateLinkScopesClient().UpdateTags(ctx, "my-resource-group", "my-privatelinkscope", armhybridcompute.TagsResource{
	Tags: map[string]*string{
		"Tag1": to.Ptr("Value1"),
		"Tag2": to.Ptr("Value2"),
	},
}, nil)
if err != nil {
	log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.PrivateLinkScope = armhybridcompute.PrivateLinkScope{
// 	Name: to.Ptr("my-privatelinkscope"),
// 	Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes"),
// 	ID: to.Ptr("/subscriptions/subid/resourceGroups/my-resource-group/providers/microsoft.hybridcompute/privateLinkScopes/my-privatelinkscope"),
// 	Location: to.Ptr("westus"),
// 	Tags: map[string]*string{
// 		"Tag1": to.Ptr("Value1"),
// 		"Tag2": to.Ptr("Value2"),
// 	},
// 	Properties: &armhybridcompute.PrivateLinkScopeProperties{
// 		PrivateEndpointConnections: []*armhybridcompute.PrivateEndpointConnectionDataModel{
// 			{
// 				Name: to.Ptr("private-endpoint-connection-name"),
// 				Type: to.Ptr("Microsoft.HybridCompute/privateLinkScopes/privateEndpointConnections"),
// 				ID: to.Ptr("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/myPrivateLinkScope/privateEndpointConnections/private-endpoint-connection-name"),
// 				Properties: &armhybridcompute.PrivateEndpointConnectionProperties{
// 					PrivateEndpoint: &armhybridcompute.PrivateEndpointProperty{
// 						ID: to.Ptr("/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"),
// 					},
// 					PrivateLinkServiceConnectionState: &armhybridcompute.PrivateLinkServiceConnectionStateProperty{
// 						Description: to.Ptr("Auto-approved"),
// 						ActionsRequired: to.Ptr("None"),
// 						Status: to.Ptr("Approved"),
// 					},
// 					ProvisioningState: to.Ptr("Succeeded"),
// 				},
// 		}},
// 		PrivateLinkScopeID: to.Ptr("e5dc51d3-92ed-4d7e-947a-775ea79b4919"),
// 		ProvisioningState: to.Ptr("Succeeded"),
// 		PublicNetworkAccess: to.Ptr(armhybridcompute.PublicNetworkAccessTypeDisabled),
// 	},
// }
Output:

type PrivateLinkScopesClientBeginDeleteOptions

type PrivateLinkScopesClientBeginDeleteOptions struct {
	// Resumes the LRO from the provided token.
	ResumeToken string
}

PrivateLinkScopesClientBeginDeleteOptions contains the optional parameters for the PrivateLinkScopesClient.BeginDelete method.

type PrivateLinkScopesClientCreateOrUpdateOptions

type PrivateLinkScopesClientCreateOrUpdateOptions struct {
}

PrivateLinkScopesClientCreateOrUpdateOptions contains the optional parameters for the PrivateLinkScopesClient.CreateOrUpdate method.

type PrivateLinkScopesClientCreateOrUpdateResponse

type PrivateLinkScopesClientCreateOrUpdateResponse struct {
	// An Azure Arc PrivateLinkScope definition.
	PrivateLinkScope
}

PrivateLinkScopesClientCreateOrUpdateResponse contains the response from method PrivateLinkScopesClient.CreateOrUpdate.

type PrivateLinkScopesClientDeleteResponse

type PrivateLinkScopesClientDeleteResponse struct {
}

PrivateLinkScopesClientDeleteResponse contains the response from method PrivateLinkScopesClient.BeginDelete.

type PrivateLinkScopesClientGetOptions

type PrivateLinkScopesClientGetOptions struct {
}

PrivateLinkScopesClientGetOptions contains the optional parameters for the PrivateLinkScopesClient.Get method.

type PrivateLinkScopesClientGetResponse

type PrivateLinkScopesClientGetResponse struct {
	// An Azure Arc PrivateLinkScope definition.
	PrivateLinkScope
}

PrivateLinkScopesClientGetResponse contains the response from method PrivateLinkScopesClient.Get.

type PrivateLinkScopesClientGetValidationDetailsForMachineOptions

type PrivateLinkScopesClientGetValidationDetailsForMachineOptions struct {
}

PrivateLinkScopesClientGetValidationDetailsForMachineOptions contains the optional parameters for the PrivateLinkScopesClient.GetValidationDetailsForMachine method.

type PrivateLinkScopesClientGetValidationDetailsForMachineResponse

type PrivateLinkScopesClientGetValidationDetailsForMachineResponse struct {
	PrivateLinkScopeValidationDetails
}

PrivateLinkScopesClientGetValidationDetailsForMachineResponse contains the response from method PrivateLinkScopesClient.GetValidationDetailsForMachine.

type PrivateLinkScopesClientGetValidationDetailsOptions

type PrivateLinkScopesClientGetValidationDetailsOptions struct {
}

PrivateLinkScopesClientGetValidationDetailsOptions contains the optional parameters for the PrivateLinkScopesClient.GetValidationDetails method.

type PrivateLinkScopesClientGetValidationDetailsResponse

type PrivateLinkScopesClientGetValidationDetailsResponse struct {
	PrivateLinkScopeValidationDetails
}

PrivateLinkScopesClientGetValidationDetailsResponse contains the response from method PrivateLinkScopesClient.GetValidationDetails.

type PrivateLinkScopesClientListByResourceGroupOptions

type PrivateLinkScopesClientListByResourceGroupOptions struct {
}

PrivateLinkScopesClientListByResourceGroupOptions contains the optional parameters for the PrivateLinkScopesClient.NewListByResourceGroupPager method.

type PrivateLinkScopesClientListByResourceGroupResponse

type PrivateLinkScopesClientListByResourceGroupResponse struct {
	// Describes the list of Azure Arc PrivateLinkScope resources.
	PrivateLinkScopeListResult
}

PrivateLinkScopesClientListByResourceGroupResponse contains the response from method PrivateLinkScopesClient.NewListByResourceGroupPager.

type PrivateLinkScopesClientListOptions

type PrivateLinkScopesClientListOptions struct {
}

PrivateLinkScopesClientListOptions contains the optional parameters for the PrivateLinkScopesClient.NewListPager method.

type PrivateLinkScopesClientListResponse

type PrivateLinkScopesClientListResponse struct {
	// Describes the list of Azure Arc PrivateLinkScope resources.
	PrivateLinkScopeListResult
}

PrivateLinkScopesClientListResponse contains the response from method PrivateLinkScopesClient.NewListPager.

type PrivateLinkScopesClientUpdateTagsOptions

type PrivateLinkScopesClientUpdateTagsOptions struct {
}

PrivateLinkScopesClientUpdateTagsOptions contains the optional parameters for the PrivateLinkScopesClient.UpdateTags method.

type PrivateLinkScopesClientUpdateTagsResponse

type PrivateLinkScopesClientUpdateTagsResponse struct {
	// An Azure Arc PrivateLinkScope definition.
	PrivateLinkScope
}

PrivateLinkScopesClientUpdateTagsResponse contains the response from method PrivateLinkScopesClient.UpdateTags.

type PrivateLinkServiceConnectionStateProperty

type PrivateLinkServiceConnectionStateProperty struct {
	// REQUIRED; The private link service connection description.
	Description *string

	// REQUIRED; The private link service connection status.
	Status *string

	// READ-ONLY; The actions required for private link service connection.
	ActionsRequired *string
}

PrivateLinkServiceConnectionStateProperty - State of the private endpoint connection.

func (PrivateLinkServiceConnectionStateProperty) MarshalJSON

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty.

func (*PrivateLinkServiceConnectionStateProperty) UnmarshalJSON

func (p *PrivateLinkServiceConnectionStateProperty) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty.

type ProductFeature

type ProductFeature struct {
	// Product feature name.
	Name *string

	// Indicates the current status of the product features.
	SubscriptionStatus *LicenseProfileSubscriptionStatus

	// READ-ONLY; The timestamp in UTC when the billing starts.
	BillingStartDate *time.Time

	// READ-ONLY; The timestamp in UTC when the user disenrolled the feature.
	DisenrollmentDate *time.Time

	// READ-ONLY; The timestamp in UTC when the user enrolls the feature.
	EnrollmentDate *time.Time
}

ProductFeature - Product Feature

func (ProductFeature) MarshalJSON

func (p ProductFeature) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ProductFeature.

func (*ProductFeature) UnmarshalJSON

func (p *ProductFeature) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ProductFeature.

type ProvisioningState

type ProvisioningState string

ProvisioningState - The provisioning state, which only appears in the response.

const (
	ProvisioningStateAccepted  ProvisioningState = "Accepted"
	ProvisioningStateCanceled  ProvisioningState = "Canceled"
	ProvisioningStateCreating  ProvisioningState = "Creating"
	ProvisioningStateDeleted   ProvisioningState = "Deleted"
	ProvisioningStateDeleting  ProvisioningState = "Deleting"
	ProvisioningStateFailed    ProvisioningState = "Failed"
	ProvisioningStateSucceeded ProvisioningState = "Succeeded"
	ProvisioningStateUpdating  ProvisioningState = "Updating"
)

func PossibleProvisioningStateValues

func PossibleProvisioningStateValues() []ProvisioningState

PossibleProvisioningStateValues returns the possible values for the ProvisioningState const type.

type PublicNetworkAccessType

type PublicNetworkAccessType string

PublicNetworkAccessType - The network access policy to determine if Azure Arc agents can use public Azure Arc service endpoints. Defaults to disabled (access to Azure Arc services only via private link).

const (
	// PublicNetworkAccessTypeDisabled - Does not allow Azure Arc agents to communicate with Azure Arc services over public (internet)
	// endpoints. The agents must use the private link.
	PublicNetworkAccessTypeDisabled PublicNetworkAccessType = "Disabled"
	// PublicNetworkAccessTypeEnabled - Allows Azure Arc agents to communicate with Azure Arc services over both public (internet)
	// and private endpoints.
	PublicNetworkAccessTypeEnabled PublicNetworkAccessType = "Enabled"
)

func PossiblePublicNetworkAccessTypeValues

func PossiblePublicNetworkAccessTypeValues() []PublicNetworkAccessType

PossiblePublicNetworkAccessTypeValues returns the possible values for the PublicNetworkAccessType const type.

type RunCommandInputParameter

type RunCommandInputParameter struct {
	// REQUIRED; The run command parameter name.
	Name *string

	// REQUIRED; The run command parameter value.
	Value *string
}

RunCommandInputParameter - Describes the properties of a run command parameter.

func (RunCommandInputParameter) MarshalJSON

func (r RunCommandInputParameter) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RunCommandInputParameter.

func (*RunCommandInputParameter) UnmarshalJSON

func (r *RunCommandInputParameter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandInputParameter.

type RunCommandManagedIdentity

type RunCommandManagedIdentity struct {
	// Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided.
	ClientID *string

	// Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided.
	ObjectID *string
}

RunCommandManagedIdentity - Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for Append blobs(outputBlobUri, errorBlobUri). In case of user assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged.

func (RunCommandManagedIdentity) MarshalJSON

func (r RunCommandManagedIdentity) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type RunCommandManagedIdentity.

func (*RunCommandManagedIdentity) UnmarshalJSON

func (r *RunCommandManagedIdentity) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type RunCommandManagedIdentity.

type ServiceStatus

type ServiceStatus struct {
	// The behavior of the service when the Arc-enabled machine starts up.
	StartupType *string

	// The current status of the service.
	Status *string
}

ServiceStatus - Describes the status and behavior of a service.

func (ServiceStatus) MarshalJSON

func (s ServiceStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceStatus.

func (*ServiceStatus) UnmarshalJSON

func (s *ServiceStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceStatus.

type ServiceStatuses

type ServiceStatuses struct {
	// The state of the extension service on the Arc-enabled machine.
	ExtensionService *ServiceStatus

	// The state of the guest configuration service on the Arc-enabled machine.
	GuestConfigurationService *ServiceStatus
}

ServiceStatuses - Reports the state and behavior of dependent services.

func (ServiceStatuses) MarshalJSON

func (s ServiceStatuses) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceStatuses.

func (*ServiceStatuses) UnmarshalJSON

func (s *ServiceStatuses) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceStatuses.

type StatusLevelTypes

type StatusLevelTypes string

StatusLevelTypes - The level code.

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

func PossibleStatusLevelTypesValues

func PossibleStatusLevelTypesValues() []StatusLevelTypes

PossibleStatusLevelTypesValues returns the possible values for the StatusLevelTypes const type.

type StatusTypes

type StatusTypes string

StatusTypes - The status of the hybrid machine agent.

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

func PossibleStatusTypesValues

func PossibleStatusTypesValues() []StatusTypes

PossibleStatusTypesValues returns the possible values for the StatusTypes const type.

type Subnet

type Subnet struct {
	// Represents address prefix.
	AddressPrefix *string
}

Subnet - Describes the subnet.

func (Subnet) MarshalJSON

func (s Subnet) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Subnet.

func (*Subnet) UnmarshalJSON

func (s *Subnet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Subnet.

type SystemData

type SystemData struct {
	// The timestamp of resource creation (UTC).
	CreatedAt *time.Time

	// The identity that created the resource.
	CreatedBy *string

	// The type of identity that created the resource.
	CreatedByType *CreatedByType

	// The timestamp of resource last modification (UTC)
	LastModifiedAt *time.Time

	// The identity that last modified the resource.
	LastModifiedBy *string

	// The type of identity that last modified the resource.
	LastModifiedByType *CreatedByType
}

SystemData - Metadata pertaining to creation and last modification of the resource.

func (SystemData) MarshalJSON

func (s SystemData) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type SystemData.

func (*SystemData) UnmarshalJSON

func (s *SystemData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type SystemData.

type TagsResource

type TagsResource struct {
	// Resource tags
	Tags map[string]*string
}

TagsResource - A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance.

func (TagsResource) MarshalJSON

func (t TagsResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TagsResource.

func (*TagsResource) UnmarshalJSON

func (t *TagsResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagsResource.

type VMGuestPatchClassificationLinux

type VMGuestPatchClassificationLinux string
const (
	VMGuestPatchClassificationLinuxCritical VMGuestPatchClassificationLinux = "Critical"
	VMGuestPatchClassificationLinuxOther    VMGuestPatchClassificationLinux = "Other"
	VMGuestPatchClassificationLinuxSecurity VMGuestPatchClassificationLinux = "Security"
)

func PossibleVMGuestPatchClassificationLinuxValues

func PossibleVMGuestPatchClassificationLinuxValues() []VMGuestPatchClassificationLinux

PossibleVMGuestPatchClassificationLinuxValues returns the possible values for the VMGuestPatchClassificationLinux const type.

type VMGuestPatchClassificationWindows

type VMGuestPatchClassificationWindows string
const (
	VMGuestPatchClassificationWindowsCritical     VMGuestPatchClassificationWindows = "Critical"
	VMGuestPatchClassificationWindowsDefinition   VMGuestPatchClassificationWindows = "Definition"
	VMGuestPatchClassificationWindowsFeaturePack  VMGuestPatchClassificationWindows = "FeaturePack"
	VMGuestPatchClassificationWindowsSecurity     VMGuestPatchClassificationWindows = "Security"
	VMGuestPatchClassificationWindowsServicePack  VMGuestPatchClassificationWindows = "ServicePack"
	VMGuestPatchClassificationWindowsTools        VMGuestPatchClassificationWindows = "Tools"
	VMGuestPatchClassificationWindowsUpdateRollUp VMGuestPatchClassificationWindows = "UpdateRollUp"
	VMGuestPatchClassificationWindowsUpdates      VMGuestPatchClassificationWindows = "Updates"
)

func PossibleVMGuestPatchClassificationWindowsValues

func PossibleVMGuestPatchClassificationWindowsValues() []VMGuestPatchClassificationWindows

PossibleVMGuestPatchClassificationWindowsValues returns the possible values for the VMGuestPatchClassificationWindows const type.

type VMGuestPatchRebootSetting

type VMGuestPatchRebootSetting string

VMGuestPatchRebootSetting - Defines when it is acceptable to reboot a VM during a software update operation.

const (
	VMGuestPatchRebootSettingAlways     VMGuestPatchRebootSetting = "Always"
	VMGuestPatchRebootSettingIfRequired VMGuestPatchRebootSetting = "IfRequired"
	VMGuestPatchRebootSettingNever      VMGuestPatchRebootSetting = "Never"
)

func PossibleVMGuestPatchRebootSettingValues

func PossibleVMGuestPatchRebootSettingValues() []VMGuestPatchRebootSetting

PossibleVMGuestPatchRebootSettingValues returns the possible values for the VMGuestPatchRebootSetting const type.

type VMGuestPatchRebootStatus

type VMGuestPatchRebootStatus string

VMGuestPatchRebootStatus - The reboot state of the VM following completion of the operation.

const (
	VMGuestPatchRebootStatusCompleted VMGuestPatchRebootStatus = "Completed"
	VMGuestPatchRebootStatusFailed    VMGuestPatchRebootStatus = "Failed"
	VMGuestPatchRebootStatusNotNeeded VMGuestPatchRebootStatus = "NotNeeded"
	VMGuestPatchRebootStatusRequired  VMGuestPatchRebootStatus = "Required"
	VMGuestPatchRebootStatusStarted   VMGuestPatchRebootStatus = "Started"
	VMGuestPatchRebootStatusUnknown   VMGuestPatchRebootStatus = "Unknown"
)

func PossibleVMGuestPatchRebootStatusValues

func PossibleVMGuestPatchRebootStatusValues() []VMGuestPatchRebootStatus

PossibleVMGuestPatchRebootStatusValues returns the possible values for the VMGuestPatchRebootStatus const type.

type WindowsParameters

type WindowsParameters struct {
	// The update classifications to select when installing patches for Windows.
	ClassificationsToInclude []*VMGuestPatchClassificationWindows

	// Filters out Kbs that don't have an InstallationRebootBehavior of 'NeverReboots' when this is set to true.
	ExcludeKbsRequiringReboot *bool

	// Kbs to exclude in the patch operation
	KbNumbersToExclude []*string

	// Kbs to include in the patch operation
	KbNumbersToInclude []*string

	// This is used to install patches that were published on or before this given max published date.
	MaxPatchPublishDate *time.Time
}

WindowsParameters - Input for InstallPatches on a Windows VM, as directly received by the API

func (WindowsParameters) MarshalJSON

func (w WindowsParameters) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type WindowsParameters.

func (*WindowsParameters) UnmarshalJSON

func (w *WindowsParameters) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type WindowsParameters.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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