tencent cloud

Updating Media Processing Queue
Last updated: 2025-09-08 17:59:39
Updating Media Processing Queue
Last updated: 2025-09-08 17:59:39

Feature Description

This API is used to update the queue for media processing.

Authorization Description

When used by a sub-account, the ci:UpdateMediaQueue permission is required. For details, see Cloud Infinite action.

Activating a Service

Using this feature requires enabling Cloud Infinite in advance and binding a bucket. For details, see Bind Bucket.
Use this feature requires enabling Media Processing Service in advance via console or API. For details, see Enable Media Processing Service.

Use Limits

When using this API, please first confirm the relevant restrictions. For details, see Usage Limits.


Request

Request sample:

PUT /queue/<queueId> HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

<body>
Description
Authorization: Auth String. For details, see Request Signature document.

Request header.

This API only uses common request headers. For details, see Common Request Headers documentation.

Request body.

The implementation of this request operation requires the following request body.
<Request>
<Name>My-Queue-Media</Name>
<State>Active</State>
<NotifyConfig>
<State>On</State>
<Url>http://callback.demo.com</Url>
<Type>Url</Type>
<Event>TaskFinish,WorkflowFinish</Event>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
</Request>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Request
None.
Container for saving results
Container
Yes
Container node Request content:
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Default Value
Name
Request
Queue name, supports Chinese, English, digits, _, -, and *, with a length not exceeding 128.
String
Yes
None.
State
Request
1. Active means jobs in the queue will be scheduled for execution by the media processing service.
2. Paused means the queue is paused, jobs will no longer be scheduled for execution by the media processing service, the status of all jobs in the queue remains in a paused state, and executing tasks are unaffected.
String
Yes
None.
NotifyConfig
Request
Callback configuration
Container
Yes
None.
The content of the NotifyConfig of the Container node
Node Name (Keyword)
Parent Node
Description
Type
Required or Not
Default Value
State
Request.NotifyConfig
Callback switch
Off
On
String
No
Off
Event
Request.NotifyConfig
Callback event
TaskFinish: Task complete
WorkflowFinish: Workflow completion
String
When State=On, required
None.
ResultFormat
Request.NotifyConfig
callback format
XML
JSON
String
No
XML
Type
Request.NotifyConfig
callback type
Url
TDMQ
String
When State=On, required
None.
Url
Request.NotifyConfig
Callback address cannot be a private network address.
String
When State=On and Type=Url, required
None.
MqMode
Request.NotifyConfig
TDMQ usage mode
Topic: Topic subscription
Queue: Queue service
String
When State=On and Type=TDMQ, it is required.
None.
MqRegion
Request.NotifyConfig
The park where TDMQ belongs. Currently supports parks: sh (Shanghai), bj (Beijing), gz (Guangzhou), cd (Chengdu), hk (Hong Kong (China)).
String
When State=On and Type=TDMQ, it is required.
None.
MqName
Request.NotifyConfig
TDMQ Topic Name
String
When State=On and Type=TDMQ, required
None.

Response

Response Headers

This API only returns common response headers. For details, please refer to the Common Response Headers document.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<RequestId>NjJmNDczY2RfOTBmYTUwNjRfNTA4ZV85</RequestId>
<Queue>
<QueueId>p4a17eeea29334bf499b7e20e2fbfd99d</QueueId>
<Name>My-Queue-file</Name>
<State>Active</State>
<NotifyConfig>
<Url>http://callback.demo.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<State>On</State>
<ResultFormat>JSON</ResultFormat>
<MqMode/>
            <MqName/>
            <MqRegion/>
</NotifyConfig>
<MaxSize>10000</MaxSize>
<MaxConcurrent>10</MaxConcurrent>
<Category>Transcoding</Category>
<UpdateTime>2022-08-09T16:23:11+0800</UpdateTime>
<CreateTime>2022-08-09T16:13:05+0800</CreateTime>
</Queue>
</Response>
The data are as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None.
Container for saving results
Container
Container node Response content:
Node Name (Keyword)
Parent Node
Description
Type
RequestId
Response
unique request ID
String
Queue
Response
queue information
Container
Container node Queue content:
Node Name (Keyword)
Parent Node
Description
Type
QueueId
Response.Queue
Queue ID
String
Name
Response.Queue
queue name
String
State
Response.Queue
Current status, Active or Paused
String
NotifyConfig
Response.Queue
callback configuration
Container
MaxSize
Response.Queue
queue maximum length
Int
MaxConcurrent
Response.Queue
Maximum number of tasks executed in parallel in the current queue
Int
Category
Response.Queue
queue type
String
UpdateTime
Response.Queue
Update time
String
CreateTime
Response.Queue
Creation time
String

Error Codes

This request returns common error responses and error codes. For more information, see Error Codes.

Examples

Request

PUT /queue/p4a17eeea29334bf499b7e20e2fbfd99d HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************
Host: test-1234567890.ci.ap-chongqing.myqcloud.com
Content-Length: 162
Content-Type: application/xml

<Request>
<Name>My-Queue-Media</Name>
<State>Active</State>
<NotifyConfig>
<State>On</State>
<Url>http://callback.demo.com</Url>
<Type>Url</Type>
<Event>TaskFinish,WorkflowFinish</Event>
<ResultFormat>JSON</ResultFormat>
</NotifyConfig>
</Request>

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 100
Connection: keep-alive
Date: Thu, 09 Aug 2022 16:23:12 GMT
Server: tencent-ci
x-ci-request-id: NjJmNDczY2RfOTBmYTUwNjRfNTA4ZV85

<Response>
<RequestId>NjJmNDczY2RfOTBmYTUwNjRfNTA4ZV85</RequestId>
<Queue>
<QueueId>p4a17eeea29334bf499b7e20e2fbfd99d</QueueId>
<Name>My-Queue-Media</Name>
<State>Active</State>
<NotifyConfig>
<Url>http://callback.demo.com</Url>
<Event>TaskFinish,WorkflowFinish</Event>
<Type>Url</Type>
<State>On</State>
<ResultFormat>JSON</ResultFormat>
<MqMode/>
            <MqName/>
            <MqRegion/>
</NotifyConfig>
<MaxSize>10000</MaxSize>
<MaxConcurrent>10</MaxConcurrent>
<Category>Transcoding</Category>
<UpdateTime>2022-08-09T16:23:11+0800</UpdateTime>
<CreateTime>2022-08-09T16:13:05+0800</CreateTime>
</Queue>
</Response>

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback