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

Description

Creates a new database from an existing database snapshot in Amazon Lightsail.

You can create a new database from a snapshot in if something goes wrong with your original database, or to change it to a different plan, such as a high availability or standard plan.

The create relational database from snapshot operation supports tag-based access control via request tags and resource tags applied to the resource identified by relationalDatabaseSnapshotName. For more information, see the Amazon Lightsail Developer Guide.

Synopsis

Creating a Request

data CreateRelationalDatabaseFromSnapshot Source #

Constructors

CreateRelationalDatabaseFromSnapshot' 

Fields

  • sourceRelationalDatabaseName :: Maybe Text

    The name of the source database.

  • relationalDatabaseBundleId :: Maybe Text

    The bundle ID for your new database. A bundle describes the performance specifications for your database.

    You can get a list of database bundle IDs by using the get relational database bundles operation.

    When creating a new database from a snapshot, you cannot choose a bundle that is smaller than the bundle of the source database.

  • publiclyAccessible :: Maybe Bool

    Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

  • useLatestRestorableTime :: Maybe Bool

    Specifies whether your database is restored from the latest backup time. A value of true restores from the latest backup time.

    Default: false

    Constraints: Cannot be specified if the restore time parameter is provided.

  • restoreTime :: Maybe POSIX

    The date and time to restore your database from.

    Constraints:

    • Must be before the latest restorable time for the database.
    • Cannot be specified if the use latest restorable time parameter is true.
    • Specified in Coordinated Universal Time (UTC).
    • Specified in the Unix time format.

      For example, if you wish to use a restore time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the restore time.

  • availabilityZone :: Maybe Text

    The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.

    You can get a list of Availability Zones by using the get regions operation. Be sure to add the include relational database Availability Zones parameter to your request.

  • relationalDatabaseSnapshotName :: Maybe Text

    The name of the database snapshot from which to create your new database.

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

  • relationalDatabaseName :: Text

    The name to use for your new Lightsail database resource.

    Constraints:

    • Must contain from 2 to 255 alphanumeric characters, or hyphens.
    • The first and last character must be a letter or number.

Instances

Instances details
Eq CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

Read CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

Show CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

Generic CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

NFData CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

Hashable CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

ToJSON CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

AWSRequest CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

ToHeaders CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

ToPath CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

ToQuery CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

type Rep CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

type Rep CreateRelationalDatabaseFromSnapshot = D1 ('MetaData "CreateRelationalDatabaseFromSnapshot" "Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CreateRelationalDatabaseFromSnapshot'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "sourceRelationalDatabaseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "relationalDatabaseBundleId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "publiclyAccessible") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "useLatestRestorableTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "restoreTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "availabilityZone") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "relationalDatabaseSnapshotName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "relationalDatabaseName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))
type AWSResponse CreateRelationalDatabaseFromSnapshot Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

newCreateRelationalDatabaseFromSnapshot Source #

Create a value of CreateRelationalDatabaseFromSnapshot 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:sourceRelationalDatabaseName:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_sourceRelationalDatabaseName - The name of the source database.

$sel:relationalDatabaseBundleId:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_relationalDatabaseBundleId - The bundle ID for your new database. A bundle describes the performance specifications for your database.

You can get a list of database bundle IDs by using the get relational database bundles operation.

When creating a new database from a snapshot, you cannot choose a bundle that is smaller than the bundle of the source database.

$sel:publiclyAccessible:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_publiclyAccessible - Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

$sel:useLatestRestorableTime:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_useLatestRestorableTime - Specifies whether your database is restored from the latest backup time. A value of true restores from the latest backup time.

Default: false

Constraints: Cannot be specified if the restore time parameter is provided.

$sel:restoreTime:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_restoreTime - The date and time to restore your database from.

Constraints:

  • Must be before the latest restorable time for the database.
  • Cannot be specified if the use latest restorable time parameter is true.
  • Specified in Coordinated Universal Time (UTC).
  • Specified in the Unix time format.

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the restore time.

$sel:availabilityZone:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_availabilityZone - The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.

You can get a list of Availability Zones by using the get regions operation. Be sure to add the include relational database Availability Zones parameter to your request.

$sel:relationalDatabaseSnapshotName:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_relationalDatabaseSnapshotName - The name of the database snapshot from which to create your new database.

$sel:tags:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_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:relationalDatabaseName:CreateRelationalDatabaseFromSnapshot', createRelationalDatabaseFromSnapshot_relationalDatabaseName - The name to use for your new Lightsail database resource.

Constraints:

  • Must contain from 2 to 255 alphanumeric characters, or hyphens.
  • The first and last character must be a letter or number.

Request Lenses

createRelationalDatabaseFromSnapshot_relationalDatabaseBundleId :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text) Source #

The bundle ID for your new database. A bundle describes the performance specifications for your database.

You can get a list of database bundle IDs by using the get relational database bundles operation.

When creating a new database from a snapshot, you cannot choose a bundle that is smaller than the bundle of the source database.

createRelationalDatabaseFromSnapshot_publiclyAccessible :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Bool) Source #

Specifies the accessibility options for your new database. A value of true specifies a database that is available to resources outside of your Lightsail account. A value of false specifies a database that is available only to your Lightsail resources in the same region as your database.

createRelationalDatabaseFromSnapshot_useLatestRestorableTime :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Bool) Source #

Specifies whether your database is restored from the latest backup time. A value of true restores from the latest backup time.

Default: false

Constraints: Cannot be specified if the restore time parameter is provided.

createRelationalDatabaseFromSnapshot_restoreTime :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe UTCTime) Source #

The date and time to restore your database from.

Constraints:

  • Must be before the latest restorable time for the database.
  • Cannot be specified if the use latest restorable time parameter is true.
  • Specified in Coordinated Universal Time (UTC).
  • Specified in the Unix time format.

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM UTC, then you input 1538424000 as the restore time.

createRelationalDatabaseFromSnapshot_availabilityZone :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text) Source #

The Availability Zone in which to create your new database. Use the us-east-2a case-sensitive format.

You can get a list of Availability Zones by using the get regions operation. Be sure to add the include relational database Availability Zones parameter to your request.

createRelationalDatabaseFromSnapshot_relationalDatabaseSnapshotName :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text) Source #

The name of the database snapshot from which to create your new database.

createRelationalDatabaseFromSnapshot_tags :: Lens' CreateRelationalDatabaseFromSnapshot (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.

createRelationalDatabaseFromSnapshot_relationalDatabaseName :: Lens' CreateRelationalDatabaseFromSnapshot Text Source #

The name to use for your new Lightsail database resource.

Constraints:

  • Must contain from 2 to 255 alphanumeric characters, or hyphens.
  • The first and last character must be a letter or number.

Destructuring the Response

data CreateRelationalDatabaseFromSnapshotResponse Source #

Constructors

CreateRelationalDatabaseFromSnapshotResponse' 

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

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

Read CreateRelationalDatabaseFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

Show CreateRelationalDatabaseFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

Generic CreateRelationalDatabaseFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

NFData CreateRelationalDatabaseFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

type Rep CreateRelationalDatabaseFromSnapshotResponse Source # 
Instance details

Defined in Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot

type Rep CreateRelationalDatabaseFromSnapshotResponse = D1 ('MetaData "CreateRelationalDatabaseFromSnapshotResponse" "Amazonka.Lightsail.CreateRelationalDatabaseFromSnapshot" "libZSservicesZSamazonka-lightsailZSamazonka-lightsail" 'False) (C1 ('MetaCons "CreateRelationalDatabaseFromSnapshotResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "operations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Operation])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateRelationalDatabaseFromSnapshotResponse Source #

Create a value of CreateRelationalDatabaseFromSnapshotResponse 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:CreateRelationalDatabaseFromSnapshotResponse', createRelationalDatabaseFromSnapshotResponse_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:CreateRelationalDatabaseFromSnapshotResponse', createRelationalDatabaseFromSnapshotResponse_httpStatus - The response's http status code.

Response Lenses

createRelationalDatabaseFromSnapshotResponse_operations :: Lens' CreateRelationalDatabaseFromSnapshotResponse (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.