Crate rusoto [] [src]

Rusoto is an AWS SDK for Rust. A high level overview is available in README.md at https://github.com/rusoto/rusoto.

Example

The following code shows a simple example of using Rusoto's DynamoDB API to list the names of all tables in a database.

use std::default::Default;

use rusoto::{DefaultCredentialsProvider, Region};
use rusoto::dynamodb::{DynamoDbClient, ListTablesInput};

let provider = DefaultCredentialsProvider::new().unwrap();
let client = DynamoDbClient::new(provider, Region::UsEast1);
let list_tables_input: ListTablesInput = Default::default();

match client.list_tables(&list_tables_input) {
    Ok(output) => {
        match output.table_names {
            Some(table_name_list) => {
                println!("Tables in database:");

                for table_name in table_name_list {
                    println!("{}", table_name);
                }
            },
            None => println!("No tables in database!"),
        }
    },
    Err(error) => {
        println!("Error: {:?}", error);
    },
}

Structs

AwsCredentials

AWS API access credentials, including access key, secret key, token (for IAM profiles), and expiration timestamp.

ChainProvider

Provides AWS credentials from multiple possible sources using a priority order.

CredentialsError
EnvironmentProvider

Provides AWS credentials from environment variables.

HttpDispatchError
HttpResponse
IamProvider

Provides AWS credentials from a resource's IAM role.

ParseRegionError

An error produced when attempting to convert a str into a Region fails.

ProfileProvider

Provides AWS credentials from a profile in a credentials file.

SignedRequest

A data structure for all the elements of an HTTP request that are involved in the Amazon Signature Version 4 signing process

Enums

Region

An AWS region. CnNorth1 is currently untested due to Rusoto maintainers not having access to AWS China.

Traits

DispatchSignedRequest
ProvideAwsCredentials

A trait for types that produce AwsCredentials.

Type Definitions

DefaultCredentialsProvider

The credentials provider you probably want to use if you don't require Sync for your AWS services. Wraps a ChainProvider in an AutoRefreshingProvider that uses a RefCell to cache credentials

DefaultCredentialsProviderSync

The credentials provider you probably want to use if you do require your AWS services. Wraps a ChainProvider in an AutoRefreshingProvider that uses a Mutex to lock credentials in a threadsafe manner.