すべてのプロダクト
Search
ドキュメントセンター

Web Application Firewall:DescribeSecurityEventTimeSeriesMetric

最終更新日:Jun 09, 2026

攻撃トラフィックの時系列データをクエリします。攻撃リクエストとは、ルールにヒットし、脅威として識別されたリクエストです。

操作説明

Attack traffic refers to requests that hit a rule and are identified as a threat. The following data is excluded:

  • Requests that hit a whitelist rule.

  • Requests that hit a bot rule where the rule action is "Mark for origin fetch".

  • Requests that hit a rule with the action "Dynamic Token", "Slider", "Strict Slider", or "JS Challenge", but are allowed because the user passed the verification.

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

yundun-waf:DescribeSecurityEventTimeSeriesMetric

get

*All Resource

*

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

InstanceId

string

必須

Web Application Firewall (WAF) インスタンスの ID。

説明

DescribeInstance を呼び出して、WAF インスタンスの ID をクエリできます。

waf-cn-tl32ast****

Filter

object

必須

クエリのフィルター条件。複数のフィルター条件は論理 AND の関係になります。

DateRange

object

必須

The time range to query.

StartDate

integer

必須

You can query data from the last 30 days. The start time of the query. This is a UNIX timestamp. Unit: seconds.

説明

The start time must be within the last 30 days.

1713888000

EndDate

integer

必須

The end time of the query. This is a UNIX timestamp. Unit: seconds.

1713888600

Conditions

array<object>

任意

A list of filter conditions. Each node describes one filter condition.

object

任意

A single query condition, which consists of a field name, an operator, and a filter value. For information about the supported field names and operators, see Additional information about request parameters.

Key

string

任意

The name of the field to filter. This operation supports all fields.

matched_host

OpValue

string

任意

The operator.

eq

Values

any

任意

The filter value.

test.waf-top

Metric

string

必須

返されるデータの内容を指定します。メトリックごとに異なるデータ内容に対応します。この操作では、以下のメトリックがサポートされています:

  • mitigated_requests: ブロックされたリクエストの時系列統計を返します。

  • monitored_requests: 観測タイプのルールのみにヒットしたリクエストの時系列統計を返します。

  • mitigated_requests_group_by_defense_scene: モジュール別にグループ化されたデータを返します。各モジュールのヒット数の時系列グラフを記録します。1 つのリクエストが複数のモジュールにヒットする場合があります。そのため、このメトリックで返されるヒット数はリクエスト数と一致しない場合があります。

  • mitigated_requests_group_by_block_defense_scene: モジュール別にグループ化されたデータを返します。各モジュールのブロックされたリクエスト数の時系列グラフを記録します。1 つのリクエストは 1 つのモジュールによってのみブロックされます。そのため、このメトリックで返されるカウントはリクエスト数と一致します。

mitigated_requests

RegionId

string

任意

WAF インスタンスが存在するリージョン。有効な値:

  • cn-hangzhou: 中国本土。

  • ap-southeast-1: 中国本土以外。

cn-hangzhou

ResourceManagerResourceGroupId

string

任意

Alibaba Cloud リソースグループの ID。

rg-acfm***q

演算子の説明

演算子意味説明
all-not-matchいずれの値とも等しくないフィールド値がデータセット内のいずれの値とも等しくありません。例えば、real_client_ip がコレクション内のいずれの値とも等しくないリクエストをフィルターする場合:
{"Key":"real_client_ip","OpValue":"all-not-match","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]}
contain含むフィールド値が特定の文字列を含みます。例えば、URL に「test」を含むデータをフィルターする場合:
{"Key":"request_path","OpValue":"contain","Values":"test"}
eq等しいフィールド値が特定の文字列と等しいです。例えば、URL が「/testcase」と等しいデータをフィルターする場合:
{"Key":"request_path","OpValue":"eq","Values":"/testcase"}
match-one複数の値のいずれかと等しいフィールド値がデータセット内のいずれかの値と等しいです。例えば、real_client_ip がコレクション内のいずれかの値と等しいリクエストをフィルターする場合:
{"Key":"real_client_ip","OpValue":"match-one","Values":["1.1.1.1","2.2.2.2","3.3.3.3"]}
ne等しくないフィールド値が特定の文字列と等しくありません。例えば、URL が「/testcase」と等しくない統計をフィルターする場合:
{"Key":"request_path","OpValue":"ne","Values":"/testcase"}
not-contain含まないフィールド値が特定の文字列を含みません。例えば、URL に「test」を含まないデータをフィルターする場合:
{"Key":"request_path","OpValue":"not-contain","Values":"test"}
prefix-match前方一致フィールド値が特定の文字列で始まります。例えば、URL のプレフィックスが「/testcase」であるデータをフィルターする場合:
{"Key":"request_path","OpValue":"prefix-match","Values":"/testcase"}
suffix-match後方一致フィールド値が特定の文字列で終わります。例えば、URL のサフィックスが「/testcase」であるデータをフィルターする場合:
{"Key":"request_path","OpValue":"suffix-match","Values":"/testcase"}

フィルター条件でサポートされるキー

フィールド名説明サポートされる演算子
action保護操作。リクエストに対して実行された最終的な操作です。ne, eq
cluster保護クラスター。ne, eq,
match-one,
all-not-match
defense_scene保護モジュール。リクエストは複数の保護モジュールにヒットする場合があります。このフィールドでフィルターされたリクエストは、他のモジュールにもヒットしている可能性があります。ne, eq
hostHTTP ヘッダーのホスト。contain,
not-contain, ne, eq, match-one, all-not-match, prefix-match, suffix-match
http_cookieHTTP ヘッダーの Cookie。contain,
not-contain, ne, eq, match-one,
all-not-match, prefix-match, suffix-match
http_user_agentHTTP ヘッダーの User-Agent。contain,
not-contain, ne, eq, match-one,
all-not-match, prefix-match, suffix-match
matched_host保護対象オブジェクト。ne, eq,
match-one,
all-not-match
real_client_ipリクエストの送信元 IP アドレス。演算子の後に続くパラメーターは、IP アドレス文字列または IP アドレス文字列のリストである必要があります。CIDR ブロックによるクエリはサポートされていません。ne, eq,
match-one,
all-not-match
remote_country_idHTTP リクエストの送信元 IP アドレスが属する国。ne, eq,
match-one,
all-not-match
remote_region_idHTTP リクエストの送信元 IP アドレスが属するリージョンまたは都市。ne, eq,
match-one,
all-not-match
request_methodHTTP リクエストメソッド。ne, eq,
match-one,
all-not-match
request_pathHTTP リクエスト URL (クエリ文字列を除く)。contain,
not-contain, ne, eq, match-one,
all-not-match, prefix-match, suffix-match
request_traceidリクエストを識別する一意の ID。ne, eq,
match-one,
all-not-match
rule_idルール ID。リクエストは複数のルールにヒットする場合があります。このフィールドでフィルターされたリクエストは、他のルールにもヒットしている可能性があります。ne, eq

レスポンスフィールド

フィールド

説明

object

The returned data. For a sample format, see the Examples section.

RequestId

string

The request ID.

D827FCFE-90A7-4330-9326-*****4C7726

SecurityEventTimeSeries

array<object>

The returned time series data. The operation can return time series data for multiple values.

object

A single set of time series data. The time series data consists of two arrays: `Timestamps` and `Values`. The `Timestamps` array contains a time series with fixed intervals. The `Values` array contains the statistical count for each interval. The two arrays have the same number of nodes, and their data points have a one-to-one correspondence.

Metric

string

The content of the returned data. This is consistent with the `Metric` request parameter.

monitored_requests

Timestamps

array

The time series. Each point represents the start time of a time range.

string

The start time for each data point. This is a UNIX timestamp string.

[]

Values

array

The data series. Each point represents the statistical count within a specific time range.

integer

The statistical count for the current time range.

[]

TimeSeriesMetaData

object

The metadata of the returned data.

DateRange

object

The time range used for the query.

StartDate

integer

The beginning of the time range to query. The value is a Unix timestamp. Unit: seconds. This value is the same as the value of StartDate in the request parameters.

1713888000

EndDate

integer

The end of the time range to query. The value is a Unix timestamp. Unit: seconds. This value is the same as the value of EndDate in the request parameters.

1713888600

AggregateInterval

string

The time granularity of each data point in the returned time series data. For example, "15m" indicates that each returned data point represents statistics for a 15-minute interval. For more information about the time granularity of the returned data, see the Time granularity of time series data points section.

1m

Units

string

The unit of the returned statistical data.

requests

時系列データポイントの時間の粒度

返されるデータの統計的な時間の粒度は、選択した時間範囲に基づいて異なります。

  • 時間範囲が 3 時間未満の場合、データポイントの時間の粒度は 1m (1 分) です。

  • 時間範囲が 3 時間以上 6 時間未満の場合、データポイントの時間の粒度は 5m (5 分) です。

  • 時間範囲が 6 時間以上 24 時間未満の場合、データポイントの時間の粒度は 15m (15 分) です。

  • 時間範囲が 24 時間以上 7 日未満の場合、データポイントの時間の粒度は 1h (1 時間) です。

  • 時間範囲が 7 日以上 30 日未満の場合、データポイントの時間の粒度は 1d (1 日) です。

成功レスポンス

JSONJSON

{
  "RequestId": "D827FCFE-90A7-4330-9326-*****4C7726\n",
  "SecurityEventTimeSeries": [
    {
      "Metric": "monitored_requests",
      "Timestamps": [
        "[]"
      ],
      "Values": [
        0
      ]
    }
  ],
  "TimeSeriesMetaData": {
    "DateRange": {
      "StartDate": 1713888000,
      "EndDate": 1713888600
    },
    "AggregateInterval": "1m",
    "Units": "requests\n"
  }
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 Waf.Report.%s Invalid parameter:%s.
400 Waf.Report.InternalError Server error occurred in report service.

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。