tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Queue APIs

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-02-04 15:40:24

Overview

This document provides an overview of APIs and SDK code samples for media processing queues.
API
Description
Searching for a media processing queue
Searches for a media processing queue.
Updating a media processing queue
Updates a media processing queue.

Searching for Media Processing Queue

Feature description

This API is used to search for media processing queues.

Method prototype

public Guzzle\\Service\\Resource\\Model describeMediaQueues(array $args = array());

Sample request

<?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, which is `http` by default
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));

try {
// https://www.tencentcloud.com/document/product/436/54045?from_cn_redirect=1: Searching for Media Processing Queue
$result = $cosClient->describeMediaQueues(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
// 'QueueIds' => '', // Queue ID (optional). If you enter multiple IDs, separate them by comma.
// 'Category' => 'Transcoding', // Category (optional). `CateAll`: All types. `Transcoding`: Media processing queue. `SpeedTranscoding`: Media processing and accelerated transcoding queue. Default value: `Transcoding`.
// 'State' => 'Paused', // Status (optional). 1. `Active`: Jobs in the queue will be scheduled and executed for transcoding by the media transcoding 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 `Paused` status, while jobs being executed will continue without being affected.
// 'PageNumber' => '1', // Page number (optional)
// 'PageSize' => '2', // Number of entries per page (optional)
));
// Request succeeded
print_r($result);
} catch (\\Exception $e) {
// Request failed
echo($e);
}

Parameter description

Request parameters are as described below:
Parameter Name (Keyword)
Description
Type
Required
QueueIds
Queue ID. If you enter multiple IDs, separate them by comma.
String
No
State
Active: Jobs in the queue will be scheduled and executed by the media processing service.
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 Paused status, while jobs being executed will not be affected.
String
No
Category
CateAll: All types.
Transcoding: Media processing queue.
SpeedTranscoding: Media processing and accelerated transcoding queue.
Default value: Transcoding.
String
No
PageNumber
Page number. Default value: 1.
String
No
PageSize
Number of entries per page. Default value: 10.
String
No

Sample response

GuzzleHttp\\Command\\Result Object
(
[RequestId] => NjNkOGM2NmVfZTYxNmY5MSAASJPOJCIANSIDNAI=
[ContentType] => application/xml
[ContentLength] => 751
[TotalCount] => 1
[PageNumber] => 1
[PageSize] => 10
[QueueList] => Array
(
[0] => Array
(
[BucketId] => examplebucket-1250000000
[QueueId] => pcc3ae89sa9d807fs89dg789sdg
[Name] => queue-1
[State] => Active
[MaxSize] => 10000
[MaxConcurrent] => 10
[Category] => Transcoding
[UpdateTime] => 2022-07-13T10:41:34+0800
[CreateTime] => 2022-07-13T10:41:34+0800
[NotifyConfig] => Array
(
[Url] =>
[State] => Off
[Type] =>
[Event] =>
[ResultFormat] => XML
)

)

)

[Bucket] => examplebucket-1250000000
[Location] => examplebucket-1250000000.ci.ap-guangzhou.myqcloud.com/queue
)

Updating Media Processing Queue

Feature description

This API is used to update a media processing queue.

Method prototype

public Guzzle\\Service\\Resource\\Model updateMediaQueue(array $args = array());

Sample request

<?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, which is `http` by default
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));

try {
// https://www.tencentcloud.com/document/product/436/54046?from_cn_redirect=1: Updating Media Processing Queue
$result = $cosClient->updateMediaQueue(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
'Key' => 'xxx', // queueId
'Name' => '', // Template name. Length limit: 100 characters.
'State' => 'Active', // Pipeline status
'NotifyConfig' => array(
'State' => 'Off',
// 'Event' => '',
// 'ResultFormat' => '',
// 'Type' => '',
// 'Url' => '',
// 'MqMode' => '',
// 'MqRegion' => '',
// 'MqName' => '',
),
));
// 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
Default Value
Constraints
Name
Request
Queue name, which can contain up to 128 bytes.
String
Yes
None
None
State
Request
Active: Jobs in the queue will be scheduled and executed by the media processing service.
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 Paused status, while jobs being executed will not be affected.
String
Yes
None
None
NotifyConfig
Request
Callback configuration
Container
Yes
None
None
NotifyConfig has the following sub-nodes:
Node Name (Keyword)
Parent Node
Description
Type
Required
Default Value
Constraints
State
Request.NotifyConfig
Callback status: Off or On.
String
No
Off
On/Off
Event
Request.NotifyConfig
Callback event
String
Yes if State is On
None
Job completion: TaskFinish; workflow completion: WorkflowFinish.
ResultFormat
Request.NotifyConfig
Callback format
String
No
XML
JSON/XML
Type
Request.NotifyConfig
Callback type
String
Yes if State is On
None
Url or TDMQ
Url
Request.NotifyConfig
Callback address
String
Yes if State is On and Type is Url
None
The callback address cannot be a private network address.
MqMode
Request.NotifyConfig
TDMQ queue mode
String
Yes if State is On and Type is TDMQ
Queue
Topic: Topic subscription. Queue: Queue service.
MqRegion
Request.NotifyConfig
TDMQ region
String
Yes if State is On and Type is TDMQ
None
Valid values: sh (Shanghai), bj (Beijing), gz (Guangzhou), cd (Chengdu), hk (Hong Kong, China).
MqName
Request.NotifyConfig
TDMQ topic name
String
Yes if State is On and Type is TDMQ
None
None

Sample response

GuzzleHttp\\Command\\Result Object
(
[Body] => GuzzleHttp\\Psr7\\Stream Object
(
[stream:GuzzleHttp\\Psr7\\Stream:private] => Resource id #88
[size:GuzzleHttp\\Psr7\\Stream:private] =>
[seekable:GuzzleHttp\\Psr7\\Stream:private] => 1
[readable:GuzzleHttp\\Psr7\\Stream:private] => 1
[writable:GuzzleHttp\\Psr7\\Stream:private] => 1
[uri:GuzzleHttp\\Psr7\\Stream:private] => php://temp
[customMetadata:GuzzleHttp\\Psr7\\Stream:private] => Array
(
)

)

[RequestId] => NjNkOGM2NmVfZTYxNmY5MSAASJPOJCIANSIDNAI=
[ContentType] => application/xml
[ContentLength] => 668
[Key] => fcd32dbdaa13b11esa9ds8g0d98gd0h85
[Bucket] => examplebucket-1250000000
[Location] => examplebucket-1250000000.ci.ap-guangzhou.myqcloud.com/queue/fcd32dbdaa13b11esa9ds8g0d98gd0h85
[Response] => Array
(
[RequestId] => NjNkOGM2NmVfZTYxNmY5MSAASJPOJCIANSIDNAI=
[Queue] => Array
(
[QueueId] => fcd32dbdaa13b11esa9ds8g0d98gd0h85
[Name] => media-queue-1
[State] => Active
[NotifyConfig] => Array
(
[Url] =>
[Event] =>
[Type] =>
[State] => Off
[ResultFormat] => XML
[MqMode] =>
[MqName] =>
[MqRegion] =>
)

[MaxSize] => 10000
[MaxConcurrent] => 10
[CreateTime] => 2022-07-13T10:41:34+0800
[UpdateTime] => 2023-01-31T17:32:18+0800
[BucketId] => examplebucket-1250000000
[Category] => Transcoding
)

)

)


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan