Queries whether the audit log feature is enabled for an ApsaraDB for MongoDB instance.

  • The instance must be in the running state when you call this operation.
  • This operation is applicable only to general-purpose local-disk and dedicated local-disk instances.
  • You can call this operation up to 30 times per minute. To call this operation at a higher frequency, use a Logstore. For more information, see Manage a Logstore.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeAuditPolicy

The operation that you want to perform. Set the value to DescribeAuditPolicy.

RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance.

DBInstanceId String Yes dds-bp12c5b040dc****

The ID of the instance.

Response parameters

Parameter Type Example Description
RequestId String 111E7B16-0A87-4CBA-B271-F34AD61E099F

The ID of the request.

LogAuditStatus String Enable

Indicates whether the log audit feature is enabled. Valid values:

  • Enable
  • Disabled

Default value: Disabled.

Examples

Sample requests

http(s)://mongodb.aliyuncs.com/?Action=DescribeAuditPolicy
&DBInstanceId=dds-bp12c5b040dc****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
<DescribeAuditPolicyResponse>
	<LogAuditStatus>Enable</LogAuditStatus>
	<RequestId>111E7B16-0A87-4CBA-B271-F34AD61E099F</RequestId>
</DescribeAuditPolicyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "LogAuditStatus" : "Enable",
  "RequestId" : "111E7B16-0A87-4CBA-B271-F34AD61E099F"
}

Error codes

For a list of error codes, visit the API Error Center.