Struct aws_config::profile::app_name::ProfileFileAppNameProvider
source · pub struct ProfileFileAppNameProvider { /* private fields */ }
Expand description
Loads an app name from a profile file
This provider will attempt to shared AWS shared configuration and then read the
sdk-ua-app-id
property from the active profile.
Location of Profile Files
- The location of the config file will be loaded from the
AWS_CONFIG_FILE
environment variable with a fallback to~/.aws/config
- The location of the credentials file will be loaded from the
AWS_SHARED_CREDENTIALS_FILE
environment variable with a fallback to~/.aws/credentials
The location of these files can also be customized programmatically using ProfileFiles
.
Home directory resolution
Home directory resolution is implemented to match the behavior of the CLI & Python. ~
is only
used for home directory resolution when it:
- Starts the path
- Is followed immediately by
/
or a platform specific separator. (On windows,~/
and~\
both resolve to the home directory.
When determining the home directory, the following environment variables are checked:
HOME
on all platformsUSERPROFILE
on Windows- The concatenation of
HOMEDRIVE
andHOMEPATH
on Windows ($HOMEDRIVE$HOMEPATH
)
Examples
Loads “my-app” as the app name
[default]
sdk-ua-app-id = my-app
Loads “my-app” as the app name if and only if the AWS_PROFILE
environment variable
is set to other
.
[profile other]
sdk-ua-app-id = my-app
This provider is part of the default app name provider chain.
Implementations§
Trait Implementations§
source§impl Debug for ProfileFileAppNameProvider
impl Debug for ProfileFileAppNameProvider
source§impl Default for ProfileFileAppNameProvider
impl Default for ProfileFileAppNameProvider
source§fn default() -> ProfileFileAppNameProvider
fn default() -> ProfileFileAppNameProvider
Returns the “default value” for a type. Read more