Struct aws_config::default_provider::credentials::DefaultCredentialsChain[][src]

pub struct DefaultCredentialsChain(_);
Expand description

Default AWS Credential Provider Chain

Resolution order:

  1. Environment variables: EnvironmentVariableCredentialsProvider
  2. 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

Builder for DefaultCredentialsChain

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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