Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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_useLatestRestorableAutoSnapshot :: Lens' CreateDiskFromSnapshot (Maybe Bool)
- createDiskFromSnapshot_sourceDiskName :: Lens' CreateDiskFromSnapshot (Maybe Text)
- createDiskFromSnapshot_addOns :: Lens' CreateDiskFromSnapshot (Maybe [AddOnRequest])
- createDiskFromSnapshot_diskSnapshotName :: Lens' CreateDiskFromSnapshot (Maybe Text)
- createDiskFromSnapshot_restoreDate :: Lens' CreateDiskFromSnapshot (Maybe Text)
- createDiskFromSnapshot_tags :: Lens' CreateDiskFromSnapshot (Maybe [Tag])
- 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.
CreateDiskFromSnapshot' | |
|
Instances
newCreateDiskFromSnapshot Source #
:: 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:
$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 date
parameter. Theuse latest restorable auto snapshot
andrestore date
parameters 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 name
parameter. Thesource disk name
anddisk snapshot name
parameters 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:addOns: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 name
parameter. Thedisk snapshot name
andsource disk name
parameters 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-DD
format. - This parameter cannot be defined together with the
use latest restorable auto snapshot
parameter. Therestore date
anduse latest restorable auto snapshot
parameters 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:tags: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:diskName:CreateDiskFromSnapshot'
, createDiskFromSnapshot_diskName
- The unique Lightsail disk name (e.g., my-disk
).
$sel:availabilityZone: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.
$sel:sizeInGb:CreateDiskFromSnapshot'
, createDiskFromSnapshot_sizeInGb
- The size of the disk in GB (e.g., 32
).
Request Lenses
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 date
parameter. Theuse latest restorable auto snapshot
andrestore date
parameters 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 name
parameter. Thesource disk name
anddisk snapshot name
parameters 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_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 name
parameter. Thedisk snapshot name
andsource disk name
parameters 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-DD
format. - This parameter cannot be defined together with the
use latest restorable auto snapshot
parameter. Therestore date
anduse latest restorable auto snapshot
parameters 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_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.
CreateDiskFromSnapshotResponse' | |
|
Instances
Eq CreateDiskFromSnapshotResponse Source # | |
Read CreateDiskFromSnapshotResponse Source # | |
Show CreateDiskFromSnapshotResponse Source # | |
Defined in Amazonka.Lightsail.CreateDiskFromSnapshot | |
Generic CreateDiskFromSnapshotResponse Source # | |
NFData CreateDiskFromSnapshotResponse Source # | |
Defined in Amazonka.Lightsail.CreateDiskFromSnapshot rnf :: CreateDiskFromSnapshotResponse -> () # | |
type Rep CreateDiskFromSnapshotResponse Source # | |
Defined in Amazonka.Lightsail.CreateDiskFromSnapshot type Rep CreateDiskFromSnapshotResponse = D1 ('MetaData "CreateDiskFromSnapshotResponse" "Amazonka.Lightsail.CreateDiskFromSnapshot" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CreateDiskFromSnapshotResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Operation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
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.