GetCustomTemplate

更新时间:
复制 MD 格式

Gets details of a custom media processing template.

Operation description

This operation gets the details of a custom template by its ID or the details of a default template. If you provide a TemplateId, the operation ignores other parameters and returns the details for that template. If you omit TemplateId, you must specify the Type parameter to get the corresponding default template.

Template type (Type):

  1. 1: transcoding template

  2. 2: snapshot template

  3. 3: Animated GIF template

  4. 4: Image watermark template

  5. 5: Text watermark template

  6. 6: Subtitle template

  7. 7: AI content moderation template

  8. 8: AI smart cover template

  9. 9: AI smart erase template

Transcoding template subtype (Subtype):

  1. 1: Normal (Normal)

  2. 2: Audio transcoding (AudioTranscode)

  3. 3: remuxing (Remux)

  4. 4: Narrowband HD 1.0 (NarrowBandV1)

  5. 5: Narrowband HD 2.0 (NarrowBandV2)

Snapshot template subtype (Subtype):

  1. 1: Static screenshot (Normal)

  2. 2: sprite (Sprite)

  3. 3: WebVTT screenshot (WebVtt)

AI content moderation template subtype (Subtype):

  1. 1: Video moderation (Video)

  2. 2: Audio moderation (Audio)

  3. 3: Image moderation (Image)

AI smart erase template subtype (Subtype):

  1. 1: Logo removal (VideoDelogo)

  2. 2: Subtitle removal (VideoDetext)

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ice:GetCustomTemplate

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

TemplateId

string

No

The ID of the custom template.

****96e8864746a0b6f3****

Type

integer

No

The ID of the template type. This parameter is required if you omit TemplateId to get a default template.

1

Subtype

integer

No

The template subtype.

1

Response elements

Element

Type

Description

Example

object

The response object.

RequestId

string

The request ID.

******11-DB8D-4A9A-875B-275798******

CustomTemplate

object

The template details.

TemplateId

string

The template ID.

****20b48fb04483915d4f2cd8ac****

TemplateName

string

The template name.

Test screenshot template

Type

integer

The ID of the template type.

2

TypeName

string

The name of the template type.

SnapshotTemplate

Subtype

integer

The ID of the template subtype.

1

SubtypeName

string

The name of the template subtype.

Normal

Status

string

The status of the template.

Normal

IsDefault

boolean

Indicates whether the template is a default template.

true

TemplateConfig

string

The template configuration, in a JSON string.

{"Type":"Normal","FrameType":"normal","Time":0,"Count":10}

CreateTime

string

The time when the template was created.

2022-01-01T10:00:00Z

ModifiedTime

string

The time when the template was last modified.

2022-01-01T11:00:00Z

FrontendHint

object

Reserved for frontend display.

TranscodeTemplateHint

object

Hint for transcoding templates.

BitrateControlType

string

The bitrate control type.

Examples

Success response

JSON format

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "CustomTemplate": {
    "TemplateId": "****20b48fb04483915d4f2cd8ac****",
    "TemplateName": "Test screenshot template",
    "Type": 2,
    "TypeName": "SnapshotTemplate",
    "Subtype": 1,
    "SubtypeName": "Normal",
    "Status": "Normal",
    "IsDefault": true,
    "TemplateConfig": "{\"Type\":\"Normal\",\"FrameType\":\"normal\",\"Time\":0,\"Count\":10}",
    "CreateTime": "2022-01-01T10:00:00Z",
    "ModifiedTime": "2022-01-01T11:00:00Z\n",
    "FrontendHint": {
      "TranscodeTemplateHint": {
        "BitrateControlType": ""
      }
    }
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.