搜索告警列表
功能介绍
搜索告警列表
调用方法
请参见如何调用API。
URI
POST /v1/{project_id}/workspaces/{workspace_id}/soc/alerts/search
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
项目id 最小长度:32 最大长度:36 |
workspace_id |
是 |
String |
工作空间id 最小长度:32 最大长度:36 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值) 最小长度:0 最大长度:2097152 |
content-type |
是 |
String |
内容类型 缺省值:application/json;charset=UTF-8 最小长度:0 最大长度:64 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
limit |
否 |
Integer |
分页大小 最小值:0 最大值:1000 |
offset |
否 |
Integer |
偏移量 最小值:0 最大值:1000 |
sort_by |
否 |
String |
排序字段:create_time | update_time 最小长度:0 最大长度:1000 |
order |
否 |
String |
排序方式:DESC | ASC 最小长度:0 最大长度:1000 枚举值:
|
from_date |
否 |
String |
搜索开始时间,例如:2023-02-20T00:00:00.000Z 最小长度:0 最大长度:64 |
to_date |
否 |
String |
搜索结束时间,例如:2023-02-27T23:59:59.999Z 最小长度:0 最大长度:64 |
condition |
否 |
condition object |
搜索条件表达式 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
conditions |
否 |
Array of conditions objects |
表达式列表 数组长度:0 - 999 |
logics |
否 |
Array of strings |
表达式名称列表 最小长度:0 最大长度:100 数组长度:0 - 999 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
X-request-id |
String |
请求ID,格式为:request_uuid-timestamp-hostname |
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
错误码 最小长度:0 最大长度:64 |
message |
String |
错误信息 最小长度:0 最大长度:1024 |
total |
Integer |
告警总数 最小值:0 最大值:10000 |
limit |
Integer |
分页大小 最小值:0 最大值:10000 |
offset |
Integer |
偏移量 最小值:0 最大值:10000 |
success |
Boolean |
是否成功 |
data |
Array of ListAlertDetail objects |
告警列表 数组长度:0 - 10000 |
参数 |
参数类型 |
描述 |
---|---|---|
data_object |
ListAlertRsp object |
告警详情 |
create_time |
String |
Create time 最小长度:0 最大长度:64 |
update_time |
String |
Update time 最小长度:0 最大长度:64 |
project_id |
String |
Id value 最小长度:32 最大长度:64 |
workspace_id |
String |
Id value 最小长度:32 最大长度:64 |
id |
String |
The name, display only 最小长度:0 最大长度:1024 |
type |
String |
The name, display only 最小长度:0 最大长度:1024 |
version |
Integer |
The name, display only 最小值:0 最大值:1024 |
format_version |
Integer |
The name, display only 最小值:0 最大值:1024 |
dataclass_ref |
dataclass_ref object |
dataclass对象 |
参数 |
参数类型 |
描述 |
---|---|---|
version |
String |
版本 最小长度:1 最大长度:64 |
environment |
environment object |
环境信息 |
data_source |
data_source object |
数据源信息 |
first_observed_time |
String |
Update time 最小长度:0 最大长度:64 |
last_observed_time |
String |
Update time 最小长度:0 最大长度:64 |
create_time |
String |
Create time 最小长度:0 最大长度:64 |
arrive_time |
String |
Update time 最小长度:0 最大长度:64 |
title |
String |
The name, display only 最小长度:0 最大长度:1024 |
description |
String |
The description, display only 最小长度:0 最大长度:1024 |
source_url |
String |
事件URL链接 最小长度:1 最大长度:64 |
count |
Integer |
事件发生次数 最小值:0 最大值:5 |
confidence |
Integer |
置信度 最小值:0 最大值:5 |
severity |
String |
严重性等级 最小长度:1 最大长度:64 |
criticality |
Integer |
关键性,是指事件涉及的资源的重要性级别。 最小值:0 最大值:5 |
alert_type |
Object |
事件分类 |
network_list |
Array of network_list objects |
network_list 数组长度:0 - 100 |
resource_list |
Array of resource_list objects |
network_list 数组长度:0 - 100 |
remediation |
remediation object |
补救措施 |
verification_state |
String |
验证状态 最小长度:1 最大长度:64 |
handle_status |
String |
事件处理状态 最小长度:1 最大长度:64 |
sla |
String |
sla 最小长度:1 最大长度:64 |
update_time |
String |
Create time 最小长度:0 最大长度:64 |
close_time |
String |
Create time 最小长度:0 最大长度:64 |
chop_phase |
String |
周期/处置阶段编号 最小长度:4 最大长度:64 |
ipdrr_phase |
String |
周期/处置阶段编号 最小长度:4 最大长度:64 |
ppdr_phase |
String |
周期/处置阶段编号 最小长度:4 最大长度:64 |
simulation |
String |
是否为调试事件. 最小长度:0 最大长度:64 |
actor |
String |
委托人 最小长度:0 最大长度:64 |
owner |
String |
The name, display only 最小长度:0 最大长度:1024 |
creator |
String |
The name, display only 最小长度:0 最大长度:1024 |
close_reason |
String |
关闭原因 最小长度:32 最大长度:64 |
close_comment |
String |
关闭原因 最小长度:0 最大长度:64 |
malware |
malware object |
恶意软件 |
system_info |
Object |
系统信息 |
process |
Array of process objects |
进程信息 数组长度:0 - 100 |
user_info |
Array of user_info objects |
用户信息 数组长度:0 - 100 |
file_info |
Array of file_info objects |
文件信息 数组长度:0 - 100 |
system_alert_table |
Object |
系统信息 |
id |
String |
Id value 最小长度:32 最大长度:64 |
workspace_id |
String |
workspace id 最小长度:32 最大长度:64 |
参数 |
参数类型 |
描述 |
---|---|---|
vendor_type |
String |
The name, display only 最小长度:0 最大长度:1024 |
domain_id |
String |
Id value 最小长度:32 最大长度:64 |
region_id |
String |
Id value 最小长度:1 最大长度:64 |
project_id |
String |
Id value 最小长度:32 最大长度:64 |
参数 |
参数类型 |
描述 |
---|---|---|
source_type |
Integer |
current page count 最小值:0 最大值:9999 |
domain_id |
String |
Id value 最小长度:32 最大长度:64 |
project_id |
String |
Id value 最小长度:32 最大长度:64 |
region_id |
String |
Id value 最小长度:1 最大长度:64 |
参数 |
参数类型 |
描述 |
---|---|---|
direction |
Object |
方向,取值范围:IN | OUT |
protocol |
String |
协议,参考:IANA registered name 最小长度:1 最大长度:64 |
src_ip |
String |
源IP地址 最小长度:0 最大长度:64 |
src_port |
Integer |
源端口,0–65535 最小值:0 最大值:65535 |
src_domain |
String |
源域名,最大128个字符 最小长度:0 最大长度:128 |
dest_ip |
String |
目的IP地址 最小长度:0 最大长度:64 |
dest_port |
String |
目的端口,0–65535 最小长度:0 最大长度:64 |
dest_domain |
String |
目的域名,最大128个字符 最小长度:0 最大长度:128 |
src_geo |
Object |
源IP的地理位置信息 |
dest_geo |
Object |
目的IP的地理位置信息 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
Id value 最小长度:32 最大长度:64 |
name |
String |
The name, display only 最小长度:0 最大长度:1024 |
type |
String |
The name, display only 最小长度:0 最大长度:1024 |
domain_id |
String |
Id value 最小长度:32 最大长度:64 |
project_id |
String |
Id value 最小长度:32 最大长度:64 |
region_id |
String |
Id value 最小长度:0 最大长度:64 |
ep_id |
String |
Id value 最小长度:0 最大长度:64 |
ep_name |
String |
The name, display only 最小长度:0 最大长度:1024 |
tags |
String |
Id value 最小长度:0 最大长度:64 |
参数 |
参数类型 |
描述 |
---|---|---|
recommendation |
String |
The name, display only 最小长度:0 最大长度:1024 |
url |
String |
The name, display only 最小长度:0 最大长度:1024 |
参数 |
参数类型 |
描述 |
---|---|---|
malware_family |
String |
恶意家族 最小长度:0 最大长度:64 |
malware_class |
String |
恶意软件分类 最小长度:0 最大长度:64 |
参数 |
参数类型 |
描述 |
---|---|---|
process_name |
String |
The name, display only 最小长度:0 最大长度:1024 |
process_path |
String |
The name, display only 最小长度:0 最大长度:1024 |
process_pid |
Integer |
Id value 最小值:0 最大值:65535 |
process_uid |
Integer |
Id value 最小值:0 最大值:65535 |
process_cmdline |
String |
The name, display only 最小长度:0 最大长度:1024 |
参数 |
参数类型 |
描述 |
---|---|---|
user_id |
String |
Id value 最小长度:0 最大长度:64 |
user_name |
String |
The name, display only 最小长度:0 最大长度:1024 |
参数 |
参数类型 |
描述 |
---|---|---|
file_path |
String |
The name, display only 最小长度:0 最大长度:1024 |
file_content |
String |
The name, display only 最小长度:0 最大长度:1024 |
file_new_path |
String |
The name, display only 最小长度:0 最大长度:1024 |
file_hash |
String |
The name, display only 最小长度:0 最大长度:1024 |
file_md5 |
String |
The name, display only 最小长度:0 最大长度:1024 |
file_sha256 |
String |
The name, display only 最小长度:0 最大长度:1024 |
file_attr |
String |
The name, display only 最小长度:0 最大长度:1024 |
参数 |
参数类型 |
描述 |
---|---|---|
id |
String |
Id value 最小长度:32 最大长度:64 |
name |
String |
The name, display only 最小长度:0 最大长度:1024 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
X-request-id |
String |
请求ID,格式为:request_uuid-timestamp-hostname |
参数 |
参数类型 |
描述 |
---|---|---|
code |
String |
错误码 最小长度:0 最大长度:64 |
message |
String |
错误描述 最小长度:0 最大长度:1024 |
请求示例
查询告警列表请求样例,查询2024年1月20号到2024年1月26号,告警等级为中危且处理状态为打开的告警,按照创建时间降序排序,返回第一页,每页10条数据
{ "limit" : 10, "offset" : 0, "sort_by" : "create_time", "order" : "DESC", "condition" : { "conditions" : [ { "name" : "severity", "data" : [ "severity", "=", "Medium" ] }, { "name" : "handle_status", "data" : [ "handle_status", "=", "Open" ] } ], "logics" : [ "severity", "and", "handle_status" ] }, "from_date" : "2024-01-20T00:00:00.000Z+0800", "to_date" : "2024-01-26T23:59:59.999Z+0800" }
响应示例
状态码: 200
搜索告警列表返回body体
{ "code" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "message" : "Error message", "total" : 41, "limit" : 2, "offset" : 1, "success" : true, "data" : [ { "data_object" : { "version" : "1.0", "environment" : { "vendor_type" : "MyXXX", "domain_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "region_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "project_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f" }, "data_source" : { "source_type" : 3, "domain_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "project_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "region_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f" }, "first_observed_time" : "2021-01-30T23:00:00Z+0800", "last_observed_time" : "2021-01-30T23:00:00Z+0800", "create_time" : "2021-01-30T23:00:00Z+0800", "arrive_time" : "2021-01-30T23:00:00Z+0800", "title" : "MyXXX", "description" : "This my XXXX", "source_url" : "http://xxx", "count" : 4, "confidence" : 4, "severity" : "TIPS", "criticality" : 4, "alert_type" : { }, "network_list" : [ { "direction" : { "IN" : null }, "protocol" : "TCP", "src_ip" : "192.168.0.1", "src_port" : "1", "src_domain" : "xxx", "dest_ip" : "192.168.0.1", "dest_port" : "1", "dest_domain" : "xxx", "src_geo" : { "latitude" : 90, "longitude" : 180 }, "dest_geo" : { "latitude" : 90, "longitude" : 180 } } ], "resource_list" : [ { "id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "name" : "MyXXX", "type" : "MyXXX", "domain_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "project_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "region_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "ep_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "ep_name" : "MyXXX", "tags" : "909494e3-558e-46b6-a9eb-07a8e18ca62f" } ], "remediation" : { "recommendation" : "MyXXX", "url" : "MyXXX" }, "verification_state" : "Unknown – 未知,True_Positive – 确认,False_Positive – 误报。默认填写Unknown", "handle_status" : "Open – 打开,Block – 阻塞,Closed – 关闭。默认填写Open", "sla" : 60000, "update_time" : "2021-01-30T23:00:00Z+0800", "close_time" : "2021-01-30T23:00:00Z+0800", "ipdrr_phase" : "Prepartion|Detection and Analysis|Containm,Eradication& Recovery| Post-Incident-Activity", "simulation" : "false", "actor" : "刘一博", "owner" : "MyXXX", "creator" : "MyXXX", "close_reason" : "误检;已解决;重复;其他", "close_comment" : "误检;已解决;重复;其他", "malware" : { "malware_family" : "family", "malware_class" : "恶意占用内存" }, "system_info" : { }, "process" : [ { "process_name" : "MyXXX", "process_path" : "MyXXX", "process_pid" : 123, "process_uid" : 123, "process_cmdline" : "MyXXX" } ], "user_info" : [ { "user_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "user_name" : "MyXXX" } ], "file_info" : [ { "file_path" : "MyXXX", "file_content" : "MyXXX", "file_new_path" : "MyXXX", "file_hash" : "MyXXX", "file_md5" : "MyXXX", "file_sha256" : "MyXXX", "file_attr" : "MyXXX" } ], "system_alert_table" : { }, "id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "workspace_id" : "909494e3-558e-46b6-a9eb-07a8e18ca620" }, "create_time" : "2021-01-30T23:00:00Z+0800", "update_time" : "2021-01-30T23:00:00Z+0800", "project_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "workspace_id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "id" : "MyXXX", "version" : 123, "format_version" : 123, "dataclass_ref" : { "id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f", "name" : "MyXXX" } } ] }
SDK代码示例
SDK代码示例如下。
查询告警列表请求样例,查询2024年1月20号到2024年1月26号,告警等级为中危且处理状态为打开的告警,按照创建时间降序排序,返回第一页,每页10条数据
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.secmaster.v2.region.SecMasterRegion; import com.huaweicloud.sdk.secmaster.v2.*; import com.huaweicloud.sdk.secmaster.v2.model.*; import java.util.List; import java.util.ArrayList; public class ListAlertsSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); ICredential auth = new BasicCredentials() .withAk(ak) .withSk(sk); SecMasterClient client = SecMasterClient.newBuilder() .withCredential(auth) .withRegion(SecMasterRegion.valueOf("<YOUR REGION>")) .build(); ListAlertsRequest request = new ListAlertsRequest(); DataobjectSearch body = new DataobjectSearch(); List<String> listConditionLogics = new ArrayList<>(); listConditionLogics.add("severity"); listConditionLogics.add("and"); listConditionLogics.add("handle_status"); List<String> listConditionsData = new ArrayList<>(); listConditionsData.add("handle_status"); listConditionsData.add("="); listConditionsData.add("Open"); List<String> listConditionsData1 = new ArrayList<>(); listConditionsData1.add("severity"); listConditionsData1.add("="); listConditionsData1.add("Medium"); List<DataobjectSearchConditionConditions> listConditionConditions = new ArrayList<>(); listConditionConditions.add( new DataobjectSearchConditionConditions() .withName("severity") .withData(listConditionsData1) ); listConditionConditions.add( new DataobjectSearchConditionConditions() .withName("handle_status") .withData(listConditionsData) ); DataobjectSearchCondition conditionbody = new DataobjectSearchCondition(); conditionbody.withConditions(listConditionConditions) .withLogics(listConditionLogics); body.withCondition(conditionbody); body.withToDate("2024-01-26T23:59:59.999Z+0800"); body.withFromDate("2024-01-20T00:00:00.000Z+0800"); body.withOrder(DataobjectSearch.OrderEnum.fromValue("DESC")); body.withSortBy("create_time"); body.withOffset(0); body.withLimit(10); request.withBody(body); try { ListAlertsResponse response = client.listAlerts(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
查询告警列表请求样例,查询2024年1月20号到2024年1月26号,告警等级为中危且处理状态为打开的告警,按照创建时间降序排序,返回第一页,每页10条数据
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# coding: utf-8 from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdksecmaster.v2.region.secmaster_region import SecMasterRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdksecmaster.v2 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = __import__('os').getenv("CLOUD_SDK_AK") sk = __import__('os').getenv("CLOUD_SDK_SK") credentials = BasicCredentials(ak, sk) \ client = SecMasterClient.new_builder() \ .with_credentials(credentials) \ .with_region(SecMasterRegion.value_of("<YOUR REGION>")) \ .build() try: request = ListAlertsRequest() listLogicsCondition = [ "severity", "and", "handle_status" ] listDataConditions = [ "handle_status", "=", "Open" ] listDataConditions1 = [ "severity", "=", "Medium" ] listConditionsCondition = [ DataobjectSearchConditionConditions( name="severity", data=listDataConditions1 ), DataobjectSearchConditionConditions( name="handle_status", data=listDataConditions ) ] conditionbody = DataobjectSearchCondition( conditions=listConditionsCondition, logics=listLogicsCondition ) request.body = DataobjectSearch( condition=conditionbody, to_date="2024-01-26T23:59:59.999Z+0800", from_date="2024-01-20T00:00:00.000Z+0800", order="DESC", sort_by="create_time", offset=0, limit=10 ) response = client.list_alerts(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
查询告警列表请求样例,查询2024年1月20号到2024年1月26号,告警等级为中危且处理状态为打开的告警,按照创建时间降序排序,返回第一页,每页10条数据
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" secmaster "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/secmaster/v2" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/secmaster/v2/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/secmaster/v2/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). Build() client := secmaster.NewSecMasterClient( secmaster.SecMasterClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.ListAlertsRequest{} var listLogicsCondition = []string{ "severity", "and", "handle_status", } var listDataConditions = []string{ "handle_status", "=", "Open", } var listDataConditions1 = []string{ "severity", "=", "Medium", } nameConditions:= "severity" nameConditions1:= "handle_status" var listConditionsCondition = []model.DataobjectSearchConditionConditions{ { Name: &nameConditions, Data: &listDataConditions1, }, { Name: &nameConditions1, Data: &listDataConditions, }, } conditionbody := &model.DataobjectSearchCondition{ Conditions: &listConditionsCondition, Logics: &listLogicsCondition, } toDateDataobjectSearch:= "2024-01-26T23:59:59.999Z+0800" fromDateDataobjectSearch:= "2024-01-20T00:00:00.000Z+0800" orderDataobjectSearch:= model.GetDataobjectSearchOrderEnum().DESC sortByDataobjectSearch:= "create_time" offsetDataobjectSearch:= int32(0) limitDataobjectSearch:= int32(10) request.Body = &model.DataobjectSearch{ Condition: conditionbody, ToDate: &toDateDataobjectSearch, FromDate: &fromDateDataobjectSearch, Order: &orderDataobjectSearch, SortBy: &sortByDataobjectSearch, Offset: &offsetDataobjectSearch, Limit: &limitDataobjectSearch, } response, err := client.ListAlerts(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。
状态码
状态码 |
描述 |
---|---|
200 |
搜索告警列表返回body体 |
400 |
搜索告警列表错误返回body体 |
错误码
请参见错误码。