Menu
Amazon Relational Database Service
API Reference (API Version 2014-10-31)

CreateDBSecurityGroup

Creates a new DB security group. DB security groups control access to a DB instance.

Request Parameters

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

DBSecurityGroupDescription

The description for the DB security group.

Type: String

Required: Yes

DBSecurityGroupName

The name for the DB security group. This value is stored as a lowercase string.

Constraints:

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

  • First character must be a letter

  • Cannot end with a hyphen or contain two consecutive hyphens

  • Must not be "Default"

Example: mysecuritygroup

Type: String

Required: Yes

Tags.Tag.N

A list of tags.

Type: Array of Tag objects

Required: No

Response Elements

The following element is returned by the service.

DBSecurityGroup

Contains the result of a successful invocation of the following actions:

This data type is used as a response element in the DescribeDBSecurityGroups action.

Type: DBSecurityGroup object

Errors

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

DBSecurityGroupAlreadyExists

A DB security group with the name specified in DBSecurityGroupName already exists.

HTTP Status Code: 400

DBSecurityGroupNotSupported

A DB security group is not allowed for this action.

HTTP Status Code: 400

QuotaExceeded.DBSecurityGroup

Request would result in user exceeding the allowed number of DB security groups.

HTTP Status Code: 400

Example

Sample Request


https://rds.us-east-1.amazonaws.com/
   ?Action=CreateDBSecurityGroup
   &DBSecurityGroupDescription=My%20new%20DB%20Security%20Group
   &DBSecurityGroupName=mydbsecuritygroup00
   &SignatureMethod=HmacSHA256
   &SignatureVersion=4
   &Version=2014-09-01
   &X-Amz-Algorithm=AWS4-HMAC-SHA256
   &X-Amz-Credential=AKIADQKE4SARGYLE/20140424/us-east-1/rds/aws4_request
   &X-Amz-Date=20140424T190716Z
   &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date
   &X-Amz-Signature=c2f180a3f0f5d73b47f9c229937a78f3569bf14392db8093d9b2e6785609ab45

Sample Response


<CreateDBSecurityGroupResponse xmlns="http://rds.amazonaws.com/doc/2014-09-01/">
  <CreateDBSecurityGroupResult>
    <DBSecurityGroup>
      <EC2SecurityGroups/>
      <DBSecurityGroupDescription>My new DB Security Group</DBSecurityGroupDescription>
      <IPRanges/>
      <OwnerId>803#########</OwnerId>
      <DBSecurityGroupName>mydbsecuritygroup00</DBSecurityGroupName>
    </DBSecurityGroup>
  </CreateDBSecurityGroupResult>
  <ResponseMetadata>
    <RequestId>e68ef6fa-afc1-11c3-845a-476777009d19</RequestId>
  </ResponseMetadata>
</CreateDBSecurityGroupResponse>

See Also

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