Struct aws_config::imds::credentials::Builder
source · pub struct Builder { /* private fields */ }
Expand description
Builder for ImdsCredentialsProvider
Implementations§
source§impl Builder
impl Builder
sourcepub fn configure(self, provider_config: &ProviderConfig) -> Self
pub fn configure(self, provider_config: &ProviderConfig) -> Self
Override the configuration used for this provider
sourcepub fn profile(self, profile: impl Into<String>) -> Self
pub fn profile(self, profile: impl Into<String>) -> Self
Override the instance profile used for this provider.
When retrieving IMDS credentials, a call must first be made to
<IMDS_BASE_URL>/latest/meta-data/iam/security-credentials/
. This returns the instance
profile used. By setting this parameter, retrieving the profile is skipped
and the provided value is used instead.
sourcepub fn imds_client(self, client: Client) -> Self
pub fn imds_client(self, client: Client) -> Self
Override the IMDS client used for this provider
The IMDS client will be loaded and configured via ~/.aws/config
and environment variables,
however, if necessary the entire client may be provided directly.
For more information about IMDS client configuration loading see imds::Client
sourcepub fn build(self) -> ImdsCredentialsProvider
pub fn build(self) -> ImdsCredentialsProvider
Create an ImdsCredentialsProvider
from this builder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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> 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.