Enum aws_types::credentials::CredentialsError[][src]

#[non_exhaustive]
pub enum CredentialsError {
    CredentialsNotLoaded {
        context: Box<dyn Error + Send + Sync + 'static>,
    },
    ProviderTimedOut(Duration),
    InvalidConfiguration {
        cause: Box<dyn Error + Send + Sync + 'static>,
    },
    ProviderError {
        cause: Box<dyn Error + Send + Sync + 'static>,
    },
    Unhandled {
        cause: Box<dyn Error + Send + Sync + 'static>,
    },
}

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CredentialsNotLoaded

No credentials were available for this provider

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of CredentialsNotLoaded

context: Box<dyn Error + Send + Sync + 'static>
ProviderTimedOut(Duration)

Loading credentials from this provider exceeded the maximum allowed duration

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Tuple Fields of ProviderTimedOut

0: Duration
InvalidConfiguration

The provider was given an invalid configuration

For example:

  • syntax error in ~/.aws/config
  • assume role profile that forms an infinite loop
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of InvalidConfiguration

cause: Box<dyn Error + Send + Sync + 'static>
ProviderError

The provider experienced an error during credential resolution

This may include errors like a 503 from STS or a file system error when attempting to read a configuration file.

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of ProviderError

cause: Box<dyn Error + Send + Sync + 'static>
Unhandled

An unexpected error occurred during credential resolution

If the error is something that can occur during expected usage of a provider, ProviderError should be returned instead. Unhandled is reserved for exceptional cases, for example:

  • Returned data not UTF-8
  • A provider returns data that is missing required fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.

Fields of Unhandled

cause: Box<dyn Error + Send + Sync + 'static>

Implementations

The credentials provider did not provide credentials

This error indicates the credentials provider was not enable or no configuration was set. This contrasts with invalid_configuration, indicating that the provider was configured in some way, but certain settings were invalid.

An unexpected error occurred loading credentials from this provider

Unhandled errors should not occur during normal operation and should be reserved for exceptional cases, such as a JSON API returning an output that was not parseable as JSON.

The credentials provider returned an error

Provider errors may occur during normal use of a credentials provider, e.g. a 503 when retrieving credentials from IMDS.

The provided configuration for a provider was invalid

The credentials provider did not provide credentials within an allotted duration

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

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.

Performs the conversion.

Converts the given value to a String. Read more

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.