Help Center/ Cloud Search Service/ API Reference/ Log Management/ Querying Basic Log Configurations
Updated on 2023-03-15 GMT+08:00

Querying Basic Log Configurations

Function

This API is used to query basic log configurations.

URI

GET /v1.0/{project_id}/clusters/{cluster_id}/logs/settings

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID and name, see Obtaining a Project ID and Name.

cluster_id

Yes

String

ID of the cluster you want to query.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

logConfiguration

logConfiguration object

Log configuration entity object.

Table 3 logConfiguration

Parameter

Type

Description

id

String

Log backup ID, which is generated using the system UUID.

clusterId

String

Cluster ID.

obsBucket

String

Name of the OBS bucket for storing logs.

agency

String

Agency name. You can create an agency to allow CSS to call other cloud services.

updateAt

Long

Update time. Format: Unix timestamp.

basePath

String

Storage path of backed up logs in the OBS bucket.

autoEnable

Boolean

Whether to enable automatic backup.

  • true: Automatic backup is enabled.
  • false: Automatic backup is disabled.

period

String

Start time of automatic log backup. If autoEnable is set to false, the value of this parameter is null. Format: GMT

logSwitch

Boolean

Whether to enable the log function.

  • true: The log function is enabled.
  • false: The log function is disabled.

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "logConfiguration" : {
    "id" : "d455a541-597e-4846-a6be-baad0ea361b1",
    "clusterId" : "4213d908-f5dc-4633-8401-cfd7175fca0c",
    "obsBucket" : "css-auto-test",
    "agency" : "css_obs_agency",
    "updateAt" : 1633663681055,
    "basePath" : "css/log",
    "autoEnable" : false,
    "period" : "00:00 GMT+08:00",
    "logSwitch" : true
  }
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request.

Modify the request before retry.

409

The request could not be completed due to a conflict with the current state of the resource.

The resource that the client attempts to create already exists, or the update request fails to be processed because of a conflict.

412

The server did not meet one of the preconditions contained in the request.

Error Codes

See Error Codes.