Struct aws_sdk_rust::aws::common::credentials::ProfileProvider [] [src]

pub struct ProfileProvider {
    // some fields omitted
}

Provides AWS credentials from a profile in a credentials file.

The credentials file is located in the home directory of the given user.

Methods

impl ProfileProvider
[src]

fn new() -> Result<ProfileProviderCredentialsError>

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

More details on the AWS credentials file can be found at AWS. Linux or Mac OS - ~/.aws/credentials Windows - %USERPROFILE%.aws\credentials

Sets the "default" credentials but can be overridden with set_profile.

fn with_configuration<F, P>(location: F, profile: P) -> ProfileProvider where F: Into<PathBuf>, P: Into<String>

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

fn location(&self) -> &Path

Get a reference to the credentials location.

fn profile(&self) -> &str

Get a reference to the profile name. Profile name is the subsection in the credentials file. See AWS for details.

fn set_location<F>(&mut self, location: F) where F: Into<PathBuf>

Set the credentials location.

fn set_profile<P>(&mut self, profile: P) where P: Into<String>

Set the profile name.

Trait Implementations

impl Debug for ProfileProvider
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for ProfileProvider
[src]

fn clone(&self) -> ProfileProvider

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl AwsCredentialsProvider for ProfileProvider
[src]

fn credentials(&self) -> Result<AwsCredentialsCredentialsError>

Produce a new AwsCredentials.