tencent cloud

CloudAudit

Product Introduction
Overview
Strengths
Features
Scenarios
CloudAudit-Enabled Services and APIs
Purchase Guide
Getting Started
Operation Guide
Viewing Event Details in Operation Record
Shipping Log with Tracking Set
Set up cross-account log delivery for group accounts
Sensitive Operation API List
API Documentation
History
Introduction
API Category
Calling Method
CloudAudit APIs
Data Types
Error Codes
PHP SDK Documentation
Creating CloudAudit
Enabling Log Collection
Updating CloudAudit
Disabling Log Collection
Fetching Bucket List of COS
Fetching CloudAudit List
Obtaining CloudAudit Info
Deleting CloudAudit
Searching Operation Logs
FAQs
Contact Us
Glossary
문서CloudAuditPHP SDK DocumentationFetching Bucket List of COS

Fetching Bucket List of COS

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-01-24 17:36:30

SDK Description

ListCosBuckets is used to fetch the bucket list of COS.

Request Parameters

For more information, see Common Request Parameters.

Response Parameters

Parameter Name
Type
Description
cosBucketsList
Array
COS bucket list
The parameter cosBucketsList is composed as follows:
Parameter Name
Type
Description
name
String
COS bucket name
region
String
The region of the bucket
appId
String
Account APPID or project APPID

Example

Request example

$config = array('SecretId' => 'Your secretId',
'SecretKey' => 'Your 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";

Response example

{
"cosBucketsList": [
{
"name": "cloudaudit",
"region": "ap-shanghai",
"appId": "1254962721"
},
{
"name": "cloudtrail",
"region": "ap-shanghai",
"appId": "1254962721"
},
{
"name": "sundehuixxx",
"region": "ap-shanghai",
"appId": "1254962721"
}
]
}

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백