CreateTemplate
Description
call CreateTemplate to create an orchestration template.
Request Method
POST
Request Path
/apsara/route/CS/CreateTemplate
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
template | BODY | string | Yes | apiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: test-sa | template content in YAML format. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
name | BODY | string | Yes | service-account-template | template name. naming rule: consists of numbers, Chinese characters, English characters, or dashes (-), and the length ranges from 1 to 63 characters, and cannot start with a dash (-). |
description | BODY | string | No | this is test | layout template description. |
template_type | BODY | string | No | 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 in the console. recommended to kubernetes. default value:compose. |
version | BODY | string | No | 2016-01-01 | version of api |
tags | BODY | string | No | test | orchestration template tags. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
template_id | string | ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf | orchestration template ID. |
Example
Successful Response example
{
"template_id":"ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}