Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/os-security-groups | Creates a security group. |
Normal response codes: 200
This table shows the URI parameters for the create security group request:
Name | Type | Description |
---|---|---|
| String | The unique identifier of the tenant or account. |
Example 3.302. Create security group: XML request
<?xml version="1.0" encoding="UTF-8"?> <addSecurityGroup> <name>test</name> </addSecurityGroup>
This operation does not require a request body.
Example 3.303. Create security group: JSON response
{ "security_group": { "description": "description", "id": 2, "name": "test", "rules": [], "tenant_id": "openstack" } }
Example 3.304. Create security group: XML response
<?xml version='1.0' encoding='UTF-8'?> <security_group xmlns="http://docs.openstack.org/compute/api/v1.1" tenant_id="openstack" id="2" name="test"> <description> description </description> <rules/> </security_group>
This operation does not return a response body.