

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Transfer Family 事件详情参考
<a name="events-detail-reference"></a>

来自 AWS 服务的所有事件都有一组公共字段，其中包含有关该事件的元数据。这些元数据可以包括作为事件来源的 AWS 服务、事件的生成时间、事件发生的账户和区域等。有关这些常规字段的定义，请参阅《Amazon EventBridge 用户指南》**中的[事件结构参考](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html)。

此外，每个事件都有一个 `detail` 字段，其中包该特定事件专有的数据。以下参考定义了各种 Transfer Family 事件的详细信息字段。

使用 EventBridge 选择和管理 Transfer Family 事件时，请考虑以下几点：
+ 来自的所有事件的`source`字段均设置 Transfer Family 为`aws.transfer`。
+ `detail-type` 字段指定事件类型。

  例如 `FTP Server File Download Completed`。
+ `detail` 字段包含该特定事件专有的数据。

有关如何构造使规则能够匹配 Transfer Family 事件的事件模式的信息，请参阅《Amazon EventBridge 用户指南》**中的[事件模式](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html)。

有关事件及其 EventBridge 处理方式的更多信息，请参阅《*Amazon EventBridge 用户指南*》中的[Amazon EventBridge 事件](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html)。

**Topics**
+ [SFTP、FTPS 和 FTP 服务器事件](#event-detail-server-events)
+ [SFTP 连接器事件](#event-detail-sftp-connector-events)
+ [AS2 事件](#event-detail-as2-server-events)

## SFTP、FTPS 和 FTP 服务器事件
<a name="event-detail-server-events"></a>

以下是 SFTP、FTPS 和 FTP 服务器事件的详细信息字段：
+ FTP 服务器目录创建已完成
+ 创建 FTP 服务器目录失败
+ FTP 服务器目录删除已完成
+ 删除 FTP 服务器目录失败
+ FTP 服务器文件删除已完成
+ FTP 服务器文件删除失败
+ FTP 服务器文件下载已完成
+ FTP 服务器文件下载失败
+ FTP 服务器文件重命名已完成
+ FTP 服务器文件重命名失败
+ FTP 服务器文件上传已完成
+ FTP 服务器文件上传失败
+ FTPS 服务器目录创建已完成
+ 创建 FTPS 服务器目录失败
+ FTPS 服务器目录删除已完成
+ 删除 FTPS 服务器目录失败
+ FTPS 服务器文件删除已完成
+ 删除 FTPS 服务器文件失败
+ FTPS 服务器文件下载已完成
+ FTPS 服务器文件下载失败
+ FTPS 服务器文件重命名已完成
+ FTPS 服务器文件重命名失败
+ FTPS 服务器文件上传已完成
+ FTPS 服务器文件上传失败
+ SFTP 服务器目录创建已完成
+ 创建 SFTP 服务器目录失败
+ SFTP 服务器目录删除已完成
+ 删除 SFTP 服务器目录失败
+ SFTP 服务器文件删除已完成
+ 删除 SFTP 服务器文件失败
+ SFTP 服务器文件下载已完成
+ SFTP 服务器文件下载失败
+ SFTP 服务器文件重命名已完成
+ SFTP 服务器文件重命名失败
+ SFTP 服务器文件上传已完成
+ SFTP 服务器文件上传失败

下面包含`source`和`detail-type`字段，因为它们包含 Transfer Family 事件的特定值。有关所有事件中包含的其他元数据字段的定义，请参阅*Amazon EventBridge 用户指南*中的[事件结构参考](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html)。

```
{
  . . .,
  "detail-type": "string",
  "source": "aws.transfer",
  . . .,
  "detail": {
    "failure-code" : "string",
    "status-code" : "string",
    "protocol" : "string",
    "bytes" : "number",
    "client-ip" : "string",
    "failure-message" : "string",
    "end-timestamp" : "string",
    "etag" : "string",
    "file-path" : "string",
    "original-file-path" : "string",
    "renamed-file-path" : "string",
    "directory-path" : "string",
    "server-id" : "string",
    "username" : "string",
    "session-id" : "string",
    "start-timestamp" : "string"
  }
}
```

`detail-type`  <a name="event-detail-server-events-detail-type"></a>
标识事件的类型。  
对于此事件，该值是先前列出的 SFTP、FTPS 或 FTP 服务器事件名称之一。

`source`  <a name="event-detail-server-events-source"></a>
标识生成事件的服务。对于 Transfer Family 事件，此值为`aws.transfer`。

`detail`  <a name="sftp-server-detail"></a>
包含关于事件信息的 JSON 对象。生成事件的服务决定该字段的内容。  
对于此事件，数据包括以下内容：    
`failure-code`  <a name="sftp-server-failure-code"></a>
传输失败原因的类别。值：`PARTIAL_UPLOAD | PARTIAL_DOWNLOAD | UNKNOWN_ERROR`  
`status-code`  <a name="sftp-server-status-code"></a>
传输是否成功。价值观：`COMPLETED | FAILED`。  
`protocol`  <a name="sftp-server-protocol"></a>
用于传输的协议。值：`SFTP | FTPS | FTP`  
`bytes`  <a name="sftp-server-bytes"></a>
传输的字节数。  
`client-ip`  <a name="sftp-server-client-ip"></a>
参与传输的客户端 IP 地址  
`failure-message`  <a name="sftp-server-failure-message"></a>
对于失败的传输，提供传输失败原因的详细信息。  
`end-timestamp`  <a name="sftp-server-end-timestamp"></a>
对于成功传输，是指文件处理完毕的时间戳。  
`etag`  <a name="sftp-server-etag"></a>
实体标签（仅用于 Amazon S3 文件）。  
`file-path`  <a name="sftp-server-file-path"></a>
正在传输、删除或以其他方式操作的文件的路径。  
`original-file-path`  <a name="sftp-server-original-file-path"></a>
对于文件重命名事件，指重命名前文件的原始路径。  
`renamed-file-path`  <a name="sftp-server-renamed-file-path"></a>
对于文件重命名事件，指重命名后文件的新路径。  
`directory-path`  <a name="sftp-server-directory-path"></a>
对于目录创建和删除事件，指目录的路径。  
`server-id`  <a name="sftp-server-server-id"></a>
Transfer Family 服务器的唯一 ID。  
`username`  <a name="sftp-server-username"></a>
正在执行转移的用户。  
`session-id`  <a name="sftp-server-session-id"></a>
传输会话的唯一标识符。  
`start-timestamp`  <a name="sftp-server-start-timestamp"></a>
对于成功传输，指文件处理开始时间的时间戳。

**Example SFTP 服务器文件下载失败示例事件**  <a name="event-detail-server-events.example"></a>
以下示例显示了在 SFTP 服务器上下载失败的事件（Amazon EFS 是否正在使用存储空间）。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "SFTP Server File Download Failed",
    "source": "aws.transfer",
    "account": "958412138249",
    "time": "2024-01-29T17:20:27Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:958412138249:server/s-1234abcd5678efghi"
    ],
    "detail": {
        "failure-code": "PARTIAL_DOWNLOAD",
        "status-code": "FAILED",
        "protocol": "SFTP",
        "bytes": 4100,
        "client-ip": "IP-address",
        "failure-message": "File was partially downloaded.",
        "end-timestamp": "2024-01-29T17:20:27.749749117Z",
        "file-path": "/fs-1234abcd5678efghi/user0/test-file",
        "server-id": "s-1234abcd5678efghi",
        "username": "test",
        "session-id": "session-ID",
        "start-timestamp": "2024-01-29T17:20:16.706282454Z"
    }
}
```

**Example FTP 服务器文件上传已完成示例事件**  <a name="event-detail-server-events.example"></a>
以下示例显示了在 FTP 服务器上成功完成上传的事件（Amazon S3 是否正在使用存储空间）。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "FTP Server File Upload Completed",
    "source": "aws.transfer",
    "account": "958412138249",
    "time": "2024-01-29T16:31:43Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:958412138249:server/s-1111aaaa2222bbbb3"
    ],
    "detail": {
        "status-code": "COMPLETED",
        "protocol": "FTP",
        "bytes": 1048576,
        "client-ip": "10.0.0.141",
        "end-timestamp": "2024-01-29T16:31:43.311866408Z",
        "etag": "b6d81b360a5672d80c27430f39153e2c",
        "file-path": "/amzn-s3-demo-bucket/test/1mb_file",
        "server-id": "s-1111aaaa2222bbbb3",
        "username": "test",
        "session-id": "event-ID",
        "start-timestamp": "2024-01-29T16:31:42.462088327Z"
    }
}
```

**Example SFTP 服务器文件删除已完成示例事件**  <a name="event-detail-server-events.example"></a>
以下示例显示了在 SFTP 服务器上成功删除文件的事件。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "SFTP Server File Delete Completed",
    "source": "aws.transfer",
    "account": "958412138249",
    "time": "2025-05-15T14:30:27Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:958412138249:server/s-1234abcd5678efghi"
    ],
    "detail": {
        "status-code": "COMPLETED",
        "protocol": "SFTP",
        "client-ip": "IP-address",
        "end-timestamp": "2025-05-15T14:30:27.749749117Z",
        "file-path": "/fs-1234abcd5678efghi/user0/test-file-to-delete.txt",
        "server-id": "s-1234abcd5678efghi",
        "username": "test",
        "session-id": "session-ID",
        "start-timestamp": "2025-05-15T14:30:26.706282454Z"
    }
}
```

**Example SFTP 服务器文件重命名已完成示例事件**  <a name="event-detail-server-events.example"></a>
以下示例显示了在 SFTP 服务器上成功重命名文件的事件。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "SFTP Server File Rename Completed",
    "source": "aws.transfer",
    "account": "958412138249",
    "time": "2025-05-15T15:45:12Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:958412138249:server/s-1234abcd5678efghi"
    ],
    "detail": {
        "status-code": "COMPLETED",
        "protocol": "SFTP",
        "client-ip": "IP-address",
        "end-timestamp": "2025-05-15T15:45:12.749749117Z",
        "original-file-path": "/fs-1234abcd5678efghi/user0/old-filename.txt",
        "renamed-file-path": "/fs-1234abcd5678efghi/user0/new-filename.txt",
        "server-id": "s-1234abcd5678efghi",
        "username": "test",
        "session-id": "session-ID",
        "start-timestamp": "2025-05-15T15:45:11.706282454Z"
    }
}
```

**Example SFTP 服务器目录创建已完成示例事件**  <a name="event-detail-server-events.example"></a>
以下示例显示了在 SFTP 服务器上成功创建目录的事件。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "SFTP Server Directory Create Completed",
    "source": "aws.transfer",
    "account": "958412138249",
    "time": "2025-05-15T16:20:05Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:958412138249:server/s-1234abcd5678efghi"
    ],
    "detail": {
        "status-code": "COMPLETED",
        "protocol": "SFTP",
        "client-ip": "IP-address",
        "end-timestamp": "2025-05-15T16:20:05.749749117Z",
        "directory-path": "/fs-1234abcd5678efghi/user0/new-directory",
        "server-id": "s-1234abcd5678efghi",
        "username": "test",
        "session-id": "session-ID",
        "start-timestamp": "2025-05-15T16:20:04.706282454Z"
    }
}
```

## SFTP 连接器事件
<a name="event-detail-sftp-connector-events"></a>

**注意**  
这些事件按持久级别传送，如《*Amazon EventBridge 事件参考*》中[AWS 服务事件的交付级别](https://docs.aws.amazon.com/eventbridge/latest/ref/event-delivery-level.html)中所述。 EventBridge 

以下是 SFTP 连接器事件的详细信息字段：
+ SFTP 连接器文件发送已完成
+ SFTP 连接器文件发送失败
+ SFTP 连接器文件检索已完成
+ 检索 SFTP 连接器文件失败
+ SFTP 连接器目录列表已完成
+ SFTP 连接器目录列表失败
+ SFTP 连接器远程移动已完成
+ SFTP 连接器远程移动失败
+ SFTP 连接器远程删除已完成
+ SFTP 连接器远程删除失败

下面包含`source`和`detail-type`字段，因为它们包含 Transfer Family 事件的特定值。有关所有事件中包含的其他元数据字段的定义，请参阅*Amazon EventBridge 用户指南*中的[事件结构参考](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html)。

```
{
  . . .,
  "detail-type": "string",
  "source": "aws.transfer",
  . . .,
  "detail": {
    "operation" : "string",
    "max-items" : "number",
    "connector-id" : "string",
    "output-directory-path" : "string",
    "listing-id" : "string",
    "transfer-id" : "string",
    "file-transfer-id" : "string",
    "url" : "string",
    "file-path" : "string",
    "status-code" : "string",
    "failure-code" : "string",
    "failure-message" : "string",
    "start-timestamp" : "string",
    "end-timestamp" : "string",
    "local-directory-path" : "string",
    "remote-directory-path" : "string"
    "item-count" : "number"
    "truncated" : "boolean"
    "bytes" : "number",
    "egress-type" : "string",
    "vpc-lattice-resource-configuration-arn" : "string",
    "vpc-lattice-port-number" : "number",
    "local-file-location" : {
      "domain" : "string",
      "bucket" : "string",
      "key" : "string"
    },
    "output-file-location" : {
      "domain" : "string",
      "bucket" : "string",
      "key" : "string"
    }
  }
}
```

`detail-type`  <a name="event-detail-sftp-connector-events-detail-type"></a>
标识事件的类型。  
对于此事件，该值是先前列出的 SFTP 连接器事件名称之一。

`source`  <a name="event-detail-sftp-connector-events-source"></a>
标识生成事件的服务。对于 Transfer Family 事件，此值为`aws.transfer`。

`detail`  <a name="sftp-connector-detail"></a>
包含关于事件信息的 JSON 对象。生成事件的服务决定了该字段的内容。  
对于此事件，数据包括以下内容：    
`max-items`  <a name="sftp-connector-max-items"></a>
要返回的最大 directory/file 名字数。  
`operation`  <a name="sftp-connector-operation"></a>
`StartFileTransfer`请求是发送文件还是检索文件。价值观：`SEND|RETRIEVE`。  
`connector-id`  <a name="sftp-connector-connector-id"></a>
正在使用的 SFTP 连接器的唯一标识符。  
`output-directory-path`  <a name="sftp-connector-output-directory-path"></a>
Amazon S3 中存储 file/directory 列表结果的路径（存储桶和前缀）。  
`listing-id`  <a name="sftp-connector-listing-id"></a>
`StartDirectoryListing`API 操作的唯一标识符。此标识符可用于检查 CloudWatch 日志，以查看上市请求的状态。  
`transfer-id`  <a name="sftp-connector-transfer-id"></a>
传输事件（`StartFileTransfer`请求）的唯一标识符。  
`file-transfer-id`  <a name="sftp-connector-file-transfer-id"></a>
正在传输的文件的唯一标识符。  
`url`  <a name="sftp-connector-url"></a>
合作伙伴 AS2 或 SFTP 终端节点的网址。  
`file-path`  <a name="sftp-connector-file-path"></a>
正在发送或检索的位置和文件。  
`status-code`  <a name="sftp-connector-status-code"></a>
传输是否成功。价值观：`FAILED | COMPLETED`。  
`failure-code`  <a name="sftp-connector-failure-code"></a>
对于失败的传输，则为转移失败的原因代码。  
`failure-message`  <a name="sftp-connector-failure-message"></a>
对于失败的传输，提供传输失败原因的详细信息。  
`start-timestamp`  <a name="sftp-connector-start-timestamp"></a>
对于成功传输，指文件处理开始时间的时间戳。  
`end-timestamp`  <a name="sftp-connector-end-timestamp"></a>
对于成功传输，指文件处理完成的时间戳。  
`local-directory-path`  <a name="sftp-connector-local-directory-path"></a>
对于`RETRIEVE`请求，指存放检索到文件的位置。  
`remote-directory-path`  <a name="sftp-connector-remote-directory-path"></a>
对于`SEND`请求，指将文件放在合作伙伴的 SFTP 服务器上的文件目录。这是用户传递给`StartFileTransfer`请求`RemoteDirectoryPath`的的值。您可以在合作伙伴的 SFTP 服务器上指定默认目录。如果是，则此字段为空。  
`item-count`  <a name="sftp-connector-item-count"></a>
为列出请求返回的项目（目录和文件）的数量。  
`truncated`  <a name="sftp-connector-truncated"></a>
列表输出是否包含远程目录中包含的所有项目。  
`bytes`  <a name="sftp-connector-bytes"></a>
正在传输的字节数。对于失败的传输，该值为 0。  
`egress-type`  <a name="sftp-connector-egress-type"></a>
连接器的出口配置类型。值：`SERVICE_MANAGED`或`VPC_LATTICE`。  
`vpc-lattice-resource-configuration-arn`  <a name="sftp-connector-vpc-lattice-resource-configuration-arn"></a>
定义目标 SFTP 服务器位置的 VPC\$1LATTICE 资源配置的 ARN。对于服务管理的连接器，此字段为空。  
`vpc-lattice-port-number`  <a name="sftp-connector-vpc-lattice-port-number"></a>
用于通过 VPC\$1LATTICE 连接到 SFTP 服务器的端口号。  
`local-file-location`  <a name="sftp-connector-local-file-location"></a>
此参数包含 AWS 存储文件位置的详细信息。    
`domain`  <a name="sftp-connector-domain"></a>
正在使用的存储空间。目前，唯一的值是`S3`。  
`bucket`  <a name="sftp-connector-bucket"></a>
Amazon S3 中对象的容器。  
`key`  <a name="sftp-connector-key"></a>
在 Amazon S3 中为对象分配的名称。  
`output-file-location`  <a name="sftp-connector-output-file-location"></a>
此参数包含存储目录列表结果的 AWS 存储位置的详细信息。    
`domain`  <a name="sftp-connector-output-domain"></a>
正在使用的存储空间。目前，唯一的值是`S3`。  
`bucket`  <a name="sftp-connector-output-bucket"></a>
Amazon S3 中对象的容器。  
`key`  <a name="sftp-connector-output-key"></a>
在 Amazon S3 中为对象分配的名称。

**Example SFTP 连接器文件发送失败示例事件**  <a name="event-detail-sftp-connector-events.example"></a>
以下示例显示了尝试向远程 SFTP 服务器发送文件时 SFTP 连接器出现故障的事件。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "SFTP Connector File Send Failed",
    "source": "aws.transfer",
    "account": "123456789012",
    "time": "2024-01-24T19:30:45Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:123456789012:connector/c-f1111aaaa2222bbbb3"
    ],
    "detail": {
        "operation": "SEND",
        "connector-id": "c-f1111aaaa2222bbbb3",
        "transfer-id": "transfer-ID",
        "file-transfer-id": "file-transfer-ID",
        "url": "sftp://s-21a23456789012a.server.transfer.us-east-1.amazonaws.com",
        "file-path": "/amzn-s3-demo-bucket/testfile.txt",
        "status-code": "FAILED",
        "failure-code": "CONNECTION_ERROR",
        "failure-message": "Unknown Host",
        "remote-directory-path": "",
        "bytes": 0,
        "start-timestamp": "2024-01-24T18:29:33.658729Z",
        "end-timestamp": "2024-01-24T18:29:33.993196Z",
        "local-file-location": {
            "domain": "S3",
            "bucket": "amzn-s3-demo-bucket",
            "key": "testfile.txt"
        }
    }
}
```

**Example SFTP 连接器文件检索已完成示例事件**  <a name="event-detail-sftp-connector-events.example"></a>
以下示例显示了一个事件，其中 SFTP 连接器成功检索了从远程 SFTP 服务器发送的文件。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "SFTP Connector File Retrieve Completed",
    "source": "aws.transfer",
    "account": "123456789012",
    "time": "2024-01-24T18:28:08Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:123456789012:connector/c-f1111aaaa2222bbbb3"
    ],
    "detail": {
        "operation": "RETRIEVE",
        "connector-id": "c-fc68000012345aa18",
        "transfer-id": "file-transfer-ID",
        "file-transfer-id": "file-transfer-ID",
        "url": "sftp://s-21a23456789012a.server.transfer.us-east-1.amazonaws.com",
        "file-path": "testfile.txt",
        "status-code": "COMPLETED",
        "local-directory-path": "/amzn-s3-demo-bucket",
        "bytes": 63533,
        "start-timestamp": "2024-01-24T18:28:07.632388Z",
        "end-timestamp": "2024-01-24T18:28:07.774898Z",
        "local-file-location": {
            "domain": "S3",
            "bucket": "amzn-s3-demo-bucket",
            "key": "testfile.txt"
        }
    }
}
```

**Example SFTP 连接器目录列表已完成示例事件**  <a name="event-detail-sftp-connector-events.example"></a>
以下示例显示了一个事件，在该事件中，启动目录列表调用从远程 SFTP 服务器检索到列表文件。  

```
{
    "version": "0",
    "id": "event-ID",
    "detail-type": "SFTP Connector Directory Listing Completed",
    "source": "aws.transfer",
    "account": "123456789012",
    "time": "2024-01-24T18:28:08Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:transfer:us-east-1:123456789012:connector/c-f1111aaaa2222bbbb3"
    ],
    "detail": {
        "max-items": 10000,
        "connector-id": "c-fc68000012345aa18",
        "output-directory-path": "/amzn-s3-demo-bucket/example/file-listing-output",
        "listing-id": "123456-23aa-7980-abc1-1a2b3c4d5e",
        "url": "sftp://s-21a23456789012a.server.transfer.us-east-1.amazonaws.com",        
        "status-code": "COMPLETED",
        "remote-directory-path": "/home",
        "item-count": 10000,
        "truncated": true,
        "start-timestamp": "2024-01-24T18:28:07.632388Z",
        "end-timestamp": "2024-01-24T18:28:07.774898Z",
        "output-file-location": {
            "domain": "S3",
            "bucket": "amzn-s3-demo-bucket",
            "key": "c-fc1ab90fd0d047e7a-70987273-49nn-4006-bab1-1a7290cc412ba.json"
        }
    }
}
```

## AS2 事件
<a name="event-detail-as2-server-events"></a>

**注意**  
这些事件按持久级别传送，如《*Amazon EventBridge 事件参考*》中[AWS 服务事件的交付级别](https://docs.aws.amazon.com/eventbridge/latest/ref/event-delivery-level.html)中所述。 EventBridge 

以下是 AS2 事件的详细信息字段：
+ AS2 有效载荷接收已完成
+ AS2 有效载荷接收失败
+ AS2 有效载荷发送已完成
+ AS2 有效载荷发送失败
+ AS2 MDN 接收已完成
+ AS2 MDN 接收失败
+ AS2 MDN 发送已完成
+ AS2 MDN 发送失败

下面包含`source`和`detail-type`字段，因为它们包含 Transfer Family 事件的特定值。有关所有事件中包含的其他元数据字段的定义，请参阅*Amazon EventBridge 用户指南*中的[事件结构参考](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html)。

```
{
   . . .,
  "detail-type": "string",
  "source": "aws.transfer",
  . . .,
  "detail": {    
    "s3-attributes" : {
      "file-bucket" : "string",
      "file-key" : "string",
      "json-bucket" : "string",
      "json-key" : "string", 
      "mdn-bucket" : "string",
      "mdn-key" : "string"
      }
    "mdn-subject" : "string",
    "mdn-message-id" : "string",
    "disposition" : "string",
    "bytes" : "number",
    "as2-from" : "string",
    "as2-message-id" : "string",
    "as2-to" : "string",
    "connector-id" : "string",
    "client-ip" : "string",
    "agreement-id" : "string",
    "server-id" : "string",
    "requester-file-name" : "string",
    "message-subject" : "string",
    "start-timestamp" : "string",
    "end-timestamp" : "string",
    "status-code" : "string",
    "failure-code" : "string",
    "failure-message" : "string",
    "transfer-id" : "string"
  }
}
```

`detail-type`  <a name="event-detail-as2-server-events-detail-type"></a>
标识事件的类型。  
对于此事件，该值是前面列出 AS2 的事件之一。

`source`  <a name="event-detail-as2-server-events-source"></a>
标识生成事件的服务。对于 Transfer Family 事件，此值为`aws.transfer`。

`detail`  <a name="as2-server-detail"></a>
包含关于事件信息的 JSON 对象。生成事件的服务决定该字段的内容。    
`s3-attributes`  <a name="as2-server-s3-attributes"></a>
识别正在传输的文件的 Amazon S3 存储桶和密钥。对于 MDN 事件，它还会识别 MDN 文件的存储桶和密钥。    
`file-bucket`  <a name="as2-server-s3-file-bucket"></a>
Amazon S3 中对象的容器。  
`file-key`  <a name="as2-server-s3-file-key"></a>
在 Amazon S3 中为对象分配的名称。  
`json-bucket`  <a name="as2-server-s3-json-bucket"></a>
对于已完成或失败的传输，为 JSON 文件的容器。  
`json-key`  <a name="as2-server-s3-json-key"></a>
对于已完成或失败的传输，指在 Amazon S3 中分配给 JSON 文件的名称。  
`mdn-bucket`  <a name="as2-server-s3-mdn-bucket"></a>
对于 MDN 事件，是 MDN 文件的容器。  
`mdn-key`  <a name="as2-server-s3-mdn-key"></a>
对于 MDN 事件，指在 Amazon S3 中分配给 MDN 文件的名称。  
`mdn-subject`  <a name="as2-server-mdn-subject"></a>
对于 MDN 事件，是消息处理的文本描述。  
`mdn-message-id`  <a name="as2-server-mdn-message-id"></a>
对于 MDN 事件，是 MDN 消息的唯一 ID。  
`disposition`  <a name="as2-server-disposition"></a>
对于 MDN 事件，指处置类别。  
`bytes`  <a name="as2-server-bytes"></a>
消息中的字节数。  
`as2-from`  <a name="as2-server-as2-from"></a>
发送消息的 AS2 贸易伙伴。  
`as2-message-id`  <a name="as2-server-as2-message-id"></a>
正在传输的 AS2 消息的唯一标识符。  
`as2-to`  <a name="as2-server-as2-to"></a>
正在接收消息的 AS2 贸易伙伴。  
`connector-id`  <a name="as2-server-connector-id"></a>
对于从 Transfer Family 服务器发送给贸易伙伴的 AS2 消息，使用 AS2 连接器的唯一标识符。  
`client-ip`  <a name="as2-server-client-ip"></a>
对于服务器事件（从交易伙伴向 Transfer Family 服务器转账），是指参与转移的客户的 IP 地址。  
`agreement-id`  <a name="as2-server-agreement-id"></a>
对于服务器事件，是 AS2协议的唯一标识符。  
`server-id`  <a name="as2-server-server-id"></a>
对于服务器事件，仅适用于 Transfer Family 服务器的唯一 ID。  
`requester-file-name`  <a name="as2-server-requester-file-name"></a>
对于负载事件，指传输期间收到的文件的原始名称。  
`message-subject`  <a name="as2-server-message-subject"></a>
消息主题的文字描述。  
`start-timestamp`  <a name="as2-server-start-timestamp"></a>
对于成功传输，指文件处理开始时间的时间戳。  
`end-timestamp`  <a name="as2-server-end-timestamp"></a>
对于成功传输，指文件处理完成的时间戳。  
`status-code`  <a name="as2-server-status-code"></a>
与 AS2 消息传输过程的状态相对应的代码。有效值：`COMPLETED | FAILED | PROCESSING`。  
`failure-code`  <a name="as2-server-failure-code"></a>
对于失败的传输，指传输失败原因的类别。  
`failure-message`  <a name="as2-server-failure-message"></a>
对于失败的传输，提供传输失败原因的详细信息。  
`transfer-id`  <a name="as2-server-transfer-id"></a>
转账事件的唯一标识符。

**Example AS2 Payload 接收已完成示例事件**  <a name="event-detail-as2-server-events.example"></a>

```
{
    "version": "0",
     "id": "event-ID",
    "detail-type": "AS2 Payload Receive Completed",
    "source": "aws.transfer",
    "account": "076722215406",
    "time": "2024-02-07T06:47:05Z",
    "region": "us-east-1",
    "resources": ["arn:aws:transfer:us-east-1:076722215406:connector/c-1111aaaa2222bbbb3"],
    "detail": {
        "s3-attributes": {
            "file-key": "/inbound/processed/testAs2Message.dat",
            "file-bucket": "amzn-s3-demo-bucket"
        },
        "client-ip": "client-IP-address",
        "requester-file-name": "testAs2MessageVerifyFile.dat",
        "end-timestamp": "2024-02-07T06:47:06.040031Z",
        "as2-from": "as2-from-ID",
        "as2-message-id": "as2-message-ID",
        "message-subject": "Message from AS2 tests",
        "start-timestamp": "2024-02-07T06:47:05.410Z",
        "status-code": "PROCESSING",
        "bytes": 63,
        "as2-to": "as2-to-ID",
        "agreement-id": "a-1111aaaa2222bbbb3",
        "server-id": "s-1234abcd5678efghi"
    }
}
```

**Example AS2 MDN 接收失败示例事件**  <a name="event-detail-as2-server-events.example"></a>

```
{
  "version": "0",
  "id": "event-ID",
  "detail-type": "AS2 MDN Receive Failed",
  "source": "aws.transfer",
  "account": "889901007463",
  "time": "2024-02-06T22:05:09Z",
  "region": "us-east-1",
  "resources": ["arn:aws:transfer:us-east-1:076722215406:server/s-1111aaaa2222bbbb3"],
  "detail": {      
      "mdn-subject": "Your Requested MDN Response re: Test run from Id 123456789abcde to partner ijklmnop987654",
      "s3-attributes": {
          "json-bucket": "amzn-s3-demo-bucket1",
          "file-key": "/as2Integ/TestOutboundWrongCert.dat",
          "file-bucket": "amzn-s3-demo-bucket2",
          "json-key": "/as2Integ/failed/TestOutboundWrongCert.dat.json"
      },
      "mdn-message-id": "MDN-message-ID",
      "end-timestamp": "2024-02-06T22:05:09.479878Z",
      "as2-from": "PartnerA",
      "as2-message-id": "as2-message-ID",
      "connector-id": "c-1234abcd5678efghj",
      "message-subject": "Test run from Id 123456789abcde to partner ijklmnop987654",
      "start-timestamp": "2024-02-06T22:05:03Z",
      "failure-code": "VERIFICATION_FAILED_NO_MATCHING_KEY_FOUND",
      "status-code": "FAILED",
      "as2-to": "MyCompany",
      "failure-message": "No public certificate matching message signature could be found in profile: p-1234abcd5678efghj",
      "transfer-id": "transfer-ID"
  }
}
```