Struct aws_config::profile::profile_file::ProfileFiles
source · pub struct ProfileFiles { /* private fields */ }
Expand description
Provides the ability to programmatically override the profile files that get loaded by the SDK.
The Default
for ProfileFiles
includes the default SDK config and credential files located in
~/.aws/config
and ~/.aws/credentials
respectively.
Any number of config and credential files may be added to the ProfileFiles
file set, with the
only requirement being that there is at least one of them. Custom file locations that are added
will produce errors if they don’t exist, while the default config/credentials files paths are
allowed to not exist even if they’re included.
Example: Using a custom profile file path
use aws_config::profile::{ProfileFileCredentialsProvider, ProfileFileRegionProvider};
use aws_config::profile::profile_file::{ProfileFiles, ProfileFileKind};
let profile_files = ProfileFiles::builder()
.with_file(ProfileFileKind::Credentials, "some/path/to/credentials-file")
.build();
let sdk_config = aws_config::from_env()
.profile_files(profile_files)
.load()
.await;
Implementations§
Trait Implementations§
source§impl Clone for ProfileFiles
impl Clone for ProfileFiles
source§fn clone(&self) -> ProfileFiles
fn clone(&self) -> ProfileFiles
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more