CreateSecurityGroup

GET /?Action=CreateSecurityGroup
Description

Creates a security group.
This action creates a security group either in the public Cloud or in a specified Virtual Private Cloud (VPC). By default, a default security group for use in the public Cloud and a default security group for use in a VPC are created.
When launching an instance, if no security group is explicitly specified, the appropriate default security group is assigned to the instance. Default security groups include a default rule granting instances network access to each other.
When creating a security group, you specify a name. Two security groups for use in the public Cloud or for use in a VPC cannot have the same name.
You can have up to 500 security groups in the public Cloud. You can create up to 500 security groups per VPC.
To add or remove rules, use the AuthorizeSecurityGroupIngress, AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress or RevokeSecurityGroupEgress methods.

Body parameter

Required: false
Name: CreateSecurityGroupRequest

Name Description Required Schema Default Example

DryRun

If set to true, checks whether you have the required permissions to perform the action.

false

boolean

GroupDescription

A description for the security group, between 1 and 255 ASCII characters.

true

string

GroupName

The name of the security group.
This name must be unique and contain between 1 and 255 ASCII characters. Accented letters are not allowed.

true

string

VpcId

The ID of the VPC.

false

string

Responses
HTTP Code 200
HTTP Code Description Schema

200

CreateSecurityGroupResult

Response 200

Response 200

Name Description Required Schema Default Example

groupId

The ID of the security group.

false

string

requestId

The ID of the request.

false

string