123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?php
- require dirname(__FILE__, 2) . '/vendor/autoload.php';
- $secretId = "SECRETID";
- $secretKey = "SECRETKEY";
- $region = "ap-beijing";
- $cosClient = new Qcloud\Cos\Client(
- array(
- 'region' => $region,
- 'scheme' => 'https',
- 'credentials'=> array(
- 'secretId' => $secretId,
- 'secretKey' => $secretKey)));
- try {
-
-
- $result = $cosClient->createInventoryTriggerJob(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Name' => '存量触发任务名称',
- 'Type' => 'Workflow',
- 'Input' => array(
- 'Object' => 'test01.png',
- ),
- 'Operation' => array(
- 'WorkflowIds' => 'w9938ed4b1435448783xxxxxxxxxxxxx',
- ),
- ));
-
- print_r($result);
-
- $result = $cosClient->createInventoryTriggerJob(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Name' => '存量触发任务名称',
- 'Type' => 'Job',
- 'Input' => array(
- 'Object' => 'test01.png',
- ),
- 'Operation' => array(
- 'Tag' => '',
- 'QueueId' => '',
- 'QueueType' => '',
- 'TimeInterval' => array(
- 'Start' => '',
- 'End' => '',
- ),
- 'Output' => array(
- 'Region' => '',
- 'Bucket' => '',
- 'Object' => '',
- 'AuObject' => '',
- 'SpriteObject' => '',
- 'StreamExtract' => array(
- 'Index' => '',
- 'Object' => '',
- ),
- ),
- 'JobParam' => array(
-
- 'TemplateId' => '',
- 'TranscodeTemplateId' => '',
- 'WatermarkTemplateId' => '',
- ),
- ),
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo($e);
- }
|