This URL updates given quarantine zone.
Resource URL
PUT /domain/<domainId>/quarantineZone/<quarantineZoneID>
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain id | Number | Yes |
| Quarantine zone id | Number | Yes |
Payload parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Name of quarantine zone | String | Yes |
| Description of quarantine zone | String | Yes |
| Is quarantine zone visible to child domain | Boolean | Yes |
| List of rules | Array | Yes |
Details of rules:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Is rule enabled or not | Boolean | Yes |
| Description of rule | String | No |
| Destination rule object | Object | No |
| Service rule object | Object | No |
| Action to be performed if the traffic matches this rule, can be "PERMIT"/ "DROP" | String | Yes |
| Is logging enabled for this rule | Boolean | Yes |
Details of destObjList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique rule object id | String | Yes |
| Rule object name | String | Yes |
| Destination mode. Can be "IPV4_NETWORK" / "IPV4_ENDPOINT" / | String | Yes |
Details of serviceObjList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique rule object id | String | Yes |
| Rule object name | String | Yes |
| Destination mode. Can be "SERVICE" | String | Yes |
| Application type. Can be "DEFAULT" / "CUSTOM" | String | Yes |
Response Parameters
Following fields are returned if the operation was successful, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Set to 1 if the operation was successful | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/domain/0/quarantineZone/220
Payload
{
"quarantineZoneName": "Quarantine20",
"quarantineZoneDescription": "Desc:Adds a new Quarantine Zone",
"visibleToChild": true,
"rules":
[
{
"state": true,
"ruleDescription": "create a new rule",
"destObjList":
[
],
"serviceObjList":
[
],
"action": "PERMIT",
"islogging": true
},
{
"state": true,
"ruleDescription": "create a new rule",
"destObjList":
[
{
"ruleObjectId": "12",
"ruleObjectName": "The 172.16.0.0/12 network",
"ruleObjectType": "IPV4_NETWORK"
}
],
"serviceObjList":
[
{
"ruleObjectId": "130",
"ruleObjectName": "ssl",
"ruleObjectType": "SERVICE",
"applicationType": "DEFAULT"
}
],
"action": "DROP",
"islogging": false
}
]
}
Response
{
"status": 1
}
Error Information
Following error codes are returned by this URL:
No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 500 | 1001 | Invalid quarantine zone id |
2 | 500 | 1001 | Given policy cannot be updated at this domain |
3 | 404 | 1105 | Invalid domain |
4 | 404 | 1720 | Invalid rule object id/ rule object not visible to this domain. |
5 | 500 | 1001 | At least one rule is required. |
6 | 500 | 1001 | Quarantine zone description: field should not be empty |
7 | 500 | 1001 | Quarantine zone name: The maximum length for the field is 64 |
8 | 500 | 1001 | Quarantine zone description: The maximum length for the field is 150 |
9 | 500 | 1001 | Quarantine zone name: Field should not be empty |
10 | 500 | 1001 | Name must contain only letters, numerical, spaces, commas, periods, hyphens or underscores |