参数名称 | 类型 | 描述 |
cosBucketsList | Array | COS Bucket 列表。 |
参数名称 | 类型 | 描述 |
name | String | COS Bucket 名称。 |
region | String | Bucket 所在的地域。 |
appId | String | 账号 APPID 或者项目 APPID 。 |
$config = array('SecretId' => '您的secretId','SecretKey' => '您的secretKey','RequestMethod' => 'GET','DefaultRegion' => 'gz');$ca = QcloudApi::load(QcloudApi::MODULE_CLOUDAUDIT, $config);$package = array();$a = $ca->ListCosBuckets($package);if ($a === false) {$error = $ca->getError();echo "Error code:" . $error->getCode() . ".\\n";echo "message:" . $error->getMessage() . ".\\n";echo "ext:" . var_export($error->getExt(), true) . ".\\n";} else {var_dump($a);}echo "\\nRequest :" . $ca->getLastRequest();echo "\\nResponse :" . $ca->getLastResponse();echo "\\n";
{"cosBucketsList": [{"name": "cloudaudit","region": "ap-shanghai","appId": "1254962721"},{"name": "cloudtrail","region": "ap-shanghai","appId": "1254962721"},{"name": "sundehuixxx","region": "ap-shanghai","appId": "1254962721"}]}
本页内容是否解决了您的问题?