armhybridcompute

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 14 Imported by: 6

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

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.NewMachinesClient()

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 added in v0.3.0

type AgentConfiguration struct {
	// 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 added in v0.3.0

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

MarshalJSON implements the json.Marshaller interface for type AgentConfiguration.

func (*AgentConfiguration) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type AgentConfiguration.

type AssessmentModeTypes added in v1.0.0

type AssessmentModeTypes string

AssessmentModeTypes - Specifies the assessment mode.

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

func PossibleAssessmentModeTypesValues added in v1.0.0

func PossibleAssessmentModeTypesValues() []AssessmentModeTypes

PossibleAssessmentModeTypesValues returns the possible values for the AssessmentModeTypes const type.

type ClientFactory added in v1.1.0

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 added in v1.1.0

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) NewMachineExtensionsClient added in v1.1.0

func (c *ClientFactory) NewMachineExtensionsClient() *MachineExtensionsClient

NewMachineExtensionsClient creates a new instance of MachineExtensionsClient.

func (*ClientFactory) NewMachinesClient added in v1.1.0

func (c *ClientFactory) NewMachinesClient() *MachinesClient

NewMachinesClient creates a new instance of MachinesClient.

func (*ClientFactory) NewManagementClient added in v1.1.0

func (c *ClientFactory) NewManagementClient() *ManagementClient

NewManagementClient creates a new instance of ManagementClient.

func (*ClientFactory) NewOperationsClient added in v1.1.0

func (c *ClientFactory) NewOperationsClient() *OperationsClient

NewOperationsClient creates a new instance of OperationsClient.

func (*ClientFactory) NewPrivateEndpointConnectionsClient added in v1.1.0

func (c *ClientFactory) NewPrivateEndpointConnectionsClient() *PrivateEndpointConnectionsClient

NewPrivateEndpointConnectionsClient creates a new instance of PrivateEndpointConnectionsClient.

func (*ClientFactory) NewPrivateLinkResourcesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkResourcesClient() *PrivateLinkResourcesClient

NewPrivateLinkResourcesClient creates a new instance of PrivateLinkResourcesClient.

func (*ClientFactory) NewPrivateLinkScopesClient added in v1.1.0

func (c *ClientFactory) NewPrivateLinkScopesClient() *PrivateLinkScopesClient

NewPrivateLinkScopesClient creates a new instance of PrivateLinkScopesClient.

type CloudMetadata added in v0.3.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type CloudMetadata.

func (*CloudMetadata) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type CloudMetadata.

type ConfigurationExtension added in v1.0.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConfigurationExtension.

func (*ConfigurationExtension) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ConnectionDetail.

func (*ConnectionDetail) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorAdditionalInfo.

func (*ErrorAdditionalInfo) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorDetail.

type ErrorResponse

type ErrorResponse struct {
	// The error object.
	Error *ErrorDetail
}

ErrorResponse - Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

func (ErrorResponse) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ErrorResponse.

func (*ErrorResponse) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ErrorResponse.

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ExtensionTargetProperties.

func (*ExtensionTargetProperties) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ExtensionTargetProperties.

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type Identity.

func (*Identity) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Identity.

type InstanceViewTypes

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

func PossibleInstanceViewTypesValues

func PossibleInstanceViewTypesValues() []InstanceViewTypes

PossibleInstanceViewTypesValues returns the possible values for the InstanceViewTypes const type.

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type LocationData.

func (*LocationData) UnmarshalJSON added in v1.1.0

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

	// 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 system meta data relating to this resource.
	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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type Machine.

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; The system meta data relating to this resource.
	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 added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachineExtensionInstanceView.

func (*MachineExtensionInstanceView) UnmarshalJSON added in v1.1.0

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 any

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

	// Json formatted public settings for the extension.
	Settings 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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachineExtensionProperties.

func (*MachineExtensionProperties) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

	// 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 any

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

	// Json formatted public settings for the extension.
	Settings 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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachineExtensionUpdateProperties.

func (*MachineExtensionUpdateProperties) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PUTExtension.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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: "@{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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/DELETEExtension.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/UpdateExtension.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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"),
			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),
	// 		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: "@{commandToExecute=powershell.exe -c \"Get-Process | Where-Object { $_.CPU -lt 100 }\"}",
	// 		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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/GETExtension.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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: "@{commandToExecute=powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\"}",
	// 		TypeHandlerVersion: to.Ptr("1.10.3"),
	// 	},
	// }
}
Output:

func (*MachineExtensionsClient) NewListPager added in v0.4.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/LISTExtension.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.2.0

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

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

type MachineExtensionsClientBeginDeleteOptions added in v0.2.0

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

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

type MachineExtensionsClientBeginUpdateOptions added in v0.2.0

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

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

type MachineExtensionsClientCreateOrUpdateResponse added in v0.2.0

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

MachineExtensionsClientCreateOrUpdateResponse contains the response from method MachineExtensionsClient.BeginCreateOrUpdate.

type MachineExtensionsClientDeleteResponse added in v0.2.0

type MachineExtensionsClientDeleteResponse struct {
}

MachineExtensionsClientDeleteResponse contains the response from method MachineExtensionsClient.BeginDelete.

type MachineExtensionsClientGetOptions added in v0.2.0

type MachineExtensionsClientGetOptions struct {
}

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

type MachineExtensionsClientGetResponse added in v0.2.0

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

MachineExtensionsClientGetResponse contains the response from method MachineExtensionsClient.Get.

type MachineExtensionsClientListOptions added in v0.2.0

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 added in v0.2.0

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

MachineExtensionsClientListResponse contains the response from method MachineExtensionsClient.NewListPager.

type MachineExtensionsClientUpdateResponse added in v0.2.0

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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MachineExtensionsListResult.

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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MachineListResult.

type MachineProperties

type MachineProperties struct {
	// 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
	Extensions []*MachineExtensionInstanceView

	// 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; 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 MachineUpdate

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

	// 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 added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type MachineUpdate.

type MachineUpdateProperties

type MachineUpdateProperties struct {
	// 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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type MachineUpdateProperties.

func (*MachineUpdateProperties) UnmarshalJSON added in v1.1.0

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) CreateOrUpdate

func (client *MachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, machineName string, parameters Machine, options *MachinesClientCreateOrUpdateOptions) (MachinesClientCreateOrUpdateResponse, error)

CreateOrUpdate - The operation to create or update a hybrid machine resource identity in Azure. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-03-10

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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Machines_CreateOrUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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().CreateOrUpdate(ctx, "myResourceGroup", "myMachine", armhybridcompute.Machine{
		Location: to.Ptr("eastus2euap"),
		Identity: &armhybridcompute.Identity{
			Type: to.Ptr("SystemAssigned"),
		},
		Properties: &armhybridcompute.MachineProperties{
			ClientPublicKey: to.Ptr("string"),
			LocationData: &armhybridcompute.LocationData{
				Name: to.Ptr("Redmond"),
			},
			ParentClusterResourceID:    to.Ptr("{AzureStackHCIResourceId}"),
			PrivateLinkScopeResourceID: to.Ptr("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
			VMID:                       to.Ptr("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
		},
	}, 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"),
	// 		DetectedProperties: map[string]*string{
	// 			"cloudprovider": to.Ptr("N/A"),
	// 			"manufacturer": to.Ptr("Microsoft Corporation"),
	// 			"model": to.Ptr("Virtual Machine"),
	// 		},
	// 		LocationData: &armhybridcompute.LocationData{
	// 			Name: to.Ptr("Redmond"),
	// 			City: to.Ptr("redmond"),
	// 			CountryOrRegion: to.Ptr("usa"),
	// 		},
	// 		MssqlDiscovered: to.Ptr("false"),
	// 		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("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
	// 	},
	// }
}
Output:

func (*MachinesClient) Delete

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

Delete - The operation to remove a hybrid machine identity in Azure. If the operation fails it returns an *azcore.ResponseError type.

Generated from API version 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Machines_Delete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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

Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Machines_Get.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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{
	// 			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"),
	// 				},
	// 				LocationData: &armhybridcompute.LocationData{
	// 					Name: to.Ptr("Redmond"),
	// 					City: to.Ptr("redmond"),
	// 					CountryOrRegion: to.Ptr("usa"),
	// 				},
	// 				MssqlDiscovered: to.Ptr("false"),
	// 				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"),
	// 			},
	// 		}
}
Output:

func (*MachinesClient) NewListByResourceGroupPager added in v0.4.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Machines_ListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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", 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{
		// 					IncomingConnectionsPorts: []*string{
		// 						to.Ptr("22"),
		// 						to.Ptr("23")},
		// 						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"),
		// 					},
		// 					LocationData: &armhybridcompute.LocationData{
		// 						Name: to.Ptr("Redmond"),
		// 					},
		// 					MssqlDiscovered: to.Ptr("false"),
		// 					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{
		// 						IncomingConnectionsPorts: []*string{
		// 							to.Ptr("22"),
		// 							to.Ptr("23")},
		// 							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"),
		// 						},
		// 						LocationData: &armhybridcompute.LocationData{
		// 							Name: to.Ptr("Redmond"),
		// 						},
		// 						MssqlDiscovered: to.Ptr("true"),
		// 						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 added in v0.4.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Machines_ListBySubscription.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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{
		// 					IncomingConnectionsPorts: []*string{
		// 						to.Ptr("22"),
		// 						to.Ptr("23")},
		// 						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"),
		// 					},
		// 					LocationData: &armhybridcompute.LocationData{
		// 						Name: to.Ptr("Redmond"),
		// 					},
		// 					MssqlDiscovered: to.Ptr("false"),
		// 					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{
		// 						IncomingConnectionsPorts: []*string{
		// 							to.Ptr("22"),
		// 							to.Ptr("23")},
		// 							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"),
		// 						},
		// 						LocationData: &armhybridcompute.LocationData{
		// 							Name: to.Ptr("Redmond"),
		// 						},
		// 						MssqlDiscovered: to.Ptr("true"),
		// 						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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Machines_Update.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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"),
	// 		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"),
	// 		ProvisioningState: to.Ptr("Succeeded"),
	// 		VMID: to.Ptr("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
	// 	},
	// }
}
Output:

type MachinesClientCreateOrUpdateOptions added in v0.2.0

type MachinesClientCreateOrUpdateOptions struct {
}

MachinesClientCreateOrUpdateOptions contains the optional parameters for the MachinesClient.CreateOrUpdate method.

type MachinesClientCreateOrUpdateResponse added in v0.2.0

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

MachinesClientCreateOrUpdateResponse contains the response from method MachinesClient.CreateOrUpdate.

type MachinesClientDeleteOptions added in v0.2.0

type MachinesClientDeleteOptions struct {
}

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

type MachinesClientDeleteResponse added in v0.2.0

type MachinesClientDeleteResponse struct {
}

MachinesClientDeleteResponse contains the response from method MachinesClient.Delete.

type MachinesClientGetOptions added in v0.2.0

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

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

type MachinesClientGetResponse added in v0.2.0

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

MachinesClientGetResponse contains the response from method MachinesClient.Get.

type MachinesClientListByResourceGroupOptions added in v0.2.0

type MachinesClientListByResourceGroupOptions struct {
}

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

type MachinesClientListByResourceGroupResponse added in v0.2.0

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

MachinesClientListByResourceGroupResponse contains the response from method MachinesClient.NewListByResourceGroupPager.

type MachinesClientListBySubscriptionOptions added in v0.2.0

type MachinesClientListBySubscriptionOptions struct {
}

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

type MachinesClientListBySubscriptionResponse added in v0.2.0

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

MachinesClientListBySubscriptionResponse contains the response from method MachinesClient.NewListBySubscriptionPager.

type MachinesClientUpdateOptions added in v0.2.0

type MachinesClientUpdateOptions struct {
}

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

type MachinesClientUpdateResponse added in v0.2.0

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

MachinesClientUpdateResponse contains the response from method MachinesClient.Update.

type ManagementClient added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Extensions_Upgrade.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.2.0

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

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

type ManagementClientUpgradeExtensionsResponse added in v0.2.0

type ManagementClientUpgradeExtensionsResponse struct {
}

ManagementClientUpgradeExtensionsResponse contains the response from method ManagementClient.BeginUpgradeExtensions.

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OSProfile.

func (*OSProfile) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OSProfileLinuxConfiguration.

func (*OSProfileLinuxConfiguration) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OSProfileWindowsConfiguration.

func (*OSProfileWindowsConfiguration) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationValue.

func (*OperationValue) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type OperationValueDisplay.

func (*OperationValueDisplay) UnmarshalJSON added in v1.1.0

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 added in v0.4.0

NewListPager - Gets a list of hybrid compute operations.

Generated from API version 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/Operations_List.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.2.0

type OperationsClientListOptions struct {
}

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

type OperationsClientListResponse added in v0.2.0

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

OperationsClientListResponse contains the response from method OperationsClient.NewListPager.

type PatchModeTypes added in v1.0.0

type PatchModeTypes string

PatchModeTypes - Specifies the patch mode.

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

func PossiblePatchModeTypesValues added in v1.0.0

func PossiblePatchModeTypesValues() []PatchModeTypes

PossiblePatchModeTypesValues returns the possible values for the PatchModeTypes 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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PatchSettings.

func (*PatchSettings) UnmarshalJSON added in v1.1.0

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; The system meta data relating to this resource.
	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 added in v1.1.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionDataModel.

func (*PrivateEndpointConnectionDataModel) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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 added in v1.0.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointConnectionProperties.

func (*PrivateEndpointConnectionProperties) UnmarshalJSON added in v1.1.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateEndpointConnectionUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateEndpointConnectionDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateEndpointConnectionGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.4.0

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

Generated from API version 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateEndpointConnectionList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.2.0

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

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

type PrivateEndpointConnectionsClientBeginDeleteOptions added in v0.2.0

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

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

type PrivateEndpointConnectionsClientCreateOrUpdateResponse added in v0.2.0

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

PrivateEndpointConnectionsClientCreateOrUpdateResponse contains the response from method PrivateEndpointConnectionsClient.BeginCreateOrUpdate.

type PrivateEndpointConnectionsClientDeleteResponse added in v0.2.0

type PrivateEndpointConnectionsClientDeleteResponse struct {
}

PrivateEndpointConnectionsClientDeleteResponse contains the response from method PrivateEndpointConnectionsClient.BeginDelete.

type PrivateEndpointConnectionsClientGetOptions added in v0.2.0

type PrivateEndpointConnectionsClientGetOptions struct {
}

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

type PrivateEndpointConnectionsClientGetResponse added in v0.2.0

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

PrivateEndpointConnectionsClientGetResponse contains the response from method PrivateEndpointConnectionsClient.Get.

type PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions added in v0.2.0

type PrivateEndpointConnectionsClientListByPrivateLinkScopeOptions struct {
}

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

type PrivateEndpointConnectionsClientListByPrivateLinkScopeResponse added in v0.2.0

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 added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateEndpointProperty.

func (*PrivateEndpointProperty) UnmarshalJSON added in v1.1.0

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; The system meta data relating to this resource.
	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 added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopePrivateLinkResourceGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.4.0

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

Generated from API version 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopePrivateLinkResourceListGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.2.0

type PrivateLinkResourcesClientGetOptions struct {
}

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

type PrivateLinkResourcesClientGetResponse added in v0.2.0

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

PrivateLinkResourcesClientGetResponse contains the response from method PrivateLinkResourcesClient.Get.

type PrivateLinkResourcesClientListByPrivateLinkScopeOptions added in v0.2.0

type PrivateLinkResourcesClientListByPrivateLinkScopeOptions struct {
}

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

type PrivateLinkResourcesClientListByPrivateLinkScopeResponse added in v0.2.0

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

PrivateLinkResourcesClientListByPrivateLinkScopeResponse contains the response from method PrivateLinkResourcesClient.NewListByPrivateLinkScopePager.

type PrivateLinkScope added in v0.2.0

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 added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScope.

func (*PrivateLinkScope) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScope.

type PrivateLinkScopeListResult added in v0.2.0

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 added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopeListResult.

func (*PrivateLinkScopeListResult) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScopeListResult.

type PrivateLinkScopeProperties added in v0.2.0

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 added in v0.2.0

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopeProperties.

func (*PrivateLinkScopeProperties) UnmarshalJSON added in v1.1.0

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 added in v1.1.0

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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesDelete.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesCreate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesUpdate.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesGet.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesGetValidation.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesGetValidationForMachine.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.4.0

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

Generated from API version 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesListByResourceGroup.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.4.0

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

Generated from API version 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesList.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 2022-03-10

  • 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/d55b8005f05b040b852c15e74a0f3e36494a15e1/specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2022-03-10/examples/PrivateLinkScopesUpdateTagsOnly.json

package main

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/hybridcompute/armhybridcompute"
)

func main() {
	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 added in v0.2.0

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

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

type PrivateLinkScopesClientCreateOrUpdateOptions added in v0.2.0

type PrivateLinkScopesClientCreateOrUpdateOptions struct {
}

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

type PrivateLinkScopesClientCreateOrUpdateResponse added in v0.2.0

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

PrivateLinkScopesClientCreateOrUpdateResponse contains the response from method PrivateLinkScopesClient.CreateOrUpdate.

type PrivateLinkScopesClientDeleteResponse added in v0.2.0

type PrivateLinkScopesClientDeleteResponse struct {
}

PrivateLinkScopesClientDeleteResponse contains the response from method PrivateLinkScopesClient.BeginDelete.

type PrivateLinkScopesClientGetOptions added in v0.2.0

type PrivateLinkScopesClientGetOptions struct {
}

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

type PrivateLinkScopesClientGetResponse added in v0.2.0

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

PrivateLinkScopesClientGetResponse contains the response from method PrivateLinkScopesClient.Get.

type PrivateLinkScopesClientGetValidationDetailsForMachineOptions added in v0.2.0

type PrivateLinkScopesClientGetValidationDetailsForMachineOptions struct {
}

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

type PrivateLinkScopesClientGetValidationDetailsForMachineResponse added in v0.2.0

type PrivateLinkScopesClientGetValidationDetailsForMachineResponse struct {
	PrivateLinkScopeValidationDetails
}

PrivateLinkScopesClientGetValidationDetailsForMachineResponse contains the response from method PrivateLinkScopesClient.GetValidationDetailsForMachine.

type PrivateLinkScopesClientGetValidationDetailsOptions added in v0.2.0

type PrivateLinkScopesClientGetValidationDetailsOptions struct {
}

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

type PrivateLinkScopesClientGetValidationDetailsResponse added in v0.2.0

type PrivateLinkScopesClientGetValidationDetailsResponse struct {
	PrivateLinkScopeValidationDetails
}

PrivateLinkScopesClientGetValidationDetailsResponse contains the response from method PrivateLinkScopesClient.GetValidationDetails.

type PrivateLinkScopesClientListByResourceGroupOptions added in v0.2.0

type PrivateLinkScopesClientListByResourceGroupOptions struct {
}

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

type PrivateLinkScopesClientListByResourceGroupResponse added in v0.2.0

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

PrivateLinkScopesClientListByResourceGroupResponse contains the response from method PrivateLinkScopesClient.NewListByResourceGroupPager.

type PrivateLinkScopesClientListOptions added in v0.2.0

type PrivateLinkScopesClientListOptions struct {
}

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

type PrivateLinkScopesClientListResponse added in v0.2.0

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

PrivateLinkScopesClientListResponse contains the response from method PrivateLinkScopesClient.NewListPager.

type PrivateLinkScopesClientUpdateTagsOptions added in v0.2.0

type PrivateLinkScopesClientUpdateTagsOptions struct {
}

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

type PrivateLinkScopesClientUpdateTagsResponse added in v0.2.0

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

PrivateLinkScopesClientUpdateTagsResponse contains the response from method PrivateLinkScopesClient.UpdateTags.

type PrivateLinkScopesResource

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

	// Resource tags
	Tags map[string]*string

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

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

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

PrivateLinkScopesResource - An azure resource object

func (PrivateLinkScopesResource) MarshalJSON

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

MarshalJSON implements the json.Marshaller interface for type PrivateLinkScopesResource.

func (*PrivateLinkScopesResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkScopesResource.

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 added in v1.1.0

MarshalJSON implements the json.Marshaller interface for type PrivateLinkServiceConnectionStateProperty.

func (*PrivateLinkServiceConnectionStateProperty) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type PrivateLinkServiceConnectionStateProperty.

type ProxyResource

type ProxyResource struct {
	// 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 type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

ProxyResource - The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location

func (ProxyResource) MarshalJSON added in v1.1.0

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

MarshalJSON implements the json.Marshaller interface for type ProxyResource.

func (*ProxyResource) UnmarshalJSON added in v1.1.0

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

UnmarshalJSON implements the json.Unmarshaller interface for type ProxyResource.

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 Resource

type Resource struct {
	// 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 type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

Resource - Common fields that are returned in the response for all Azure Resource Manager resources

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type Resource.

func (*Resource) UnmarshalJSON added in v1.1.0

func (r *Resource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type Resource.

type ResourceUpdate

type ResourceUpdate struct {
	// Resource tags
	Tags map[string]*string
}

ResourceUpdate - The Update Resource model definition.

func (ResourceUpdate) MarshalJSON

func (r ResourceUpdate) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ResourceUpdate.

func (*ResourceUpdate) UnmarshalJSON added in v1.1.0

func (r *ResourceUpdate) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ResourceUpdate.

type ServiceStatus added in v1.0.0

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 added in v1.1.0

func (s ServiceStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceStatus.

func (*ServiceStatus) UnmarshalJSON added in v1.1.0

func (s *ServiceStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type ServiceStatus.

type ServiceStatuses added in v1.0.0

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 added in v1.1.0

func (s ServiceStatuses) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type ServiceStatuses.

func (*ServiceStatuses) UnmarshalJSON added in v1.1.0

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 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 added in v1.1.0

func (t *TagsResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TagsResource.

type TrackedResource

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

	// 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 type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string
}

TrackedResource - The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'

func (TrackedResource) MarshalJSON

func (t TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaller interface for type TrackedResource.

func (*TrackedResource) UnmarshalJSON added in v1.1.0

func (t *TrackedResource) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaller interface for type TrackedResource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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