aliyuncli

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AK                  = AuthenticateMode("AK")
	StsToken            = AuthenticateMode("StsToken")
	RamRoleArn          = AuthenticateMode("RamRoleArn")
	EcsRamRole          = AuthenticateMode("EcsRamRole")
	RsaKeyPair          = AuthenticateMode("RsaKeyPair")
	RamRoleArnWithEcs   = AuthenticateMode("RamRoleArnWithRoleName")
	ChainableRamRoleArn = AuthenticateMode("ChainableRamRoleArn")
	External            = AuthenticateMode("External")
	CredentialsURI      = AuthenticateMode("CredentialsURI")
)
View Source
const (
	DefaultConfigProfileName = "default"
)

Variables

This section is empty.

Functions

func LoadProfile

func LoadProfile(path string, name string) (*Configuration, Profile, error)

Types

type AuthenticateMode added in v0.12.0

type AuthenticateMode string

type Configuration added in v0.12.0

type Configuration struct {
	CurrentProfile string    `json:"current"`
	Profiles       []Profile `json:"profiles"`
	MetaPath       string    `json:"meta_path"`
}

func LoadConfiguration added in v0.12.0

func LoadConfiguration(inputPath string) (conf *Configuration, err error)

func NewConfigFromBytes added in v0.12.0

func NewConfigFromBytes(bytes []byte) (conf *Configuration, err error)

func NewConfiguration added in v0.12.0

func NewConfiguration() *Configuration

func (*Configuration) GetProfile added in v0.12.0

func (c *Configuration) GetProfile(pn string) (Profile, bool)

type CredentialHelper

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

func NewCredentialHelper

func NewCredentialHelper(configPath, profileName string) (*CredentialHelper, error)

func (CredentialHelper) GetCredentials

func (c CredentialHelper) GetCredentials() (credentials.Credential, error)

func (CredentialHelper) ProfileName added in v0.12.0

func (c CredentialHelper) ProfileName() string

type Profile

type Profile struct {
	Name            string           `json:"name"`
	Mode            AuthenticateMode `json:"mode"`
	AccessKeyId     string           `json:"access_key_id"`
	AccessKeySecret string           `json:"access_key_secret"`
	StsToken        string           `json:"sts_token"`
	StsRegion       string           `json:"sts_region"`
	RamRoleName     string           `json:"ram_role_name"`
	RamRoleArn      string           `json:"ram_role_arn"`
	RoleSessionName string           `json:"ram_session_name"`
	SourceProfile   string           `json:"source_profile"`
	PrivateKey      string           `json:"private_key"`
	KeyPairName     string           `json:"key_pair_name"`
	ExpiredSeconds  int              `json:"expired_seconds"`
	Verified        string           `json:"verified"`
	RegionId        string           `json:"region_id"`
	OutputFormat    string           `json:"output_format"`
	Language        string           `json:"language"`
	Site            string           `json:"site"`
	ReadTimeout     int              `json:"retry_timeout"`
	ConnectTimeout  int              `json:"connect_timeout"`
	RetryCount      int              `json:"retry_count"`
	ProcessCommand  string           `json:"process_command"`
	CredentialsURI  string           `json:"credentials_uri"`
	// contains filtered or unexported fields
}

func NewProfile added in v0.12.0

func NewProfile(name string) Profile

func (*Profile) GetParent added in v0.12.0

func (cp *Profile) GetParent() *Configuration

func (*Profile) GetSTSClientByEcsRamRole added in v0.12.0

func (cp *Profile) GetSTSClientByEcsRamRole() (*sts.Client, error)

func (*Profile) GetSessionCredential added in v0.12.0

func (cp *Profile) GetSessionCredential(client *sts.Client) (*sts.AssumeRoleResponseBodyCredentials, error)

func (*Profile) Validate added in v0.12.0

func (cp *Profile) Validate() error

func (*Profile) ValidateAK added in v0.12.0

func (cp *Profile) ValidateAK() error

type ProfileWrapper added in v0.12.0

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

func (*ProfileWrapper) GetCredentials added in v0.12.0

func (p *ProfileWrapper) GetCredentials() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsByAK added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByAK() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsByChainableRamRoleArn added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByChainableRamRoleArn() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsByCredentialsURI added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByCredentialsURI() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsByEcsRamRole added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByEcsRamRole() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsByExternal added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByExternal() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsByRamRoleArnWithEcs added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByRamRoleArnWithEcs() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsByRoleArn added in v0.12.0

func (p *ProfileWrapper) GetCredentialsByRoleArn() (credentials.Credential, error)

func (*ProfileWrapper) GetCredentialsBySts added in v0.12.0

func (p *ProfileWrapper) GetCredentialsBySts() (credentials.Credential, error)

Jump to

Keyboard shortcuts

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