将 ListIdentityPoolUsage 和 Amazon SDK 搭配使用 - Amazon Cognito
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

ListIdentityPoolUsage 和 Amazon SDK 搭配使用

以下代码示例演示如何使用 ListIdentityPoolUsage

Rust
适用于 Rust 的 SDK
注意

查看 GitHub,了解更多信息。查找完整示例,学习如何在 Amazon 代码示例存储库中进行设置和运行。

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(()) }

有关 Amazon SDK 开发人员指南和代码示例的完整列表,请参阅 将此服务与 Amazon SDK 结合使用。本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。