Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Use StartSnapshot
with an Amazon SDK or CLI
The following code example shows how to use StartSnapshot
.
- Rust
-
- SDK for Rust
-
async fn start(client: &Client, description: &str) -> Result<String, Error> {
let snapshot = client
.start_snapshot()
.description(description)
.encrypted(false)
.volume_size(1)
.send()
.await?;
Ok(snapshot.snapshot_id.unwrap())
}