All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeMongoDBLogConfig

Last Updated:Sep 03, 2024

Queries the logging 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 requirements. 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.

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:DescribeMongoDBLogConfigget
  • dbinstance
    acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

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

dds-bp12c5b040dc****

Response parameters

ParameterTypeDescriptionExample
object

Information about the logging configurations.

UserProjectNamestring

The name of the project.

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

The request ID.

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

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

  • 1: A logging project exists in the current region.
  • 0 or null: A logging 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.

  • true: The audit log feature is enabled.
  • false: The audit log feature is disabled.
true
TtlForTraillong

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

1
UsedStorageForTraillong

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

12548178759
PreserveStorageForTraillong

The maximum storage capacity for the free trial edition of the audit log feature. Unit: bytes. You can set the maximum storage capacity 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. Unit: day.

30
UsedStorageForStandardlong

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

20163
PreserveStorageForStandardlong

The maximum storage capacity for the formal edition of the audit log feature. If the value is -1, no maximum storage capacity 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.

Change history

Change timeSummary of changesOperation
No change history