編排模板是對一組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"
}
]
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。