Copyright | (c) 2013-2017 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 |
Language | Haskell2010 |
The DeleteDBInstance action deletes a previously provisioned DB instance. When you delete a DB instance, all automated backups for that instance are deleted and cannot be recovered. Manual DB snapshots of the DB instance to be deleted by DeleteDBInstance
are not deleted.
If you request a final DB snapshot the status of the Amazon RDS DB instance is deleting
until the DB snapshot is created. The API action DescribeDBInstance
is used to monitor the status of this operation. The action cannot be canceled or reverted once submitted.
Note that when a DB instance is in a failure state and has a status of failed
, incompatible-restore
, or incompatible-network
, you can only delete it when the SkipFinalSnapshot
parameter is set to true
.
If the specified DB instance is part of an Amazon Aurora DB cluster, you cannot delete the DB instance if both of the following conditions are true:
- The DB cluster is a Read Replica of another Amazon Aurora DB cluster.
- The DB instance is the only instance in the DB cluster.
To delete a DB instance in this case, first call the PromoteReadReplicaDBCluster
API action to promote the DB cluster so it's no longer a Read Replica. After the promotion completes, then call the DeleteDBInstance
API action to delete the final instance in the DB cluster.
- deleteDBInstance :: Text -> DeleteDBInstance
- data DeleteDBInstance
- ddiFinalDBSnapshotIdentifier :: Lens' DeleteDBInstance (Maybe Text)
- ddiSkipFinalSnapshot :: Lens' DeleteDBInstance (Maybe Bool)
- ddiDBInstanceIdentifier :: Lens' DeleteDBInstance Text
- deleteDBInstanceResponse :: Int -> DeleteDBInstanceResponse
- data DeleteDBInstanceResponse
- ddirsDBInstance :: Lens' DeleteDBInstanceResponse (Maybe DBInstance)
- ddirsResponseStatus :: Lens' DeleteDBInstanceResponse Int
Creating a Request
Creates a value of DeleteDBInstance
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ddiFinalDBSnapshotIdentifier
- The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set tofalse
. Constraints: * Must be 1 to 255 letters or numbers. * First character must be a letter * Cannot end with a hyphen or contain two consecutive hyphens * Cannot be specified when deleting a Read Replica.ddiSkipFinalSnapshot
- Determines whether a final DB snapshot is created before the DB instance is deleted. Iftrue
is specified, no DBSnapshot is created. Iffalse
is specified, a DB snapshot is created before the DB instance is deleted. Note that when a DB instance is in a failure state and has a status offailed
, 'incompatible-restore', or 'incompatible-network', it can only be deleted when the SkipFinalSnapshot parameter is set to "true". Specifytrue
when deleting a Read Replica. Default:false
ddiDBInstanceIdentifier
- The DB instance identifier for the DB instance to be deleted. This parameter isn't case-sensitive. Constraints: * Must match the name of an existing DB instance.
data DeleteDBInstance Source #
See: deleteDBInstance
smart constructor.
Request Lenses
ddiFinalDBSnapshotIdentifier :: Lens' DeleteDBInstance (Maybe Text) Source #
The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to false
. Constraints: * Must be 1 to 255 letters or numbers. * First character must be a letter * Cannot end with a hyphen or contain two consecutive hyphens * Cannot be specified when deleting a Read Replica.
ddiSkipFinalSnapshot :: Lens' DeleteDBInstance (Maybe Bool) Source #
Determines whether a final DB snapshot is created before the DB instance is deleted. If true
is specified, no DBSnapshot is created. If false
is specified, a DB snapshot is created before the DB instance is deleted. Note that when a DB instance is in a failure state and has a status of failed
, 'incompatible-restore', or 'incompatible-network', it can only be deleted when the SkipFinalSnapshot parameter is set to "true". Specify true
when deleting a Read Replica. Default: false
ddiDBInstanceIdentifier :: Lens' DeleteDBInstance Text Source #
The DB instance identifier for the DB instance to be deleted. This parameter isn't case-sensitive. Constraints: * Must match the name of an existing DB instance.
Destructuring the Response
deleteDBInstanceResponse Source #
Creates a value of DeleteDBInstanceResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ddirsDBInstance
- Undocumented member.ddirsResponseStatus
- -- | The response status code.
data DeleteDBInstanceResponse Source #
See: deleteDBInstanceResponse
smart constructor.
Response Lenses
ddirsDBInstance :: Lens' DeleteDBInstanceResponse (Maybe DBInstance) Source #
Undocumented member.
ddirsResponseStatus :: Lens' DeleteDBInstanceResponse Int Source #
- - | The response status code.