Description
The UpdateDocProcessQueue interface is used to update the Queue for document transcoding.
Authorization Description
When a sub-account is used, you need to grant the ci:UpdateDocProcessQueue permission in the action of the authorization policy. For all operation interfaces supported by Cloud Infinite, see CI action. Service Activation
To use this feature, you need to bind Bucket in advance and activate the Cloud Infinite service. To use this feature, you need to activate the document processing service in advance via the console or API. Note:
After Cloud Infinite is bound, if you manually unbind Cloud Infinite from the Bucket, you will not be able to continue using this feature.
Use Limits
When you use this interface, please first confirm the relevant restrictions. For details, see Usage Limits. Request
Request sample
PUT /docqueue/<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>
Note:
<queueId>: The Queue ID for file processing, which can be queried via the console or API. Request header
Request body
The implementation of this request operation requires the following request body.
<Request>
<Name>Queue Name</Name>
<State></State>
<NotifyConfig>
<Type></Type>
<Url></Url>
<Event></Event>
</NotifyConfig>
</Request>
The detailed data is described as follows:
|
Request | None. | Container for saving requests | Container | Yes |
Detailed data descriptions for the Request of Container type are as follows:
|
Name | Request | Queue Name | String | Yes | 100-character limit |
State | Request | Queue Status | String | Yes | 1. Active indicates that jobs in the Queue are scheduled for transcoding execution by the document preview service. 2. Paused indicates that the Queue is suspended. Jobs will no longer be scheduled for execution by the Document Preview Service. All jobs in the Queue remain in the Submitted state. Tasks already in progress will continue executing and remain unaffected. |
NotifyConfig | Request | Notification Channel | Container | Yes | Third-party callback Url |
Detailed data descriptions for the NotifyConfig of Container type are as follows:
|
Url | Request.NotifyConfig | callback configuration | String | No | 100-character limit |
Type | Request.NotifyConfig | Callback type, Normal callback: Url | String | No | 100-character limit |
Event | Request.NotifyConfig | Callback Event, Completion of the Document Preview Task | String | No | 100-character limit |
State | Request.NotifyConfig | Callback Switch, Off, On | String | No | 100-character limit |
Response
Response Headers
Response Body
The response body returns application/xml data. The content containing complete node data is displayed as follows:
<Response>
<RequestId>NTk0MjdmODlfMjQ4OGY3XzYzYzhf****</RequestId>
<Queue>
<QueueId></QueueId>
<Name></Name>
<State>Active</State>
<NotifyConfig>
<Url>mts-topic-1</Url>
<Type></Type>
<Event></Event>
</NotifyConfig>
<CreateTime></CreateTime>
<UpdateTime></UpdateTime>
</Queue>
</Response>
The specific data content is as follows:
|
| | Container for saving results | |
Content of the Container node Response:
Error Codes
This request operation has no special error messages. For common error messages, see Error Codes. Practical Case
Request
PUT /docqueue/p2505d57bdf4c4329804b58a6a5fb1572 HTTP/1.1
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: cos-python-sdk-v5.3.2
Host: examplebucket-1250000000.ci.ap-chongqing.myqcloud.com
Content-Type: application/xml
Content-Length: 279
Authorization: Authorization
<?xml version="1.0" encoding="UTF-8" ?>
<Request>
<State>Active</State>
<Name>markjrzhang4</Name>
<NotifyConfig>
<Url>http://google.com/</Url>
<Type>Url</Type>
<Event>TransCodingFinish</Event>
</NotifyConfig>
</Request>
Response
HTTP/1.1 200 OK
Date: Mon, 27 Jul 2020 08:22:41 GMT
Content-Type: application/xml
Content-Length: 641
Connection: keep-alive
Server: tencent-ci
x-ci-request-id: NWYxZThlZDBfYzc2OTQzNjRfMzUxYV8x****
<?xml version="1.0" encoding="utf-8"?>
<Response>
<RequestId>NWYxZThlZDBfYzc2OTQzNjRfMzUxYV8x****</RequestId>
<Queue>
<QueueId>p2505d57bdf4c4329804b58a6a5fb1572</QueueId>
<Name>markjrzhang4</Name>
<State>Active</State>
<NotifyConfig>
<Url>http://example.com/</Url>
<Event>TransCodingFinish</Event>
<Type>Url</Type>
<State>On</State>
</NotifyConfig>
<MaxSize>10000</MaxSize>
<MaxConcurrent>10</MaxConcurrent>
<CreateTime>2020-07-24T22:42:27+0800</CreateTime>
<UpdateTime>2020-07-27T16:22:40+0800</UpdateTime>
<BucketId>test007-1251704708</BucketId>
<Category>DocProcessing</Category>
</Queue>
</Response>