libZSservicesZSamazonka-lightsailZSamazonka-lightsail
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

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

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

  • sourceRegion :: RegionName

    The AWS Region where the source manual or automatic snapshot is located.

Instances

Instances details
Eq CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Read CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Show CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Generic CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Associated Types

type Rep CopySnapshot :: Type -> Type #

NFData CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Methods

rnf :: CopySnapshot -> () #

Hashable CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

ToJSON CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

AWSRequest CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Associated Types

type AWSResponse 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

type Rep CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

type Rep CopySnapshot = D1 ('MetaData "CopySnapshot" "Amazonka.Lightsail.CopySnapshot" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CopySnapshot'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "useLatestRestorableAutoSnapshot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (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 "targetSnapshotName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sourceRegion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RegionName)))))
type AWSResponse CopySnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

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: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: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:targetSnapshotName:CopySnapshot', copySnapshot_targetSnapshotName - The name of the new manual snapshot to be created as a copy.

$sel:sourceRegion:CopySnapshot', copySnapshot_sourceRegion - The AWS Region where the source manual or automatic snapshot is located.

Request Lenses

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_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_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 AWS 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
Eq CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Read CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Show CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Generic CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Associated Types

type Rep CopySnapshotResponse :: Type -> Type #

NFData CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

Methods

rnf :: CopySnapshotResponse -> () #

type Rep CopySnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CopySnapshot

type Rep CopySnapshotResponse = D1 ('MetaData "CopySnapshotResponse" "Amazonka.Lightsail.CopySnapshot" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" '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.