use super::*;
#[derive(Debug, Args)]
pub struct StartSnapshot {
#[arg(long)]
volume_size: i64,
#[arg(long)]
parent_snapshot_id: Option<String>,
#[arg(long, value_parser = parsers::tag::parse_tags::<ebs::types::Tag>, num_args = 1..)]
tags: Option<Vec<ebs::types::Tag>>,
#[arg(long)]
description: Option<String>,
#[arg(long)]
client_token: Option<String>,
#[arg(long)]
timeout: Option<i32>,
}
impl StartSnapshot {
pub(crate) async fn execute(self, config: &Config) -> EbsResult {
let output = config
.ebs()
.start_snapshot()
.volume_size(self.volume_size)
.set_parent_snapshot_id(self.parent_snapshot_id)
.set_description(self.description)
.set_tags(self.tags)
.set_client_token(self.client_token)
.set_timeout(self.timeout)
.send()
.await?;
Ok(Box::new(output))
}
}