查询单元化路由规则配置

最近更新时间: 2026-10-11 00:12:05

1. 接口描述

接口请求域名: tsf.api3.fincloud.tencent.com。

查询单元化路由规则配置

默认接口请求频率限制:20次/秒。

接口更新时间:2026-03-13 14:55:11。

接口只验签名不鉴权。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数。

参数名称 必选 允许NULL 类型 描述
Action 是 否 String 公共参数,本接口取值:DescribeUnitRouteConfig
Version 是 否 String 公共参数,本接口取值:2018-03-26
Region 是 否 String 公共参数,地域信息可通过DescribeRegions接口查看产品支持的地域列表
SearchWord 否 否 String 根据规则名模糊查询
示例值: payment
UnitRuleId 否 否 String 单元化路由规则id
示例值: unti-maexjny3
Limit 否 否 Int64 不传默认20
示例值: 20
Offset 否 否 Int64 不传默认0
示例值: 0

3. 输出参数

参数名称 类型 描述
Result UnitRuleResult 单元路由列表
示例值:查看
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

4. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码。

错误码 描述
FailedOperation.UnitConfigQueryFailed 单元配置项查询失败
InternalError.InternalError tsf-dcfg内部错误
InternalError.UnhandledException [%s]模块未处理异常。。
FailedOperation.NoneUnitRouteRule 未找到单元化路由规则,请先推送

5. 示例

示例1 查询单元化路由规则配置

输入示例

{
  "Offset": 20,
  "Limit": 50,
  "SearchWord": "payment"
}

输出示例

{
  "Response": {
    "RequestId": "9d0fffd3-65ae-432a-9d2c-12e32e79d393",
    "Result": {
      "totalCount": 2,
      "content": [
        {
          "id": "unit-rule-12345",
          "name": "user route rule",
          "description": "Assign unitization routing based on user ID",
          "customerIdModValue": "100",
          "customerIdTag": "userId",
          "updatedTime": "1704067200000",
          "updatedShowTime": "2024-01-01 12:00:00",
          "unitRuleItemList": [
            {
              "name": "VIP user route",
              "relationship": "AND",
              "destUnitId": "unit-vip-001",
              "destUnitName": "VIP UNIT",
              "cloudSpaceName": "production",
              "unitRuleTagList": [
                {
                  "tagField": "userLevel",
                  "tagOperator": "EQUAL",
                  "tagValue": "VIP"
                },
                {
                  "tagField": "region",
                  "tagOperator": "IN",
                  "tagValue": "bj,sh"
                }
              ]
            },
            {
              "name": "user_common_route",
              "relationship": "OR",
              "destUnitId": "unit-normal-001",
              "destUnitName": "NormalUnit",
              "cloudSpaceName": "Production",
              "unitRuleTagList": [
                {
                  "tagField": "userLevel",
                  "tagOperator": "NOT_EQUAL",
                  "tagValue": "VIP"
                },
                {
                  "tagField": "userId",
                  "tagOperator": "RANGE",
                  "tagValue": "1-10000"
                }
              ]
            }
          ]
        },
        {
          "id": "unit-rule-67890",
          "name": "route_rule",
          "description": "Assign unitization routing based on payment amount",
          "customerIdModValue": "50",
          "customerIdTag": "paymentAmount",
          "updatedTime": "1704153600000",
          "updatedShowTime": "2024-01-02 12:00:00",
          "unitRuleItemList": [
            {
              "name": "PaymentRoute",
              "relationship": "AND",
              "destUnitId": "unit-payment-high",
              "destUnitName": "Large payment unit",
              "cloudSpaceName": "Production",
              "unitRuleTagList": [
                {
                  "tagField": "amount",
                  "tagOperator": "RANGE",
                  "tagValue": "10000-999999"
                },
                {
                  "tagField": "paymentType",
                  "tagOperator": "IN",
                  "tagValue": "bank,alipay"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}