Documentation
¶
Index ¶
- type ClientPool
- func (p *ClientPool) GetClient(accountID types.AwsAccountID, region types.AwsRegion) (*v2.Client, error)
- func (p *ClientPool) GetClients(regions ...types.AwsRegion) ([]*v2.Client, error)
- func (p *ClientPool) GetContext() context.Context
- func (p *ClientPool) ListAccountIDs() ([]types.AwsAccountID, error)
- func (p *ClientPool) ListAssumableRoleArns() ([]iam.RoleArn, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientPool ¶
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 (*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)
Click to show internal directories.
Click to hide internal directories.