awshelpers

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountAlias

func GetAccountAlias(ctx context.Context, cfg aws.Config) (string, error)

GetAccountAlias gets the first one of the current aliases for the account that the credentials passed belong to.

func GetAwsConfig

func GetAwsConfig(ctx context.Context, accountArn, role string, duration int) (aws.Config, error)

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

Retrieve retrieves the credentials from the Vulcan assume role service.

Jump to

Keyboard shortcuts

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