与 AWS SDK或CompleteSnapshot一起使用 CLI - AWS SDK 代码示例

AWS 文档 AWS SDK示例 GitHub 存储库中还有更多SDK示例

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

与 AWS SDK或CompleteSnapshot一起使用 CLI

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

Rust
SDK对于 Rust
注意

还有更多相关信息 GitHub。在 AWS 代码示例存储库中查找完整实例,了解如何进行设置和运行。

async fn finish(client: &Client, id: &str) -> Result<(), Error> { client .complete_snapshot() .changed_blocks_count(2) .snapshot_id(id) .send() .await?; println!("Snapshot ID {}", id); println!("The state is 'completed' when all of the modified blocks have been transferred to Amazon S3."); println!("Use the get-snapshot-state code example to get the state of the snapshot."); Ok(()) }
  • 有关API详细信息,请参见CompleteSnapshot中的 Rust AWS SDK API 参考