RDS / Client / delete_db_subnet_group

delete_db_subnet_group#

RDS.Client.delete_db_subnet_group(**kwargs)#

Deletes a DB subnet group.

Note

The specified database subnet group must not be associated with any DB instances.

See also: AWS API Documentation

Request Syntax

response = client.delete_db_subnet_group(
    DBSubnetGroupName='string'
)
Parameters:

DBSubnetGroupName (string) –

[REQUIRED]

The name of the database subnet group to delete.

Note

You can’t delete the default subnet group.

Constraints: Must match the name of an existing DBSubnetGroup. Must not be default.

Example: mydbsubnetgroup

Returns:

None

Exceptions

  • RDS.Client.exceptions.InvalidDBSubnetGroupStateFault

  • RDS.Client.exceptions.InvalidDBSubnetStateFault

  • RDS.Client.exceptions.DBSubnetGroupNotFoundFault

Examples

This example deletes the specified DB subnetgroup.

response = client.delete_db_subnet_group(
    DBSubnetGroupName='mydbsubnetgroup',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}