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

Querying File Preview Feature Status

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-03-01 14:43:58

Overview

This document provides an overview of APIs and SDK code samples for querying the file preview feature status.
API
Description
Queries whether the file preview feature is enabled for a bucket.

Querying File Preview Feature Status

Feature description

This API is used to query the buckets with the file preview feature enabled.

Method prototype

public Guzzle\\Service\\Resource\\Model describeDocProcessBuckets(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 header, which is http by default
'credentials'=> array(
'secretId' => $secretId ,
'secretKey' => $secretKey)));

try {
// Query the file preview feature status. For more information, visit https://www.tencentcloud.com/document/product/460/46945?from_cn_redirect=1.
$result = $cosClient->describeDocProcessBuckets(array(
'Regions' => '', // Optional region information, such as `ap-shanghai` and `ap-beijing`. To specify multiple regions, separate them with commas
'BucketNames' => '', // Bucket name (optional). To specify multiple bucket names, separate them by comma. Exact search is supported.
'BucketName' => '', // Optional bucket name prefix for prefix search
'PageNumber' => 1, // Optional page number
'PageSize' => 20, // Optional number of entries per page
));
// Request succeeded
print_r($result);
} catch (\\Exception $e) {
// Request failed
echo($e);
}

Parameter description

Name
Description
Type
Required
Regions
Region. Separate multiple regions by comma. Valid values: All, ap-shanghai, ap-beijing.
string
No
BucketNames
Bucket name. Separate multiple bucket names by comma. Exact search is supported.
string
No
BucketName
Bucket name prefix. Prefix search is supported.
string
No
PageNumber
Page number
string
No
PageSize
Number of entries per page
string
No

Sample response

GuzzleHttp\\Command\\Result Object
(
[RequestId] => NjMxMDcwZDlfAHDKAJHSDKJASHDKY3
[ContentType] => application/xml
[ContentLength] => 4600
[TotalCount] => 59
[PageNumber] => 1
[PageSize] => 3
[DocBucketList] => Array
(
[0] => Array
(
[BucketId] => xxx-123
[Name] => xxx-123
[Region] => ap-chongqing
[CreateTime] => 2022-08-30T10:41:31+0800
[AliasBucketId] =>
)

[1] => Array
(
[BucketId] => xxx-123
[Name] => xxx-123
[Region] => ap-chongqing
[CreateTime] => 2022-08-30T10:41:31+0800
[AliasBucketId] =>
)

[2] => Array
(
[BucketId] => xxx-123
[Name] => xxx-123
[Region] => ap-chongqing
[CreateTime] => 2022-08-30T10:41:31+0800
[AliasBucketId] =>
)

)

[Location] => ci.ap-guangzhou.myqcloud.com/docbucket
)

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan