DeleteDBSecurityGroup - Amazon Relational Database Service

DeleteDBSecurityGroup

Deletes a DB security group.

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

Note

EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see Migrate from EC2-Classic to a VPC in the Amazon EC2 User Guide, the blog EC2-Classic Networking is Retiring – Here’s How to Prepare, and Moving a DB instance not in a VPC into a VPC in the Amazon RDS User Guide.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

DBSecurityGroupName

The name of the DB security group to delete.

Note

You can't delete the default DB security group.

Constraints:

  • Must be 1 to 255 letters, numbers, or hyphens.

  • First character must be a letter

  • Can't end with a hyphen or contain two consecutive hyphens

  • Must not be "Default"

Type: String

Required: Yes

Errors

For information about the errors that are common to all actions, see Common Errors.

DBSecurityGroupNotFound

DBSecurityGroupName doesn't refer to an existing DB security group.

HTTP Status Code: 404

InvalidDBSecurityGroupState

The state of the DB security group doesn't allow deletion.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of DeleteDBSecurityGroup.

Sample Request

https://rds.us-east-1.amazonaws.com/ ?Action=DeleteDBSecurityGroup &DBSecurityGroupName=mydbsecuritygroup &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2014-10-31 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140423/us-east-1/rds/aws4_request &X-Amz-Date=20140423T203336Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=873c15061fe60b9db8ea63137e5af82b157019696fc3e9764ef2abd9d71c640a

Sample Response

<DeleteDBSecurityGroupResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/"> <ResponseMetadata> <RequestId>7aec7454-ba25-11d3-855b-576787000e19</RequestId> </ResponseMetadata> </DeleteDBSecurityGroupResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: