tencent cloud

Cloud Infinite

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Product Overview
Product Strengths
Use Cases
Feature Overview
Regions and Domains
Specifications and Limits
Billing
Billing Overview
Billing Mode
Billable Items
Free Tier
Payment Overdue
Viewing Bill Details
FAQs
Getting Started
Registering and Logging In
Bind Bucket
Uploading and Processing File
Downloading and Deleting Images
Unbinding Buckets
Using CI via COS
Features
Image Processing
Media Processing
Content Moderation
AI Content Recognition
File Processing
Smart Voice
File processing
User Guide
Overview
Bucket Management
Smart Toolbox
Job and Workflow
Data Monitoring
Usage statistics
Use Cases
Copyright Protection Solutions
Image Processing Practices
Working with API Authorization Policies
Workflow Practices
API Documentation
API Overview
Structure
Common Request Headers
Common Response Headers
Activate Vast Service
Image Processing
AI-Based Content Recognition
Smart Audio
Media Processing
Content Moderation
Document Processing
File Processing
Job and Workflow
Cloud Virus Detection
Error Codes
Request Signature
SDK Documentation
SDK Overview
Android SDK
iOS SDK
COS Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Go SDK
COS iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
Mini Program SDK
Personal Information Protection Policy for SDK
Security and Compliance
Permission ‍Management
FAQs
Basic Settings
Document Processing
Media Processing
Content Recognition
Smart Audio
Agreements
Service Level Agreement
Contact Us
Glossary

Async Processing Queue APIs

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-03-01 14:43:58

Overview

This document provides an overview of APIs and SDK code samples for async processing queues.
API
Operation
Description
Querying file transcoding queues
Queries file transcoding queues.
Querying file transcoding queues
Queries file transcoding queues.

Querying File Transcoding Queue

Feature description

This API (DescribeDocProcessQueues) is used to query the file transcoding queue. It can also be used to get the ID of the queue where the specified bucket is in.

Sample code

<?php

require dirname(__FILE__) . '/../vendor/autoload.php';

$secretId = "SECRETID"; //Replace it with the actual `SecretId`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$secretKey = "SECRETKEY"; //Replace it with the actual `SecretKey`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$region = "ap-beijing"; //Replace it with the actual `region`, which can be viewed in the console at https://console.tencentcloud.com/cos5/bucket
$cosClient = new Qcloud\\Cos\\Client(
array(
'region' => $region,
'schema' => 'https', //Protocol header, which is http by default
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));
try {
$result = $cosClient->describeDocProcessQueues(array(
'Bucket' => 'examplebucket-1250000000', // Bucket name in the format of `BucketName-APPID`, which can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket
));
// Request succeeded
print_r($result);
} catch (\\Exception $e) {
// Request failed
echo($e);
}

Parameter description

Parameter
Type
Description
Bucket
COS bucket name
String

Response parameters

Response has the following sub-nodes:
Parameter
Type
Description
RequestId
String
Unique ID of the request
TotalCount
Integer
Total number of queues
PageNumber
Integer
Current page number. Same as pageNumber in the request.
PageSize
Integer
Number of entries per page. Same as pageSize in the request.
QueueList
Array
Queue array
QueueList has the following sub-nodes:
Parameter
Type
Description
QueueId
String
Queue ID
Name
String
Queue name
State
String
Current status: Active or Paused
NotifyConfig
Array
Callback configuration
MaxSize
Integer
Maximum queue length
MaxConcurrent
Integer
Maximum number of concurrent jobs in the current queue
UpdateTime
String
Update time
CreateTime
String
Creation time
NotifyConfig has the following sub-nodes:
Parameter
Type
Description
Url
String
Callback address
State
String
Status: On or Off
Type
String
Callback type: Url
Event
String
The event that triggers the callback

Updating File Transcoding Queue

Feature description

This API (UpdateDocProcessQueue) is used to update a file transcoding queue.

Sample code

<?php

require dirname(__FILE__, 2) . '/vendor/autoload.php';

$secretId = "SECRETID"; //Replace it with the actual `SecretId`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$secretKey = "SECRETKEY"; //Replace it with the actual `SecretKey`, which can be viewed and managed in the CAM console at https://console.tencentcloud.com/cam/capi
$region = "ap-beijing"; //Replace it with the actual `region`, which can be viewed in the console at https://console.tencentcloud.com/cos5/bucket
$cosClient = new Qcloud\\Cos\\Client(
array(
'region' => $region,
'schema' => 'https', //Protocol header, which is http by default
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));
try {
// Update the file transcoding queue as instructed at https://www.tencentcloud.com/document/product/460/46947?from_cn_redirect=1
$result = $cosClient->updateDocProcessQueue(array(
'Bucket' => 'examplebucket-125000000', // Bucket name in the format of `BucketName-APPID`, which can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket
'Key' => '', // QueueID
'Name' => '',
'QueueID' => '',
'State' => '',
'NotifyConfig' => array(
'Url' => '',
'Type' => '',
'Event' => '',
'State' => '',
),
));
// Request succeeded
print_r($result);
} catch (\\Exception $e) {
// Request failed
echo($e);
}

Parameter description

Request has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
Constraints
Name
Request
Queue name
String
Yes
Up to 100 characters
QueueID
Request
Queue ID
String
Yes
None
State
Request
Queue status
String
Yes
1. Active: Jobs in the queue will be scheduled and executed by the file preview service.
2. Paused: The queue is paused, and jobs in it will no longer be scheduled and executed. All jobs in the queue will remain in the Submitted status, while jobs being executed will continue without being affected.
NotifyConfig
Request
Notification channel
Container
Yes
Third-party callback URL
NotifyConfig has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
Constraints
Url
Request.NotifyConfig
Callback configuration
String
No
Up to 100 characters
Type
Request.NotifyConfig
Callback type. General callback: Url.
String
No
Up to 100 characters
Event
Request.NotifyConfig
Callback event: File preview job completed.
String
No
Up to 100 characters
State
Request.NotifyConfig
Callback status: Off or On.
String
No
Up to 100 characters

Response parameters

Response has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
RequestId
Response
Unique ID of the request
String
Queue
Response
Queue information. For more information, see Response.QueueList in DescribeDocProcessQueues.
Container


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백