123456789101112131415161718192021222324252627 |
- <?php
- include './qcloud-sts-sdk.php';
- $sts = new STS();
- $config = array(
- 'url' => 'https://sts.tencentcloudapi.com/',
- 'domain' => 'sts.tencentcloudapi.com',
- 'proxy' => '',
- 'secretId' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
- 'secretKey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
- 'bucket' => 'test-1250000000',
- 'region' => 'ap-guangzhou',
- 'durationSeconds' => 1800,
- 'allowPrefix' => '*',
-
- 'allowActions' => array (
-
- 'name/cos:PutObject',
- 'name/cos:PostObject',
- )
- );
- $tempKeys = $sts->getTempKeys($config);
- echo json_encode($tempKeys);
|