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.