Creating a Security Group (Discarded)
Function
This API is used to create a security group.
This API has been discarded. Use the API described in Creating a Security Group.
URI
POST /v2.1/{project_id}/os-security-groups
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
Request
Table 2 describes the request parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| security_group | Yes | Object | Specifies the security group, which is configured in the message body. For details, see Table 3. |
Response
Table 4 describes the response parameters.
| Parameter | Type | Description |
|---|---|---|
| security_group | Object | Specifies the security group. For details, see Table 5. |
| Parameter | Type | Description |
|---|---|---|
| description | String | Provides supplementary information about the security group. |
| id | String | Specifies the security group ID in UUID format. |
| name | String | Specifies the security group name. |
| rules | Array of objects | Specifies the rules of the security group. The list is empty. |
| tenant_id | String | Specifies the tenant or project ID. |
Example Request
POST https://{endpoint}/v2.1/bb1118612ba64af3a6ea63a1bdcaa5ae/os-security-groups {
"security_group": {
"name": "test",
"description": "description"
}
} Example Response
{
"security_group": {
"rules": [],
"tenant_id": "bb1118612ba64af3a6ea63a1bdcaa5ae",
"description": "desc-sg",
"id": "81f1d23b-b1e2-42cd-bdee-359b4a065a42",
"name": "test-sg"
}
} Returned Values
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.