All Products
Search
Document Center

Security Center:ListCloudSiemCustomizeRules

Last Updated:May 29, 2024

Queries custom rules.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
IdstringNo

The ID of the custom rule.

10223
StartTimelongNo

The beginning of the time range to query. Unit: milliseconds.

1577808000000
EndTimelongNo

The end of the time range to query. Unit: milliseconds.

1577808000000
ThreatLevelarrayNo

The threat level. The value must be a JSON array. Valid values:

  • serious: high-risk.
  • suspicious: medium-risk.
  • remind: low-risk.
stringNo

The threat level. The value must be a JSON array. Valid values:

  • serious: high-risk.
  • suspicious: medium-risk.
  • remind: low-risk.
["remind","serious"]
AlertTypestringNo

The alert type.

scan
RuleNamestringNo

The name of the rule. The name can contain letters, digits, underscores (_), and periods (.).

waf_scan
RuleTypestringNo

The type of the rule. Valid values:

  • predefine
  • customize
customize
StatusintegerNo

The status of the rule. Valid values:

  • 0: The rule is in the initial state.
  • 10: The simulation data is tested.
  • 15: The business data is being tested.
  • 20: The business data test is complete.
  • 100: The rule is in effect.
0
OrderFieldstringNo

The field that is used to sort the rules. Valid values:

  • GmtModified: The rules are sorted based on the modification time.
  • Id (default): The rules are sorted based on the rule ID.
Id
OrderstringNo

The sort method. Valid values:

  • desc: descending order.
  • asc: ascending order.
desc
CurrentPageintegerYes

The page number. Pages start from page 1.

1
PageSizeintegerYes

The number of entries per page. The value can be up to 100.

10
RoleTypeintegerNo

The type of the view. Valid values:

  • 0: view of the current Alibaba Cloud account.
  • 1: view of all accounts for the enterprise.
0
RoleForlongNo

The ID of the destination account to which you switch the view from the management account.

113091674488****
RegionIdstringNo

The data management center of the threat analysis feature. Specify this parameter based on the regions in which your assets reside. Valid values:

  • cn-hangzhou: Your assets reside in regions in China.
  • ap-southeast-1: Your assets reside in regions outside China.
cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

PageResponse<List>

Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Codeinteger

The HTTP status code.

200
Messagestring

The returned message.

success
RequestIdstring

The request ID.

9AAA9ED9-78F4-5021-86DC-D51C7511****
Dataobject

The data returned.

PageInfoobject

The pagination information.

CurrentPageinteger

The current page number.

1
PageSizeinteger

The number of entries per page.

10
TotalCountlong

The total number of entries returned.

100
ResponseDataobject []

The detailed data.

Idlong

The ID of the custom rule.

123456789
GmtCreatestring

The time when the custom rule was created.

2021-01-06 16:37:29
GmtModifiedstring

The time when the custom rule was last updated.

2021-01-06 16:37:29
Aliuidlong

The ID of the Alibaba Cloud account in SIEM.

127608589417****
RuleNamestring

The name of the rule.

waf_scan
RuleDescstring

The description of the rule.

this rule is for waf scan
RuleTypestring

The type of the rule. Valid values:

  • predefine
  • customize
customize
ThreatLevelstring

The risk level. Valid values:

  • serious: high-risk.
  • suspicious: medium-risk.
  • remind: low-risk.
remind
AlertTypestring

The type of the risk.

WEBSHELL
AlertTypeMdsstring

The internal code of the risk type.

${siem_rule_type_process_abnormal_command}
LogTypestring

The log type of the rule.

ALERT_ACTIVITY
LogTypeMdsstring

The internal code of the log type.

${sas.cloudsiem.prod.alert_activity}
LogSourcestring

The log source of the rule.

cloud_siem_aegis_sas_alert
LogSourceMdsstring

The internal code of the log source.

${sas.cloudsiem.prod.cloud_siem_aegis_sas_alert}
RuleConditionstring

The query condition of the rule. The value is in the JSON format. The HTML escape characters are reversed.

[[{&quot;not&quot;:false,&quot;left&quot;:&quot;alert_name&quot;,&quot;operator&quot;:&quot;=&quot;,&quot;right&quot;:&quot;WEBSHELL&quot;}]]
RuleGroupstring

The log aggregation field. The value is in the JSON format. The HTML escape characters are reversed.

[&quot;asset_id&quot;]
RuleThresholdstring

The threshold configurations of the rule in the JSON format. The HTML escape characters are reversed.

{&quot;aggregateFunction&quot;:&quot;count&quot;,&quot;aggregateFunctionName&quot;:&quot;count&quot;,&quot;field&quot;:&quot;activity_name&quot;,&quot;operator&quot;:&quot;&lt;=&quot;,&quot;value&quot;:1}
QueryCyclestring

The window length of the rule. The HTML escape characters are reversed.

{&quot;time&quot;:&quot;1&quot;,&quot;unit&quot;:&quot;HOUR&quot;}
AttCkstring

The alert additional field for ATT&CK.

T1595.002 Vulnerability Scanning
EventTransferSwitchinteger

Indicates whether the system generates an event for the alert. Valid values:

  • 0: no.
  • 1: yes.
1
EventTransferTypestring

The method that is used to generate an event. Valid values:

  • default: built-in method.
  • singleToSingle: The system generates an event for each alert.
  • allToSingle: The system generates an event for alerts within a period of time.
allToSingle
EventTransferExtstring

The extended information about event generation. If the value of eventTransferType is allToSingle, the value of this parameter indicates the length and unit of the alert aggregation window. The HTML escape characters are reversed.

{&quot;time&quot;:&quot;1&quot;,&quot;unit&quot;:&quot;MINUTE&quot;}
Statusinteger

The status of the rule. Valid values:

  • 0: The rule is in the initial state.
  • 10: The simulation data is tested.
  • 15: The business data is being tested.
  • 20: The business data test is complete.
  • 100: The rule is in effect.
0
DataTypeinteger

The type of the view. Valid values:

0: view of the current Alibaba Cloud account. 1: view of all accounts for the enterprise.

1

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "Code": 200,
  "Message": "success",
  "RequestId": "9AAA9ED9-78F4-5021-86DC-D51C7511****",
  "Data": {
    "PageInfo": {
      "CurrentPage": 1,
      "PageSize": 10,
      "TotalCount": 100
    },
    "ResponseData": [
      {
        "Id": 123456789,
        "GmtCreate": "2021-01-06 16:37:29",
        "GmtModified": "2021-01-06 16:37:29",
        "Aliuid": 0,
        "RuleName": "waf_scan",
        "RuleDesc": "this rule is for waf scan",
        "RuleType": "customize",
        "ThreatLevel": "remind",
        "AlertType": "WEBSHELL",
        "AlertTypeMds": "${siem_rule_type_process_abnormal_command}",
        "LogType": "ALERT_ACTIVITY",
        "LogTypeMds": "${sas.cloudsiem.prod.alert_activity}",
        "LogSource": "cloud_siem_aegis_sas_alert",
        "LogSourceMds": "${sas.cloudsiem.prod.cloud_siem_aegis_sas_alert}",
        "RuleCondition": "[[{&quot;not&quot;:false,&quot;left&quot;:&quot;alert_name&quot;,&quot;operator&quot;:&quot;=&quot;,&quot;right&quot;:&quot;WEBSHELL&quot;}]]",
        "RuleGroup": "[&quot;asset_id&quot;]",
        "RuleThreshold": "{&quot;aggregateFunction&quot;:&quot;count&quot;,&quot;aggregateFunctionName&quot;:&quot;count&quot;,&quot;field&quot;:&quot;activity_name&quot;,&quot;operator&quot;:&quot;&lt;=&quot;,&quot;value&quot;:1}",
        "QueryCycle": "{&quot;time&quot;:&quot;1&quot;,&quot;unit&quot;:&quot;HOUR&quot;}",
        "AttCk": "T1595.002 Vulnerability Scanning",
        "EventTransferSwitch": 1,
        "EventTransferType": "allToSingle",
        "EventTransferExt": "{&quot;time&quot;:&quot;1&quot;,&quot;unit&quot;:&quot;MINUTE&quot;}",
        "Status": 0,
        "DataType": 1
      }
    ]
  }
}

Error codes

HTTP status codeError codeError message
500InternalErrorThe request processing has failed due to some unknown error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-17The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 501
    Added Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: OrderField
    Added Input Parameters: Order
    Added Input Parameters: RoleType
    Added Input Parameters: RoleFor
Output ParametersThe response structure of the API has changed.