AWS文件開發套件範例
將 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
。
-
動作
PutSnapshotBlock