Documentation
¶
Index ¶
- func GetAccountAlias(ctx context.Context, cfg aws.Config) (string, error)
- func GetAwsConfig(ctx context.Context, accountArn, role string, duration int) (aws.Config, error)
- func GetAwsConfigWithVulcanAssumeRole(ctx context.Context, assumeRoleEndpoint, accountArn, role string, duration int) (aws.Config, error)
- type VulcanAssumeRoleProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAccountAlias ¶
GetAccountAlias gets the first one of the current aliases for the account that the credentials passed belong to.
func GetAwsConfig ¶
GetAwsConfig returns an AWS config with the provided account ARN and role. If role is not empty, the config will be created with the provided role and the specified duration.
func GetAwsConfigWithVulcanAssumeRole ¶
func GetAwsConfigWithVulcanAssumeRole(ctx context.Context, assumeRoleEndpoint, accountArn, role string, duration int) (aws.Config, error)
GetAwsConfigWithVulcanAssumeRole returns an AWS config with the provided assume role endpoint, account ARN, role and duration.
Types ¶
type VulcanAssumeRoleProvider ¶
type VulcanAssumeRoleProvider struct {
URL string
AccountID string
Role string
Duration int
// contains filtered or unexported fields
}
VulcanAssumeRoleProvider is a custom AWS credentials provider that assumes a role using the Vulcan assume role service.
func NewVulcanAssumeRoleProvider ¶
func NewVulcanAssumeRoleProvider(url, accountID, role string, duration int) *VulcanAssumeRoleProvider
NewVulcanAssumeRoleProvider creates a VulcanAssumeRoleProvider.
func (*VulcanAssumeRoleProvider) Retrieve ¶
func (p *VulcanAssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, error)
Retrieve retrieves the credentials from the Vulcan assume role service.