package arm

import "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"

Index

Constants

const (
	// AzureChina is the Azure Resource Manager China cloud endpoint.
	AzureChina = "https://management.chinacloudapi.cn/"
	// AzureGermany is the Azure Resource Manager Germany cloud endpoint.
	AzureGermany = "https://management.microsoftazure.de/"
	// AzureGovernment is the Azure Resource Manager US government cloud endpoint.
	AzureGovernment = "https://management.usgovcloudapi.net/"
	// AzurePublicCloud is the Azure Resource Manager public cloud endpoint.
	AzurePublicCloud = "https://management.azure.com/"
)

Types

type Connection

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

Connection is a connection to an Azure Resource Manager endpoint. It contains the base ARM endpoint and a pipeline for making requests.

func NewConnection

func NewConnection(endpoint string, cred azcore.TokenCredential, options *ConnectionOptions) *Connection

NewConnection creates an instance of the Connection type with the specified endpoint. Use this when connecting to clouds other than the Azure public cloud (stack/sovereign clouds). Pass nil to accept the default options; this is the same as passing a zero-value options.

func NewDefaultConnection

func NewDefaultConnection(cred azcore.TokenCredential, options *ConnectionOptions) *Connection

NewDefaultConnection creates an instance of the Connection type using the AzurePublicCloud. Pass nil to accept the default options; this is the same as passing a zero-value options.

func (*Connection) Endpoint

func (con *Connection) Endpoint() string

Endpoint returns the connection's ARM endpoint.

func (*Connection) NewPipeline

func (con *Connection) NewPipeline(module, version string) pipeline.Pipeline

NewPipeline creates a pipeline from the connection's options. The telemetry policy, when enabled, will use the specified module and version info.

type ConnectionOptions

type ConnectionOptions struct {
	// AuxiliaryTenants contains a list of additional tenants to be used to authenticate
	// across multiple tenants.
	AuxiliaryTenants []string

	// HTTPClient sets the transport for making HTTP requests.
	HTTPClient policy.Transporter

	// Retry configures the built-in retry policy behavior.
	Retry policy.RetryOptions

	// Telemetry configures the built-in telemetry policy behavior.
	Telemetry policy.TelemetryOptions

	// Logging configures the built-in logging policy behavior.
	Logging policy.LogOptions

	// DisableRPRegistration disables the auto-RP registration policy.
	// The default value is false.
	DisableRPRegistration bool

	// PerCallPolicies contains custom policies to inject into the pipeline.
	// Each policy is executed once per request.
	PerCallPolicies []policy.Policy

	// PerRetryPolicies contains custom policies to inject into the pipeline.
	// Each policy is executed once per request, and for each retry request.
	PerRetryPolicies []policy.Policy
}

ConnectionOptions contains configuration settings for the connection's pipeline. All zero-value fields will be initialized with their default values.

Source Files

connection.go

Directories

PathSynopsis
arm/internal
arm/runtime
Version
v0.19.0
Published
Aug 26, 2021
Platform
windows/amd64
Imports
6 packages
Last checked
1 hour ago

Tools for package owners.