All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeMongoDBLogConfig

Last Updated:Nov 06, 2023

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

Operation Description

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

debugging

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dds:DescribeMongoDBLogConfigREAD
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

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

dds-bp12c5b040dc****

Response parameters

ParameterTypeDescriptionExample
object
UserProjectNamestring

The name of the Log Service project.

nosql-176498472570****-cn-hangzhou
RequestIdstring

The ID of the request.

664ECE26-658A-47C5-88F6-870B0132E8D2
IsUserProjectLogstoreExistinteger

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.
1
IsEtlMetaExistinteger

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.
1
ServiceTypestring

The type of the audit log feature. Valid values:

  • Trail: the free trial edition
  • Standard: the official edition
Standard
EnableAuditboolean

Indicates whether to enable the audit log feature is enabled.

  • true
  • false
true
TtlForTraillong

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

1
UsedStorageForTraillong

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

12548178759
PreserveStorageForTraillong

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.

107374182400
TtlForStandardlong

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

30
UsedStorageForStandardlong

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

20163
PreserveStorageForStandardlong

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

-1

Examples

Sample success responses

JSONformat

{
  "UserProjectName": "nosql-176498472570****-cn-hangzhou",
  "RequestId": "664ECE26-658A-47C5-88F6-870B0132E8D2",
  "IsUserProjectLogstoreExist": 1,
  "IsEtlMetaExist": 1,
  "ServiceType": "Standard",
  "EnableAudit": true,
  "TtlForTrail": 1,
  "UsedStorageForTrail": 12548178759,
  "PreserveStorageForTrail": 107374182400,
  "TtlForStandard": 30,
  "UsedStorageForStandard": 20163,
  "PreserveStorageForStandard": -1
}

Error codes

For a list of error codes, visit the Service error codes.