tencent cloud

Feedback

UpdateAudit

Last updated: 2023-01-04 11:44:58
This document is currently invalid. Please refer to the documentation page of the product.

1. API Description

Domain name for API request: cloudaudit.tencentcloudapi.com.

Parameter requirements:

  1. If the value of IsCreateNewBucket exists, cosRegion and osBucketName are required.
  2. If the value of IsEnableCmqNotify is 1, IsCreateNewQueue, CmqRegion, and CmqQueueName are required.
  3. If the value of IsEnableCmqNotify is 0, IsCreateNewQueue, CmqRegion, and CmqQueueName cannot be passed in.
  4. If the value of IsEnableKmsEncry is 1, KmsRegion and KeyId are required.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: UpdateAudit.
Version Yes String Common Params. The value used for this API: 2019-03-19.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou.
AuditName Yes String Tracking set name
IsEnableCmqNotify No Integer Whether to enable CMQ message notification. 1: Yes; 0: No. Only CMQ queue service is currently supported. If CMQ message notification is enabled, CloudAudit will deliver your log contents to the designated queue in the specified region in real time.
ReadWriteAttribute No Integer Manages the read/write attribute of event. Valid values: 1 (read-only), 2 (write-only), 3 (read/write).
KeyId No String Globally unique ID of the CMK. This value is required if it is not a newly created KMS element. It can be obtained through ListKeyAliasByRegion. CloudAudit will not verify the validity of the KeyId. Enter it carefully to avoid data loss.
CosRegion No String COS region. Supported regions can be queried through the ListCosEnableRegion API.
CmqQueueName No String Queue name, which must begin with a letter and can contain up to 64 letters, digits, and dashes (-). This field is required if the value of IsEnableCmqNotify is 1. If a queue is not newly created, CloudAudit will not verify whether it actually exists. Enter the name with caution to avoid log delivery failure and consequent data loss.
IsCreateNewBucket No Integer Whether to create a COS bucket. 1: Yes; 0: No.
KmsRegion No String KMS region. Currently supported regions can be obtained through ListKmsEnableRegion. This must be the same as the COS region.
IsEnableKmsEncry No Integer Whether to enable KMS encryption. 1: Yes, 0: No. If KMS encryption is enabled, the data will be encrypted when delivered to COS.
CosBucketName No String User-defined COS bucket name, which can only contain 1–40 lowercase letters (a–z), digits (0–9), and dashes (-) and cannot begin or end with "-". If a bucket is not newly created, CloudAudit will not verify whether it actually exists. Enter the name with caution to avoid log delivery failure and consequent data loss.
CmqRegion No String Region where the queue is located. Supported CMQ regions can be queried through the ListCmqEnableRegion API. This field is required if the value of IsEnableCmqNotify is 1.
LogFilePrefix No String Log file prefix, which can only contain 3–40 ASCII letters (a–z; A–Z) and digits (0–9).
IsCreateNewQueue No Integer Whether to create a queue. 1: Yes; 0: No. This field is required if the value of IsEnableCmqNotify is 1.

3. Output Parameters

Parameter Name Type Description
IsSuccess Integer Whether update succeeded
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Updating tracking set

This example shows you how to update a tracking set.

Input Example

https://cloudaudit.tencentcloudapi.com/?Action=UpdateAudit
&AuditName=xxxxx
&CosBucketName=sss
&CosRegion=ap-hongkong
&LogFilePrefix=wwwwww
&<Common request parameters>

Output Example

{
    "Response": {
        "IsSuccess": 1,
        "RequestId": "45cb39e2-4b94-4d9c-bf95-db7daba5740d"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError.CmqError An exception occurred while creating the CMQ queue, probably because the CMQ queue to be created already exists, or your account has no permission or has overdue payments.
InternalError.UpdateAuditError An internal error occurred. Submit a ticket for assistance.
InvalidParameterValue.CmqRegionError CloudAudit currently does not support the entered CMQ region.
InvalidParameterValue.CosNameError The entered COS bucket name is non-compliant.
InvalidParameterValue.CosRegionError CloudAudit currently does not support the entered COS region.
InvalidParameterValue.LogFilePrefixError The log prefix format is incorrect.
InvalidParameterValue.QueueNameError The entered queue name is non-compliant.
InvalidParameterValue.ReadWriteAttributeError Valid values of the read/write attribute: 1 (read-only), 2 (write-only), 3 (read/write).
MissingParameter.cmq If the value of IsEnableCmqNotify is 1, IsCreateNewQueue, CmqQueueName, and CmqRegion are required.
ResourceInUse.CosBucketExists The COS bucket already exists.
ResourceNotFound.AuditNotExist The tracking set does not exist.