| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.Lightsail.CreateInstancesFromSnapshot
Description
Creates one or more new instances from a manual or automatic snapshot of an instance.
The create instances from snapshot operation supports tag-based access
control via request tags and resource tags applied to the resource
identified by instance snapshot name. For more information, see the
Amazon Lightsail Developer Guide.
Synopsis
- data CreateInstancesFromSnapshot = CreateInstancesFromSnapshot' {
- addOns :: Maybe [AddOnRequest]
- attachedDiskMapping :: Maybe (HashMap Text [DiskMap])
- instanceSnapshotName :: Maybe Text
- ipAddressType :: Maybe IpAddressType
- keyPairName :: Maybe Text
- restoreDate :: Maybe Text
- sourceInstanceName :: Maybe Text
- tags :: Maybe [Tag]
- useLatestRestorableAutoSnapshot :: Maybe Bool
- userData :: Maybe Text
- instanceNames :: [Text]
- availabilityZone :: Text
- bundleId :: Text
- newCreateInstancesFromSnapshot :: Text -> Text -> CreateInstancesFromSnapshot
- createInstancesFromSnapshot_addOns :: Lens' CreateInstancesFromSnapshot (Maybe [AddOnRequest])
- createInstancesFromSnapshot_attachedDiskMapping :: Lens' CreateInstancesFromSnapshot (Maybe (HashMap Text [DiskMap]))
- createInstancesFromSnapshot_instanceSnapshotName :: Lens' CreateInstancesFromSnapshot (Maybe Text)
- createInstancesFromSnapshot_ipAddressType :: Lens' CreateInstancesFromSnapshot (Maybe IpAddressType)
- createInstancesFromSnapshot_keyPairName :: Lens' CreateInstancesFromSnapshot (Maybe Text)
- createInstancesFromSnapshot_restoreDate :: Lens' CreateInstancesFromSnapshot (Maybe Text)
- createInstancesFromSnapshot_sourceInstanceName :: Lens' CreateInstancesFromSnapshot (Maybe Text)
- createInstancesFromSnapshot_tags :: Lens' CreateInstancesFromSnapshot (Maybe [Tag])
- createInstancesFromSnapshot_useLatestRestorableAutoSnapshot :: Lens' CreateInstancesFromSnapshot (Maybe Bool)
- createInstancesFromSnapshot_userData :: Lens' CreateInstancesFromSnapshot (Maybe Text)
- createInstancesFromSnapshot_instanceNames :: Lens' CreateInstancesFromSnapshot [Text]
- createInstancesFromSnapshot_availabilityZone :: Lens' CreateInstancesFromSnapshot Text
- createInstancesFromSnapshot_bundleId :: Lens' CreateInstancesFromSnapshot Text
- data CreateInstancesFromSnapshotResponse = CreateInstancesFromSnapshotResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newCreateInstancesFromSnapshotResponse :: Int -> CreateInstancesFromSnapshotResponse
- createInstancesFromSnapshotResponse_operations :: Lens' CreateInstancesFromSnapshotResponse (Maybe [Operation])
- createInstancesFromSnapshotResponse_httpStatus :: Lens' CreateInstancesFromSnapshotResponse Int
Creating a Request
data CreateInstancesFromSnapshot Source #
See: newCreateInstancesFromSnapshot smart constructor.
Constructors
| CreateInstancesFromSnapshot' | |
Fields
| |
Instances
newCreateInstancesFromSnapshot Source #
Arguments
| :: Text | |
| -> Text | |
| -> CreateInstancesFromSnapshot |
Create a value of CreateInstancesFromSnapshot with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
CreateInstancesFromSnapshot, createInstancesFromSnapshot_addOns - An array of objects representing the add-ons to enable for the new
instance.
$sel:attachedDiskMapping:CreateInstancesFromSnapshot', createInstancesFromSnapshot_attachedDiskMapping - An object containing information about one or more disk mappings.
$sel:instanceSnapshotName:CreateInstancesFromSnapshot', createInstancesFromSnapshot_instanceSnapshotName - 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.
Constraint:
- This parameter cannot be defined together with the
source instance nameparameter. Theinstance snapshot nameandsource instance nameparameters are mutually exclusive.
CreateInstancesFromSnapshot, createInstancesFromSnapshot_ipAddressType - The IP address type for the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4
and IPv6.
The default value is dualstack.
CreateInstancesFromSnapshot, createInstancesFromSnapshot_keyPairName - The name for your key pair.
$sel:restoreDate:CreateInstancesFromSnapshot', createInstancesFromSnapshot_restoreDate - 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-DDformat. - This parameter cannot be defined together with the
use latest restorable auto snapshotparameter. Therestore dateanduse latest restorable auto snapshotparameters are mutually exclusive. - Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
$sel:sourceInstanceName:CreateInstancesFromSnapshot', createInstancesFromSnapshot_sourceInstanceName - The name of the source instance from which the source automatic snapshot
was created.
Constraints:
- This parameter cannot be defined together with the
instance snapshot nameparameter. Thesource instance nameandinstance snapshot nameparameters are mutually exclusive. - Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
CreateInstancesFromSnapshot, createInstancesFromSnapshot_tags - The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
$sel:useLatestRestorableAutoSnapshot:CreateInstancesFromSnapshot', createInstancesFromSnapshot_useLatestRestorableAutoSnapshot - A Boolean value to indicate whether to use the latest available
automatic snapshot.
Constraints:
- This parameter cannot be defined together with the
restore dateparameter. Theuse latest restorable auto snapshotandrestore dateparameters are mutually exclusive. - Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
CreateInstancesFromSnapshot, createInstancesFromSnapshot_userData - 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
Amazon Lightsail Developer Guide.
$sel:instanceNames:CreateInstancesFromSnapshot', createInstancesFromSnapshot_instanceNames - The names for your new instances.
CreateInstancesFromSnapshot, createInstancesFromSnapshot_availabilityZone - 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.
CreateInstancesFromSnapshot, createInstancesFromSnapshot_bundleId - The bundle of specification information for your virtual private server
(or instance), including the pricing plan (e.g., micro_1_0).
Request Lenses
createInstancesFromSnapshot_addOns :: Lens' CreateInstancesFromSnapshot (Maybe [AddOnRequest]) Source #
An array of objects representing the add-ons to enable for the new instance.
createInstancesFromSnapshot_attachedDiskMapping :: Lens' CreateInstancesFromSnapshot (Maybe (HashMap Text [DiskMap])) Source #
An object containing information about one or more disk mappings.
createInstancesFromSnapshot_instanceSnapshotName :: Lens' CreateInstancesFromSnapshot (Maybe Text) Source #
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.
Constraint:
- This parameter cannot be defined together with the
source instance nameparameter. Theinstance snapshot nameandsource instance nameparameters are mutually exclusive.
createInstancesFromSnapshot_ipAddressType :: Lens' CreateInstancesFromSnapshot (Maybe IpAddressType) Source #
The IP address type for the instance.
The possible values are ipv4 for IPv4 only, and dualstack for IPv4
and IPv6.
The default value is dualstack.
createInstancesFromSnapshot_keyPairName :: Lens' CreateInstancesFromSnapshot (Maybe Text) Source #
The name for your key pair.
createInstancesFromSnapshot_restoreDate :: Lens' CreateInstancesFromSnapshot (Maybe Text) Source #
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-DDformat. - This parameter cannot be defined together with the
use latest restorable auto snapshotparameter. Therestore dateanduse latest restorable auto snapshotparameters are mutually exclusive. - Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
createInstancesFromSnapshot_sourceInstanceName :: Lens' CreateInstancesFromSnapshot (Maybe Text) Source #
The name of the source instance from which the source automatic snapshot was created.
Constraints:
- This parameter cannot be defined together with the
instance snapshot nameparameter. Thesource instance nameandinstance snapshot nameparameters are mutually exclusive. - Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
createInstancesFromSnapshot_tags :: Lens' CreateInstancesFromSnapshot (Maybe [Tag]) Source #
The tag keys and optional values to add to the resource during create.
Use the TagResource action to tag a resource after it's created.
createInstancesFromSnapshot_useLatestRestorableAutoSnapshot :: Lens' CreateInstancesFromSnapshot (Maybe Bool) Source #
A Boolean value to indicate whether to use the latest available automatic snapshot.
Constraints:
- This parameter cannot be defined together with the
restore dateparameter. Theuse latest restorable auto snapshotandrestore dateparameters are mutually exclusive. - Define this parameter only when creating a new instance from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
createInstancesFromSnapshot_userData :: Lens' CreateInstancesFromSnapshot (Maybe Text) Source #
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
Amazon Lightsail Developer Guide.
createInstancesFromSnapshot_instanceNames :: Lens' CreateInstancesFromSnapshot [Text] Source #
The names for your new instances.
createInstancesFromSnapshot_availabilityZone :: Lens' CreateInstancesFromSnapshot Text Source #
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.
createInstancesFromSnapshot_bundleId :: Lens' CreateInstancesFromSnapshot Text Source #
The bundle of specification information for your virtual private server
(or instance), including the pricing plan (e.g., micro_1_0).
Destructuring the Response
data CreateInstancesFromSnapshotResponse Source #
See: newCreateInstancesFromSnapshotResponse smart constructor.
Constructors
| CreateInstancesFromSnapshotResponse' | |
Fields
| |
Instances
newCreateInstancesFromSnapshotResponse Source #
Arguments
| :: Int | |
| -> CreateInstancesFromSnapshotResponse |
Create a value of CreateInstancesFromSnapshotResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:operations:CreateInstancesFromSnapshotResponse', createInstancesFromSnapshotResponse_operations - 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.
$sel:httpStatus:CreateInstancesFromSnapshotResponse', createInstancesFromSnapshotResponse_httpStatus - The response's http status code.
Response Lenses
createInstancesFromSnapshotResponse_operations :: Lens' CreateInstancesFromSnapshotResponse (Maybe [Operation]) Source #
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.
createInstancesFromSnapshotResponse_httpStatus :: Lens' CreateInstancesFromSnapshotResponse Int Source #
The response's http status code.