GetRouteRule

Updated at:

Queries the details of a 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:GetRouteRule

get

*All Resource

*

None None

Request syntax

POST /routeRule/detail HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

routeRuleId

integer

Yes

The rule ID.

1

clientToken

string

No

The client token.

C4BE3837-1A13-413B-A225-2C88188E8A43

{ "routeRuleId" : 1, "}

Response elements

Element

Type

Description

Example

object

The response structure.

requestId

string

The request ID.

6B9347ED-FD93-42B4-B9A4-7282962F5D6A

data

object

The rule details.

routeRuleId

integer

The rule ID.

180000000

ruleName

string

The name of the routing rule.

Rule 1

timeWindow

integer

The time window.

3

relatedServiceName

string

The associated service name.

Soaring Clouds

enableStatus

string

Specifies whether the rule is enabled. Valid values:

  • disable: Disabled.

  • enable: Enabled.

disable

relatedServiceId

integer

The ID of the associated service.

1000

routeType

string

The route type. Valid values:

  • INCIDENT: Triggers an event.

  • ALERT: Triggers only an alert.

INCIDENT

incidentLevel

string

The event level in descending order of severity. Valid values:

  • P1

  • P2

  • P3

  • P4

P1

assignObjectId

integer

The ID of the object to which the event is assigned, which can be a service group ID or a user ID.

1000

assignObjectType

string

The event assignment object type. Valid values:

  • SERVICEGROUP: Service group.

  • USER: Individual user.

SERVICEGROUP

effection

string

The impact level. Valid values:

  • LOW: General.

  • HIGH: Severe.

LOW

matchCount

integer

The number of hits.

3

childRuleRelation

string

The logical relation between child rules. Valid values:

  • AND: Logical AND.

  • OR: Logical OR.

AND、OR

eventRouteChildRules

array<object>

The child rules.

array<object>

The child rules.

childRouteRuleId

integer

The ID of the child rule.

1000

isValidChildRule

boolean

Specifies whether the rule is valid. Valid values:

  • true: Valid.

  • false: Invalid.

false

parentRuleId

integer

The rule ID.

1800

monitorSourceId

integer

The ID of the monitoring source.

1

monitorIntegrationConfigId

integer

The ID of the integration configuration.

1

monitorSourceName

string

The name of the monitoring source.

zabbix

childConditionRelation

integer

The logical relation for calculating child conditions. Valid values:

  • 0: Logical AND.

  • 1: Logical OR.

1

conditions

array<object>

The matching conditions.

object

The condition.

key

string

The key of the condition.

alarmName

value

string

The match value.

Zabbix server

operationSymbol

string

The operator.

contain

problemLevel

string

The fault level.

1

createTime

string

The creation time in the YYYY-MM-DD HH:mm:ss format.

2020-09-08 15:30:30

updateTime

string

The update time in the YYYY-MM-DD HH:mm:ss format.

2020-09-08 15:30:30

notifyChannels

array

The notification channels.

string

The notification channels.

[SMS,PHONE]

notifyChannelNames

array

The names of the notification channels.

string

The names of the notification channels.

[SMS, Phone call]

assignObjectName

string

The name of the notification recipient.

Mr. Liu

relServiceDeleteType

integer

The service deletion field.

1

problemLevelGroup

object

The fault level group.

{"P1":{"childRuleRelation":1,"matchCount":1,"timeWindow":5,"timeWindowUnit":"MINUTE","enableUpgrade":false,"upgradeTimeWindow":5,"upgradeTimeWindowUnit":"minute"}}

object

The service group.

childRuleRelation

integer

The child rules.

11

matchCount

integer

The number of hits.

11

timeWindow

integer

The time window.

1

timeWindowUnit

string

The time unit.

1

enableUpgrade

boolean

Specifies whether the upgrade is enabled.

true

upgradeTimeWindow

integer

The time window.

1

upgradeTimeWindowUnit

string

The time unit.

1

coverageProblemLevels

array

The covered fault levels.

string

The fault level.

1

problemEffectionServices

array

The services affected by the fault.

integer

The service associated with the fault.

1

convergenceFields

array

The collection of convergence fields.

string

The name of the convergence field.

name

convergenceType

integer

The convergence type. Valid values:

  • 0: Routing rule convergence.

  • 1: Field convergence.

0

{ "requestId": "6B9347ED-FD93-42B4-B9A4-7282962F5D6A", "data": { "routeRuleId": 180000000, "subscriptionName": "My subscription", "ruleName": "Rule 1", "timeWindow": 3, "relatedServiceName": "Soaring into the Clouds", "enableStatus": "DISABLE", "relatedServiceId": 1000, "routeType": "INCIDENT", "incidentLevel": "P1", "assignObjectId": 1000, "assignObjectType": "SERVICEGROUP", "effection": "LOW", "matchCount": 3, "eventRouteChildRules": [ { "childRouteRuleId": 1000, "isValidChildRule": false, "parentRuleId": 1800, "monitorSourceId": 1, "monitorIntegrationConfigId": 1, "monitorSourceName": "zabbix", "conditions": [ { "key": "alarmName", "value": "Zabbix server", "operationSymbol": "contain" } ] } ], "createTime": "2020-09-08 15:30:30", "updateTime": "2020-09-08 15:30:30", "notifyChannels": [ "[SMS,PHONE]" ], "notifyChannelNames": [ "[SMS,Phone]" ], "assignObjectName": "Liu Dehua" } }

Examples

Success response

JSON format

{
  "requestId": "6B9347ED-FD93-42B4-B9A4-7282962F5D6A",
  "data": {
    "routeRuleId": 180000000,
    "ruleName": "Rule 1",
    "timeWindow": 3,
    "relatedServiceName": "Soaring Clouds",
    "enableStatus": "disable",
    "relatedServiceId": 1000,
    "routeType": "INCIDENT",
    "incidentLevel": "P1",
    "assignObjectId": 1000,
    "assignObjectType": "SERVICEGROUP",
    "effection": "LOW",
    "matchCount": 3,
    "childRuleRelation": "AND、OR",
    "eventRouteChildRules": [
      {
        "childRouteRuleId": 1000,
        "isValidChildRule": false,
        "parentRuleId": 1800,
        "monitorSourceId": 1,
        "monitorIntegrationConfigId": 1,
        "monitorSourceName": "zabbix",
        "childConditionRelation": 1,
        "conditions": [
          {
            "key": "alarmName",
            "value": "Zabbix server",
            "operationSymbol": "contain"
          }
        ],
        "problemLevel": "1"
      }
    ],
    "createTime": "2020-09-08 15:30:30",
    "updateTime": "2020-09-08 15:30:30",
    "notifyChannels": [
      "[SMS,PHONE]"
    ],
    "notifyChannelNames": [
      "[SMS, Phone call]"
    ],
    "assignObjectName": "Mr. Liu",
    "relServiceDeleteType": 1,
    "problemLevelGroup": {
      "key": {
        "childRuleRelation": 11,
        "matchCount": 11,
        "timeWindow": 1,
        "timeWindowUnit": "1",
        "enableUpgrade": true,
        "upgradeTimeWindow": 1,
        "upgradeTimeWindowUnit": "1"
      }
    },
    "coverageProblemLevels": [
      "1"
    ],
    "problemEffectionServices": [
      1
    ],
    "convergenceFields": [
      "name"
    ],
    "convergenceType": 0
  }
}

Error codes

HTTP status code

Error code

Error message

Description

404 RouteRuleNotExisted The rule does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.