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
Path Parameters
KeyTypeDescriptionNote
guidStringSubnet group GUID36 characters
Request Body Parameters
KeyRequiredTypeDescriptionNote
nameYesStringSubnet group nameMinimum 1 to maximum 50 characters
descriptionNoStringSubnet descriptionMaximum 2,000 characters

Success Response

{}

Error Responses

name parameter is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "name should be not null"
}
name parameter length is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'name' must be shorter than or equal to 50 characters."
}
description parameter length is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'description' must be shorter than or equal to 2000 characters."
}
guid is not a valid GUID

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
Subnet group is not found

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "subnet group not found: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Duplicate group name

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated subnet group name: OA"
}
Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}