Documentation
¶
Overview ¶
Package awsconfig provides support for obtaining configuration and associated credentials information for use with AWS.
Index ¶
- func AccountID(ctx context.Context, cfg aws.Config) (string, error)
- func DebugPrintConfig(ctx context.Context, out io.Writer, cfg aws.Config) error
- func Load(ctx context.Context, opts ...ConfigOption) (aws.Config, error)
- func LoadUsingFlags(ctx context.Context, cl AWSFlags) (aws.Config, error)
- type AWSFlags
- type ConfigOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountID ¶
AccountID uses the sts service to obtain the calling processes Amazon Account ID (number).
func DebugPrintConfig ¶
DebugPrintConfig dumps the aws.Config to help with debugging configuration issues. It displays the types of the fields that can't be directly printed.
Types ¶
type AWSFlags ¶
type AWSFlags struct { AWS bool `subcmd:"aws,false,set to enable AWS functionality" yaml:"aws" cmd:"set to true enable AWS functionality"` AWSProfile string `` /* 136-byte string literal not displayed */ AWSRegion string `` /* 178-byte string literal not displayed */ AWSConfigFiles string `` /* 243-byte string literal not displayed */ }
AWSFlags defines commonly used flags that control AWS behaviour.
type ConfigOption ¶
type ConfigOption func(o *options)
ConfigOption represents an option to Load.
func ConfigOptionsFromFlags ¶
func ConfigOptionsFromFlags(cl AWSFlags) []ConfigOption
ConfigOptionsFromFlags returns the ConfigOptions implied by the flags. NOTE: it always includes config.WithEC2IMDSRegion so that the region information is retrieved from EC2 IMDS when it's not found by other means.
func WithConfigOptions ¶
func WithConfigOptions(fn ...func(*config.LoadOptions) error) ConfigOption
WithConfigOptions will pass the supplied options from the aws config package.