Struct aws_config::profile::ProfileFileRegionProvider
source · [−]pub struct ProfileFileRegionProvider { /* private fields */ }
Expand description
Load a region from a profile file
This provider will attempt to load AWS shared configuration, then read the region
property
from the active profile.
Examples
Loads “us-west-2” as the region
[default]
region = us-west-2
Loads us-east-1
as the region if and only if the AWS_PROFILE
environment variable is set
to other
.
[profile other]
region = us-east-1
This provider is part of the default region provider chain.
Implementations
sourceimpl ProfileFileRegionProvider
impl ProfileFileRegionProvider
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new ProfileFileRegionProvider
To override the selected profile, set the AWS_PROFILE
environment variable or use the Builder
.
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Builder
to construct a ProfileFileRegionProvider
Trait Implementations
sourceimpl Debug for ProfileFileRegionProvider
impl Debug for ProfileFileRegionProvider
sourceimpl Default for ProfileFileRegionProvider
impl Default for ProfileFileRegionProvider
sourcefn default() -> ProfileFileRegionProvider
fn default() -> ProfileFileRegionProvider
Returns the “default value” for a type. Read more
sourceimpl ProvideRegion for ProfileFileRegionProvider
impl ProvideRegion for ProfileFileRegionProvider
sourcefn region(&self) -> ProvideRegion<'_>ⓘNotable traits for ProvideRegion<'_>impl Future for ProvideRegion<'_> type Output = Option<Region>;
fn region(&self) -> ProvideRegion<'_>ⓘNotable traits for ProvideRegion<'_>impl Future for ProvideRegion<'_> type Output = Option<Region>;
Load a region from this provider
Auto Trait Implementations
impl RefUnwindSafe for ProfileFileRegionProvider
impl Send for ProfileFileRegionProvider
impl Sync for ProfileFileRegionProvider
impl Unpin for ProfileFileRegionProvider
impl UnwindSafe for ProfileFileRegionProvider
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more