VerifyRouteRule

Updated at:

Validates a routing rule.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

gemp:VerifyRouteRule

none

*All Resource

*

None None

Request syntax

POST /routeRule/verify HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

routeRuleId

integer

No

The rule ID.

1111

testSourceEvents

array<object>

No

The alert test content.

object

No

The alert test content.

{}

monitorSourceId

integer

No

The monitoring source ID.

1

monitorSourceName

string

No

The monitoring source name.

zabbix

eventTime

string

No

The alert time. Format: YYYY-MM-DD HH:mm:ss.

2021-09-08 13:00:00

eventJson

string

No

The format of the alert test content.

{}

{ "testSourceEvents": [ { "eventJson": "{\n\t"summary": "Cpu_util at 85.16% on machine 112.11.123.11",\n\t"priority": "P1",\n\t"name": "CPU usage exceeded threshold alert",\n\t"timestamp": "2021-07-17 T08:42:58.315+0000",\n\t"region": "shanghai",\n\t"source": "112.11.123.11",\n\t"application": "zheda/mozi",\n\t"group": "Production",\n\t"class": "Load",\n\t"details": {\n\t\t"freeSpace": "1%",\n\t\t"pingTime": "1500ms",\n\t\t"loadAvg": "0.75"\n\t},\n\t"tags": "{}"\n}", "eventTime": "2021-12-17 05:13:17", "monitorSourceId": 23463, "monitorSourceName": "Standard integration" } ], "routeRuleId": "160034020", "clientToken": "7e070585-ee11-450e-8827-db353faa3419" }

Response elements

Element

Type

Description

Example

object

The response structure.

requestId

string

The request ID.

2f0e4a68-9c12-4b57-8d30-6a91c5e7b204

data

object

The validation result.

isValidRule

boolean

Indicates whether the validation is successful.

true

routeType

string

The event or alert.

INCIDENT、ALERT

notifySubscriptionNames

array<object>

The subscription names.

object

The notification subscription.

{"subscriptionId":111111,"title":"My subscription"}

subscriptionId

integer

The subscription ID.

111111

title

string

The subscription names.

Subscription name

escalationPlans

array<object>

The escalation policy names.

object

The escalation plan.

escalationPlanName

string

The escalation plan name.

Escalation plan 1

escalationPlanId

integer

The escalation plan ID.

111111

routeRuleFailReason

array

The reason for the routing rule validation failure.

string

The reason for the routing rule validation failure.

alertName does not match

monitorSourceIds

array

The monitoring source IDs with validation failures.

integer

The monitoring source ID with a validation failure.

1000

{ "requestId": "gdgsdgsggsdg", "success": true, "errCode": 200, "errMessage": null, "data": { "routeRuleId": null, "isValidRule": false, "routeType": "INCIDENT", "routeRuleName": null, "assignToWhoName": null, "notifySubscriptions": [ { "subscriptionId": 80002030, "title": "[Test, do not modify] All services" }, { "subscriptionId": 100000010, "title": "Sample text 1" }, { "subscriptionId": 100000030, "title": "ceshi2190830" }, { "subscriptionId": 100000040, "title": "test121" }, { "subscriptionId": 100000070, "title": "Yes" }, { "subscriptionId": 110000000, "title": "All services - Individual - High priority" }, { "subscriptionId": 110000010, "title": "111" }, { "subscriptionId": 110000030, "title": "Legacy data compatibility testing" }, { "subscriptionId": 110000090, "title": "Test optimization feature" }, { "subscriptionId": 120000000, "title": "Test 1" }, { "subscriptionId": 120000030, "title": "Three-level cascade -- All services" }, { "subscriptionId": 120000070, "title": "341" }, { "subscriptionId": 130000000, "title": "All services - Service group" }, { "subscriptionId": 130000010, "title": "222" }, { "subscriptionId": 130000030, "title": "ceshi0903" }, { "subscriptionId": 130000060, "title": "niidfads" }, { "subscriptionId": 130000070, "title": "e232" }, { "subscriptionId": 130000080, "title": "test0001" }, { "subscriptionId": 140000000, "title": "Boundary value test" }, { "subscriptionId": 140000010, "title": "Notification subscribe" }, { "subscriptionId": 140000020, "title": "[Do not modify configurations!!!] [New] Notification subscribe - All" }, { "subscriptionId": 140000070, "title": "ceshiyixzia" }, { "subscriptionId": 150000000, "title": "24321" }, { "subscriptionId": 150000030, "title": "dscs" }, { "subscriptionId": 150000070, "title": "Steve v" }, { "subscriptionId": 150000090, "title": "121212" }, { "subscriptionId": 160000010, "title": "3333" }, { "subscriptionId": 160000030, "title": "wj test subscribe" }, { "subscriptionId": 160000060, "title": "cdscds" }, { "subscriptionId": 160000070, "title": "ceshisd" }, { "subscriptionId": 170000000, "title": "Service -- Individual" }, { "subscriptionId": 170000010, "title": "4444444" }, { "subscriptionId": 170000020, "title": "Test 11" }, { "subscriptionId": 170000030, "title": "This is a test 0927" }, { "subscriptionId": 170000060, "title": "Jinghua, the mastermind behind the manipulated stock Rendong Holdings, recently received a 5 million RMB fine from the regulatory authority. The penalty decision shows that this former top investor lost nearly 2.7 billion RMB on Rendong Holdings and also..." }, { "subscriptionId": 170000070, "title": "Eat" }, { "subscriptionId": 170000090, "title": "Prosper" }, { "subscriptionId": 180000000, "title": "aa1" }, { "subscriptionId": 180000010, "title": "3" }, { "subscriptionId": 180000030, "title": "sdds" }, { "subscriptionId": 180000040, "title": "4fy" }, { "subscriptionId": 180000050, "title": "cadscds" }, { "subscriptionId": 180000060, "title": "sdc" }, { "subscriptionId": 180000090, "title": "Speed" }, { "subscriptionId": 190000040, "title": "Time custom configuration test" }, { "subscriptionId": 190000080, "title": "Legacy data compatibility" }, { "subscriptionId": 190000090, "title": "DingTalk test" } ], "escalationPlans": [], "routeRuleFailReason": [ "No alerting content matches this Zabbix rule" ], "monitorSourceIds": [ 23465 ] } }

Examples

Success response

JSON format

{
  "requestId": "2f0e4a68-9c12-4b57-8d30-6a91c5e7b204",
  "data": {
    "isValidRule": true,
    "routeType": "INCIDENT、ALERT",
    "notifySubscriptionNames": [
      {
        "subscriptionId": 111111,
        "title": "订阅名称"
      }
    ],
    "escalationPlans": [
      {
        "escalationPlanName": "升级计划1",
        "escalationPlanId": 111111
      }
    ],
    "routeRuleFailReason": [
      "alertName不匹配"
    ],
    "monitorSourceIds": [
      1000
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.