# Functions
DefaultSharedConfigFilename returns the SDK's default file path for the shared config file.
DefaultSharedCredentialsFilename returns the SDK's default file path for the shared credentials file.
GetAssumeRoleCredentialProviderOptions searches the slice of configs and returns the first function found.
GetCredentialsProvider searches the Configs for a CredentialsProviderProvider and returns the value if found.
GetCustomCABundle searchds the Configs for a CustomCABundleProvider and returns the value if found.
GetDefaultRegion searches the slice of configs and returns the first fallback region found.
GetEC2RoleCredentialProviderOptions searches the slice of configs and returns the first function found.
GetEnableEndpointDiscovery searches the provided configs and returns the value for EndpointDiscoveryEnabled.
GetEndpointCredentialProviderOptions searches the slice of configs and returns the first function found.
GetEndpointResolverFunc searches the provided config sources for a EndpointResolverFunc that can be used to configure the aws.Config.EndpointResolver value.
GetHandlersFunc searches the provided configs and returns the first HandlersFunc returned by a configuration provider.
GetMFATokenFunc searches the Configs for a MFATokenFuncProvider and returns the value if found.
GetProcessCredentialProviderOptions searches the slice of configs and returns the first function found.
GetRegion searchds the Configs for a RegionProvider and returns the value if found.
GetSharedConfigFiles searchds the Configs for a SharedConfigFilesProvider and returns the value if found.
GetSharedConfigProfile searches the Configs for a SharedConfigProfileProvider and returns the value if found.
GetWebIdentityCredentialProviderOptions searches the slice of configs and returns the first function found.
LoadDefaultAWSConfig reads the SDK's default external configurations, and populates an AWS Config with the values from the external configurations.
LoadEnvConfig reads configuration values from the OS's environment variables.
LoadSharedConfig uses the Configs passed in to load the SharedConfig from file The file names and profile name are sourced from the Configs.
LoadSharedConfigIgnoreNotExist is an alias for LoadSharedConfig with the addition of ignoring when none of the files exist or when the profile is not found in any of the files.
NewEnvConfig retrieves the SDK's environment configuration.
NewSharedConfig retrieves the configuration from the list of files using the profile provided.
NewWithEC2MetadataRegion function takes in a context and an ec2metadataClient, returns a WithEC2MetadataRegion region provider
Usage: ec2metaClient := ec2metadata.New(defaults.Config())
cfg, err := external.LoadDefaultAWSConfig( external.NewWithEC2MetadataRegion(ctx, ec2metaClient), )
.
ResolveCredentialChain resolves a credential provider chain using EnvConfig and SharedConfig if present in the slice cof provided configs.
ResolveCredentialProvider extracts the first instance of Credentials from the config slices.
ResolveCredentials extracts a credential provider from slice of config sources.
ResolveCustomCABundle extracts the first instance of a custom CA bundle filename from the external configurations.
ResolveDefaultAWSConfig will write default configuration values into the cfg value.
ResolveDefaultRegion extracts the first instance of a default region and sets `aws.Config.Region` to the default region if region had not been resolved from other sources.
ResolveEC2Region attempts to resolve the region using the EC2 instance metadata service.
ResolveEnableEndpointDiscovery will configure the AWS config for Endpoint Discovery based on the first value discovered from the provided slice of configs.
ResolveEndpointResolverFunc extracts the first instance of a EndpointResolverFunc from the config slice and sets the functions result on the aws.Config.EndpointResolver.
ResolveHandlersFunc will configure the AWS config Handler chain using the resolved handlers function if provided.
ResolveRegion extracts the first instance of a Region from the Configs slice.
# Constants
CredentialsSourceName provides a name of the provider when config is loaded from environment.
DefaultSharedConfigProfile is the default profile to be used when loading configuration from the config files if another profile name is not provided.
ErrCodeSharedConfig AWS SDK Error Code for Shared Configuration Errors.
# Variables
DefaultAWSConfigResolvers are a slice of functions that will resolve external configuration values into AWS configuration values.
DefaultConfigLoaders are a slice of functions that will read external configuration sources for configuration values.
DefaultSharedConfigFiles is a slice of the default shared config files that the will be used in order to load the SharedConfig.
# Structs
AssumeRoleConfig provides the values defining the configuration for an IAM assume role.
AssumeRoleTokenProviderNotSetError is an error returned when creating a session when the MFAToken option is not set when shared config is configured load assume a role with an MFA token.
CredentialRequiresARNError provides the error for shared config credentials that are incorrectly configured in the shared config or credentials file.
EnvConfig is a collection of environment values the SDK will read setup config from.
SharedConfig represents the configuration fields of the SDK config files.
SharedConfigAssumeRoleError is an error for the shared config when the profile contains assume role information, but that information is invalid or not complete.
SharedConfigFileNotExistError is an error for the shared config when the filename does not exist.
SharedConfigLoadError is an error for the shared config file failed to load.
SharedConfigProfileNotExistError is an error for the shared config when the profile was not find in the config file.
WithCredentialsProvider provides wrapping of a credentials Value to satisfy the CredentialsProviderProvider interface.
WithEC2MetadataRegion provides a RegionProvider that retrieves the region from the EC2 Metadata service.
# Interfaces
AssumeRoleCredentialProviderOptions is an interface for retrieving a function for setting the stscreds.AssumeRoleProviderOptions.
A Config represents a generic configuration value or set of values.
CredentialsProviderProvider provides access to the credentials external configuration value.
CustomCABundleProvider provides access to the custom CA bundle PEM bytes.
DefaultRegionProvider is an interface for retrieving a default region if a region was not resolved from other sources.
EC2RoleCredentialProviderOptions is an interface for retrieving a function for setting the ec2rolecreds.Provider options.
EnableEndpointDiscoveryProvider provides access to the.
EndpointCredentialProviderOptions is an interface for retrieving a function for setting the endpointcreds.ProviderOptions.
EndpointResolverFuncProvider is an interface for retrieving an aws.EndpointResolver from a configuration source.
HandlersFuncProvider provides access to the configuration handlers.
MFATokenFuncProvider provides access to the MFA token function needed for Assume Role with MFA.
ProcessCredentialProviderOptions is an interface for retrieving a function for setting the processcreds.ProviderOptions.
RegionProvider provides access to the region external configuration value.
SharedConfigFilesProvider provides access to the shared config filesnames external configuration value.
SharedConfigProfileProvider provides access to the shared config profile name external configuration value.
WebIdentityCredentialProviderOptions is an interface for retrieving a function for setting the stscreds.WebIdentityCredentialProviderOptions.
# Type aliases
An AWSConfigResolver will extract configuration data from the Configs slice using the provider interfaces to extract specific functionality.
A ConfigLoader is used to load external configuration data and returns it as a generic Config type.
Configs is a slice of Config values.
EndpointResolverFunc is a function that is given the default EndpointResolver and returns an aws.EndpointResolver that will be used.
HandlersFunc is a function pointer that takes a list of handlers and returns the modified set of handlers to use.
SharedConfigNotExistErrors provides an error type for failure to load shared config because resources do not exist.
WithAssumeRoleCredentialProviderOptions wraps a function and satisfies the EC2RoleCredentialProviderOptions interface.
WithAssumeRoleDuration provides a wrapping type of a time.Duration to satisfy.
WithCustomCABundle provides wrapping of a region string to satisfy the CustomCABundleProvider interface.
WithDefaultRegion wraps a string and satisfies the DefaultRegionProvider interface.
WithEC2RoleCredentialProviderOptions wraps a function and satisfies the EC2RoleCredentialProviderOptions interface.
WithEnableEndpointDiscovery provides a wrapping type of a bool to satisfy the EnableEndpointDiscoveryProvider interface.
WithEndpointCredentialProviderOptions wraps a function and satisfies the EC2RoleCredentialProviderOptions interface.
WithEndpointResolverFunc wraps a aws.EndpointResolver value to satisfy the EndpointResolverFuncProvider interface.
WithHandlersFunc implements the HandlersFuncProvider and delegates to the wrapped function.
WithMFATokenFunc provides wrapping of a string to satisfy the MFATokenFuncProvider interface.
WithProcessCredentialProviderOptions wraps a function and satisfies the EC2RoleCredentialProviderOptions interface.
WithRegion provides wrapping of a region string to satisfy the RegionProvider interface.
WithSharedConfigFiles wraps a slice of strings to satisfy the SharedConfigFilesProvider interface so a slice of custom shared config files ared used when loading the SharedConfig.
WithSharedConfigProfile wraps a strings to satisfy the SharedConfigProfileProvider interface so a slice of custom shared config files ared used when loading the SharedConfig.
WithWebIdentityCredentialProviderOptions wraps a function and satisfies the EC2RoleCredentialProviderOptions interface.