# DescribeDDosEventDetail

## 1. 接口描述

本接口(DescribeDDosEventDetail)用于获取攻击事件详情

## 2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

| 参数名称     | 必选 | 类型     | 描述        |
| -------- | -- | ------ | --------- |
| eventId  | 是  | String | 攻击事件唯一ID。 |
| regionId | 是  | String | 区域节点ID。   |

## 3. 响应结果

| 参数名称                  | 类型                                                                                                              | 描述                                                       |
| --------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| requestId             | String                                                                                                          | <p>唯一请求 ID。</p><p>每次请求都会返回。定位问题时需要提供该次请求的 requestId。</p> |
| eventId               | String                                                                                                          | 攻击事件唯一ID。                                                |
| status                | [DdosAttackStatus](https://docs.console.zenlayer.com/api-reference/cn/compute/datastructure#ddosattackstatus)   | 攻击状态。                                                    |
| type                  | [DdosProtectedType](https://docs.console.zenlayer.com/api-reference/cn/compute/datastructure#ddosprotectedtype) | 攻击类型。                                                    |
| ipAddress             | String                                                                                                          | 被攻击的IP。                                                  |
| protecting            | Boolean                                                                                                         | IP是否正在防护中。                                               |
| startTime             | String                                                                                                          | 攻击开始时间。                                                  |
| endTime               | String                                                                                                          | 攻击结束时间。                                                  |
| endBlackholeTime      | String                                                                                                          | 从黑洞解封时间。                                                 |
| attackBandwidthMax    | Float                                                                                                           | <p>攻击带宽峰值。</p><p>单位bps。</p>                              |
| protectedBandwidthMax | Float                                                                                                           | <p>防护带宽峰值。</p><p>单位bps。</p>                              |
| attackPackageMax      | Float                                                                                                           | <p>攻击峰值包速率。</p><p>单位pps。</p>                             |
| protectedPackageMax   | Float                                                                                                           | <p>防护峰值包速率。</p><p>单位pps。</p>                             |
| sourceIp              | Array of String                                                                                                 | 攻击来源IP。                                                  |
| sourcePort            | Array of [TopPort](https://docs.console.zenlayer.com/api-reference/cn/compute/datastructure#topport)            | 攻击来源端口。                                                  |
| desertionPort         | Array of [TopPort](https://docs.console.zenlayer.com/api-reference/cn/compute/datastructure#topport)            | 攻击目标端口。                                                  |

## 4. 代码示例

{% tabs %}
{% tab title="示例" %}
**1. 获取攻击事件详情**

```json
POST /api/v2/zec HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeDDosEventDetail
<Common Request Params>

Request：
{
    "eventId": "<eventId>",
    "regionId": "regionId"
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "eventId": "<eventId>",
    "status": "ATTACKING",
    "type": "DDOS",
    "ipAddress": "10.0.0.1",
    "protecting": true,
    "startTime": "2025-05-01T01:01:01Z",
    "endTime": "2025-05-01T01:01:01Z",
    "endBlackholeTime": "2025-05-01T01:01:01Z",
    "attackBandwidthMax": 2,
    "protectedBandwidthMax": 2,
    "attackPackageMax": 2,
    "protectedPackageMax": 2,
    "sourceIp": null,
    "sourcePort": null,
    "desertionPort": null
  }
}
```

{% endtab %}
{% endtabs %}

## 5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的[开发工具集（SDK）](https://docs.console.zenlayer.com/api-reference/cn/api-introduction/toolkit)，未来会陆续支持更多开发语言，方便快速接入和使用Zenlayer的产品和服务。

## 6. 错误码

下面包含业务逻辑中遇到的错误码，其他错误码见[公共错误码](https://docs.console.zenlayer.com/api-reference/cn/api-introduction/instruction/commonerrorcode)

| HTTP状态码 | 错误码                                      | 说明           |
| ------- | ---------------------------------------- | ------------ |
| 404     | INVALID\_REGION\_NOT\_FOUND              | 指定的可用区不存在。   |
| 404     | INVALID\_DDOS\_ATTACK\_EVENT\_NOT\_FOUND | DDoS攻击事件不存在。 |
