Struct aws_config::meta::credentials::CredentialsProviderChain[][src]

pub struct CredentialsProviderChain { /* fields omitted */ }
Expand description

Credentials provider that checks a series of inner providers

Each provider will be evaluated in order:

  • If a provider returns valid Credentials they will be returned immediately. No other credential providers will be used.
  • Otherwise, if a provider returns CredentialsError::CredentialsNotLoaded, the next provider will be checked.
  • Finally, if a provider returns any other error condition, an error will be returned immediately.

Examples

use aws_config::meta::credentials::CredentialsProviderChain;
use aws_types::Credentials;
use aws_config::environment;
use aws_config::environment::credentials::EnvironmentVariableCredentialsProvider;
let provider = CredentialsProviderChain::first_try("Environment", EnvironmentVariableCredentialsProvider::new())
    .or_else("Static", Credentials::from_keys("someacceskeyid", "somesecret", None));

Implementations

Create a CredentialsProviderChain that begins by evaluating this provider

Add a fallback provider to the credentials provider chain

Add a fallback to the default provider chain

Creates a credential provider chain that starts with the default provider

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