| 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.CreateDiskFromSnapshot
Description
Creates a block storage disk from a manual or automatic snapshot of a
disk. The resulting disk can be attached to an Amazon Lightsail instance
in the same Availability Zone (e.g., us-east-2a).
The create disk from snapshot operation supports tag-based access
control via request tags and resource tags applied to the resource
identified by disk snapshot name. For more information, see the
Amazon Lightsail Developer Guide.
Synopsis
- data CreateDiskFromSnapshot = CreateDiskFromSnapshot' {}
- newCreateDiskFromSnapshot :: Text -> Text -> Int -> CreateDiskFromSnapshot
- createDiskFromSnapshot_addOns :: Lens' CreateDiskFromSnapshot (Maybe [AddOnRequest])
- createDiskFromSnapshot_diskSnapshotName :: Lens' CreateDiskFromSnapshot (Maybe Text)
- createDiskFromSnapshot_restoreDate :: Lens' CreateDiskFromSnapshot (Maybe Text)
- createDiskFromSnapshot_sourceDiskName :: Lens' CreateDiskFromSnapshot (Maybe Text)
- createDiskFromSnapshot_tags :: Lens' CreateDiskFromSnapshot (Maybe [Tag])
- createDiskFromSnapshot_useLatestRestorableAutoSnapshot :: Lens' CreateDiskFromSnapshot (Maybe Bool)
- createDiskFromSnapshot_diskName :: Lens' CreateDiskFromSnapshot Text
- createDiskFromSnapshot_availabilityZone :: Lens' CreateDiskFromSnapshot Text
- createDiskFromSnapshot_sizeInGb :: Lens' CreateDiskFromSnapshot Int
- data CreateDiskFromSnapshotResponse = CreateDiskFromSnapshotResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newCreateDiskFromSnapshotResponse :: Int -> CreateDiskFromSnapshotResponse
- createDiskFromSnapshotResponse_operations :: Lens' CreateDiskFromSnapshotResponse (Maybe [Operation])
- createDiskFromSnapshotResponse_httpStatus :: Lens' CreateDiskFromSnapshotResponse Int
Creating a Request
data CreateDiskFromSnapshot Source #
See: newCreateDiskFromSnapshot smart constructor.
Constructors
| CreateDiskFromSnapshot' | |
Fields
| |
Instances
newCreateDiskFromSnapshot Source #
Arguments
| :: Text | |
| -> Text | |
| -> Int | |
| -> CreateDiskFromSnapshot |
Create a value of CreateDiskFromSnapshot 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:
CreateDiskFromSnapshot, createDiskFromSnapshot_addOns - An array of objects that represent the add-ons to enable for the new
disk.
$sel:diskSnapshotName:CreateDiskFromSnapshot', createDiskFromSnapshot_diskSnapshotName - The name of the disk snapshot (e.g., my-snapshot) from which to create
the new storage disk.
Constraint:
- This parameter cannot be defined together with the
source disk nameparameter. Thedisk snapshot nameandsource disk nameparameters are mutually exclusive.
$sel:restoreDate:CreateDiskFromSnapshot', createDiskFromSnapshot_restoreDate - The date of the automatic snapshot to use for the new disk. 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 disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
$sel:sourceDiskName:CreateDiskFromSnapshot', createDiskFromSnapshot_sourceDiskName - The name of the source disk from which the source automatic snapshot was
created.
Constraints:
- This parameter cannot be defined together with the
disk snapshot nameparameter. Thesource disk nameanddisk snapshot nameparameters are mutually exclusive. - Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
CreateDiskFromSnapshot, createDiskFromSnapshot_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:CreateDiskFromSnapshot', createDiskFromSnapshot_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 disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
$sel:diskName:CreateDiskFromSnapshot', createDiskFromSnapshot_diskName - The unique Lightsail disk name (e.g., my-disk).
CreateDiskFromSnapshot, createDiskFromSnapshot_availabilityZone - The Availability Zone where you want to create the disk (e.g.,
us-east-2a). Choose the same Availability Zone as the Lightsail
instance where you want to create the disk.
Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
CreateDiskFromSnapshot, createDiskFromSnapshot_sizeInGb - The size of the disk in GB (e.g., 32).
Request Lenses
createDiskFromSnapshot_addOns :: Lens' CreateDiskFromSnapshot (Maybe [AddOnRequest]) Source #
An array of objects that represent the add-ons to enable for the new disk.
createDiskFromSnapshot_diskSnapshotName :: Lens' CreateDiskFromSnapshot (Maybe Text) Source #
The name of the disk snapshot (e.g., my-snapshot) from which to create
the new storage disk.
Constraint:
- This parameter cannot be defined together with the
source disk nameparameter. Thedisk snapshot nameandsource disk nameparameters are mutually exclusive.
createDiskFromSnapshot_restoreDate :: Lens' CreateDiskFromSnapshot (Maybe Text) Source #
The date of the automatic snapshot to use for the new disk. 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 disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
createDiskFromSnapshot_sourceDiskName :: Lens' CreateDiskFromSnapshot (Maybe Text) Source #
The name of the source disk from which the source automatic snapshot was created.
Constraints:
- This parameter cannot be defined together with the
disk snapshot nameparameter. Thesource disk nameanddisk snapshot nameparameters are mutually exclusive. - Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
createDiskFromSnapshot_tags :: Lens' CreateDiskFromSnapshot (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.
createDiskFromSnapshot_useLatestRestorableAutoSnapshot :: Lens' CreateDiskFromSnapshot (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 disk from an automatic snapshot. For more information, see the Amazon Lightsail Developer Guide.
createDiskFromSnapshot_diskName :: Lens' CreateDiskFromSnapshot Text Source #
The unique Lightsail disk name (e.g., my-disk).
createDiskFromSnapshot_availabilityZone :: Lens' CreateDiskFromSnapshot Text Source #
The Availability Zone where you want to create the disk (e.g.,
us-east-2a). Choose the same Availability Zone as the Lightsail
instance where you want to create the disk.
Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
createDiskFromSnapshot_sizeInGb :: Lens' CreateDiskFromSnapshot Int Source #
The size of the disk in GB (e.g., 32).
Destructuring the Response
data CreateDiskFromSnapshotResponse Source #
See: newCreateDiskFromSnapshotResponse smart constructor.
Constructors
| CreateDiskFromSnapshotResponse' | |
Fields
| |
Instances
newCreateDiskFromSnapshotResponse Source #
Create a value of CreateDiskFromSnapshotResponse 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:CreateDiskFromSnapshotResponse', createDiskFromSnapshotResponse_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:CreateDiskFromSnapshotResponse', createDiskFromSnapshotResponse_httpStatus - The response's http status code.
Response Lenses
createDiskFromSnapshotResponse_operations :: Lens' CreateDiskFromSnapshotResponse (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.
createDiskFromSnapshotResponse_httpStatus :: Lens' CreateDiskFromSnapshotResponse Int Source #
The response's http status code.