| 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.CopySnapshot
Description
Copies a manual snapshot of an instance or disk as another manual snapshot, or copies an automatic snapshot of an instance or disk as a manual snapshot. This operation can also be used to copy a manual or automatic snapshot of an instance or a disk from one Amazon Web Services Region to another in Amazon Lightsail.
When copying a manual snapshot, be sure to define the source region,
source snapshot name, and target snapshot name parameters.
When copying an automatic snapshot, be sure to define the
source region, source resource name, target snapshot name, and
either the restore date or the use latest restorable auto snapshot
parameters.
Synopsis
- data CopySnapshot = CopySnapshot' {}
- newCopySnapshot :: Text -> RegionName -> CopySnapshot
- copySnapshot_restoreDate :: Lens' CopySnapshot (Maybe Text)
- copySnapshot_sourceResourceName :: Lens' CopySnapshot (Maybe Text)
- copySnapshot_sourceSnapshotName :: Lens' CopySnapshot (Maybe Text)
- copySnapshot_useLatestRestorableAutoSnapshot :: Lens' CopySnapshot (Maybe Bool)
- copySnapshot_targetSnapshotName :: Lens' CopySnapshot Text
- copySnapshot_sourceRegion :: Lens' CopySnapshot RegionName
- data CopySnapshotResponse = CopySnapshotResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newCopySnapshotResponse :: Int -> CopySnapshotResponse
- copySnapshotResponse_operations :: Lens' CopySnapshotResponse (Maybe [Operation])
- copySnapshotResponse_httpStatus :: Lens' CopySnapshotResponse Int
Creating a Request
data CopySnapshot Source #
See: newCopySnapshot smart constructor.
Constructors
| CopySnapshot' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> RegionName | |
| -> CopySnapshot |
Create a value of CopySnapshot 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:restoreDate:CopySnapshot', copySnapshot_restoreDate - The date of the source automatic snapshot to copy. 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 copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
$sel:sourceResourceName:CopySnapshot', copySnapshot_sourceResourceName - The name of the source instance or disk from which the source automatic
snapshot was created.
Constraint:
- Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
$sel:sourceSnapshotName:CopySnapshot', copySnapshot_sourceSnapshotName - The name of the source manual snapshot to copy.
Constraint:
- Define this parameter only when copying a manual snapshot as another manual snapshot.
$sel:useLatestRestorableAutoSnapshot:CopySnapshot', copySnapshot_useLatestRestorableAutoSnapshot - A Boolean value to indicate whether to use the latest available
automatic snapshot of the specified source instance or disk.
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 copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
$sel:targetSnapshotName:CopySnapshot', copySnapshot_targetSnapshotName - The name of the new manual snapshot to be created as a copy.
$sel:sourceRegion:CopySnapshot', copySnapshot_sourceRegion - The Amazon Web Services Region where the source manual or automatic
snapshot is located.
Request Lenses
copySnapshot_restoreDate :: Lens' CopySnapshot (Maybe Text) Source #
The date of the source automatic snapshot to copy. 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 copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
copySnapshot_sourceResourceName :: Lens' CopySnapshot (Maybe Text) Source #
The name of the source instance or disk from which the source automatic snapshot was created.
Constraint:
- Define this parameter only when copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
copySnapshot_sourceSnapshotName :: Lens' CopySnapshot (Maybe Text) Source #
The name of the source manual snapshot to copy.
Constraint:
- Define this parameter only when copying a manual snapshot as another manual snapshot.
copySnapshot_useLatestRestorableAutoSnapshot :: Lens' CopySnapshot (Maybe Bool) Source #
A Boolean value to indicate whether to use the latest available automatic snapshot of the specified source instance or disk.
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 copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.
copySnapshot_targetSnapshotName :: Lens' CopySnapshot Text Source #
The name of the new manual snapshot to be created as a copy.
copySnapshot_sourceRegion :: Lens' CopySnapshot RegionName Source #
The Amazon Web Services Region where the source manual or automatic snapshot is located.
Destructuring the Response
data CopySnapshotResponse Source #
See: newCopySnapshotResponse smart constructor.
Constructors
| CopySnapshotResponse' | |
Fields
| |
Instances
newCopySnapshotResponse Source #
Arguments
| :: Int | |
| -> CopySnapshotResponse |
Create a value of CopySnapshotResponse 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:CopySnapshotResponse', copySnapshotResponse_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:CopySnapshotResponse', copySnapshotResponse_httpStatus - The response's http status code.
Response Lenses
copySnapshotResponse_operations :: Lens' CopySnapshotResponse (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.
copySnapshotResponse_httpStatus :: Lens' CopySnapshotResponse Int Source #
The response's http status code.