tcb integration get
使用 tcb integration get 命令查询指定集成的详细信息。
语法
tcb integration get <keyId> [options]
参数
| 参数 | 说明 | 必填 |
|---|---|---|
<keyId> | 集成实例唯一标识(Key ID),也可传实例名称 | 是 |
--json | 以 JSON 格式输出结果 | 否 |
按名称查询
位置参数也可以传集成实例的 name。只有按 keyId 直查返回空时才回退按 name 解析:
| 场景 | 行为 |
|---|---|
| keyId 命中 | 直接返回该实例 |
| keyId 未命中,name 唯一命中 | 返回该实例 |
| keyId 未命中,name 命中多条 | 报错并列出候选 keyId,改用 keyId 指定 |
| keyId 与 name 都未命中 | 提示用 tcb integration list 查看全部实例 |
| 网络或鉴权异常 | 直接抛出,不静默回退 |
tcb integration get stripe-test
示例
查询集成详情
tcb integration get key-721a6e232e169382d3cbc5faa3dc2cd6
JSON 格式输出
tcb integration get key-721a6e232e169382d3cbc5faa3dc2cd6 --json
输出示例:
{
"data": {
"keyId": "key-721a6e232e169382d3cbc5faa3dc2cd6",
"name": "my-integration",
"authTypeCode": "custom",
"authTypeName": "自定义集成",
"description": "我的集成",
"boundFunction": "my-function",
"updateTime": "2024-01-01 12:00",
"envVariables": {
"AppId": "wx1234567890",
"AppSecret": "******"
}
}
}
输出字段说明
| 字段 | 说明 |
|---|---|
keyId | 集成唯一标识 |
name | 集成名称 |
authTypeCode | 认证类型 Code |
authTypeName | 认证类型名称 |
description | 集成描述 |
boundFunction | 绑定的云函数名称 |
updateTime | 更新时间 |
envVariables | 环境变量配置(敏感字段已脱敏) |
敏感字段脱敏
查询集成详情时,敏感字段(如 api_key、AppSecret 等)会自动脱敏显示为 ******,避免泄露敏感信息。