This URL updates the QoS policy details.
Resource URL
PUT /qospolicy/<policy_id>
Request Parameters
URL Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| QoS policy id | Number | Yes |
Payload Request Parameters:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique QoS policy id | Number | No |
| Policy name | String | Yes |
| Id of domain to which this QoS policy belongs to | Number | Yes |
| Policy visible to child domain | Boolean | Yes |
| QoS policy description | String | No |
| Last modified time of the QoS policy | String | Yes |
| Policy is editable or not | Boolean | Yes |
| Policy type, can be "ADVANCED" / "CLASSIC" | Number | Yes |
| Policy version | Number | Yes |
| Latest user that modified the policy | String | Yes |
| Default value is true | Boolean | No |
| Default value is true | Boolean | No |
| QoS rules in the policy | Object | Yes |
Details of MemberDetails:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| List of QoS rules in the policy | Array | Yes |
Details of object in QoSMemberRuleList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Rule description | String | Yes |
| Is rule enabled or not | Boolean | Yes |
| Rule type, can be "DIFFSERV" / "VLAN" / "BANDWIDTH" | String | Yes |
| Source address rule object list | Array | Yes |
| Source user rule object list | Array | Yes |
| Destination address rule object list | Array | Yes |
| Service rule object rlst | Array | Yes |
| Application rule object list | Array | Yes |
| Time rule object list | Array | Yes |
| Tag/class value, For Diffserv, tag value should be between 0 - 63 For VLAN, tag value should be between 0 - 7 For Bandwidth, tag value should be between 1 - 7 | Number | Yes |
Details of SourceAddressObjectList and DestinationAddressObjectList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique rule object id | String | Yes |
| Rule object name | String | Yes |
| Source/destination mode, can be "COUNTRY" / "HOST_DNS_NAME" / "HOST_IPV_4" / "HOST_IPV_6" / "IPV_4_ADDRESS_RANGE" / "IPV_6_ADDRESS_RANGE" / "NETWORK_IPV_4" / "NETWORK_IPV_6" / "NETWORK_GROUP" | String | Yes |
Details of SourceUserObjectList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique rule object id | String | Yes |
| Rule object name | String | Yes |
| Source user, can be "USER" / "USER_GROUP" | String | Yes |
Details of ServiceObjectList and ApplicationObjectList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique service rule object id | String | Yes |
| Rule object name | String | Yes |
| Service/application mode, can be "APPLICATION" / "APPLICATION_GROUP" / "APPLICATION_ON_CUSTOM_PORT" / "SERVICE" / "SERVICE_RANGE" / "SERVICE_GROUP" | String | Yes |
| Application type, can be "DEFAULT" / "CUSTOM" | String | Yes |
Details of TimeObjectList:
Field Name | Description | Data Type | Mandatory |
|---|---|---|---|
| Unique service rule object id | String | Yes |
| Rule object name | String | Yes |
| Time mode, can be "FINITE_TIME_PERIOD" / "RECURRING_TIME_PERIOD" / "RECURRING_TIME_PERIOD_GROUP" | String | Yes |
Response Parameters
Following fields are returned if the request parameters are correct, otherwise error details are returned.
Field Name | Description | Data Type |
|---|---|---|
| Update status | Number |
Example
Request
PUT https://<NSM_IP>/sdkapi/qospolicy/183
{
"QoSPolicyId" : 183,
"Name" : "QoSPolicyTest",
"DomainId" : 0,
"VisibleToChild" : true,
"Description" : "To Test the QoS Policy",
"LastModifiedTime" : "2012-12-12 16:24:28",
"IsEditable" : true,
"PolicyType" : "ADVANCED",
"PolicyVersion" : 1,
"LastModifiedUser" : "admin",
"IsDiffServSettoZero" : false,
"IsVlanSettoZero" : false,
"MemberDetails" : {
"QoSMemberRuleList" : [{
"Description" : "QoSpolicyRatelimiting",
"Enabled" : true,
"RuleType" : "RATE_LIMITING",
"TagOrClass" : 3,
"SourceAddressObjectList" : [{
"RuleObjectId" : "AX",
"Name" : "Aland Islands",
"RuleObjectType" : "COUNTRY"
}, {
"RuleObjectId" : "101",
"Name" : "hostDNSRule",
"RuleObjectType" : "HOST_DNS_NAME"
}, {
"RuleObjectId" : "102",
"Name" : "hostIpv4",
"RuleObjectType" : "HOST_IPV_4"
}, {
"RuleObjectId" : "103",
"Name" : "ipv4Addressrange",
"RuleObjectType" : "IPV_4_ADDRESS_RANGE"
}, {
"RuleObjectId" : "104",
"Name" : "networkgroup",
"RuleObjectType" : "NETWORK_GROUP"
}
],
"DestinationAddressObjectList" : [{
"RuleObjectId" : "AL",
"Name" : "Albania",
"RuleObjectType" : "COUNTRY"
}, {
"RuleObjectId" : "DZ",
"Name" : "Algeria",
"RuleObjectType" : "COUNTRY"
}, {
"RuleObjectId" : "AS",
"Name" : "American Samoa",
"RuleObjectType" : "COUNTRY"
}
],
"SourceUserObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any",
"RuleObjectType" : "USER"
}
],
"ServiceObjectList" : [{
"RuleObjectId" : "110",
"Name" : "serviceCustom",
"RuleObjectType" : "SERVICE",
"ApplicationType" : "CUSTOM"
}, {
"RuleObjectId" : "112",
"Name" : "serviceGroup",
"RuleObjectType" : "SERVICE_GROUP",
"ApplicationType" : "CUSTOM"
}, {
"RuleObjectId" : "111",
"Name" : "serviceRange",
"RuleObjectType" : "SERVICE_RANGE",
"ApplicationType" : "CUSTOM"
}
],
"ApplicationObjectList" : [],
"TimeObjectList" : [{
"RuleObjectId" : "107",
"Name" : "finiteTimePeriod",
"RuleObjectType" : "FINITE_TIMING_PERIOD"
}
]
}, {
"Description" : "DiffServ Rules",
"Enabled" : true,
"RuleType" : "DIFFSERV",
"TagOrClass" : 3,
"SourceAddressObjectList" : [{
"RuleObjectId" : "AF",
"Name" : "Afghanistan",
"RuleObjectType" : "COUNTRY"
}
],
"DestinationAddressObjectList" : [{
"RuleObjectId" : "VG",
"Name" : "Virgin Islands, British",
"RuleObjectType" : "COUNTRY"
}
],
"SourceUserObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any",
"RuleObjectType" : "USER"
}
],
"ServiceObjectList" : [],
"ApplicationObjectList" : [{
"RuleObjectId" : "1627607040",
"RuleObjectType" : "APPLICATION",
"ApplicationType" : "DEFAULT"
}, {
"RuleObjectId" : "1543598080",
"RuleObjectType" : "APPLICATION",
"ApplicationType" : "DEFAULT"
}
],
"TimeObjectList" : [{
"RuleObjectId" : "109",
"Name" : "recurringTimeperiodGroup",
"RuleObjectType" : "RECURRING_TIME_PERIOD_GROUP"
}
]
}, {
"Description" : "",
"Enabled" : true,
"RuleType" : "VLAN",
"TagOrClass" : 0,
"SourceAddressObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any"
}
],
"DestinationAddressObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any"
}
],
"SourceUserObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any",
"RuleObjectType" : "USER"
}
],
"ServiceObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Any"
}
],
"ApplicationObjectList" : [],
"TimeObjectList" : [{
"RuleObjectId" : "-1",
"Name" : "Always"
}
]
}
]
}
}
Response
{
"status":1
}
Error Information
Following error codes are returned by this URL:
S.No | HTTP Error Code | SDK API errorId | SDK API errorMessage |
|---|---|---|---|
1 | 500 | 1001 | Internal error |
2 | 404 | 1105 | Invalid domain |
3 | 400 | 1704 | Rule object type is expected |
4 | 400 | 1720 | Invalid rule object id/ rule object not visible to this domain |
5 | 400 | 1804 | Maximum of 10 rule objects are allowed in each object list of an advanced firewall/QoS policy |
6 | 400 | 1813 | Source/destination object list is not provided |
7 | 400 | 1814 | Service/application object list is not provided |
8 | 400 | 1815 | Time object list is not provided |
9 | 400 | 1821 | Either application or service object list can be defined in a member rule for an advanced firewall/QoS policy |
10 | 400 | 1832 | Source address and destination address object list cannot combine IPV6 rule objects with host IPV4, network IPV4, IPV4 address range, country and host DNS name rule objects |
11 | 400 | 2701 | Invalid QoS policy type |
12 | 400 | 2702 | Invalid QoS policy id/ QoS policy not visible to this domain |
13 | 400 | 2704 | Diffserv tag value should be between 0 to 63 |
14 | 400 | 2705 | Rate limiting class value should be between 1 to 7 |
15 | 400 | 2706 | Vlan tag value should be between 0 to 7 |
16 | 400 | 2707 | QoS policy name is required |
17 | 400 | 2710 | Time object list is not applicable for classic QoS policy |
18 | 400 | 2711 | Application object list is not applicable for classic QoS policy |
19 | 400 | 2712 | Source address object list is not applicable for classic QoS policy |
20 | 400 | 2713 | Source address object list is not applicable for classic QoS policy |
21 | 400 | 2714 | Source user object list is not applicable for classic QoS policy |
22 | 400 | 2716 | Only service type rule object is supported for classic QoS policy |
23 | 400 | 2717 | Name must contain only letters, numerals, spaces, commas, periods, hyphens or underscores |
24 | 400 | 2718 | QoS policy name should not be greater than 40 chars |
25 | 400 | 2719 | Classic QoS policy should have at least one service object list |
26 | 400 | 2720 | QoS policy with the same name was defined |
27 | 400 | 2721 | QoS policy provided is not up to date |
28 | 400 | 2722 | Policy type cannot be modified |
29 | 400 | 2723 | Either application or service object list can be defined in a member rule for an advanced QoS policy |
30 | 400 | 2724 | QoS policy description should not be greater than 255 chars |
31 | 400 | 2725 | Member rule description should not be greater than 64 chars |