Help Center/ SecMaster/ API Reference/ SecMaster APIs (V1)/ Cloud Service Access/ Saving Cloud Service Log Collection Configuration
Updated on 2025-12-18 GMT+08:00

Saving Cloud Service Log Collection Configuration

Function

This API is used to save cloud service collection configurations.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/collector/cloudlogs/config

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID

Constraints

N/A

Value Range

N/A

Default value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

region_id

No

String

Region ID.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. Obtaining a User Token

Constraints

N/A

Range

N/A

Default Value

N/A

Table 4 Request body parameters

Parameter

Mandatory

Type

Description

config

Yes

Array of ConfigInfo objects

Dataset list.

dataspace_id

Yes

String

Data space ID.

dataspace_name

Yes

String

Data space name.

domain_id

No

String

Account ID.

lts_config

No

Array of LtsRquestVo objects

LTS configuration.

workspace_id

Yes

String

Workspace ID.

Table 5 ConfigInfo

Parameter

Mandatory

Type

Description

accounts

No

Array of strings

Managed account list. This parameter is not required in non-cross-account scenarios.

action

No

String

Operation

alert

No

Boolean

Auto alert conversion.

all_accounts

No

Boolean

Whether to access all managed accounts.

csvc

No

String

Cloud product.

csvc_display

Yes

String

Cloud service description.

enable

Yes

Long

Status. 0: disabled; 1: enabled.

new_account_auto_access

No

Boolean

Whether to automatically synchronize new accounts.

shards

Yes

Long

Number of required partitions.

source_display

Yes

String

Data source description.

source_id

Yes

Long

Data source ID.

source_name

No

String

Log name.

ttl

Yes

Long

Data lifecycle.

Table 6 LtsRquestVo

Parameter

Mandatory

Type

Description

config_name

No

String

Configuration name.

description

No

String

Description.

enable

No

String

Whether to enable.

log_group_id

No

String

Log ID.

log_stream_id

No

String

Log stream ID.

log_type

No

String

Log type.

log_type_prefix

No

String

Log prefix.

pipe_alias

No

String

Log alias.

Response Parameters

Status code: 200

Table 7 Response body parameters

Parameter

Type

Description

[items]

Array of ConfigResponse objects

Response body for saving cloud service collection configurations

Table 8 ConfigResponse

Parameter

Type

Description

alert

Boolean

Auto alert conversion.

allow_alert

Boolean

Whether to enable auto alert conversion.

allow_lts

Boolean

Whether to allow long-term storage.

csvc_display

String

Cloud service description.

datasets

Array of DatasetInfo objects

Associated dataset list.

region

Boolean

Whether to collect data by region.

source_display

String

Data source description.

success

Boolean

Whether the creation is successful.

total

Integer

Number of collected logs.

Table 9 DatasetInfo

Parameter

Type

Description

csvc

String

Cloud service to which the data source belongs. For example, enter hss for server security.

enable

String

Status. 0: disabled; 1: enabled.

is_region

Long

Location information. 1: region; 0: global.

reference

reference object

Data source name.

source_id

Long

Data source ID.

source_name

String

Data source name.

target

Object

Destination pipeline information.

type

Long

Subscription type. 1: tenant subscription; 2: tenant industry monitoring subscription; 3: platform industry monitoring subscription. Currently, the value is 1.

Table 10 reference

Parameter

Type

Description

csvc_display

String

Cloud service description.

source_display

String

Data source description.

link

String

URL.

csvc_help

String

Cloud service help.

source_help

String

Data source help.

Table 11 TargetInfo

Parameter

Type

Description

pipe

String

Pipeline name.

shards

Long

Number of required partitions.

ttl

Long

Data lifecycle.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

Successful.

Error Codes

See Error Codes.