aws_sdk_lightsail/client/
copy_snapshot.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`CopySnapshot`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`source_snapshot_name(impl Into<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::source_snapshot_name) / [`set_source_snapshot_name(Option<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::set_source_snapshot_name):<br>required: **false**<br><p>The name of the source manual snapshot to copy.</p> <p>Constraint:</p> <ul>  <li>   <p>Define this parameter only when copying a manual snapshot as another manual snapshot.</p></li> </ul><br>
7    ///   - [`source_resource_name(impl Into<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::source_resource_name) / [`set_source_resource_name(Option<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::set_source_resource_name):<br>required: **false**<br><p>The name of the source instance or disk from which the source automatic snapshot was created.</p> <p>Constraint:</p> <ul>  <li>   <p>Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-keeping-automatic-snapshots">Amazon Lightsail Developer Guide</a>.</p></li> </ul><br>
8    ///   - [`restore_date(impl Into<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::restore_date) / [`set_restore_date(Option<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::set_restore_date):<br>required: **false**<br><p>The date of the source automatic snapshot to copy. Use the <code>get auto snapshots</code> operation to identify the dates of the available automatic snapshots.</p> <p>Constraints:</p> <ul>  <li>   <p>Must be specified in <code>YYYY-MM-DD</code> format.</p></li>  <li>   <p>This parameter cannot be defined together with the <code>use latest restorable auto snapshot</code> parameter. The <code>restore date</code> and <code>use latest restorable auto snapshot</code> parameters are mutually exclusive.</p></li>  <li>   <p>Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-keeping-automatic-snapshots">Amazon Lightsail Developer Guide</a>.</p></li> </ul><br>
9    ///   - [`use_latest_restorable_auto_snapshot(bool)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::use_latest_restorable_auto_snapshot) / [`set_use_latest_restorable_auto_snapshot(Option<bool>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::set_use_latest_restorable_auto_snapshot):<br>required: **false**<br><p>A Boolean value to indicate whether to use the latest available automatic snapshot of the specified source instance or disk.</p> <p>Constraints:</p> <ul>  <li>   <p>This parameter cannot be defined together with the <code>restore date</code> parameter. The <code>use latest restorable auto snapshot</code> and <code>restore date</code> parameters are mutually exclusive.</p></li>  <li>   <p>Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-keeping-automatic-snapshots">Amazon Lightsail Developer Guide</a>.</p></li> </ul><br>
10    ///   - [`target_snapshot_name(impl Into<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::target_snapshot_name) / [`set_target_snapshot_name(Option<String>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::set_target_snapshot_name):<br>required: **true**<br><p>The name of the new manual snapshot to be created as a copy.</p><br>
11    ///   - [`source_region(RegionName)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::source_region) / [`set_source_region(Option<RegionName>)`](crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::set_source_region):<br>required: **true**<br><p>The Amazon Web Services Region where the source manual or automatic snapshot is located.</p><br>
12    /// - On success, responds with [`CopySnapshotOutput`](crate::operation::copy_snapshot::CopySnapshotOutput) with field(s):
13    ///   - [`operations(Option<Vec::<Operation>>)`](crate::operation::copy_snapshot::CopySnapshotOutput::operations): <p>An array of objects that describe the result of the action, such as the status of the request, the timestamp of the request, and the resources affected by the request.</p>
14    /// - On failure, responds with [`SdkError<CopySnapshotError>`](crate::operation::copy_snapshot::CopySnapshotError)
15    pub fn copy_snapshot(&self) -> crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder {
16        crate::operation::copy_snapshot::builders::CopySnapshotFluentBuilder::new(self.handle.clone())
17    }
18}