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).
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cs:CreateTemplate | create |
|
| none |
Request syntax
POST /templates HTTP/1.1
PUT /templates HTTP/1.1
POST /templates HTTP/1.1
PUT /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. | |
description | string | No | The description of the template. | this is test |
template_type | string | No | The type of template. You can set the parameter to a custom value.
We recommend that you set the parameter to Default value: | kubernetes |
Response parameters
Examples
Sample success responses
JSON
format
{
"template_id": "ba1fe77b-b01e-4640-b77e-8f1b80e3e3cf"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|