將 CompleteSnapshot 與 AWS SDK 搭配使用 - AWS SDK 程式碼範例

AWS文件開發套件範例 GitHub 儲存庫中有更多可用的 AWS SDK 範例。

CompleteSnapshot 與 AWS SDK 搭配使用

以下程式碼範例顯示如何使用 CompleteSnapshot

Rust
SDK for 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 詳細資訊,請參閱《AWS SDK for Rust API 參考》中的 CompleteSnapshot