

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

# 使用 Amazon 监控 HealthLake 事件 EventBridge
<a name="monitoring-eventbridge"></a>

Amazon EventBridge 是一项无服务器服务，它使用事件将应用程序组件连接在一起，使您可以更轻松地构建可扩展的事件驱动应用程序。的基础 EventBridge 是创建将[事件](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html)路由到[目标](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html)的[规则](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html)。 AWS HealthLake 提供对状态变化的持久传输 EventBridge。有关更多信息，请参阅[什么是亚马逊 EventBridge？](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html) 在《*亚马逊 EventBridge 用户指南》*中。

**注意**  
要了解如何向亚马逊发送 HealthLake 事件 EventBridge，请参阅 for *Industries* 博客 AWS HealthLake中的[AWS 亚马逊 EventBridge 集成](https://aws.amazon.com/blogs/industries/amazon-eventbridge-integration-for-aws-healthlake)。

**Topics**
+ [HealthLake 事件已发送至 EventBridge](#event-notifications-listing)
+ [HealthLake 事件结构](#event-notifications-structure)

## HealthLake 事件已发送至 EventBridge
<a name="event-notifications-listing"></a>

下表列出了发送 EventBridge 给处理的所有 HealthLake 事件。

<a name="event-notifications-table"></a>
<table>
<thead>
  <tr><th>HealthLake 事件类型</th><th>州</th></tr>
</thead>
<tbody>
  <tr><td colspan="2"> 数据存储事件 </td></tr>
  <tr><td>     创建数据存储</td><td>CREATING</td></tr>
  <tr><td>     数据存储处于活动状态</td><td>ACTIVE</td></tr>
  <tr><td>     正在删除数据存储</td><td>DELETING</td></tr>
  <tr><td>     数据存储已删除</td><td>DELETED</td></tr>
  <tr><td>     创建数据存储失败</td><td>CREATE\_FAILED</td></tr>
  <tr><td colspan="2">有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_DatastoreProperties.html#HealthLake-Type-DatastoreProperties-DatastoreStatus](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_DatastoreProperties.html#HealthLake-Type-DatastoreProperties-DatastoreStatus)。</td></tr>
  <tr><td colspan="2"> 导入作业事件 </td></tr>
  <tr><td>     导入 Job 已提交</td><td>SUBMITTED</td></tr>
  <tr><td>     正在导入 Job</td><td>IN\_PROGRESS</td></tr>
  <tr><td>     导入 Job 已完成但出现错误</td><td>COMPLETED\_WITH\_ERRORS</td></tr>
  <tr><td>     导入 Job 已完成</td><td>COMPLETED</td></tr>
  <tr><td>     导入 Job 失败</td><td>FAILED</td></tr>
  <tr><td colspan="2">有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ImportJobProperties.html#HealthLake-Type-ImportJobProperties-JobStatus](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ImportJobProperties.html#HealthLake-Type-ImportJobProperties-JobStatus)。</td></tr>
  <tr><td colspan="2"> 导出作业事件 </td></tr>
  <tr><td>     导出 Job 已提交</td><td>SUBMITTED</td></tr>
  <tr><td>     正在导出 Job</td><td>IN\_PROGRESS</td></tr>
  <tr><td>     导出 Job 已完成但出现错误</td><td>COMPLETED\_WITH\_ERRORS</td></tr>
  <tr><td>     导出 Job 已完成</td><td>COMPLETED</td></tr>
  <tr><td>     导出 Job 失败</td><td>FAILED</td></tr>
  <tr><td colspan="2">有关更多信息，请参阅《AWS HealthLake API Reference》**中的 [https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ExportJobProperties.html#HealthLake-Type-ExportJobProperties-JobStatus](https://docs.aws.amazon.com/healthlake/latest/APIReference/API_ExportJobProperties.html#HealthLake-Type-ExportJobProperties-JobStatus)。</td></tr>
</tbody>
</table>


## HealthLake 事件结构
<a name="event-notifications-structure"></a>

HealthLake 事件是具有 JSON 结构的对象，其中还包含元数据详细信息。您可以使用元数据作为输入来重新创建事件或了解更多信息。所有关联的元数据字段都列在以下菜单的代码示例下的表格中。有关更多信息，请参阅 *Amazon EventBridge 用户指南*中的[AWS 服务事件元数据](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html)。

**注意**  
要了解如何向亚马逊发送 HealthLake 事件 EventBridge，请参阅 for *Industries* 博客 AWS HealthLake中的[AWS 亚马逊 EventBridge 集成](https://aws.amazon.com/blogs/industries/amazon-eventbridge-integration-for-aws-healthlake)。

### 数据存储事件
<a name="event-notifications-data-store"></a>

------
#### [ Data Store Creating ]

**州-`CREATING`**

```
{
    "version": "0",
    "id": "514ad836-bb8a-4523-a10b-fa2756c3bdb0",
    "detail-type": "Data Store Creating",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T08:58:12Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "datastoreName": "your-data-store-name",
        "datastoreTypeVersion": "R4",
        "datastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/eeb8005725ae22b35b4edbdc68cf2dfd/r4/"
    }
}
```

------
#### [ Data Store Active ]

**州-`ACTIVE`**

```
{
    "version": "0",
    "id": "d57105bc-0d2d-4009-b34d-453e2567c599",
    "detail-type": "Data Store Active",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T09:16:51Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "datastoreName": "your-data-store-name",
        "datastoreTypeVersion": "R4",
        "datastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/eeb8005725ae22b35b4edbdc68cf2dfd/r4/"
    }
}
```

------
#### [ Data Store Deleting ]

**州-`DELETING`**

```
{
    "version": "0",
    "id": "d135ee1f-e14a-4730-8766-7b98f822c94a",
    "detail-type": "Data Store Deleting",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T12:44:47Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "datastoreName": "your-data-store-name",
        "datastoreTypeVersion": "R4",
        "datastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/eeb8005725ae22b35b4edbdc68cf2dfd/r4/"
    }
}
```

------
#### [ Data Store Deleted ]

**州-`DELETED`**

```
{
    "version": "0",
    "id": "6d880b86-e115-4947-81a9-494db704571a",
    "detail-type": "Data Store Deleted",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-05-12T12:58:03Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "datastoreName": "your-data-store-name",
        "datastoreTypeVersion": "R4",
        "datastoreEndpoint": "https://healthlake.us-east-1.amazonaws.com/datastore/eeb8005725ae22b35b4edbdc68cf2dfd/r4/"
    }
}
```

------


**数据存储事件-元数据描述**  

| Name | Type | 说明 | 
| --- | --- | --- | 
| version | 字符串 |  EventBridge 事件架构版本。 | 
| id | 字符串 | 为每个事件生成的版本 4 UUID。 | 
| detail-type | 字符串 | 正在发送的事件的类型。 | 
| source | 字符串 | 标识生成事件的服务。 | 
| account | 字符串 | 数据存储所有者的 12 位数 AWS 账户 ID。 | 
| time | 字符串 | 事件发生的时间。 | 
| region | 字符串 | 标识数据存储的 AWS 区域。 | 
| resources | 数组（字符串） | 包含数据存储的 ARN 的 JSON 数组。 | 
| detail | object | 包含关于事件信息的 JSON 对象。 | 
| detail.datastoreId | 字符串 | 与状态更改事件关联的数据存储 ID。 | 
| detail.datastoreName | 字符串 | 数据存储名称。 | 
| detail.datastoreTypeVersion | 字符串 | 数据存储 FHIR 版本。 | 
| detail.datastoreEndpoint | 字符串 | 数据存储端点。 | 

### 导入作业事件
<a name="event-notifications-import-jobs"></a>

------
#### [ Import Job Submitted ]

**州-`SUBMITTED`**

```
{
    "version": "0",
    "id": "25e606f7-800c-da41-45df-0e68587250c9",
    "detail-type": "Import Job Submitted",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T01:50:51Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "08c60716d6321710893ff88410e902c2",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "inputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/input/"
        }
    }
}
```

------
#### [ Import Job In Progress ]

**州-`IN_PROGRESS`**

```
{
    "version": "0",
    "id": "cc886b49-2737-19c4-7c4e-84ac9429ab73",
    "detail-type": "Import Job In Progress",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T01:51:23Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "08c60716d6321710893ff88410e902c2",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "inputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/input/"
        }
    }
}
```

------
#### [ Import Job Completed ]

**州-`COMPLETED`**

```
{
    "version": "0",
    "id": "36c865ef-da41-76ef-c882-3ba8dad8656b",
    "detail-type": "Import Job Completed",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T02:14:42Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "08c60716d6321710893ff88410e902c2",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "inputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/input/"
        }
    }
}
```

------
#### [ Import Job Completed With Errors ]

**州-`COMPLETED_WITH_ERRORS`**

```
{
    "version": "0",
    "id": "b61387d7-bffe-4f01-8291-65dc4be52cc1",
    "detail-type": "Import Job Completed With Errors",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T02:14:42Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "08c60716d6321710893ff88410e902c2",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "inputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/input/"
        }
    }
}
```

------
#### [ Import Job Failed ]

**州-`FAILED`**

```
{
    "version": "0",
    "id": "c4d65575-d1a7-4040-9c6c-c225bf6723c5",
    "detail-type": "Import Job Failed",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T02:14:42Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "08c60716d6321710893ff88410e902c2",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "inputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/input/"
        }
    }
}
```

------


**导入任务事件-元数据描述**  

| Name | Type | 说明 | 
| --- | --- | --- | 
| version | 字符串 |  EventBridge 事件架构版本。 | 
| id | 字符串 | 为每个事件生成的版本 4 UUID。 | 
| detail-type | 字符串 | 正在发送的事件的类型。 | 
| source | 字符串 | 标识生成事件的服务。 | 
| account | 字符串 | 数据存储所有者的 12 位数 AWS 账户 ID。 | 
| time | 字符串 | 事件发生的时间。 | 
| region | 字符串 | 标识数据存储的 AWS 区域。 | 
| resources | 数组（字符串） | 包含数据存储的 ARN 的 JSON 数组。 | 
| detail | object | 包含关于事件信息的 JSON 对象。 | 
| detail.jobId | 字符串 | 与状态更改事件关联的导入任务 ID。 | 
| detail.submitTime | 字符串 | 提交导入任务的时间。 | 
| detail.datastoreId | 字符串 | 生成状态更改事件的数据存储。 | 
| detail.inputDataConfig | 字符串 | 包含要导入的 FHIR 文件的 Amazon S3 存储桶的输入前缀路径。 | 

### 导出作业事件
<a name="event-notifications-export-jobs"></a>

------
#### [ Export Job Submitted ]

**州-`SUBMITTED`**

```
{
    "version": "0",
    "id": "f8af7d04-2221-4f02-a01a-6fc3ae403bab",
    "detail-type": "Export Job Submitted",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T01:50:51Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "45e899e545bf774710388260fc60b143",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "outputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/output/"
        }
    }
}
```

------
#### [ Export Job In Progress ]

**州-`IN_PROGRESS`**

```
{
    "version": "0",
    "id": "7bb7e39c-707d-4a83-8532-cee015299100",
    "detail-type": "Export Job In Progress",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T01:51:23Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "45e899e545bf774710388260fc60b143",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "outputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/output/"
        }
    }
}
```

------
#### [ Export Job Completed ]

**州-`COMPLETED`**

```
{
    "version": "0",
    "id": "d7629aa7-e63a-4b84-858c-96a62b57ebc8",
    "detail-type": "Export Job Completed",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T02:14:42Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "45e899e545bf774710388260fc60b143",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "outputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/output/"
        }
    }
}
```

------
#### [ Export Job Completed With Errors ]

**州-`COMPLETED_WITH_ERRORS`**

```
{
    "version": "0",
    "id": "5fa50bc5-50e3-4bc4-b66a-1b1d2f7b07a7",
    "detail-type": "Export Job Completed With Errors",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T02:14:42Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "45e899e545bf774710388260fc60b143",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "outputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/output/"
        }
    }
}
```

------
#### [ Export Job Failed ]

**州-`FAILED`**

```
{
    "version": "0",
    "id": "49fce45e-7e02-4846-8582-e7f19ca039cb",
    "detail-type": "Export Job Failed",
    "source": "aws.healthlake",
    "account": "123456789012",
    "time": "2023-12-08T02:14:42Z",
    "region": "us-east-1",
    "resources":
    [
        "arn:aws:healthlake:us-east-1:123456789012:datastore/fhir/eeb8005725ae22b35b4edbdc68cf2dfd"
    ],
    "detail":
    {
        "jobId": "45e899e545bf774710388260fc60b143",
        "submitTime": "2023-12-08T01:50:50.986Z",
        "datastoreId": "eeb8005725ae22b35b4edbdc68cf2dfd",
        "outputDataConfig":
        {
            "s3Uri": "s3://{{amzn-s3-demo-source-bucket}}/output/"
        }
    }
}
```

------


**导出作业事件-元数据描述**  

| Name | Type | 说明 | 
| --- | --- | --- | 
| version | 字符串 |  EventBridge 事件架构版本。 | 
| id | 字符串 | 为每个事件生成的版本 4 UUID。 | 
| detail-type | 字符串 | 正在发送的事件的类型。 | 
| source | 字符串 | 标识生成事件的服务。 | 
| account | 字符串 | 数据存储所有者的 12 位数 AWS 账户 ID。 | 
| time | 字符串 | 事件发生的时间。 | 
| region | 字符串 | 标识数据存储的 AWS 区域。 | 
| resources | 数组（字符串） | 包含数据存储的 ARN 的 JSON 数组。 | 
| detail | object | 包含关于事件信息的 JSON 对象。 | 
| detail.jobId | 字符串 | 与状态更改事件关联的导出任务 ID。 | 
| detail.submitTime | 字符串 | 提交导出任务的时间。 | 
| detail.datastoreId | 字符串 | 生成状态更改事件的数据存储。 | 
| detail.outputDataConfig | 字符串 | 包含要导出的 FHIR 文件的 Amazon S3 存储桶的输出前缀路径。 | 