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);
    },
}

Modules

claims

Credential Claims module.

Structs

AwsCredentials

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

BaseAutoRefreshingProvider

Wrapper for ProvideAwsCredentials that caches the credentials returned by the wrapped provider. Each time the credentials are accessed, they are checked to see if they have expired, in which case they are retrieved from the wrapped provider again.

ChainProvider

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

ContainerProvider

Provides AWS credentials from a task's IAM role.

CredentialsError
EnvironmentProvider

Provides AWS credentials from environment variables.

HttpDispatchError
HttpResponse
InstanceMetadataProvider

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

TlsError

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.

Functions

default_region

Get the region from AWS_DEFAULT_REGION environment variable. Uses us-east-1 if not set or value is malformed.

default_tls_client

Helper method for creating an http client with tls. Makes a hyper client with NativeTls for HTTPS support.

Type Definitions

AutoRefreshingProvider

!Sync AutoRefreshingProvider that caches credentials in a RefCell

AutoRefreshingProviderSync

Threadsafe AutoRefreshingProvider that locks cached credentials with a Mutex

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 Sync for your AWS services. Wraps a ChainProvider in an AutoRefreshingProvider that uses a Mutex to lock credentials in a threadsafe manner.