provider

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientPool

type ClientPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ClientPool is a concurrent map implementation to store multiple AWS clients.

func NewClientPool

func NewClientPool(ctx context.Context, clientBuilder *v2.ClientBuilder) *ClientPool

NewClientPool creates an AWS client for each permutation of the given profiles and regions. If profiles, regions, or both are empty, credentials and regions are picked up via the usual default provider chain, respectively. For example, if regions are empty, the region is first looked for via the according region environment variable or second the default region for each profile is used from `~/.aws/config`.

func (*ClientPool) GetClient

func (p *ClientPool) GetClient(accountID types.AwsAccountID, region types.AwsRegion) (*v2.Client, error)

func (*ClientPool) GetClients

func (p *ClientPool) GetClients(regions ...types.AwsRegion) ([]*v2.Client, error)

func (*ClientPool) GetContext

func (p *ClientPool) GetContext() context.Context

func (*ClientPool) ListAccountIDs

func (p *ClientPool) ListAccountIDs() ([]types.AwsAccountID, error)

func (*ClientPool) ListAssumableRoleArns

func (p *ClientPool) ListAssumableRoleArns() ([]iam.RoleArn, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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