This URL adds a quarantine zone at given domain.
Resource URL
POST /domain/<domainId>/quarantineZone
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Domain id | Number | Yes |
Payload Request 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.
Field Name | Description | Data Type |
|---|---|---|
| Unique id of the created quarantine zone | Number |
Example
Request
POST https://<NSM_IP>/sdkapi/domain/0/quarantineZone
Payload
{
"quarantineZoneName": "Quarantine1",
"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
{
"createdResourceId": 243
}
Error Information
Following error codes are returned by this URL:
No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 500 | 1001 | Internal error - Failed to add NAZ definition. A NAZ with the same name already exists. |
2 | 404 | 1105 | Invalid domain |
3 | 404 | 1720 | Invalid rule object id/ rule object not visible to this domain |
4 | 500 | 1001 | At least one rule is required. |
5 | 500 | 1001 | Quarantine zone description: field should not be empty |
6 | 500 | 1001 | Quarantine zone name: The maximum length for the field is 64 |
7 | 500 | 1001 | Quarantine zone description: The maximum length for the field is 150 |
8 | 500 | 1001 | Quarantine zone name: Field should not be empty |
9 | 500 | 1001 | Name must contain only letters, numerical, spaces, commas, periods, hyphens or underscores |