azurecli

package
v0.20240425.1225320 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MsalVersion is the first known version of Azure CLI to support MSAL / v2 tokens
	MsalVersion = "2.30.0"

	// MinimumVersion is the oldest supported version of Azure CLI by this package
	MinimumVersion = "2.0.81"

	// NextMajorVersion is the next (possibly upcoming) major version that is not yet supported by this package
	NextMajorVersion = "3.0.0"
)

Variables

This section is empty.

Functions

func CheckAzVersion

func CheckAzVersion() error

CheckAzVersion tries to determine the version of Azure CLI in the path and checks for a compatible version

func GetAccountName added in v0.20240327.1161949

func GetAccountName() (*string, error)

GetAccountName returns the name of the authenticated principal

func GetAccountType added in v0.20240327.1161949

func GetAccountType() (*string, error)

GetAccountType returns the account type of the authenticated principal

func GetDefaultSubscriptionID

func GetDefaultSubscriptionID() (*string, error)

GetDefaultSubscriptionID tries to determine the default subscription

func GetDefaultTenantID

func GetDefaultTenantID() (*string, error)

GetDefaultTenantID tries to determine the default tenant

func JSONUnmarshalAzCmd

func JSONUnmarshalAzCmd(cacheable bool, i interface{}, arg ...string) error

JSONUnmarshalAzCmd executes an Azure CLI command and unmarshalls the JSON output, optionally retrieving from and populating the command result cache, to avoid unnecessary repeated invocations of Azure CLI.

func ValidateTenantID

func ValidateTenantID(tenantId string) (bool, error)

ValidateTenantID validates the supplied tenant ID, and tries to determine the default tenant if a valid one is not supplied.

Types

This section is empty.

Jump to

Keyboard shortcuts

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