1. 接口描述
接口请求域名: tse.tencentcloudapi.com 。
按一种业务资源类型分页查询绑定候选及 Route 占用情况。编辑策略时传 PolicyId 排除自身占用,选择时同时检查 Supported 和 Occupied。当前屏蔽的 Dify/Custom Agent、Legacy SSE MCP 不进入可绑定列表。创建策略时使用 ResourceId,不使用 RouteIds。
本产品为 tse,版本为 2020-12-07。公共参数及签名按云 API 规范配置;在 API Explorer 选择目标环境,示例正文仅为业务参数,中文诊断示例以公共参数 Language=zh-CN 为前提。响应业务字段统一位于 Response.Result,Response.RequestId 为云 API 请求 ID;HTTP 成功不代表 Result.Success=true。示例 ID、域名和鉴权值均为占位内容,须替换为实际值。
默认接口请求频率限制:20次/秒。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| Action | 是 | String | 公共参数,本接口取值:DescribeAIGWCustomGuardrailBindableResources。 |
| Version | 是 | String | 公共参数,本接口取值:2020-12-07。 |
| Region | 是 | String | 公共参数,详见产品支持的 地域列表,本接口仅支持其中的: ap-bangkok, ap-beijing, ap-chengdu, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley 。 |
| GatewayId | 是 | String | 网关实例 ID 示例值:gateway-12345678 |
| ResourceType | 是 | String | 资源类型:model_api、mcp_server 或 agent_api 示例值:mcp_server |
| PolicyId | 否 | String | 当前策略 ID;用于排除自身占用 示例值:11111111-1111-4111-8111-111111111111 |
| Keyword | 否 | String | 按资源名称或路径模糊搜索 示例值:weather |
| Offset | 否 | Integer | 分页偏移量,最小 0 示例值:0 |
| Limit | 否 | Integer | 单页数量,范围 1~100,默认 20 示例值:20 |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Result | DescribeAIGWCustomGuardrailBindableResourcesResult | 接口业务结果,位于完整云 API 响应 Response.Result。存在 Success 时仍须单独判断;Response.RequestId 是本次云 API 请求标识。 |
| RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 查看 A2A 资源被其他策略占用
Supported=true 但 Occupied=true,仍不能直接重复绑定。 这是说明性示例,未执行真实资源操作;响应字段以目标环境实际部署版本为准。
输入示例
POST / HTTP/1.1
Host: tse.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAIGWCustomGuardrailBindableResources
X-TC-Version: 2020-12-07
X-TC-Region: ap-guangzhou
<其他公共请求参数与 TC3 签名>
{
"GatewayId": "gateway-12345678",
"ResourceType": "agent_api",
"Offset": 0,
"Limit": 20
}
输出示例
{
"Response": {
"Result": {
"TotalCount": 1,
"DataList": [
{
"ResourceType": "agent_api",
"ResourceId": "55555555-5555-4555-8555-555555555555",
"ResourceName": "示例 A2A 服务",
"Path": "/agents/example",
"Protocol": "a2a",
"RouteIds": [
"44444444-4444-4444-8444-444444444444"
],
"Occupied": true,
"Supported": true,
"OccupiedBy": "已有审核策略 (11111111-1111-4111-8111-111111111111)"
}
]
},
"RequestId": "77777777-7777-4777-8777-777777777777"
}
}
示例2 编辑时查询可绑定 MCP 资源
PolicyId 用于排除本策略自己的占用,不表示移除其他策略占用。 这是说明性示例,未执行真实资源操作;响应字段以目标环境实际部署版本为准。
输入示例
POST / HTTP/1.1
Host: tse.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAIGWCustomGuardrailBindableResources
X-TC-Version: 2020-12-07
X-TC-Region: ap-guangzhou
<其他公共请求参数与 TC3 签名>
{
"GatewayId": "gateway-12345678",
"ResourceType": "mcp_server",
"PolicyId": "11111111-1111-4111-8111-111111111111",
"Offset": 0,
"Limit": 20
}
输出示例
{
"Response": {
"Result": {
"TotalCount": 1,
"DataList": [
{
"ResourceType": "mcp_server",
"ResourceId": "22222222-2222-4222-8222-222222222222",
"ResourceName": "示例 MCP 服务",
"Path": "/mcp/example",
"Protocol": "mcp",
"RouteIds": [
"44444444-4444-4444-8444-444444444444"
],
"Occupied": false,
"Supported": true
}
]
},
"RequestId": "77777777-7777-4777-8777-777777777777"
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Java: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for PHP: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Go: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Node.js: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for .NET: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for C++: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Ruby: CNB, GitHub, Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
| 错误码 | 描述 |
|---|---|
| FailedOperation | 操作失败。 |
| FailedOperation.FailedOperation | 操作失败。 |
| FailedOperation.InternalError | 操作失败,内部错误。 |
| InternalError.InternalError | 服务内部错误。 |
| InvalidParameterValue.BadRequestFormat | 请求格式不正确。 |
| InvalidParameterValue.InvalidParameterValue | 无效的参数值。 |
| LimitExceeded.LimitExceeded | 参数超过限制。 |
| MissingParameter.MissParameter | 缺少参数。 |
| OperationDenied.OperationDenied | 不允许的操作。 |
| ResourceNotFound | 资源不存在。 |
| ResourceNotFound.InstanceNotFound | 实例不存在。 |
| ResourceNotFound.ResourceNotFound | 资源不存在。 |
| UnauthorizedOperation | 未授权操作。 |
| UnauthorizedOperation.UnauthorizedOperation | 未授权的操作。 |