Struct aws_config::default_provider::credentials::Builder
source · [−]pub struct Builder { /* private fields */ }
Expand description
Builder for DefaultCredentialsChain
Implementations
sourceimpl Builder
impl Builder
sourcepub fn region(self, region: impl ProvideRegion + 'static) -> Self
pub fn region(self, region: impl ProvideRegion + 'static) -> Self
Sets the region used when making requests to AWS services
When unset, the default region resolver chain will be used.
sourcepub fn set_region(
&mut self,
region: Option<impl ProvideRegion + 'static>
) -> &mut Self
pub fn set_region(
&mut self,
region: Option<impl ProvideRegion + 'static>
) -> &mut Self
Sets the region used when making requests to AWS services
When unset, the default region resolver chain will be used.
sourcepub fn with_custom_credential_source(
self,
name: impl Into<Cow<'static, str>>,
provider: impl ProvideCredentials + 'static
) -> Self
pub fn with_custom_credential_source(
self,
name: impl Into<Cow<'static, str>>,
provider: impl ProvideCredentials + 'static
) -> Self
Add an additional credential source for the ProfileProvider
Assume role profiles may specify named credential sources:
[default]
role_arn = arn:aws:iam::123456789:role/RoleA
credential_source = MyCustomProvider
Typically, these are built-in providers like Environment
, however, custom sources may
also be used.
sourcepub fn profile_name(self, name: &str) -> Self
pub fn profile_name(self, name: &str) -> Self
Override the profile name used by this provider
When unset, the value of the AWS_PROFILE
environment variable will be used.
sourcepub fn configure(self, config: ProviderConfig) -> Self
pub fn configure(self, config: ProviderConfig) -> Self
Override the configuration used for this provider
sourcepub async fn build(self) -> DefaultCredentialsChain
pub async fn build(self) -> DefaultCredentialsChain
Creates a DefaultCredentialsChain
Panics
This function will panic if no connector has been set and neither rustls
and native-tls
features have both been disabled.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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