MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / _delete_rds_instance

Method _delete_rds_instance

web/pgacloud/providers/aws.py:252–275  ·  view source on GitHub ↗

Delete an RDS instance

(self, args, name)

Source from the content-addressed store, hash-verified

250 return response['DBInstances']
251
252 def _delete_rds_instance(self, args, name):
253 """ Delete an RDS instance """
254 rds = self._get_aws_client('rds', args)
255
256 debug('Deleting RDS instance: {}...'.format(name))
257 try:
258 rds.delete_db_instance(
259 DBInstanceIdentifier=name,
260 SkipFinalSnapshot=True,
261 DeleteAutomatedBackups=True
262 )
263 except Exception as e:
264 error(str(e))
265
266 # Wait for completion
267 while True:
268 try:
269 rds.describe_db_instances(DBInstanceIdentifier=args.name)
270 except rds.exceptions.DBInstanceNotFoundFault:
271 return
272 except Exception as e:
273 error(str(e))
274
275 time.sleep(5)
276
277 def _delete_security_group(self, args, id):
278 """ Delete a security group """

Callers 1

cmd_delete_instanceMethod · 0.95

Calls 3

_get_aws_clientMethod · 0.95
debugFunction · 0.90
errorFunction · 0.90

Tested by

no test coverage detected