public Guzzle\\Service\\Resource\\Model describeMediaTemplates(array $args = array());
<?phprequire dirname(__FILE__) . '/../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 {// 查询模板列表$result = $cosClient->describeMediaTemplates(array('Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.tencentcloud.com/cos5/bucket'Tag' => '', // 模板 Tag:Animation、Snapshot、Watermark、Transcode、Concat、HighSpeedHd、VideoMontage、VoiceSeparate、VideoProcess、PicProcess'Category' => 'Custom','Ids' => '','Name' => '','PageNumber' => '','PageSize' => '',));// 请求成功print_r($result);} catch (\\Exception $e) {// 请求失败echo($e);}
节点名称(关键字) | 父节点 | 描述 | 类型 | 必选 |
Tag | 无 | 模板 Tag | String | 是 |
Category | 无 | Official,Custom,默认值:Custom | String | 否 |
Ids | 无 | 模板 ID,以 , 符号分割字符串 | String | 否 |
Name | 无 | 模板名称前缀 | String | 否 |
PageNumber | 无 | 第几页 | Integer | 否 |
PageSize | 无 | 每页个数 | Integer | 否 |
GuzzleHttp\\Command\\Result Object([RequestId] => NjJhOTRlZDFfNzgwYzdkAOIUDOAIUDTA4ZWE=[ContentType] => application/xml[ContentLength] => 782[TotalCount] => 1[PageNumber] => 1[PageSize] => 10[TemplateList] => Array([0] => Array([TemplateId] => t1456ea89fcbdf45basd7fa98sd97a5[Name] => VoiceSeparate-Name[State] => Normal[Tag] => VoiceSeparate[CreateTime] => 2021-12-27T22:19:15+0800[UpdateTime] => 2021-12-27T22:19:15+0800[BucketId] => examplebucket-125000000[Category] => Custom[VoiceSeparate] => Array([AudioMode] => AudioAndBackground[AudioConfig] => Array([Codec] => mp3[Samplerate] => 44100[Bitrate] => 128[Channels] => 2))))[Bucket] => examplebucket-125000000[Location] => examplebucket-125000000.ci.ap-guangzhou.myqcloud.com/template)
本页内容是否解决了您的问题?