Struct aws_runtime::env_config::file::EnvConfigFiles
source · 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>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.