pub struct EnvConfigFiles { /* private fields */ }
Expand description
Provides the ability to programmatically override the profile files that get loaded by the SDK.
The Default
for EnvConfigFiles
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 EnvConfigFiles
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_runtime::env_config::file::{EnvConfigFiles, SharedConfigFileKind};
use std::sync::Arc;
let profile_files = EnvConfigFiles::builder()
.with_file(SharedConfigFileKind::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 EnvConfigFiles
impl Clone for EnvConfigFiles
Source§fn clone(&self) -> EnvConfigFiles
fn clone(&self) -> EnvConfigFiles
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 moreSource§impl Debug for EnvConfigFiles
impl Debug for EnvConfigFiles
Auto Trait Implementations§
impl Freeze for EnvConfigFiles
impl RefUnwindSafe for EnvConfigFiles
impl Send for EnvConfigFiles
impl Sync for EnvConfigFiles
impl Unpin for EnvConfigFiles
impl UnwindSafe for EnvConfigFiles
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Creates a shared type from an unshared type.