Querying LTS Log Configurations
API Description
This API is used to query LTS log configurations.
Restrictions
This API is available only for audit logs.
URI
- URI format
GET https://{Endpoint}/v3/{project_id}/instances/logs/lts-configs
- URI example
https://dds.cn-north-1.myhuaweicloud.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/logs/lts-configs?offset=0&limit=10
Table 1 Request parameters Parameter
Mandatory
Type
Description
X-Auth-Token
Yes
String
Definition
User token obtained from IAM. For details, see Authentication.
Constraints
N/A
Range
N/A
Default Value
N/A
project_id
Yes
String
Definition
Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
Table 2 Query parameters Name
Mandatory
Type
Description
offset
No
Integer
Definition
Index offset.
Constraints
The value must be an integer.
Range
≥ 0
Default Value
0: The query starts from the first data record.
limit
No
Integer
Definition
Number of records to be queried.
Constraints
The value is a positive integer.
Range
1–50
Default Value
50
Response Parameters
- Parameter description
Table 3 Response body parameters Parameter
Type
Description
instance_lts_configs
Array of Table 4 objects
Definition
LTS log configuration and brief information about each instance.
Range
N/A
total_count
Integer
Definition
Total number of cloud service log configurations that can be queried, which is equal to the total number of DDS instances.
Range
≥ 0
Table 4 instance_lts_configs Parameter
Type
Description
instance
Table 5 object
Definition
Brief information about an instance.
Range
N/A
lts_configs
Array of Table lts_configs objects
Definition
LTS log configuration details. If no LTS log stream is configured, no response is returned for this field.
Range
N/A
Table 5 instance Parameter
Type
Description
id
String
Definition
Instance ID.
Range
N/A
name
String
Definition
Instance name.
Range
N/A
mode
String
Definition
Instance type, which can be single node, replica set, or cluster.
Range
- Single
- Replica
- Sharding
datastore
Table 6 object
Definition
DB engine and version of the DB instance.
Range
N/A
status
String
Definition
Instance status.
Range
N/A
enterprise_project_id
String
Definition
ID of the enterprise project selected when you purchased the instance.
Range
For the default enterprise project, the value is 0. For other enterprise projects, see Enterprise Management User Guide.
actions
Array of strings
Definition
All actions that are being executed on an instance.
Range
N/A
Table 6 datastore Parameter
Type
Description
type
String
Definition
DB engine.
Range
- mongodb
version
String
Definition
Database major version.
Range
N/A
Table 7 lts_configs Parameter
Type
Description
log_type
String
Definition
LTS log type, which cannot be left blank.
Range
- audit_log
lts_group_id
String
Definition
LTS log group ID.
Range
N/A
lts_stream_id
String
Definition
LTS log stream ID.
Range
N/A
enabled
Boolean
Definition
Indicates whether to upload logs to LTS.
Range
- true
- false
- Example response
{ "total_count" : 1, "instance_lts_configs" : [ { "instance" : { "id" : "520c58ba00a3497e97ce0b9604874dd6in02", "name" : "dds-1f84", "mode" : "Single", "datastore" : { "type" : "mongodb", "version" : 4.0 }, "status" : "normal", "enterprise_project_id" : "0", "actions" : [ "OPS_AUDIT_LOG" ] }, "lts_configs" : [ { "log_type" : "audit_log", "lts_group_id" : "ec6dc499-1a63-4229-a0c2-a2afa8bcfc95", "lts_stream_id" : "cae69d2e-378b-41dd-b3c9-3ca1cd5335bc", "enabled" : true } ] } ] }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot