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

Creating CloudAudit

PDF
Focus Mode
Font Size
Last updated: 2024-01-24 17:36:30

SDK Description

CreateAudit is used to create CloudAudits. A user can only create a maximum of 50 CloudAudits.

Request Parameters

Parameter Name
Required
Type
Description
IsMultiRegionAudit
No
Number
Indicates whether to enable multi-region collection. 0: Disable; 1: Enable.
KmsKeyId
No
String
The scretId of Kms, which is used to encrypt data.
Name
Yes
String
CloudAudit name, which has a length of 3-128 bytes. Only ASCII coded letters (a-z, A-Z), numbers (0-9) and underscore (_) are allowed.
CosBucketName
Yes
String
The name of the receiving COS Bucket. Refer to the naming requirements for COS.
CosKeyPrefix
No
String
COS bucket Prefix. For the naming convention, see COS documentation.
CmqTopicName
No
String
CMQ topic name, which is required if CMQ is enabled. Refer to the naming requirements for CMQ.

Response Parameters

Parameter Name
Type
Description
IsMultiRegionAudit
Number
Indicates whether to enable multi-region collection. 1: Yes; 0: No.
KmsKeyId
String
Kms key ID
Name
String
CloudAudit name
CosBucketName
String
COS bucket name
CosKeyPrefix
String
COS bucket Prefix
CmqTopicName
String
CMQ topic name

Example

Request example

$config = array('SecretId' => 'Your secretId',
'SecretKey' => 'Your secretKey',
'RequestMethod' => 'GET',
'DefaultRegion' => 'gz');
$ca = QcloudApi::load(QcloudApi::MODULE_CLOUDAUDIT, $config);
$package = array('IsMultiRegionAudit ' => 1, 'Name' => 'ayisunxxx','CosBucketName'=>'sundehuixxx');
$a = $ca->CreateAudit($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

{
"IsMultiRegionAudit": "1",
"KmsKeyId": "",
"Name": "ayisunxxx",
"CosBucketName": "sundehuixxx",
"CosKeyPrefix": "91000000009",
"CmqTopicName": ""
}


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback