Skip to content

/AWS1/CL_LSA=>COPYSNAPSHOT()

About CopySnapshot

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.

Method Signature

IMPORTING

Required arguments:

IV_TARGETSNAPSHOTNAME TYPE /AWS1/LSARESOURCENAME /AWS1/LSARESOURCENAME

The name of the new manual snapshot to be created as a copy.

IV_SOURCEREGION TYPE /AWS1/LSAREGIONNAME /AWS1/LSAREGIONNAME

The Amazon Web Services Region where the source manual or automatic snapshot is located.

Optional arguments:

IV_SOURCESNAPSHOTNAME TYPE /AWS1/LSARESOURCENAME /AWS1/LSARESOURCENAME

The name of the source manual snapshot to copy.

Constraint:

  • Define this parameter only when copying a manual snapshot as another manual snapshot.

IV_SOURCERESOURCENAME TYPE /AWS1/LSASTRING /AWS1/LSASTRING

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

Constraint:

IV_RESTOREDATE TYPE /AWS1/LSASTRING /AWS1/LSASTRING

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-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 copying an automatic snapshot as a manual snapshot. For more information, see the Amazon Lightsail Developer Guide.

IV_USELATSTRESTORABLEAUTOS00 TYPE /AWS1/LSABOOLEAN /AWS1/LSABOOLEAN

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 date parameter. The use latest restorable auto snapshot and restore date parameters 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.

RETURNING

OO_OUTPUT TYPE REF TO /AWS1/CL_LSACOPYSNAPSHOTRESULT /AWS1/CL_LSACOPYSNAPSHOTRESULT