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
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-02-29 16:52:32

Overview

This document provides an overview of APIs and SDK code samples for file preview queues.
API
Operation
Description
DescribeDocProcessQueues
Querying file preview queues
Queries specified file preview queues.
UpdateDocProcessQueue
Updating file preview queue
Updates specified file preview queue.

Querying File Preview Queue

Feature description

This API (DescribeDocProcessQueues) is used to query file preview queues.

Method prototype

func (s *CIService) DescribeDocProcessQueues(ctx context.Context, opt *DescribeDocProcessQueuesOptions) (*DescribeDocProcessQueuesResult, *Response, error)

Sample request

DescribeQueueOpt := &cos.DescribeDocProcessQueuesOptions{
QueueIds: "p111a8dd208104ce3b11c78398f658ca8,p4318f85d2aa14c43b1dba6f9b78be9b3,aacb2bb066e9c4478834d4196e76c49d3",
PageNumber: 1,
PageSize: 2,
}
res, _, err := c.CI.DescribeDocProcessQueues(context.Background(), DescribeQueueOpt)

Parameter description

type DescribeDocProcessQueuesOptions struct {
QueueIds string `url:"queueIds,omitempty"`
State string `url:"state,omitempty"`
PageNumber int `url:"pageNumber,omitempty"`
PageSize int `url:"pageSize,omitempty"`
}
Parameter
Description
Type
QueueIds
Queue ID. If you enter multiple IDs, separate them by comma.
String
State
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 Paused status, while jobs being executed will continue without being affected.
String
PageNumber
Page number.
int
PageSize
Number of entries per page.
int

Response description

type DescribeDocProcessQueuesResult struct {
XMLName xml.Name
RequestId string
TotalCount int
PageNumber int
PageSize int
QueueList []DocProcessQueue
NonExistPIDs []string
}
type DocProcessQueue struct {
QueueId string
Name string
State string
MaxSize int
MaxConcurrent int
UpdateTime string
CreateTime string
NotifyConfig *DocProcessQueueNotifyConfig
}
type DocProcessQueueNotifyConfig struct {
Url string
State string
Type string
Event string
}
Parameter
Description
Type
RequestId
Unique ID of the request
String
TotalCount
Total number of queues
Int
PageNumber
Current page number, which is the same as pageNumber in the request.
Int
PageSize
Number of entries per page, which is the same as pageSize in the request.
Int
QueueList
Queue array
Container
NonExistPIDs
List of IDs of non-existent queues
String array
QueueId
Queue ID
String
Name
Queue name
String
State
Current status: Active or Paused.
String
NotifyConfig
Callback configuration
Container
MaxSize
Maximum length of the queue
Int
MaxConcurrent
Maximum number of concurrent jobs in the current queue
Int
UpdateTime
Update time
String
CreateTime
Creation time
String
Url
Callback address
String
State
Switch status: On or Off.
String
Type
Callback type: Url.
String
Event
The event that triggers the callback
String

Updating File Preview Queue

Feature description

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

Method prototype

func (s *CIService) UpdateDocProcessQueue(ctx context.Context, opt *UpdateDocProcessQueueOptions) (*UpdateDocProcessQueueResult, *Response, error)

Sample request

updateQueueOpt := &cos.UpdateDocProcessQueueOptions{
Name: "queue-doc-process-1",
QueueID: "p111a8dd208104ce3b11c78398f658ca8",
State: "Active",
NotifyConfig: &cos.DocProcessQueueNotifyConfig{
State: "Off",
},
}
res, _, err := c.CI.UpdateDocProcessQueue(context.Background(), updateQueueOpt)

Parameter description

type UpdateDocProcessQueueOptions struct {
XMLName xml.Name
Name string
QueueID string
State string
NotifyConfig *DocProcessQueueNotifyConfig
}
Parameter
Description
Type
Name
Queue name
String
QueueID
Queue ID
String
State
Queue status
String
NotifyConfig
Notification channel. For more information, see DocProcessQueue.NotifyConfig.
Container

Response description

type UpdateDocProcessQueueResult struct {
XMLName xml.Name
RequestId string
Queue *DocProcessQueue
}
Parameter
Description
Type
RequestId
Unique ID of the request
Struct
Queue
Queue information. For more information, see DescribeDocProcessQueuesResult.QueueList.
Struct

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan