Update Subnet Group
Updates a specified subnet group.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
PUT /api/sonar/subnet-groups/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-d name="OA" \
-d description="Office zone network" \
-X PUT \
https://HOSTNAME/api/sonar/subnet-groups/b76c3c81-c961-404f-a0eb-fae2f12f5bd8
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guid | O | String | Subnet group GUID | 36 characters |
| name | O | String | Subnet group name | Minimum 1 to maximum 50 characters |
| description | X | String | Subnet description | Maximum 50 characters |
Success Response
{}
Error Responses
Required argument is missing
HTTP status code 400
{
"error_code": "null-argument",
"error_msg": "name should be not null"
}
Invalid argument length
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'name' must be less than or equal to 50 characters."
}
Subnet group is not found
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "subnet group not found: c1dfe306-abba-4ed8-862b-0e98e2effcb5"
}
Duplicate group name
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "duplicated subnet group name: OA"
}
No privileges to update a subnet group
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}