Documentation
¶
Index ¶
- func GetUserAgentExtension() string
- func IsPublic(env cloud.Configuration) bool
- func NewTokenWrapper(cred azcore.TokenCredential) azcore.TokenCredential
- func TokenScope(cloudCfg cloud.Configuration) string
- type AuxiliaryTokenPolicy
- type AuxiliaryTokenServer
- type ClientConfig
- type Config
- type Environment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserAgentExtension ¶
func GetUserAgentExtension() string
func IsPublic ¶ added in v1.6.2
func IsPublic(env cloud.Configuration) bool
IsPublic returns if the specified configuration is public. This takes the track2 format rather than being a method on Environment because usage in api/sdk contexts use the track2 format and may not have access to the auth.Environment struct.
func NewTokenWrapper ¶ added in v0.5.1
func NewTokenWrapper(cred azcore.TokenCredential) azcore.TokenCredential
func TokenScope ¶ added in v1.6.2
func TokenScope(cloudCfg cloud.Configuration) string
TokenScope returns the token scope for the Azure environment, such as "https://management.azure.com/.default" (for public cloud)
Types ¶
type AuxiliaryTokenPolicy ¶ added in v1.4.0
type AuxiliaryTokenPolicy struct {
Token azcore.AccessToken
// contains filtered or unexported fields
}
AuxiliaryTokenPolicy provides a custom policy used to authenticate with shared node image galleries.
func NewAuxiliaryTokenPolicy ¶ added in v1.4.0
func NewAuxiliaryTokenPolicy(client AuxiliaryTokenServer, url string, scope string) *AuxiliaryTokenPolicy
func (*AuxiliaryTokenPolicy) GetAuxiliaryToken ¶ added in v1.5.0
func (p *AuxiliaryTokenPolicy) GetAuxiliaryToken() error
type AuxiliaryTokenServer ¶ added in v1.5.0
type ClientConfig ¶
type ClientConfig struct {
CloudName string
Location string
SubscriptionID string
ResourceManagerEndpoint string
Authorizer autorest.Authorizer
UserAgent string
}
ClientConfig contains all essential information to create an Azure client.
type Config ¶
type Config struct {
Cloud string `json:"cloud" yaml:"cloud"`
Location string `json:"location" yaml:"location"`
TenantID string `json:"tenantId" yaml:"tenantId"`
SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"`
ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"`
AzureEnvironmentFilepath string `json:"azureEnvironmentFilepath" yaml:"azureEnvironmentFilepath"`
}
Config holds the configuration parsed from the --cloud-config flag
func BuildAzureConfig ¶
BuildAzureConfig returns a Config object for the Azure clients
type Environment ¶ added in v1.6.2
type Environment struct {
// Environment is the track 1 representation of the Azure environment
Environment *azclient.Environment
// Cloud is the track 2 representation of the Azure environment
Cloud cloud.Configuration
}
func EnvironmentFromName ¶ added in v1.6.2
func EnvironmentFromName(cloudName string) (*Environment, error)
func ResolveCloudEnvironment ¶ added in v1.6.2
func ResolveCloudEnvironment(cfg *Config) (*Environment, error)
ResolveCloudEnvironment resolves the cloud environment using the following precedence: 1. File-based environment (AZURE_ENVIRONMENT_FILEPATH) 2. Known cloud names (ARM_CLOUD) 3. Default (Azure Public Cloud)