Creates an orchestration template. An orchestration template defines and describes a group of Kubernetes resources. It declaratively describes the configuration of an application or how an application runs. You can use orchestration templates to manage resources in Kubernetes clusters and automate resource deployment, such as pods, Services, Deployments, ConfigMaps, and persistent volumes (PVs).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:CreateTemplate |
create |
*All Resource
|
None | None |
Request syntax
POST /templates HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| name |
string |
Yes |
The name of the orchestration template. The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-). |
service-account-template |
| template |
string |
Yes |
The template content in the YAML format. |
apiVersion: v1\nkind: ServiceAccount\nmetadata:\n name: test-sa |
| tags |
string |
No |
The label of the template. |
test |
| description |
string |
No |
The description of the template. |
this is test |
| template_type |
string |
No |
The template type.
We recommend that you set the parameter to |
kubernetes |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| template_id |
string |
The ID of the orchestration template. |
ba1fe77b-b01e-4640-b77e-8f1b80****** |
Examples
Success response
JSON format
{
"template_id": "ba1fe77b-b01e-4640-b77e-8f1b80******"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.