ModifyTemplate

Updated at:

Modifies template information.

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

vs:ModifyTemplate

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Id

string

Yes

The ID of the template.

323*****998-cn-qingdao

Name

string

No

The name of the template.

录制模板

Description

string

No

The description of the template.

录制模板

Region

string

No

The region where the Object Storage Service (OSS) bucket is located.

cn-qingdao

OssBucket

string

No

The OSS bucket.

bucketname

OssEndpoint

string

No

The domain name of the OSS bucket.

oss-cn-qingdao.aliyuncs.com

OssFilePrefix

string

No

The prefix of the OSS file.

oss-prefix

Trigger

string

No

The trigger type of the template. The default value is auto. Valid values:

  • auto (automatic)

  • ondemand (on-demand)

auto

Interval

integer

No

The operation interval, in seconds.

3600

Retention

integer

No

The retention period for time shifting, in days.

3

FileFormat

string

No

The file format for storage. Separate multiple values with commas. Valid values:

  • mp4

  • flv

  • hls

Note

Recording in FLV and MP4 formats is not supported in the China (Qingdao) region.

hls

JpgOverwrite

string

No

The storage path for JPG files. This path is used to overwrite snapshots.

  • Only JPG images are supported.

  • The path supports variables such as {AppName} and {StreamName}.

osspath/snapshot/{AppName}/{StreamName}.jpg

JpgSequence

string

No

The storage path for JPG files. This path is used for sequence snapshots.

  • Only JPG images are supported.

  • The path supports variables such as {AppName}, {StreamName}, {UnixTimestamp}, and {Sequence}.

  • You must include either {UnixTimestamp} or {Sequence}.

osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg

JpgOnDemand

string

No

The storage path for JPG files. This path is used for on-demand snapshots.

  • Only JPG images are supported.

  • The path supports variables such as {AppName}, {StreamName}, {UnixTimestamp}, and {Sequence}.

  • You must include either {UnixTimestamp} or {Sequence}.

osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}_ondemand.jpg

Mp4

string

No

The storage path for MP4 files.

  • The path supports variables such as {AppName}, {StreamName}, {Sequence}, {EscapedStartTime}, and {EscapedEndTime}.

  • You must include {EscapedStartTime} and {EscapedEndTime}.

osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}

Flv

string

No

The storage path for FLV files. For information about the format, see the description of the Mp4 parameter.

osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}

HlsM3u8

string

No

The storage path for HLS M3U8 files. For information about the format, see the description of the Mp4 parameter.

osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}

HlsTs

string

No

The storage path for HLS TS files.

  • The path supports variables such as {AppName}, {StreamName}, {UnixTimestamp}, and {Sequence}.

  • You must include the {UnixTimestamp} and {Sequence} variables.

osspath/record/{StreamName}/{UnixTimestamp}_{Sequence}

Callback

string

No

The callback URL that is used after the template is executed.

http://example.com/callback

TransConfigsJSON

string

No

An array of transcoding configurations of the TransConfig type, in a JSON-formatted string.

[{"Fps":25,"Gop":50,"Height":720,"VideoCodec":"h264","Width":1280,"Name":"sd","VideoBitrate":800}]

Response elements

Element

Type

Description

Example

object

Id

string

The ID of the template.

323*****998-cn-qingdao

RequestId

string

The ID of the request.

BEA5625F-8FCF-48F4-851B-CA63946DA664

Examples

Success response

JSON format

{
  "Id": "323*****998-cn-qingdao",
  "RequestId": "BEA5625F-8FCF-48F4-851B-CA63946DA664"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.