Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data CreateRelationalDatabaseFromSnapshot = CreateRelationalDatabaseFromSnapshot' {
- sourceRelationalDatabaseName :: Maybe Text
- relationalDatabaseBundleId :: Maybe Text
- publiclyAccessible :: Maybe Bool
- useLatestRestorableTime :: Maybe Bool
- restoreTime :: Maybe POSIX
- availabilityZone :: Maybe Text
- relationalDatabaseSnapshotName :: Maybe Text
- tags :: Maybe [Tag]
- relationalDatabaseName :: Text
- newCreateRelationalDatabaseFromSnapshot :: Text -> CreateRelationalDatabaseFromSnapshot
- createRelationalDatabaseFromSnapshot_sourceRelationalDatabaseName :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text)
- createRelationalDatabaseFromSnapshot_relationalDatabaseBundleId :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text)
- createRelationalDatabaseFromSnapshot_publiclyAccessible :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Bool)
- createRelationalDatabaseFromSnapshot_useLatestRestorableTime :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Bool)
- createRelationalDatabaseFromSnapshot_restoreTime :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe UTCTime)
- createRelationalDatabaseFromSnapshot_availabilityZone :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text)
- createRelationalDatabaseFromSnapshot_relationalDatabaseSnapshotName :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text)
- createRelationalDatabaseFromSnapshot_tags :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe [Tag])
- createRelationalDatabaseFromSnapshot_relationalDatabaseName :: Lens' CreateRelationalDatabaseFromSnapshot Text
- data CreateRelationalDatabaseFromSnapshotResponse = CreateRelationalDatabaseFromSnapshotResponse' {
- operations :: Maybe [Operation]
- httpStatus :: Int
- newCreateRelationalDatabaseFromSnapshotResponse :: Int -> CreateRelationalDatabaseFromSnapshotResponse
- createRelationalDatabaseFromSnapshotResponse_operations :: Lens' CreateRelationalDatabaseFromSnapshotResponse (Maybe [Operation])
- createRelationalDatabaseFromSnapshotResponse_httpStatus :: Lens' CreateRelationalDatabaseFromSnapshotResponse Int
Creating a Request
data CreateRelationalDatabaseFromSnapshot Source #
See: newCreateRelationalDatabaseFromSnapshot
smart constructor.
CreateRelationalDatabaseFromSnapshot' | |
|
Instances
newCreateRelationalDatabaseFromSnapshot Source #
:: Text |
|
-> CreateRelationalDatabaseFromSnapshot |
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 istrue
. - 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_sourceRelationalDatabaseName :: Lens' CreateRelationalDatabaseFromSnapshot (Maybe Text) Source #
The name of the source database.
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 istrue
. - 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 #
See: newCreateRelationalDatabaseFromSnapshotResponse
smart constructor.
CreateRelationalDatabaseFromSnapshotResponse' | |
|
Instances
Eq CreateRelationalDatabaseFromSnapshotResponse Source # | |
Read CreateRelationalDatabaseFromSnapshotResponse Source # | |
Show CreateRelationalDatabaseFromSnapshotResponse Source # | |
Generic CreateRelationalDatabaseFromSnapshotResponse Source # | |
NFData CreateRelationalDatabaseFromSnapshotResponse Source # | |
type Rep CreateRelationalDatabaseFromSnapshotResponse Source # | |
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 #
:: Int |
|
-> CreateRelationalDatabaseFromSnapshotResponse |
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.
createRelationalDatabaseFromSnapshotResponse_httpStatus :: Lens' CreateRelationalDatabaseFromSnapshotResponse Int Source #
The response's http status code.