All Products
Search
Document Center

ApsaraDB for MongoDB:DescribeMongoDBLogConfig

Last Updated:Jun 10, 2026

Menampilkan konfigurasi MongoDB Log Service.

Deskripsi operasi

This API applies to General-purpose and Dedicated instances that use local disks.

You can enable the audit log feature for ApsaraDB for MongoDB as needed. For more information, see Enable audit logs.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dds:DescribeMongoDBLogConfig

get

*dbinstance

acs:dds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBInstanceId

string

Yes

ID instans. Panggil DescribeDBInstances untuk mengkueri ID instans.

dds-bp12c5b040dc****

Elemen respons

Element

Type

Description

Example

object

The audit log configuration.

UserProjectName

string

The name of the Simple Log Service project for the audit logs.

nosql-176498472570****-cn-hangzhou

RequestId

string

The request ID.

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

IsUserProjectLogstoreExist

integer

Indicates whether a Simple Log Service project for audit logs exists in the current region. Valid values:

  • 1: The project exists.

  • 0 or null: The project does not exist.

1

IsEtlMetaExist

integer

Indicates whether a rule is created to ship audit logs to Logtail. For more information about Logtail, see What is Logtail?. Valid values:

  • 1: A rule is created.

  • 0 or null: No rule is created.

1

ServiceType

string

The version of the audit log feature.

  • Trial: Free trial version.

  • Standard: Official version.

  • V2_Standard: DAS Enterprise Edition (NoSQL-compatible) version.

Standard

EnableAudit

boolean

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

  • true: Enabled.

  • false: Disabled.

true

TtlForTrail

integer

The retention period of audit logs for the free trial version. Unit: days.

1

UsedStorageForTrail

integer

The storage capacity that is used by audit logs for the free trial version. Unit: bytes.

12548178759

PreserveStorageForTrail

integer

The maximum storage capacity for the free trial version of audit logs. Unit: bytes. The maximum value is 107374182400 bytes.

107374182400

TtlForStandard

integer

The retention period of audit logs for the official version. The value ranges from 1 to 365. Unit: days.

30

UsedStorageForStandard

integer

The storage capacity that is used by audit logs for the official version. Unit: bytes.

20163

PreserveStorageForStandard

integer

The maximum storage capacity for the official version of audit logs. A value of -1 indicates that no upper limit is set.

-1

HotTtlForV2Standard

integer

The retention period of hot storage for the V2_Standard (DAS Enterprise Edition (NoSQL-compatible)) version of audit logs. Unit: days.

7

TtlForV2Standard

integer

The retention period of cold storage for the V2_Standard (DAS Enterprise Edition (NoSQL-compatible)) version of audit logs. Unit: days.

30

Contoh

Respons sukses

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,
  "HotTtlForV2Standard": 7,
  "TtlForV2Standard": 30
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.