DescribeTemplates
Description
Call DescribeTemplates query orchestration template.
Request Method
POST
Request Path
/apsara/route/CS/DescribeTemplates
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
page_num | BODY | long | No | 1 | paging the query results and specifying the data on which page to return. default value: 1. |
template_type | BODY | string | Yes | kubernetes | template type, the value can be any value. when the value is kubernetes will be displayed on the orchestration template page of the console. when the value is compose will not be displayed on the orchestration template page of the console. default value:kubernetes. |
version | BODY | string | No | 2016-01-01 | version of api |
page_size | BODY | long | No | 10 | paging the query results and specifying the number of data contained in each page. default value: 10. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
template | string | apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment-basic labels: app: nginx spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: busybox:latest ports: - containerPort: 80 | template content in YAML format. |
template_with_hist_id | string | ad81d115-7c8b-47e7-a222-9c28d7f6e588 | The parent template ID associated with the template, used to realize multi-version function of template (different versions of the same template have the same template_with_hist_id value). |
created | string | 2020-06-10T16:30:16+08:00 | deployment template creation time. |
total_count | long | 50 | total number of results. |
templates | array of template | No sample value for this parameter. | template list. |
description | string | a web server | deployment template description information. |
acl | string | private | access to the user deployment template, value: private: private. public: public. shared: shareable. default value:private. |
tags | string | kubernetes | the label of the deployment template, if not explicitly specified, the default is the template name. |
page_number | long | 20 | shows the current number of pages. |
page_info | object | No sample value for this parameter. | paging information. |
name | string | webserver | deployment template name. |
template_type | string | kubernetes | template type, the value can be any value. when the value is kubernetes will be displayed on the orchestration template page of the console. when the value is compose will display the template (obsolete) on the console Swarm cluster page. |
id | string | 874ec485-e7e6-4373-8a3b-47bde8ae789f | deployment template ID. |
updated | string | 2020-06-10T16:30:16+08:00 | deployment template update time. |
page_size | long | 3 | Maximum number of data on a single page. |
Example
Successful Response example
{
"template":"apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment-basic labels: app: nginx spec: replicas: 2 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: busybox:latest ports: - containerPort: 80",
"template_with_hist_id":"ad81d115-7c8b-47e7-a222-9c28d7f6e588",
"created":"2020-06-10T16:30:16+08:00",
"total_count":"50",
"templates":"",
"description":"a web server",
"acl":"private",
"tags":"kubernetes",
"page_number":"20",
"page_info":"",
"name":"webserver",
"template_type":"kubernetes",
"id":"874ec485-e7e6-4373-8a3b-47bde8ae789f",
"updated":"2020-06-10T16:30:16+08:00",
"page_size":"3"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}