aws_sdk_lightsail/client/create_instances_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 [`CreateInstancesFromSnapshot`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`instance_names(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::instance_names) / [`set_instance_names(Option<Vec::<String>>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_instance_names):<br>required: **true**<br><p>The names for your new instances.</p><br>
7 /// - [`attached_disk_mapping(impl Into<String>, Vec::<DiskMap>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::attached_disk_mapping) / [`set_attached_disk_mapping(Option<HashMap::<String, Vec::<DiskMap>>>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_attached_disk_mapping):<br>required: **false**<br><p>An object containing information about one or more disk mappings.</p><br>
8 /// - [`availability_zone(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::availability_zone) / [`set_availability_zone(Option<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_availability_zone):<br>required: **true**<br><p>The Availability Zone where you want to create your instances. Use the following formatting: <code>us-east-2a</code> (case sensitive). You can get a list of Availability Zones by using the <a href="http://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html">get regions</a> operation. Be sure to add the <code>include Availability Zones</code> parameter to your request.</p><br>
9 /// - [`instance_snapshot_name(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::instance_snapshot_name) / [`set_instance_snapshot_name(Option<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_instance_snapshot_name):<br>required: **false**<br><p>The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots operation to return information about your existing snapshots.</p> <p>Constraint:</p> <ul> <li> <p>This parameter cannot be defined together with the <code>source instance name</code> parameter. The <code>instance snapshot name</code> and <code>source instance name</code> parameters are mutually exclusive.</p></li> </ul><br>
10 /// - [`bundle_id(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::bundle_id) / [`set_bundle_id(Option<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_bundle_id):<br>required: **true**<br><p>The bundle of specification information for your virtual private server (or <i>instance</i>), including the pricing plan (<code>micro_x_x</code>).</p><br>
11 /// - [`user_data(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::user_data) / [`set_user_data(Option<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_user_data):<br>required: **false**<br><p>You can create a launch script that configures a server with additional user data. For example, <code>apt-get -y update</code>.</p><note> <p>Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use <code>yum</code>, Debian and Ubuntu use <code>apt-get</code>, and FreeBSD uses <code>pkg</code>. For a complete list, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/compare-options-choose-lightsail-instance-image">Amazon Lightsail Developer Guide</a>.</p> </note><br>
12 /// - [`key_pair_name(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::key_pair_name) / [`set_key_pair_name(Option<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_key_pair_name):<br>required: **false**<br><p>The name for your key pair.</p><br>
13 /// - [`tags(Tag)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::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>
14 /// - [`add_ons(AddOnRequest)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::add_ons) / [`set_add_ons(Option<Vec::<AddOnRequest>>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_add_ons):<br>required: **false**<br><p>An array of objects representing the add-ons to enable for the new instance.</p><br>
15 /// - [`ip_address_type(IpAddressType)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::ip_address_type) / [`set_ip_address_type(Option<IpAddressType>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_ip_address_type):<br>required: **false**<br><p>The IP address type for the instance.</p> <p>The possible values are <code>ipv4</code> for IPv4 only, <code>ipv6</code> for IPv6 only, and <code>dualstack</code> for IPv4 and IPv6.</p> <p>The default value is <code>dualstack</code>.</p><br>
16 /// - [`source_instance_name(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::source_instance_name) / [`set_source_instance_name(Option<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_source_instance_name):<br>required: **false**<br><p>The name of the source instance from which the source automatic snapshot was created.</p> <p>Constraints:</p> <ul> <li> <p>This parameter cannot be defined together with the <code>instance snapshot name</code> parameter. The <code>source instance name</code> and <code>instance snapshot name</code> parameters are mutually exclusive.</p></li> <li> <p>Define this parameter only when creating a new instance 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>
17 /// - [`restore_date(impl Into<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::restore_date) / [`set_restore_date(Option<String>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::set_restore_date):<br>required: **false**<br><p>The date of the automatic snapshot to use for the new instance. 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 instance 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>
18 /// - [`use_latest_restorable_auto_snapshot(bool)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::use_latest_restorable_auto_snapshot) / [`set_use_latest_restorable_auto_snapshot(Option<bool>)`](crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::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 instance 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>
19 /// - On success, responds with [`CreateInstancesFromSnapshotOutput`](crate::operation::create_instances_from_snapshot::CreateInstancesFromSnapshotOutput) with field(s):
20 /// - [`operations(Option<Vec::<Operation>>)`](crate::operation::create_instances_from_snapshot::CreateInstancesFromSnapshotOutput::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>
21 /// - On failure, responds with [`SdkError<CreateInstancesFromSnapshotError>`](crate::operation::create_instances_from_snapshot::CreateInstancesFromSnapshotError)
22 pub fn create_instances_from_snapshot(
23 &self,
24 ) -> crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder {
25 crate::operation::create_instances_from_snapshot::builders::CreateInstancesFromSnapshotFluentBuilder::new(self.handle.clone())
26 }
27}