You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Lightsail::Types::CreateInstancesFromSnapshotRequest

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing CreateInstancesFromSnapshotRequest as input to an Aws::Client method, you can use a vanilla Hash:

{
  instance_names: ["string"], # required
  attached_disk_mapping: {
    "ResourceName" => [
      {
        original_disk_path: "NonEmptyString",
        new_disk_name: "ResourceName",
      },
    ],
  },
  availability_zone: "string", # required
  instance_snapshot_name: "ResourceName",
  bundle_id: "NonEmptyString", # required
  user_data: "string",
  key_pair_name: "ResourceName",
  tags: [
    {
      key: "TagKey",
      value: "TagValue",
    },
  ],
  add_ons: [
    {
      add_on_type: "AutoSnapshot", # required, accepts AutoSnapshot
      auto_snapshot_add_on_request: {
        snapshot_time_of_day: "TimeOfDay",
      },
    },
  ],
  source_instance_name: "string",
  restore_date: "string",
  use_latest_restorable_auto_snapshot: false,
}

Instance Attribute Summary collapse

Instance Attribute Details

#add_onsArray<Types::AddOnRequest>

An array of objects representing the add-ons to enable for the new instance.

Returns:

  • (Array<Types::AddOnRequest>)

    An array of objects representing the add-ons to enable for the new instance.

#attached_disk_mappingHash<String,Array<Types::DiskMap>>

An object containing information about one or more disk mappings.

Returns:

  • (Hash<String,Array<Types::DiskMap>>)

    An object containing information about one or more disk mappings.

#availability_zoneString

The Availability Zone where you want to create your instances. Use the following formatting: us-east-2a (case sensitive). You can get a list of Availability Zones by using the get regions operation. Be sure to add the include Availability Zones parameter to your request.

Returns:

  • (String)

    The Availability Zone where you want to create your instances.

#bundle_idString

The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0).

Returns:

  • (String)

    The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0).

#instance_namesArray<String>

The names for your new instances.

Returns:

  • (Array<String>)

    The names for your new instances.

#instance_snapshot_nameString

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.

This parameter cannot be defined together with the source instance name parameter. The instance snapshot name and source instance name parameters are mutually exclusive.

Returns:

  • (String)

    The name of the instance snapshot on which you are basing your new instances.

#key_pair_nameString

The name for your key pair.

Returns:

  • (String)

    The name for your key pair.

#restore_dateString

The date of the automatic snapshot to use for the new instance.

Use the get auto snapshots operation to identify the dates of the available automatic snapshots.

Constraints:

  • Must be specified in YYYY-MM-DD format.

  • This parameter cannot be defined together with the use latest restorable auto snapshot parameter. The restore date and use latest restorable auto snapshot parameters are mutually exclusive.

Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

Returns:

  • (String)

    The date of the automatic snapshot to use for the new instance.

#source_instance_nameString

The name of the source instance from which the source automatic snapshot was created.

This parameter cannot be defined together with the instance snapshot name parameter. The source instance name and instance snapshot name parameters are mutually exclusive.

Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

Returns:

  • (String)

    The name of the source instance from which the source automatic snapshot was created.

#tagsArray<Types::Tag>

The tag keys and optional values to add to the resource during create.

To tag a resource after it has been created, see the tag resource operation.

Returns:

  • (Array<Types::Tag>)

    The tag keys and optional values to add to the resource during create.

#use_latest_restorable_auto_snapshotBoolean

A Boolean value to indicate whether to use the latest available automatic snapshot.

This parameter cannot be defined together with the restore date parameter. The use latest restorable auto snapshot and restore date parameters are mutually exclusive.

Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Lightsail Dev Guide.

Returns:

  • (Boolean)

    A Boolean value to indicate whether to use the latest available automatic snapshot.

#user_dataString

You can create a launch script that configures a server with additional user data. For example, apt-get -y update.

Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg. For a complete list, see the Dev Guide.

Returns:

  • (String)

    You can create a launch script that configures a server with additional user data.