データ監査アラートログを照会して、アラートを検出およびハンドルします。
操作説明
Before calling this API, ensure you meet the following prerequisites:
-
We recommend using the latest version of the Alibaba Cloud or DAS SDK.
-
When using an SDK to call the DAS service, set the region to cn-shanghai.
今すぐお試しください
テスト
RAM 認証
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| Lang |
string |
任意 |
リクエストおよび応答の言語。デフォルト値: zh-CN。有効な値:
|
zh-CN |
| UserName |
string |
任意 |
ユーザー名。 |
admin |
| ClientIp |
string |
任意 |
クライアントの IP アドレス。 |
11.26.118.7 |
| ClientUa |
string |
任意 |
クライアントタイプ。 |
mysql |
| InstanceName |
string |
任意 |
インスタンスの名前。 |
rm-t4ni1cezz5y3xxxx |
| DatabaseName |
string |
任意 |
データベースの名前。 |
TestDB |
| StartTime |
integer |
任意 |
クエリの開始時刻。値はミリ秒単位の UNIX タイムスタンプです。 |
1608888296000 |
| EndTime |
integer |
任意 |
クエリの終了時刻。値はミリ秒単位の UNIX タイムスタンプです。 |
15682887991222 |
| ProductCode |
string |
任意 |
データ資産が属するデータベースサービスの名前。例: RDS、PolarDB、PolarDB-X。 |
RDS |
| ProductId |
integer |
任意 |
データベースサービスの ID。有効な値:
|
5 |
| SqlText |
string |
任意 |
SQL ステートメントの内容。 |
SELECT * FROM test where name = 'das' |
| ExecuteTimeRange |
string |
任意 |
実行時間の有効値 (ミリ秒単位)。 |
in[1000 2000] |
| EffectRowRange |
string |
任意 |
影響を受ける行数の有効値。 |
in[1 33] |
| RuleID |
string |
任意 |
ルール ID。 |
9953411 |
| RuleName |
string |
任意 |
ルール名。 |
test_rule |
| OperateType |
string |
任意 |
操作タイプ。 |
Insert |
| OssObjectKey |
string |
任意 |
OSS オブジェクトのキー。 |
N.A |
| AsyncRequestId |
string |
任意 |
リクエスト ID。 |
2c548e83-1473-4fda-b3dc-5a189074ead5 |
| PageSize |
integer |
任意 |
ページあたりのエントリの最大値。デフォルト値: 10。 |
30 |
| CurrentPage |
integer |
任意 |
返すページ番号。 |
3 |
| RuleCategory |
string |
任意 |
ルールタイプ。 |
10 |
| LoadWhiteList |
boolean |
任意 |
ホワイトリストのステータスを取得するかどうかを指定します。 |
false |
| IpType |
string |
任意 |
ネットワークタイプ。有効な値:
|
aliyun |
| LogSource |
string |
任意 |
データソース。 |
SLOW_SQL |
| RuleAggQuery |
boolean |
任意 |
集計クエリを実行するかどうかを指定します。 |
true |
| RuleId |
string |
任意 |
ルール ID。 |
867028 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
The response parameters. |
||
| AsyncRequestId |
string |
The request ID. |
3926fba5-1774-44f4-af2d-ac7b33e86c3b |
| CurrentPage |
integer |
The current page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| RequestId |
string |
The request ID. |
A7021857-AFD9-5AD6-979D-AA7DFC5AFADF |
| TotalCount |
integer |
The total number of entries. This parameter is valid only for Redis. |
12 |
| Items |
array<object> |
The details of the audit logs. |
|
|
object |
An audit log entry. |
||
| CreationTime |
integer |
The time when the alert was generated, as a UNIX timestamp in milliseconds. |
1536751124000 |
| WarnLevel |
string |
The risk level. Valid values:
|
1 |
| ClientPort |
string |
The client port number. |
53815 |
| TableName |
string |
The name of the table. |
it_table |
| EffectRow |
integer |
The number of affected rows. |
10 |
| PackageName |
string |
The name of the MaxCompute package. |
test01 |
| UserId |
string |
The user ID (UID). |
19********94 |
| Message |
string |
The raw log content. |
success |
| RuleId |
string |
The ID of the audit rule. |
9953411 |
| OperateType |
string |
The operation type. |
Drop |
| LogTime |
integer |
The time when the operation was executed, as a UNIX timestamp in milliseconds. |
1751870592000 |
| WarnLevelName |
string |
The name of the risk level.
|
1 |
| InstanceName |
string |
The alias of the instance. |
test-instance-003 |
| DatabaseName |
string |
The name of the database. |
chngc_b2b_migration_sh |
| OssObjectKey |
string |
The key of the OSS object. |
N.A |
| ExecuteStatus |
integer |
The execution status, where 0 indicates failure and 1 indicates success. |
1 |
| ProductId |
integer |
The ID of the database service. Valid values:
|
5 |
| ExecuteTime |
integer |
The execution duration, in milliseconds. |
1751870592000 |
| UserName |
string |
The username. |
admin |
| InstanceDescription |
string |
The description of the instance. |
instance dscription |
| RuleName |
string |
The name of the audit rule. |
name |
| ColumnName |
string |
The column name. |
ds |
| ClientIp |
string |
The client's IP address. |
100.104.16.251 |
| ClientUa |
string |
The client's user agent. |
mysql |
| Id |
integer |
The primary key of the log entry. |
1 |
| ProductCode |
string |
The name of the database service, such as RDS, PolarDB, and PolarDB-X 2.0. |
RDS |
| SqlText |
string |
The SQL statement. |
select * from test03 |
| InWhiteList |
boolean |
Indicates whether the alert is in the whitelist. |
True |
| IpType |
string |
The network type. Valid values: default: A non-Alibaba Cloud service. This is the default. aliyun: An Alibaba Cloud service. |
aliyun |
| RuleCategory |
string |
The rule category. |
10 |
| LogSource |
string |
The data source. |
SLOW_SQL |
| InstanceAuditStatus |
string |
The audit status of the instance. |
2 |
例
成功レスポンス
JSONJSON
{
"AsyncRequestId": "3926fba5-1774-44f4-af2d-ac7b33e86c3b",
"CurrentPage": 1,
"PageSize": 10,
"RequestId": "A7021857-AFD9-5AD6-979D-AA7DFC5AFADF",
"TotalCount": 12,
"Items": [
{
"CreationTime": 1536751124000,
"WarnLevel": "1",
"ClientPort": "53815",
"TableName": "it_table",
"EffectRow": 10,
"PackageName": "test01",
"UserId": "19********94",
"Message": "success",
"RuleId": "9953411",
"OperateType": "Drop",
"LogTime": 1751870592000,
"WarnLevelName": "1",
"InstanceName": "test-instance-003",
"DatabaseName": "chngc_b2b_migration_sh",
"OssObjectKey": "N.A",
"ExecuteStatus": 1,
"ProductId": 5,
"ExecuteTime": 1751870592000,
"UserName": "admin",
"InstanceDescription": "instance dscription",
"RuleName": "name",
"ColumnName": "ds",
"ClientIp": "100.104.16.251",
"ClientUa": "mysql",
"Id": 1,
"ProductCode": "RDS",
"SqlText": "select * from test03",
"InWhiteList": true,
"IpType": "aliyun",
"RuleCategory": "10",
"LogSource": "SLOW_SQL",
"InstanceAuditStatus": "2"
}
]
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。