amazonka-lightsail-2.0: Amazon Lightsail SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

Creating a Request

data CopySnapshot Source #

See: newCopySnapshot smart constructor.

Constructors

CopySnapshot' 

Fields

  • restoreDate :: Maybe Text

    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.
  • sourceResourceName :: Maybe Text

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

    Constraint:

  • sourceSnapshotName :: Maybe Text

    The name of the source manual snapshot to copy.

    Constraint:

    • Define this parameter only when copying a manual snapshot as another manual snapshot.
  • useLatestRestorableAutoSnapshot :: Maybe Bool

    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.
  • targetSnapshotName :: Text

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

  • sourceRegion :: RegionName

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

Instances

Instances details
ToJSON CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

ToHeaders CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

ToPath CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

ToQuery CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

AWSRequest CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Associated Types

type AWSResponse CopySnapshot #

Generic CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Associated Types

type Rep CopySnapshot :: Type -> Type #

Read CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Show CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

NFData CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Methods

rnf :: CopySnapshot -> () #

Eq CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Hashable CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

type AWSResponse CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

type Rep CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

type Rep CopySnapshot = D1 ('MetaData "CopySnapshot" "Amazonka.Lightsail.CopySnapshot" "amazonka-lightsail-2.0-77hvsZhtZFxFduYae8QaN0" 'False) (C1 ('MetaCons "CopySnapshot'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "restoreDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "sourceResourceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "sourceSnapshotName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "useLatestRestorableAutoSnapshot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "targetSnapshotName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sourceRegion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RegionName)))))

newCopySnapshot Source #

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-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.

$sel:sourceResourceName:CopySnapshot', copySnapshot_sourceResourceName - The name of the source instance or disk from which the source automatic snapshot was created.

Constraint:

$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 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.

$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-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.

copySnapshot_sourceResourceName :: Lens' CopySnapshot (Maybe Text) Source #

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

Constraint:

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 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.

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

  • operations :: Maybe [Operation]

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Associated Types

type Rep CopySnapshotResponse :: Type -> Type #

Read CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Show CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

NFData CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Methods

rnf :: CopySnapshotResponse -> () #

Eq CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

type Rep CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

type Rep CopySnapshotResponse = D1 ('MetaData "CopySnapshotResponse" "Amazonka.Lightsail.CopySnapshot" "amazonka-lightsail-2.0-77hvsZhtZFxFduYae8QaN0" 'False) (C1 ('MetaCons "CopySnapshotResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Operation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCopySnapshotResponse Source #

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.