CreateRouteRule
Creates a routing rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gemp:CreateRouteRule |
create |
*All Resource
|
None | None |
Request syntax
POST /routeRule/save HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The parameters for creating a routing rule. |
|
| ruleName |
string |
Yes |
The name of the routing rule. |
Rule name |
| enableStatus |
string |
No |
Specifies whether the rule is enabled. Valid values:
|
enable |
| relatedServiceId |
integer |
Yes |
The ID of the associated service. |
100 |
| routeType |
string |
Yes |
The route type. Valid values:
|
INCIDENT |
| incidentLevel |
string |
Yes |
The event level. The severity decreases from P1 to P4. |
P1 |
| assignObjectId |
integer |
Yes |
The ID of the object to which the event is assigned. The object can be a service group or a user. |
65 |
| assignObjectType |
string |
Yes |
The object type for event assignment. Valid values:
|
SERVICEGROUP |
| effection |
string |
Yes |
The impact level. Valid values:
|
LOW |
| timeWindow |
integer |
Yes |
The time window. |
2 |
| matchCount |
integer |
Yes |
The number of hits. |
3 |
| timeWindowUnit |
string |
Yes |
The unit of the time window. Valid values:
|
MINUTE |
| routeChildRules |
array<object> |
Yes |
The array of child rules. |
|
|
array<object> |
Yes |
The child rule. |
||
| monitorSourceId |
integer |
Yes |
The ID of the monitoring source. |
1 |
| conditions |
array<object> |
Yes |
The list of matching conditions. |
|
|
object |
Yes |
The matching condition. |
||
| key |
string |
Yes |
The matching key. |
payload.summary |
| value |
string |
Yes |
The matching value. |
123 |
| operationSymbol |
string |
Yes |
The operator. |
equals |
| childConditionRelation |
integer |
No |
The logical relation between child conditions. Valid values:
|
0 |
| problemLevel |
string |
No |
The fault level. The severity decreases from P1 to P4. |
P1 |
| notifyChannels |
array |
Yes |
The list of notification channels. |
|
|
string |
Yes |
The notification channel. Valid values:
|
[SMS,PHONE] |
|
| clientToken |
string |
No |
The idempotency token. |
C4BE3837-1A13-413B-A225-2C88188E8A43 |
| childRuleRelation |
string |
Yes |
The logical relation between child rules. Valid values:
|
AND |
| problemLevelGroup |
object |
No |
The fault level group. |
{"P1":{"childRuleRelation":1,"matchCount":1,"timeWindow":5,"timeWindowUnit":"MINUTE","enableUpgrade":false,"upgradeTimeWindow":5,"upgradeTimeWindowUnit":"minute"}} |
|
object |
No |
The fault level. |
||
| childRuleRelation |
integer |
No |
The logical relation between child rules. Valid values:
|
1 |
| matchCount |
integer |
No |
The number of hits for suppression. |
1 |
| timeWindow |
integer |
No |
The time window for suppression. |
5 |
| timeWindowUnit |
string |
No |
The unit of the time window for suppression. |
M |
| enableUpgrade |
boolean |
No |
Specifies whether to enable the upgrade. |
false |
| upgradeTimeWindow |
integer |
No |
The time window for the upgrade. |
5 |
| upgradeTimeWindowUnit |
string |
No |
The unit of the time window for the upgrade. |
M |
| coverageProblemLevels |
array |
No |
The fault level coverage. |
|
|
string |
No |
The fault level type. |
P1 |
|
| problemEffectionServices |
array |
No |
The services affected by the fault. |
|
|
integer |
No |
The ID of the affected service. |
1 |
|
| convergenceFields |
array |
No |
The set of convergence fields. |
|
|
string |
No |
The set of convergence fields. |
app |
|
| convergenceType |
integer |
No |
The convergence type. Valid values:
|
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| requestId |
string |
The request ID. |
Request ID |
| data |
object |
The returned result. |
{"routeRuleId":1000} |
| routeRuleId |
integer |
The rule ID. |
1000 |
Examples
Success response
JSON format
{
"requestId": "Request ID",
"data": {
"routeRuleId": 1000
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | AddRouteRuleFail | Failed to add the rule. | |
| 400 | RouteRuleNameAlreadyExisted | The rule name already exists. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.