Struct aws_config::default_provider::credentials::DefaultCredentialsChain [−][src]
pub struct DefaultCredentialsChain(_);
Expand description
Default AWS Credential Provider Chain
Resolution order:
- Environment variables:
EnvironmentVariableCredentialsProvider
- Shared config (
~/.aws/config
,~/.aws/credentials
):SharedConfigCredentialsProvider
The outer provider is wrapped in a refreshing cache.
More providers are a work in progress.
Examples
Create a default chain with a custom region:
use aws_types::region::Region;
use aws_config::default_provider::credentials::DefaultCredentialsChain;
let credentials_provider = DefaultCredentialsChain::builder()
.region(Region::new("us-west-1"))
.build();
Create a default chain with no overrides:
use aws_config::default_provider::credentials::DefaultCredentialsChain;
let credentials_provider = DefaultCredentialsChain::builder().build();
Create a default chain that uses a different profile:
use aws_config::default_provider::credentials::DefaultCredentialsChain;
let credentials_provider = DefaultCredentialsChain::builder()
.profile_name("otherprofile")
.build();
Implementations
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DefaultCredentialsChain
impl Send for DefaultCredentialsChain
impl Sync for DefaultCredentialsChain
impl Unpin for DefaultCredentialsChain
impl !UnwindSafe for DefaultCredentialsChain
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more