logo
pub struct ProfileProvider { /* private fields */ }
Expand description

Provides AWS credentials from a profile in a credentials file, or from a credential process.

Warning

This provider allows the credential_process option, a method of sourcing credentials from an external process. This can potentially be dangerous, so proceed with caution. Other credential providers should be preferred if at all possible. If using this option, you should make sure that the config file is as locked down as possible using security best practices for your operating system.

Implementations

Create a new ProfileProvider for the default credentials file path and profile name.

Create a new ProfileProvider for the credentials file at the given path, using the given profile.

Create a new ProfileProvider for the credentials file at the given path, using the profile name from environment variable AWS_PROFILE or fall-back to "default" if AWS_PROFILE is not set.

Create a new ProfileProvider for the default credentials file path using the given profile.

Attempts to resolve a region value associated with the current default profile from ~/.aws/config or the file associated with the AWS_CONFIG_FILE environment variable. As these fields do not require a region field to be defined, an Option type is returned

For a the ful region resolution chain, use the Default impl for rusoto_core::Region

Attempts to resolve the region value associated with the current ProfileProviders config file path (ProfileProvider.file_path) and profile (ProfileProvider.profile). As these fields do not require a region field to be defined, an Option type is returned

Get a reference to the credentials file path.

Get a reference to the profile name.

Set the credentials file path.

Set the profile name.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Produce a new AwsCredentials future.

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

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. 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.

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