调用DescribeTemplateAttribute查看指定模板的详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求语法
GET /templates/TemplateId?template_type=String HTTP/1.1
Content-Type:application/json
请求参数
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
TemplateId | String | 是 | 874ec485-e7e6-4373-8a3b-47bde8a**** |
模板ID。 |
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
template_type | String | 否 | kubernetes |
模板类型,其值可以是任意值。
默认值: |
响应体语法
HTTP/1.1 200
Content-Type:application/json
[ {
"id" : "String",
"acl" : "String",
"name" : "String",
"template" : "String",
"template_type" : "String",
"description" : "String",
"tags" : "String",
"template_with_hist_id" : "String",
"created" : "String",
"updated" : "String"
} ]
响应参数
参数名称 | 类型 | 示例 | 说明 |
---|---|---|---|
Array of template_info |
编排模板详情。 |
||
id | String | 72d20cf8-a533-4ea9-a10d-e7630d3d**** |
编排模板ID,每次变更都会有一个模板ID。 |
acl | String | private |
编排模板访问权限。 |
name | String | web |
编排模板名称。 |
template | String | apiVersion: V1\n*** |
编排模板YAML内容。 |
template_type | String | kubernetes |
模板类型,其值可以是任意值。
默认值: |
description | String | test template |
编排模板描述信息。 |
tags | String | sa |
部署模板的标签。 |
template_with_hist_id | String | 874ec485-e7e6-4373-8a3b-47bde8ae**** |
编排模板唯一ID,不随模板更新而改变。 |
created | String | 2020-09-16T19:21:29+08:00 |
编排模板创建时间。 |
updated | String | 2020-09-16T19:21:29+08:00 |
编排模板更新时间。 |
查询编排模板详情示例
请求示例
GET /templates/874ec485-e7e6-4373-8a3b-47bde8a****?template_type=kubernetes HTTP/1.1
Content-Type:application/json
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<0>
<id>72d20cf8-a533-4ea9-a10d-e7630d3d****</id>
<acl>private</acl>
<name>web</name>
<template>apiVersion: V1\n***</template>
<template_type>kubernetes</template_type>
<description>test template</description>
<tags>sa</tags>
<template_with_hist_id>874ec485-e7e6-4373-8a3b-47bde8ae****</template_with_hist_id>
<created>2020-09-16T19:21:29+08:00</created>
<updated>2020-09-16T19:21:29+08:00</updated>
</0>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/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" : "2020-09-16T19:21:29+08:00",
"updated" : "2020-09-16T19:21:29+08:00"
} ]
错误码
访问错误中心查看更多错误码。