All Products
Search
Document Center

AddVodTemplate

Last Updated: Jul 11, 2019

Description

You can call this operation to add a snapshot template.

Note:

  • After adding a snapshot template, you can specify its snapshot template ID to submit a video snapshot job through the SubmitSnapshotJob operation.
  • To obtain the snapshot result, you can specify the callback configuration to receive a SnapshotComplete event notification.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set this parameter to AddVodTemplate.
TemplateType String Yes The type of the template. Valid value: Snapshot.
Name String Yes The name of the snapshot template.
  • Length constraint: Maximum length of 128 bytes.
  • Encoding: UTF-8.
TemplateConfig SnapshotTemplateConfig Yes The configuration of the snapshot template.

Response parameters

Parameter Type Description
RequestId String The ID of the request.
VodTemplateId String The ID of the snapshot template. The value can be used to submit a video snapshot job through the SubmitSnapshotJob operation.

API examples

Sample request

https://vod.cn-shanghai.aliyuncs.com?Action=AddVodTemplate&Name=test&TemplateConfig={"SnapshotConfig":{"Count":10,"SpecifiedOffsetTime":0,"Interval":1},"SnapshotType":"NormalSnapshot"}&TemplateType=Snapshot

Sample response

JSON format

{
    "RequestId": "25818875-5F78-4A13-BEF6-D7393642CA58",
     "VodTemplateId":"sssssssssss"
 }

SDK examples

We recommend that you use a server SDK to call this operation. For more information about the sample code used to call this operation in various languages, see the following topics: