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

Description

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

Creating a Request

data CreateDiskFromSnapshot Source #

See: newCreateDiskFromSnapshot smart constructor.

Constructors

CreateDiskFromSnapshot' 

Fields

  • useLatestRestorableAutoSnapshot :: Maybe Bool

    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. The use latest restorable auto snapshot and restore 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.
  • sourceDiskName :: Maybe Text

    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. The source disk name and disk 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.
  • addOns :: Maybe [AddOnRequest]

    An array of objects that represent the add-ons to enable for the new disk.

  • diskSnapshotName :: Maybe Text

    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. The disk snapshot name and source disk name parameters are mutually exclusive.
  • restoreDate :: Maybe Text

    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. The restore date and use 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.
  • tags :: Maybe [Tag]

    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.

  • diskName :: Text

    The unique Lightsail disk name (e.g., my-disk).

  • availabilityZone :: Text

    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.

  • sizeInGb :: Int

    The size of the disk in GB (e.g., 32).

Instances

Instances details
Eq CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Read CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Show CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Generic CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Associated Types

type Rep CreateDiskFromSnapshot :: Type -> Type #

NFData CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Methods

rnf :: CreateDiskFromSnapshot -> () #

Hashable CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

ToJSON CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

AWSRequest CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Associated Types

type AWSResponse CreateDiskFromSnapshot #

ToHeaders CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

ToPath CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

ToQuery CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

type Rep CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

type Rep CreateDiskFromSnapshot = D1 ('MetaData "CreateDiskFromSnapshot" "Amazonka.Lightsail.CreateDiskFromSnapshot" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CreateDiskFromSnapshot'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "useLatestRestorableAutoSnapshot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "sourceDiskName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "addOns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [AddOnRequest])) :*: S1 ('MetaSel ('Just "diskSnapshotName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "restoreDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag]))) :*: (S1 ('MetaSel ('Just "diskName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "availabilityZone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "sizeInGb") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))))
type AWSResponse CreateDiskFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

newCreateDiskFromSnapshot Source #

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. The use latest restorable auto snapshot and restore 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. The source disk name and disk 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. The disk snapshot name and source 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. The restore date and use 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. The use latest restorable auto snapshot and restore 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. The source disk name and disk 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. The disk snapshot name and source 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. The restore date and use 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.

Constructors

CreateDiskFromSnapshotResponse' 

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 CreateDiskFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Read CreateDiskFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Show CreateDiskFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Generic CreateDiskFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

Associated Types

type Rep CreateDiskFromSnapshotResponse :: Type -> Type #

NFData CreateDiskFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateDiskFromSnapshot

type Rep CreateDiskFromSnapshotResponse Source # 
Instance details

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.