Creates a template.
Operation description
- For more information about how to use a regular template, see Create and use a regular template.
- For more information about how to use an advanced template, see Create and use advanced templates.
- After an advanced template is created, it enters the Processing state. In this case, the template is unavailable. The template can be used only when it is in the Available state. The time required for template processing varies based on the size of the template file. Generally, it ranges from 10 seconds to 5 minutes.
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 |
---|---|---|---|---|
ice:AddTemplate | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Name | string | No | The name of the custom template. | |
Type | string | No | The template type. Valid values:
| Timeline |
Config | string | No |
| |
CoverUrl | string | No | The URL of the template thumbnail. | http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg |
PreviewMedia | string | No | The ID of the template preview video. | ****01bf24bf41c78b2754cb3187**** |
Status | string | No | The template state. Valid values:
| Available |
Source | string | No | The source from which the template is created. Valid values:
| OpenAPI |
RelatedMediaids | string | No | The IDs of the materials associated with the template for use by the regular template editor. | {"video":["1805a0c6ca544fb395a06ca683619655"]} |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "****2876-6263-4B75-8F2C-CD0F7FCF****",
"Template": {
"TemplateId": "****01bf24bf41c78b2754cb3187****",
"Name": "",
"Type": "Timeline",
"Config": "",
"CoverUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/cover.jpg",
"PreviewMedia": "****01bf24bf41c78b2754cb3187****",
"Status": "Available",
"CreateSource": "OpenAPI",
"ModifiedSource": "OpenAPI"
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-23 | The internal configuration of the API is changed, but the call is not affected | View Change Details |