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

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

ListIdentityPoolUsage与 Amazon SDK 或 CLI 配合使用

以下代码示例演示了如何使用 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(()) }

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