aws_sdk_lightsail/client/create_disk_from_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 [`CreateDiskFromSnapshot`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`disk_name(impl Into<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::disk_name) / [`set_disk_name(Option<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_disk_name):<br>required: **true**<br><p>The unique Lightsail disk name (<code>my-disk</code>).</p><br>
7 /// - [`disk_snapshot_name(impl Into<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::disk_snapshot_name) / [`set_disk_snapshot_name(Option<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_disk_snapshot_name):<br>required: **false**<br><p>The name of the disk snapshot (<code>my-snapshot</code>) from which to create the new storage disk.</p> <p>Constraint:</p> <ul> <li> <p>This parameter cannot be defined together with the <code>source disk name</code> parameter. The <code>disk snapshot name</code> and <code>source disk name</code> parameters are mutually exclusive.</p></li> </ul><br>
8 /// - [`availability_zone(impl Into<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::availability_zone) / [`set_availability_zone(Option<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_availability_zone):<br>required: **true**<br><p>The Availability Zone where you want to create the disk (<code>us-east-2a</code>). Choose the same Availability Zone as the Lightsail instance where you want to create the disk.</p> <p>Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.</p><br>
9 /// - [`size_in_gb(i32)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::size_in_gb) / [`set_size_in_gb(Option<i32>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_size_in_gb):<br>required: **true**<br><p>The size of the disk in GB (<code>32</code>).</p><br>
10 /// - [`tags(Tag)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::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>
11 /// - [`add_ons(AddOnRequest)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::add_ons) / [`set_add_ons(Option<Vec::<AddOnRequest>>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_add_ons):<br>required: **false**<br><p>An array of objects that represent the add-ons to enable for the new disk.</p><br>
12 /// - [`source_disk_name(impl Into<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::source_disk_name) / [`set_source_disk_name(Option<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_source_disk_name):<br>required: **false**<br><p>The name of the source disk from which the source automatic snapshot was created.</p> <p>Constraints:</p> <ul> <li> <p>This parameter cannot be defined together with the <code>disk snapshot name</code> parameter. The <code>source disk name</code> and <code>disk snapshot name</code> parameters are mutually exclusive.</p></li> <li> <p>Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-automatic-snapshots">Amazon Lightsail Developer Guide</a>.</p></li> </ul><br>
13 /// - [`restore_date(impl Into<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::restore_date) / [`set_restore_date(Option<String>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_restore_date):<br>required: **false**<br><p>The date of the automatic snapshot to use for the new disk. 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 creating a new disk from an automatic snapshot. For more information, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-automatic-snapshots">Amazon Lightsail Developer Guide</a>.</p></li> </ul><br>
14 /// - [`use_latest_restorable_auto_snapshot(bool)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::use_latest_restorable_auto_snapshot) / [`set_use_latest_restorable_auto_snapshot(Option<bool>)`](crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::set_use_latest_restorable_auto_snapshot):<br>required: **false**<br><p>A Boolean value to indicate whether to use the latest available automatic snapshot.</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 creating a new disk from an automatic snapshot. For more information, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-configuring-automatic-snapshots">Amazon Lightsail Developer Guide</a>.</p></li> </ul><br>
15 /// - On success, responds with [`CreateDiskFromSnapshotOutput`](crate::operation::create_disk_from_snapshot::CreateDiskFromSnapshotOutput) with field(s):
16 /// - [`operations(Option<Vec::<Operation>>)`](crate::operation::create_disk_from_snapshot::CreateDiskFromSnapshotOutput::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>
17 /// - On failure, responds with [`SdkError<CreateDiskFromSnapshotError>`](crate::operation::create_disk_from_snapshot::CreateDiskFromSnapshotError)
18 pub fn create_disk_from_snapshot(&self) -> crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder {
19 crate::operation::create_disk_from_snapshot::builders::CreateDiskFromSnapshotFluentBuilder::new(self.handle.clone())
20 }
21}