编排模板是对一组Kubernetes集群资源的定义和描述,以声明性方式描述应用应该如何运行或者配置。您可以调用DescribeTemplateAttribute接口,查询目标编排模板的详细信息,包括访问权限、YAML内容、标签等。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
cs:DescribeTemplateAttribute |
get |
*全部资源
|
无 | 无 |
请求语法
GET /templates/{TemplateId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| TemplateId |
string |
是 |
模板 ID。 |
874ec485-e7e6-4373-8a3b-47bde8a**** |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| template_type |
string |
否 |
模板类型。
推荐设置为 |
kubernetes |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
array |
编排模板详情。 |
||
|
object |
请求数据体。 |
||
| id |
string |
编排模板 ID,每次变更都会有一个模板 ID。 |
72d20cf8-a533-4ea9-a10d-e7630d3d**** |
| acl |
string |
编排模板的访问权限,取值:
|
private |
| name |
string |
编排模板名称。 |
web |
| template |
string |
编排模板 YAML 内容。 |
apiVersion: V1\n*** |
| template_type |
string |
模板类型。
|
kubernetes |
| description |
string |
编排模板描述信息。 |
test template |
| tags |
string |
部署模板的标签。 |
sa |
| template_with_hist_id |
string |
编排模板唯一 ID,不随模板更新而改变。 |
874ec485-e7e6-4373-8a3b-47bde8ae**** |
| created |
string |
编排模板创建时间。 |
2025-04-25T16:56:33+08:00 |
| updated |
string |
编排模板更新时间。 |
2025-04-25T16:56:33+08:00 |
示例
正常返回示例
JSON格式
[
{
"id": "72d20cf8-a533-4ea9-a10d-e7630d3d****",
"acl": "private",
"name": "web",
"template": "apiVersion: V1\\n***",
"template_type": "kubernetes",
"description": "test template",
"tags": "sa",
"template_with_hist_id": "874ec485-e7e6-4373-8a3b-47bde8ae****",
"created": "2025-04-25T16:56:33+08:00",
"updated": "2025-04-25T16:56:33+08:00"
}
]
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。