Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCredentialsHomeNotFound returned when a user home directory can't be located. ErrCredentialsHomeNotFound = errors.New("user home directory not found") // ErrCredentialsNotFound returned when the required AlibabaCloud CLI credentials don't exist. ErrCredentialsNotFound = errors.New("AlibabaCloud CLI credentials not found") )
Functions ¶
This section is empty.
Types ¶
type AliCloudCredentials ¶
type AliCloudCredentials struct { AliCloudAccessKey string `json:"access_key_id"` AliCloudSecretKey string `json:"access_key_secret"` AliCloudSessionToken string `json:"ram_session_name"` AliCloudSecurityToken string `json:"sts_token"` PrincipalARN string `json:"ram_role_arn"` Region string `json:"region,omitempty"` }
AliCloudCredentials represents the set of attributes used to authenticate to AlibabaCloud with a short lived session
type CredentialsProvider ¶
CredentialsProvider loads AlibabaCloud CLI credentials file
func NewSharedCredentials ¶
func NewSharedCredentials(profile string) *CredentialsProvider
NewSharedCredentials helper to create the credentials provider
func (*CredentialsProvider) CredsExists ¶
func (p *CredentialsProvider) CredsExists() (bool, error)
CredsExists verify that the credentials exist
func (*CredentialsProvider) Expired ¶
func (p *CredentialsProvider) Expired() bool
Expired checks if the current credentials are expired
func (*CredentialsProvider) Load ¶
func (p *CredentialsProvider) Load() (*AliCloudCredentials, error)
Load load the AlibabaCloud CLI credentials file
func (*CredentialsProvider) Save ¶
func (p *CredentialsProvider) Save(alibabacloudCreds *AliCloudCredentials) error
Save persist the credentials
Click to show internal directories.
Click to hide internal directories.