Struct s3::credentials::Credentials [] [src]

pub struct Credentials {
    pub access_key: String,
    pub secret_key: String,
    pub token: Option<String>,
    // some fields omitted
}

AWS access credentials: access key, secret key, and optional token.

Example

use s3::credentials::Credentials;

// Load from environment AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and
// AWS_SESSION_TOKEN variables
// TODO let credentials = Credentials::from_env().unwrap();

// Load credentials from the standard AWS credentials file with the given
// profile name.
// TODO let credentials = Credentials::from_profile("default").unwrap();

// Initialize directly with key ID, secret key, and optional token
let credentials = Credentials::new("access_key", "secret_key", Some("token"));

Fields

AWS public access key.

AWS secret key.

Temporary token issued by AWS service.

Methods

impl Credentials
[src]

[src]

Initialize Credentials directly with key ID, secret key, and optional token.

Trait Implementations

impl Clone for Credentials
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Credentials
[src]

[src]

Formats the value using the given formatter.

impl Eq for Credentials
[src]

impl PartialEq for Credentials
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.