Queries the audit log feature configurations of an ApsaraDB for MongoDB instance.

This operation is applicable only to general-purpose local-disk and dedicated local-disk instances.

This operation depends on the audit log feature of ApsaraDB for MongoDB. You can enable the audit log feature based on your business needs. For more information, see Enable the audit log feature

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 DescribeMongoDBLogConfig

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

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. You can call the DescribeDBInstances operation to query the ID of the instance.

Response parameters

Parameter Type Example Description
UserProjectName String nosql-176498472570****-cn-hangzhou

The name of the Log Service project.

RequestId String 664ECE26-658A-47C5-88F6-870B0132E8D2

The ID of the request.

IsUserProjectLogstoreExist Integer 1

Indicates whether a Log Service project exists in the current region. Valid values:

  • 1: A Log Service project exists in the current region.
  • 0 or null: A Log Service project does not exist in the current region.
IsEtlMetaExist Integer 1

Indicates whether a rule to distribute logs to Logtail is created. For more information, see Logtail overview. Valid values:

  • 1: A rule to distribute logs to Logtail is created.
  • 0 or null: A rule to distribute logs to Logtail is not created.
ServiceType String Standard

The type of the audit log feature. Valid values:

  • Trail: the free trial edition
  • Standard: the official edition
EnableAudit Boolean true

Indicates whether to enable the audit log feature is enabled.

  • true
  • false
TtlForTrail Long 1

The retention period for the free trial edition of the audit log feature.

UsedStorageForTrail Long 12548178759

The used storage space for the free trial edition of the audit log feature. Unit: bytes.

PreserveStorageForTrail Long 107374182400

The maximum storage space for the free trial edition of the audit log feature. Unit: bytes. You can set the maximum up to 107,374,182,400 bytes.

TtlForStandard Long 30

The retention period for the official edition of the audit log feature. Valid values: 1 to 365 days.

UsedStorageForStandard Long 20163

The used storage space for the formal edition of the audit log feature. Unit: bytes.

PreserveStorageForStandard Long -1

The maximum storage space for the formal edition of the audit log feature. If the value is -1, no maximum is set.

Examples

Sample requests

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

Sample success responses

XML format

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

<DescribeMongoDBLogConfigResponse>
    <EnableAudit>true</EnableAudit>
    <TtlForStandard>30</TtlForStandard>
    <PreserveStorageForStandard>-1</PreserveStorageForStandard>
    <UserProjectName>nosql-1764984725705461-cn-hangzhou</UserProjectName>
    <RequestId>58E34DEE-EF44-5A59-B83E-A5B6F82CF5C9</RequestId>
    <ServiceType>Standard</ServiceType>
    <IsUserProjectLogstoreExist>1</IsUserProjectLogstoreExist>
    <UsedStorageForTrail>12565942384</UsedStorageForTrail>
    <PreserveStorageForTrail>107374182400</PreserveStorageForTrail>
    <IsEtlMetaExist>1</IsEtlMetaExist>
    <TtlForTrail>30</TtlForTrail>
    <UsedStorageForStandard>20163</UsedStorageForStandard>
</DescribeMongoDBLogConfigResponse>

JSON format

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

{
  "EnableAudit" : true,
  "TtlForStandard" : 30,
  "PreserveStorageForStandard" : -1,
  "UserProjectName" : "nosql-1764984725705461-cn-hangzhou",
  "RequestId" : "58E34DEE-EF44-5A59-B83E-A5B6F82CF5C9",
  "ServiceType" : "Standard",
  "IsUserProjectLogstoreExist" : 1,
  "UsedStorageForTrail" : 12565942384,
  "PreserveStorageForTrail" : 107374182400,
  "IsEtlMetaExist" : 1,
  "TtlForTrail" : 30,
  "UsedStorageForStandard" : 20163
}

Error codes

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