获取一个 GTM 实例的路由规则列表。
除了以下参数,您还需要 对请求进行鉴权。
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListRules | API 的名称。该参数的取值是 ListRules 。 |
Version | String | 是 | 2023-01-01 | API 的版本。该参数的取值是 2023-01-01 。 |
GtmId | String | 是 | 8234cb50-f957-4be9-b515-55c5d419ea9e | 表示 GTM 实例的 UUID。您可以通过 ListGtms API 获取 UUID。 |
PolicyType | String | 是 | geo | 路由规则对应的策略类型。
|
Name | String | 否 | rule | 表示路由规则的名称。 默认为空值,即该参数不作为查询条件。 |
Line | String | 否 | cn_mobile_anhui | 路由规则所适用的线路。您可以通过调用 ListLines API 获取可用的线路名称。您必须填入 API 返回的 value 字段的值。默认为空值,即该参数不作为查询条件。 |
Address | String | 否 | 1.1.1.1 | 路由规则的目标地址。 默认为空值,即该参数不作为查询条件。 |
SearchMode | String | 否 | like | 查询模式。包括以下模式:
|
PoolName | String | 否 | pool | 路由规则中地址池的名称。 默认为空值,即该参数不作为查询条件。 |
SortBy | String | 否 | UpdateTime | 对返回结果排序的键值。
|
SortOrder | String | 否 | Desc | 返回结果的排序方向。
|
PageSize | Integer | 否 | 50 | 每页包含的地址池的数量。默认为 50。云调度 GTM 会将获取的地址池进行分页显示。页数由获取的地址池总数和 PageSize 确定。 |
PageNumber | Integer | 否 | 1 | 页码。默认为 1。页数由获取的路由规则总数和 PageSize 确定。 |
参数名称 | 数据类型 | 参数说明 |
---|---|---|
RequestId | String | 标识本次请求的 ID。 |
Action | String | Action 查询参数的值。 |
Version | String | API 版本。 |
Service | String | 服务类型。 |
Region | String | 服务所在区域。 |
参数名称 | 数据类型 | 参数说明 |
---|---|---|
TotalCount | Integer | 地址池的总数量。 |
PageNumber | Integer | 分页的页码。 |
PageSize | Integer | 每个分页的地址池数量。 |
Data | Array of Objects | 路由规则的信息。 |
POST https://open.volcengineapi.com?Action=ListRules&Version=2023-01-01&GtmId=b46cf3dc-10e5-4847-8e32-e5c7696eebd0&PolicyType=geo
{ "ResponseMetadata": { "RequestId": "20240528163510DAE426781C7A5702C3DB", "Action": "ListRules", "Version": "2023-01-01", "Service": "GTM", "Region": "cn-north-1" }, "Result": { "TotalCount": 1, "PageNumber": 1, "PageSize": 100, "Data": [ { "RuleId": "44eed96c-12ce-4d32-9f5d-3218efa741cf", "Name": "csdcsdccsd", "Remark": "", "Disable": false, "Line": "default", "Weight": 1, "EffectivePoolSetIndex": 0, "PoolSetMode": "auto", "PoolSets": [ { "PoolSetId": "9d91d3dc-f68e-4223-943a-a4e30beba78c", "Name": "pool_set_1", "Weight": 1, "ActiveAddrThr": 1, "Pools": [ { "PoolId": "0a6f9638-f7a6-464b-a07b-1a48fb3b9c4e", "Weight": 1, "PoolName": "移动-浙江", "Addresses": [ { "Value": "x.x.x.x", "Weight": 1, "Capacity": 100, "Mode": "auto", "Geo": "中国_电信_福建", "Active": true, "Latency": 0, "PlatId": 0, "Area": "" }, { "Value": "x.x.x.x", "Weight": 1, "Capacity": 100, "Mode": "auto", "Geo": "中国_电信_福建", "Active": true, "Latency": 0, "PlatId": 0, "Area": "" } ], "InactiveAddrNumber": 0 } ], "Active": true, "Disable": false, "Addresses": [ { "Value": "x.x.x.x", "Weight": 1, "Capacity": 100, "Mode": "auto", "Geo": "中国_电信_福建", "AddrId": "9dbf70ba-8b4b-42c1-90c0-df1d7a2b2e62", "Active": false, "Latency": 0, "PlatId": 0, "Area": "" }, { "Value": "x.x.x.x", "Weight": 1, "Capacity": 100, "Mode": "auto", "Geo": "中国_电信_福建", "AddrId": "35e50b42-37f8-4a26-bc71-b91cd13e82c6", "Active": false, "Latency": 0, "PlatId": 0, "Area": "" } ], "AddrType": "ipv4" } ], "Probe": { "Nodes": [ "山东 济南市 中国移动", "福建 厦门市 中国移动", "浙江 杭州市 中国移动", "江西 南昌市 中国联通", "山东 济南市 中国联通", "山东 济南市 中国电信", "江西 南昌市 中国电信", "河北 廊坊市 中国电信" ], "IsManualNodes": false, "AdvisedNodeCount": 8, "Protocol": "tcp", "Interval": 60, "Timeout": 5, "PingLossPercent": 10, "PingCount": 20, "FailedCount": 3, "TcpConnTimeout": 2, "Host": "", "Port": 80, "Url": "", "HttpMethod": "GET", "Disable": false }, "UseRuleProbeConfig": true, "UsePolicyProbeNodes": false, "ProbeMode": "customized_base_config", "CreateTime": "2024-05-28T07:20:10.207Z", "UpdateTime": "2024-05-28T08:35:03.213Z" } ] } }
您可访问公共错误码,获取详细信息。