Updating a Security Group (Discarded)
Function
This API is used to update a security group.
This API has been discarded. Use the API described in Updating a Security Group.
URI
PUT /v2.1/{project_id}/os-security-groups/{security_group_id}
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
security_group_id |
Yes |
Specifies the security group ID, which is specified in the URI. |
Request
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
security_group |
Yes |
Object |
Specifies the security group in the message body. For details, see Table 3. |
Response
Table 4 describes the response parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
security_group |
Yes |
Object |
Specifies the security group. For details, see Table 5. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
description |
Yes |
String |
Specifies information about a security group. The value cannot exceed 255 characters. |
id |
Yes |
String |
Specifies the security group ID in UUID format. |
name |
Yes |
String |
Specifies the security group name. The value cannot exceed 255 characters. |
rules |
Yes |
Array of objects |
Specifies the security group rule list. For details, see Table 6. |
tenant_id |
Yes |
String |
Specifies the tenant or project ID. The value cannot exceed 255 characters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
parent_group_id |
Yes |
String |
Specifies the associated security group ID in UUID format. |
ip_protocol |
Yes |
String |
Specifies the protocol type or the IP protocol number. The value can be icmp, tcp, udp, or the IP protocol number. |
from_port |
Yes |
Integer |
Specifies the start port. The value ranges from 1 to 65,535 and cannot be greater than to_port. When ip_protocol is icmp, this parameter specifies a port type with a length from 0 to 255 characters. |
to_port |
Yes |
Integer |
Specifies the end port. The value ranges from 1 to 65,535 and cannot be less than from_port. When ip_protocol is icmp, it specifies the code. The value ranges from 0 to 255. If both from_port and to_port are -1, any ICMP packet can be transmitted. |
ip_range |
Yes |
Object |
Specifies the peer IP segment in CIDR format. For details, see Table 7. The value of ip_range or group must be empty. |
group |
Yes |
Object |
Specifies the name of the peer security group and the ID of the tenant in the peer security group. For details, see Table 8. The value of ip_range or group must be empty. |
id |
Yes |
String |
Specifies the security group rule ID in UUID format. |
Example Request
PUT https://{endpoint}/v2.1/bb1118612ba64af3a6ea63a1bdcaa5ae/os-security-groups/3d02312d-0764-49c9-8244-2368ddce0045
{ "security_group": { "name": "test", "description": "description" } }
Example Response
{ "security_group": { "rules": [ { "from_port": null, "group": { "tenant_id": "bb1118612ba64af3a6ea63a1bdcaa5ae", "name": "test" }, "ip_protocol": null, "to_port": null, "parent_group_id": "3d02312d-0764-49c9-8244-2368ddce0045", "ip_range": {}, "id": "00dec0b6-8e96-4906-aadf-46cfe54cf5ef" } ], "tenant_id": "bb1118612ba64af3a6ea63a1bdcaa5ae", "id": "3d02312d-0764-49c9-8244-2368ddce0045", "name": "test", "description": "description" } }
Returned Values
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot