CreateSecurityGroup
Description
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.
Request Parameters
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. If the description contains spaces, you must enclose it in single quotes (') or URL-encode it. Type: String Default: None Constraints: Accepts alphanumeric characters, spaces, dashes, and underscores. | Yes |
Response Elements
Name | Description |
---|---|
|
Type: |
Ancestor: None
Children: requestId
, return
requestId
The ID of the request.
Type: xsd:string
Ancestor: CreateSecurityGroupResponseType
Children: None
return
Returns true if creation succeeded. Otherwise, returns an error.
Type: xsd:boolean
Ancestor: CreateSecurityGroupResponseType
Children: None
Examples
Example Request
This example creates the websrv
security group.
https://ec2.amazonaws.com/?Action=CreateSecurityGroup&GroupName=websrv&GroupDescription='Web Servers'&AuthParams
Example Response
<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <return>true</return> </CreateSecurityGroupResponse>