Updates a subtitle template.
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 |
---|---|---|---|---|
live:UpdateLiveAISubtitle | create | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
SubtitleName | string | No | The name of the subtitle template. The name can contain digits, letters, and hyphens (-) but cannot start with a hyphen (-). | live AI subtitle template |
SrcLanguage | string | No | The source language. Valid values:
| zh-CN |
DstLanguage | string | No | The target language. Valid values:
| zh-CN |
FontColor | string | No | The font color. Color format: RGBA. | 0xFFFFFF |
FontName | string | No | The font. Valid values:
| KaiTi |
BgColor | string | No | The background color of the subtitles. Color format: RGBA. | 0xFF0000 |
PositionNormalized | array | No | The position of the subtitles relative to the lower-left corner of the screen. The value is a pair of coordinates. | |
float | No | The position of the subtitles relative to the lower-left corner of the screen. The value is a pair of coordinates. | [0.32,0.27] | |
ShowSourceLan | boolean | No | Specifies whether to display the source language. Valid values: true and false. Default value: false. | true |
MaxLines | integer | No | The number of displayed lines. | 2 |
WordPerLine | integer | No | The number of characters per line. Valid values: 1 to 500. | 20 |
FontSizeNormalized | float | No | The font size. Valid values: [0,1]. | 0.037 |
BorderWidthNormalized | float | No | The font weight. Valid values: [0,1]. | 0.05 |
BgWidthNormalized | float | No | The size of the background box. Valid values: [0,1]. | 0.09 |
SubtitleId | string | Yes | The ID of the subtitle template. | 597991f3-6ef9-4100-9238-82951de1**** |
Description | string | No | The description of the subtitle template. The description can be up to 128 characters in length and can contain letters, digits, and special characters. | live AI subtitle template |
Width | string | No | The width of the preview. Unit: pixels. | 1280 |
Height | string | No | The height of the preview. Unit: pixels. The following preview specifications (width x height) are supported:
| 720 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "String\t5c6a2a0df228-4a64- af62-20e91b96****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | MissingParameter | %s. | Missing parameter |
400 | InvalidParameter | %s. | Parameter error |
For a list of error codes, visit the Service error codes.