Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Use ListIdentityPoolUsage
with an Amazon SDK
The following code example shows how to use ListIdentityPoolUsage
.
- Rust
-
- SDK for Rust
-
async fn show_pools(client: &Client) -> Result<(), Error> {
let response = client
.list_identity_pool_usage()
.max_results(10)
.send()
.await?;
let pools = response.identity_pool_usages();
println!("Identity pools:");
for pool in pools {
println!(
" Identity pool ID: {}",
pool.identity_pool_id().unwrap_or_default()
);
println!(
" Data storage: {}",
pool.data_storage().unwrap_or_default()
);
println!(
" Sync sessions count: {}",
pool.sync_sessions_count().unwrap_or_default()
);
println!(
" Last modified: {}",
pool.last_modified_date().unwrap().to_chrono_utc()?
);
println!();
}
println!("Next token: {}", response.next_token().unwrap_or_default());
Ok(())
}
For a complete list of Amazon SDK developer guides and code examples, see
Using this service with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.