aws_sdk_lightsail/client/
create_disk_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 [`CreateDiskSnapshot`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`disk_name(impl Into<String>)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::disk_name) / [`set_disk_name(Option<String>)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::set_disk_name):<br>required: **false**<br><p>The unique name of the source disk (<code>Disk-Virginia-1</code>).</p><note>  <p>This parameter cannot be defined together with the <code>instance name</code> parameter. The <code>disk name</code> and <code>instance name</code> parameters are mutually exclusive.</p> </note><br>
7    ///   - [`disk_snapshot_name(impl Into<String>)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::disk_snapshot_name) / [`set_disk_snapshot_name(Option<String>)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::set_disk_snapshot_name):<br>required: **true**<br><p>The name of the destination disk snapshot (<code>my-disk-snapshot</code>) based on the source disk.</p><br>
8    ///   - [`instance_name(impl Into<String>)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::instance_name) / [`set_instance_name(Option<String>)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::set_instance_name):<br>required: **false**<br><p>The unique name of the source instance (<code>Amazon_Linux-512MB-Virginia-1</code>). When this is defined, a snapshot of the instance's system volume is created.</p><note>  <p>This parameter cannot be defined together with the <code>disk name</code> parameter. The <code>instance name</code> and <code>disk name</code> parameters are mutually exclusive.</p> </note><br>
9    ///   - [`tags(Tag)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::set_tags):<br>required: **false**<br><p>The tag keys and optional values to add to the resource during create.</p> <p>Use the <code>TagResource</code> action to tag a resource after it's created.</p><br>
10    /// - On success, responds with [`CreateDiskSnapshotOutput`](crate::operation::create_disk_snapshot::CreateDiskSnapshotOutput) with field(s):
11    ///   - [`operations(Option<Vec::<Operation>>)`](crate::operation::create_disk_snapshot::CreateDiskSnapshotOutput::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>
12    /// - On failure, responds with [`SdkError<CreateDiskSnapshotError>`](crate::operation::create_disk_snapshot::CreateDiskSnapshotError)
13    pub fn create_disk_snapshot(&self) -> crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder {
14        crate::operation::create_disk_snapshot::builders::CreateDiskSnapshotFluentBuilder::new(self.handle.clone())
15    }
16}