123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- require dirname(__FILE__) . '/../vendor/autoload.php';
- $secretId = "SECRETID";
- $secretKey = "SECRETKEY";
- $region = "ap-beijing";
- $cosClient = new Qcloud\Cos\Client(
- array(
- 'region' => $region,
- 'schema' => 'https',
- 'credentials'=> array(
- 'secretId' => $secretId ,
- 'secretKey' => $secretKey)));
- try {
- $result = $cosClient->putBucketInventory(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Id' => 'string',
- 'Destination' => array(
- 'COSBucketDestination'=>array(
- 'Format' => 'CSV',
- 'AccountId' => '125000000',
- 'Bucket' => 'qcs::cos:ap-chengdu::examplebucket-125000000',
- 'Prefix' => 'string',
- )
- ),
- 'IsEnabled' => 'True',
- 'Schedule' => array(
- 'Frequency' => 'Daily',
- ),
- 'Filter' => array(
- 'Prefix' => 'string',
- ),
- 'IncludedObjectVersions' => 'Current',
- 'OptionalFields' => array(
- 'Size',
- 'ETag',
- )
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo "$e\n";
- }
|