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 |
---|---|---|
|
Type: |
Ancestor: None
Children: groupName
, groupDescription
groupName
Name of the security group.
Type: xsd:string
Default: None
Constraints: Accepts alphanumeric characters, spaces, dashes, and underscores.
Ancestor: CreateSecurityGroupType
Children: None
Yes
groupDescription
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: xsd:string
Default: None
Constraints: Accepts alphanumeric characters, spaces, dashes, and underscores.
Ancestor: CreateSecurityGroupType
Children: None
Yes
Response Elements
Name | Description |
---|---|
|
Type: CreateSecurityGroupResponseType Ancestor: None Children: |
|
The ID of the request. Type: xsd:string Ancestor: Children: None |
|
Returns true if creation succeeded. Otherwise, returns an error. Type: xsd:boolean Ancestor: Children: None |
Examples
Example Request
This example creates the websrv
security group.
<CreateSecurityGroup xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <groupName>websrv</groupName> <groupDescription>Web Servers</groupDescription> </CreateSecurityGroup>
Example Response
<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2009-10-31/"> <return>true</return> </CreateSecurityGroupResponse>