Creates a new security group. Group names must be unique per account.
Every instance is launched in a security group. If no security group is specified
during launch, the instances are launched in the default security group. Instances
within the same security group have unrestricted network access to each other.
Instances will reject network access attempts from other instances in a different
security group. As the owner of instances you can grant or revoke specific
permissions using the AuthorizeSecurityGroupIngress and RevokeSecurityGroupIngress operations.
For more information about security groups, go to Security Groups in the Amazon Elastic Compute Cloud User Guide.
| Name | Description | Required |
|---|---|---|
|
|
Name of the security group. Type: String Default: None Constraints: Accepts alphanumeric characters, spaces, dashes, and underscores. |
Yes |
|
|
Description of the group. This is informational only. Type: String Default: None Constraints: Accepts alphanumeric characters, spaces, dashes, and underscores. |
Yes |
The elements in the following table come wrapped in a
CreateSecurityGroupResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
Returns true if the request succeeds. Otherwise, returns an error. Type: xsd:boolean |
This example creates the websrv security group.
https://ec2.amazonaws.com/?Action=CreateSecurityGroup &GroupName=websrv &GroupDescription="Web Servers" &AuthParams
<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <return>true</return> </CreateSecurityGroupResponse>