All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeMongoDBLogConfig

Last Updated:Jan 17, 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

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • 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 keyword: refers to the condition keyword defined by the cloud product itself.
  • 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.
Operate access level Resource type conditional keyword Association operation
dds:DescribeMongoDBLogConfig READ
  • MongoDB
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    without
without

Request parameters

Parameter Type Required Description Example
DBInstanceId string Yes

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

dds-bp12c5b040dc****

Response parameters

Parameter Type Description Example
object
UserProjectName string

The name of the Log Service project.

nosql-176498472570****-cn-hangzhou
RequestId string

The ID of the request.

664ECE26-658A-47C5-88F6-870B0132E8D2
IsUserProjectLogstoreExist integer

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
IsEtlMetaExist integer

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
ServiceType string

The type of the audit log feature. Valid values:

  • Trail: the free trial edition
  • Standard: the official edition
Standard
EnableAudit boolean

Indicates whether to enable the audit log feature is enabled.

  • true
  • false
true
TtlForTrail long

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

1
UsedStorageForTrail long

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

12548178759
PreserveStorageForTrail long

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
TtlForStandard long

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

30
UsedStorageForStandard long

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

20163
PreserveStorageForStandard long

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

-1

Example

Normal return example

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 API error center.