Documentation ¶
Index ¶
- Constants
- func CheckAzVersion() error
- func GetAccountName() (*string, error)
- func GetAccountType() (*string, error)
- func GetDefaultSubscriptionID() (*string, error)
- func GetDefaultTenantID() (*string, error)
- func JSONUnmarshalAzCmd(cacheable bool, i interface{}, arg ...string) error
- func ListAvailableSubscriptionIDs() (*[]string, error)
- func ValidateTenantID(tenantId string) (bool, error)
Constants ¶
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
GetAccountName returns the name of the authenticated principal
func GetAccountType ¶ added in v0.20240327.1161949
GetAccountType returns the account type of the authenticated principal
func GetDefaultSubscriptionID ¶
GetDefaultSubscriptionID tries to determine the default subscription
func GetDefaultTenantID ¶
GetDefaultTenantID tries to determine the default tenant
func JSONUnmarshalAzCmd ¶
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 ListAvailableSubscriptionIDs ¶ added in v0.20240610.1112704
ListAvailableSubscriptionIDs lists the available subscriptions
func ValidateTenantID ¶
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.