amazonka-rds-1.4.5: Amazon Relational Database Service SDK.

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

Network.AWS.RDS.DeleteDBInstance

Contents

Description

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 the following 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.

Synopsis

Creating a Request

deleteDBInstance #

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 to false . Constraints: * Must be 1 to 255 alphanumeric characters * 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. 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 - The DB instance identifier for the DB instance to be deleted. This parameter isn't case-sensitive. Constraints: * Must contain from 1 to 63 alphanumeric characters or hyphens * First character must be a letter * Cannot end with a hyphen or contain two consecutive hyphens

data DeleteDBInstance #

See: deleteDBInstance smart constructor.

Instances

Eq DeleteDBInstance # 
Data DeleteDBInstance # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeleteDBInstance -> c DeleteDBInstance #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeleteDBInstance #

toConstr :: DeleteDBInstance -> Constr #

dataTypeOf :: DeleteDBInstance -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DeleteDBInstance) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeleteDBInstance) #

gmapT :: (forall b. Data b => b -> b) -> DeleteDBInstance -> DeleteDBInstance #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeleteDBInstance -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeleteDBInstance -> r #

gmapQ :: (forall d. Data d => d -> u) -> DeleteDBInstance -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DeleteDBInstance -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeleteDBInstance -> m DeleteDBInstance #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteDBInstance -> m DeleteDBInstance #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteDBInstance -> m DeleteDBInstance #

Read DeleteDBInstance # 
Show DeleteDBInstance # 
Generic DeleteDBInstance # 
Hashable DeleteDBInstance # 
NFData DeleteDBInstance # 

Methods

rnf :: DeleteDBInstance -> () #

AWSRequest DeleteDBInstance # 
ToQuery DeleteDBInstance # 
ToPath DeleteDBInstance # 
ToHeaders DeleteDBInstance # 
type Rep DeleteDBInstance # 
type Rep DeleteDBInstance = D1 (MetaData "DeleteDBInstance" "Network.AWS.RDS.DeleteDBInstance" "amazonka-rds-1.4.5-I79yxZdjKNFFGn6ti49zKn" False) (C1 (MetaCons "DeleteDBInstance'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ddiFinalDBSnapshotIdentifier") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_ddiSkipFinalSnapshot") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_ddiDBInstanceIdentifier") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs DeleteDBInstance # 

Request Lenses

ddiFinalDBSnapshotIdentifier :: Lens' DeleteDBInstance (Maybe Text) #

The DBSnapshotIdentifier of the new DBSnapshot created when SkipFinalSnapshot is set to false . Constraints: * Must be 1 to 255 alphanumeric characters * 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) #

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 #

The DB instance identifier for the DB instance to be deleted. This parameter isn't case-sensitive. Constraints: * Must contain from 1 to 63 alphanumeric characters or hyphens * First character must be a letter * Cannot end with a hyphen or contain two consecutive hyphens

Destructuring the Response

deleteDBInstanceResponse #

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:

data DeleteDBInstanceResponse #

See: deleteDBInstanceResponse smart constructor.

Instances

Eq DeleteDBInstanceResponse # 
Data DeleteDBInstanceResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DeleteDBInstanceResponse -> c DeleteDBInstanceResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DeleteDBInstanceResponse #

toConstr :: DeleteDBInstanceResponse -> Constr #

dataTypeOf :: DeleteDBInstanceResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DeleteDBInstanceResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DeleteDBInstanceResponse) #

gmapT :: (forall b. Data b => b -> b) -> DeleteDBInstanceResponse -> DeleteDBInstanceResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DeleteDBInstanceResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DeleteDBInstanceResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> DeleteDBInstanceResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> DeleteDBInstanceResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> DeleteDBInstanceResponse -> m DeleteDBInstanceResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteDBInstanceResponse -> m DeleteDBInstanceResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DeleteDBInstanceResponse -> m DeleteDBInstanceResponse #

Read DeleteDBInstanceResponse # 
Show DeleteDBInstanceResponse # 
Generic DeleteDBInstanceResponse # 
NFData DeleteDBInstanceResponse # 
type Rep DeleteDBInstanceResponse # 
type Rep DeleteDBInstanceResponse = D1 (MetaData "DeleteDBInstanceResponse" "Network.AWS.RDS.DeleteDBInstance" "amazonka-rds-1.4.5-I79yxZdjKNFFGn6ti49zKn" False) (C1 (MetaCons "DeleteDBInstanceResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ddirsDBInstance") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe DBInstance))) (S1 (MetaSel (Just Symbol "_ddirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

ddirsResponseStatus :: Lens' DeleteDBInstanceResponse Int #

  • - | The response status code.