API | 操作描述 |
用于查询已经开通文档预览功能的 Bucket |
public Guzzle\\Service\\Resource\\Model describeDocProcessBuckets(array $args = array());
<?phprequire dirname(__FILE__, 2) . '/vendor/autoload.php';$secretId = "SECRETID"; //替换为用户的 secretId,请登录访问管理控制台进行查看和管理,https://console.tencentcloud.com/cam/capi$secretKey = "SECRETKEY"; //替换为用户的 secretKey,请登录访问管理控制台进行查看和管理,https://console.tencentcloud.com/cam/capi$region = "ap-beijing"; //替换为用户的 region,已创建桶归属的region可以在控制台查看,https://console.tencentcloud.com/cos5/bucket$cosClient = new Qcloud\\Cos\\Client(array('region' => $region,'schema' => 'https', //协议头部,默认为http'credentials'=> array('secretId' => $secretId ,'secretKey' => $secretKey)));try {// 查询文档预览开通状态 https://www.tencentcloud.com/document/product/460/46945?from_cn_redirect=1$result = $cosClient->describeDocProcessBuckets(array('Regions' => '', // 可选 地域信息,例如 ap-shanghai、ap-beijing,若查询多个地域以“,”分隔字符串'BucketNames' => '', // 可选 存储桶名称,以“,”分隔,支持多个存储桶,精确搜索'BucketName' => '', // 可选 存储桶名称前缀,前缀搜索'PageNumber' => 1, // 可选 第几页'PageSize' => 20, // 可选 每页个数));// 请求成功print_r($result);} catch (\\Exception $e) {// 请求失败echo($e);}
名称 | 描述 | 类型 | 是否必选 |
Regions | 地域信息,以“,”分隔字符串,支持 All、ap-shanghai、ap-beijing | string | 否 |
BucketNames | 存储桶名称,以“,”分隔,支持多个存储桶,精确搜索 | string | 否 |
BucketName | 存储桶名称前缀,前缀搜索 | string | 否 |
PageNumber | 第几页 | string | 否 |
PageSize | 每页个数 | string | 否 |
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)
本页内容是否解决了您的问题?