|
8 | 8 | $cosClient = new Qcloud\Cos\Client( |
9 | 9 | array( |
10 | 10 | 'region' => $region, |
11 | | - 'schema' => 'https', //协议头部,默认为http |
| 11 | + 'schema' => 'https', // 万象接口必须使用https |
12 | 12 | 'credentials'=> array( |
13 | 13 | 'secretId' => $secretId , |
14 | 14 | 'secretKey' => $secretKey))); |
15 | 15 | try { |
16 | 16 | // https://cloud.tencent.com/document/product/436/71516 触发批量存量任务 |
| 17 | + // 1. 触发任务(工作流)https://cloud.tencent.com/document/product/460/76887 |
17 | 18 | $result = $cosClient->createInventoryTriggerJob(array( |
18 | 19 | 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket |
19 | 20 | 'Name' => '存量触发任务名称', |
| 21 | + 'Type' => 'Workflow', |
20 | 22 | 'Input' => array( |
21 | 23 | // 'Manifest' => '', |
22 | 24 | // 'UrlFile' => '', |
|
28 | 30 | // 'TimeInterval' => array( |
29 | 31 | // 'Start' => '', |
30 | 32 | // 'End' => '', |
| 33 | +// ), |
| 34 | + ), |
| 35 | + )); |
| 36 | + // 请求成功 |
| 37 | + print_r($result); |
| 38 | + |
| 39 | + // 2. 触发任务(独立节点)https://cloud.tencent.com/document/product/460/80155 |
| 40 | + $result = $cosClient->createInventoryTriggerJob(array( |
| 41 | + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket |
| 42 | + 'Name' => '存量触发任务名称', |
| 43 | + 'Type' => 'Job', |
| 44 | + 'Input' => array( |
| 45 | +// 'Manifest' => '', |
| 46 | +// 'UrlFile' => '', |
| 47 | +// 'Prefix' => '', |
| 48 | + 'Object' => 'test01.png', |
| 49 | + ), |
| 50 | + 'Operation' => array( |
| 51 | + 'Tag' => '', |
| 52 | + 'QueueId' => '', |
| 53 | + 'QueueType' => '', |
| 54 | + 'TimeInterval' => array( |
| 55 | + 'Start' => '', |
| 56 | + 'End' => '', |
| 57 | + ), |
| 58 | + 'Output' => array( |
| 59 | + 'Region' => '', |
| 60 | + 'Bucket' => '', |
| 61 | + 'Object' => '', |
| 62 | + 'AuObject' => '', |
| 63 | + 'SpriteObject' => '', |
| 64 | + 'StreamExtract' => array( |
| 65 | + 'Index' => '', |
| 66 | + 'Object' => '', |
| 67 | + ), |
| 68 | + ), |
| 69 | + 'JobParam' => array( |
| 70 | + // 根据Tag输入相应参数,参数详情参考 https://cloud.tencent.com/document/product/460/80155 |
| 71 | + 'TemplateId' => '', |
| 72 | + 'TranscodeTemplateId' => '', |
| 73 | + 'WatermarkTemplateId' => '', |
| 74 | +// 'Animation' => ..., |
| 75 | +// 'Transcode' => ..., |
| 76 | +// 'SmartCover' => ..., |
| 77 | +// 'DigitalWatermark' => ..., |
| 78 | +// 'Watermark' => ..., |
| 79 | +// 'RemoveWatermark' => ..., |
| 80 | +// 'Snapshot' => ..., |
| 81 | +// 'SpeechRecognition' => ..., |
| 82 | +// 'ConcatTemplate' => ..., |
| 83 | +// 'VoiceSeparate' => ..., |
| 84 | +// 'VideoMontage' => ..., |
| 85 | +// 'SDRtoHDR' => ..., |
| 86 | +// 'VideoProcess' => ..., |
| 87 | +// 'SuperResolution' => ..., |
| 88 | +// 'Segment' => ..., |
| 89 | +// 'ExtractDigitalWatermark' => ..., |
| 90 | +// 'VideoTag' => ..., |
| 91 | +// 'TtsTpl' => ..., |
| 92 | +// 'NoiseReduction' => ..., |
| 93 | + ), |
| 94 | +// 'UserData' => '', |
| 95 | +// 'JobLevel' => '', |
| 96 | +// 'CallBackFormat' => '', |
| 97 | +// 'CallBackType' => '', |
| 98 | +// 'CallBack' => '', |
| 99 | +// 'CallBackMqConfig' => array( |
| 100 | +// 'MqRegion' => '', |
| 101 | +// 'MqMode' => '', |
| 102 | +// 'MqName' => '', |
31 | 103 | // ), |
32 | 104 | ), |
33 | 105 | )); |
|
0 commit comments