将 CompleteSnapshot 和 AWS SDK 结合使用 - AWS SDK 代码示例

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

CompleteSnapshot 和 AWS SDK 结合使用

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

Rust
适用于 Rust 的 SDK
注意

查看 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 详细信息,请参阅《AWS SDK for Rust API Reference》中的 CompleteSnapshot