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

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@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 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.

Synopsis

Creating a Request

deleteDBInstance Source #

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 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. 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 match the name of an existing DB instance.

data DeleteDBInstance Source #

See: deleteDBInstance smart constructor.

Instances

Eq DeleteDBInstance Source # 
Data DeleteDBInstance Source # 

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 Source # 
Show DeleteDBInstance Source # 
Generic DeleteDBInstance Source # 
Hashable DeleteDBInstance Source # 
NFData DeleteDBInstance Source # 

Methods

rnf :: DeleteDBInstance -> () #

AWSRequest DeleteDBInstance Source # 
ToQuery DeleteDBInstance Source # 
ToPath DeleteDBInstance Source # 
ToHeaders DeleteDBInstance Source # 
type Rep DeleteDBInstance Source # 
type Rep DeleteDBInstance = D1 (MetaData "DeleteDBInstance" "Network.AWS.RDS.DeleteDBInstance" "amazonka-rds-1.5.0-4pv5DetELOaBXetw2fB1GM" 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 Source # 

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:

data DeleteDBInstanceResponse Source #

See: deleteDBInstanceResponse smart constructor.

Instances

Eq DeleteDBInstanceResponse Source # 
Data DeleteDBInstanceResponse Source # 

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 Source # 
Show DeleteDBInstanceResponse Source # 
Generic DeleteDBInstanceResponse Source # 
NFData DeleteDBInstanceResponse Source # 
type Rep DeleteDBInstanceResponse Source # 
type Rep DeleteDBInstanceResponse = D1 (MetaData "DeleteDBInstanceResponse" "Network.AWS.RDS.DeleteDBInstance" "amazonka-rds-1.5.0-4pv5DetELOaBXetw2fB1GM" False) (C1 (MetaCons "DeleteDBInstanceResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_ddirsDBInstance") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe DBInstance))) (S1 (MetaSel (Just Symbol "_ddirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses