

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon EventBridge での Amazon One Enterprise イベントのモニタリング
<a name="monitoring-events"></a>

EventBridge で Amazon One Enterprise イベントをモニタリングして、独自のアプリケーション、software-as-a-service (SaaS) アプリケーション、および AWS サービスからリアルタイムデータのストリームを配信できます。EventBridge は、そのデータを AWS Lambda や Amazon Simple Notification Service などのターゲットにルーティングします。これらのイベントは、 AWS リソースの変更を記述するシステムイベントのほぼリアルタイムのストリームを提供します。

## Amazon One Enterprise イベントをサブスクライブする
<a name="subscribe-device-status-events"></a>

Amazon One デバイスおよびユーザープロファイルのステータス変更イベントは EventBridge を使用して発行され、新しいルールを作成して EventBridge コンソールで有効にできます。イベントは順序付けされていませんが、データの使用に役立つタイムスタンプがあります。イベントは、[ベストエフォート](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html)ベースで出力されます。

**Amazon One Enterprise イベントをサブスクライブするには**

1. [https://console.aws.amazon.com/events/](https://console.aws.amazon.com/events/) で AWS コンソールにログインします。

1. [https://console.aws.amazon.com/events/](https://console.aws.amazon.com/events/) で EventBridge コンソールを開きます。

1. ナビゲーションペインの **[バス]** で、**[ルール]** を選択します。

1. **[‬ルールを作成]‭** を選択します。

1. **デフォルトルールの詳細**ページで、ルールに名前を割り当てます。

1. **[Rule with an event pattern]** (イベントパターンを持つルール) を選択してから、**[Next]** (次へ) を選択します。

1. **[イベントパターンを構築]** ページの **[イベントソース]** で、**[AWS イベントまたは EventBridge パートナーイベント]** が選択されていることを確認します。

1. **サンプルイベントタイプ**で、**AWS Events** を選択します。

1. **作成メソッド**で、**カスタムパターン**を選択します。

1. **イベントパターン**セクションで、イベントソースを `aws:one`とし、必要な detail-type を持つ JSON を追加します。

   ```
          "
          source": ["aws.one"],
          "detail-type": ["New Successful Enrollment", 
          "New Successful Un-enrollment",
          "Unsuccessful Enrollment", 
          "Unsuccessful Un-enrollment", 
          "Successful Recognition", 
          "Unsuccessful Recognition",
          "New Alert(s) Detected",
          "Some Alert(s) Cleared"]
          }
   ```

   上記のリストから必要な詳細タイプを選択し、不要なものを削除できます。

1. [**次へ**] を選択します。

1. Select **target (s)** ページで、Lambda 関数、SQS キュー、または SNS トピックを含む、任意のターゲットを選択します。ターゲットの設定の詳細については、[「Amazon EventBridge ターゲット](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html)」を参照してください。

   たとえば、誰かがいつクロックインするかを表示するには、**「Successful Recognition**」を選択します。次に、イベントの詳細 (付録を参照) を見て、誰がクロックインしたかを確認します。

   ワークフローを完了するには、外部 API または別のターゲットを実行できます。

1. 必要に応じて、タグを設定できます。

1. **[Review and create]** (確認して作成) ページで、**[Create rule]** (ルールの作成) を選択します。ルールの設定の詳細については、[EventBridge ユーザーガイド」の「EventBridge ルール](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html)」を参照してください。 EventBridge 

## デバイスステータス変更イベントタイプ
<a name="device-status-change-event-types"></a>

デバイスステータス変更イベントは JSON で生成されます。イベントタイプごとに、ルールで設定されているように、JSON ブロブが、選択したターゲットに送信されます。次の詳細タイプを使用できます。

**一部のアラート (複数可) がクリアされました**  
デバイスが 1 つ以上のヘルスチェックに合格しました。

**新しいアラート (複数可) が検出されました**  
デバイスが 1 つ以上のヘルスチェックに失敗しました。

**Topics**

**リソース**  
Device Status Change イベントが発行された deviceInstance arn のリストが含まれます。

**data**  
clearedAlerts  
+ deviceInstance が以前に失敗したヘルスチェックを表します。
+ アラートのタイプと reportedAt タイムスタンプの statusCode で構成されます。
+ statusCode の可能な値: NetworkDisconnected、USBDisconnected
currentAlerts  
+ deviceInstance の現在のステータスを表します。
+ アラートのタイプと reportedAt タイムスタンプの statusCode で構成されます。
+ statusCode の可能な値: NetworkDisconnected、USBDisconnected
newAlerts  
+ deviceInstance の新しく失敗したヘルスチェックを表します。
+ アラートのタイプと reportedAt タイムスタンプの statusCode で構成されます。
+ statusCode の可能な値: NetworkDisconnected、USBDisconnected
currentAlertsCount  
+ deviceInstance で現在失敗しているヘルスチェックの数。
assetTagId  
+ deviceInstance に関連付けられたデバイスの assetTagId。
deviceInstanceName  
+ Device Status Event が公開された deviceInstance の名前。
siteName  
+ deviceInstance が存在するサイトの名前。
siteArn  
+ deviceInstance が存在するサイトの Arn。

## ユーザープロファイルイベントタイプ
<a name="user-profile-event-types"></a>

ユーザープロファイル関連のイベントの詳細タイプは次のとおりです。

**新しい正常な登録**  
ユーザーが正常に登録されたとき。

**新しい正常な登録解除**  
ユーザーが正常に登録解除されたとき。

**失敗した登録**  
ユーザーが登録に失敗したとき。

**失敗した登録解除**  
ユーザーが登録解除に失敗したとき。

**認識の成功**  
ユーザーが手掌をスキャンして認証に成功したとき。

**失敗した認識**  
パルミネーションスキャンの認識に失敗したとき。

**Topics**

**リソース**  
ユーザープロファイルイベントが公開されたユーザープロファイル ARN のリストが含まれます。

**data**  
accountId  
+ リクエストを開始したデバイスの関連 AWS アカウント。
requestSource  
+ これは、リクエストを開始したデバイスの deviceInstanceId です。
createdTimestamp  
+ イベントの作成時刻。
userStatus  
+ ユーザーの現在のステータス。
+ 指定できる値: ACTIVE、DELETED
associatedId  
+ バッジ ID など、ユーザーの関連付けられた ID。
理由  
+ この値は、失敗したイベントに表示されます。これには、イベントが失敗した理由が含まれます。

## イベント例
<a name="sample-event"></a>

次の例は、Amazon One Enterprise のイベントを示しています。

**Topics**
+ [Amazon One Enterprise イベントをサブスクライブする](#subscribe-device-status-events)
+ [デバイスステータス変更イベントタイプ](#device-status-change-event-types)
+ [ユーザープロファイルイベントタイプ](#user-profile-event-types)
+ [イベント例](#sample-event)
+ [デバイスのヘルスステータスが正常に変更されました](#device-health-to-healthy)
+ [デバイスのヘルスステータスがクリティカルに変更されました](#device-health-to-critical)
+ [デバイス接続がオンラインに変更されました](#device-connectivity-to-online)
+ [デバイス接続がオフラインに変更されました](#device-connectivity-to-offline)

## デバイスのヘルスステータスが正常に変更されました
<a name="device-health-to-healthy"></a>

デバイスはすべてのヘルスチェックに合格しました。

```
{
        "version": "0",
        "id": "51e022b4-7ce6-34e0-264b-370948fc1123",
        "detail-type": "Some Alert(s) Cleared",
        "source": "aws.one",
        "account": "123456789012",
        "time": "2025-07-17T19:32:42Z",
        "region": "us-east-1",
        "resources":
        [
            "arn:aws:one:us-east-1:123456789012:deviceInstance/F5JRte5Jz21Tqx"
        ],
        "detail":
        {
            "version": "1.0.0",
            "data":
            {
                "clearedAlerts":
                [
                    {
                        "statusCode": "USBDisconnected",
                        "reportedAt": "Thu Jul 17 19:32:42 UTC 2025"
                    }
                ],
                "currentAlerts":
                [],
                "currentAlertsCount": 0,
                "assetTagId": "0000123456",
                "deviceInstanceName": "device_name",
                "siteName": "site_name",
                "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234"
            }
        }
      }
```

## デバイスのヘルスステータスがクリティカルに変更されました
<a name="device-health-to-critical"></a>

デバイスが 1 つ以上のヘルスチェックに失敗しました。

```
{
        "version": "0",
        "id": "07af4893-ef9f-965a-d245-3f0c8bd3c123",
        "detail-type": "New Alert(s) Detected",
        "source": "aws.one",
        "account": "123456789012",
        "time": "2025-07-17T19:26:58Z",
        "region": "us-east-1",
        "resources":
        [
            "arn:aws:one:us-east-1:123456789012:deviceInstance/12345678901234"
        ],
        "detail":
        {
            "version": "1.0.0",
            "data":
            {
                "newAlerts":
                [
                    {
                        "statusCode": "USBDisconnected",
                        "reportedAt": "Thu Jul 17 19:26:58 UTC 2025"
                    }
                ],
                "currentAlerts":
                [
                    {
                        "statusCode": "USBDisconnected",
                        "reportedAt": "Thu Jul 17 19:26:58 UTC 2025"
                    }
                ],
                "currentAlertsCount": 1,
                "assetTagId": "0000123456",
                "deviceInstanceName": "device_name",
                "siteName": "site_name",
                "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234"
            }
        }
      }
```

## デバイス接続がオンラインに変更されました
<a name="device-connectivity-to-online"></a>

これで、デバイスはインターネットに接続されました。

```
{
        "version": "0",
        "id": "e6ecea28-dd60-5061-29f8-dfbc902f4123",
        "detail-type": "Some Alert(s) Cleared",
        "source": "aws.one",
        "account": "123456789012",
        "time": "2025-07-17T18:28:23Z",
        "region": "us-east-1",
        "resources":
        [
            "arn:aws:one:us-east-1:123456789012:deviceInstance/12345678901234"
        ],
        "detail":
        {
            "version": "1.0.0",
            "data":
            {
                "clearedAlerts":
                [
                    {
                        "statusCode": "NetworkDisconnected",
                        "reportedAt": "Thu Jul 17 18:28:23 UTC 2025"
                    }
                ],
                "currentAlerts":
                [],
                "currentAlertsCount": 0,
                "assetTagId": "0000123456",
                "deviceInstanceName": "device_name",
                "siteName": "site_name",
                "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234"
            }
        }
      }
```

## デバイス接続がオフラインに変更されました
<a name="device-connectivity-to-offline"></a>

デバイスはインターネットに接続されなくなりました。

```
{
        "version": "0",
        "id": "e6ecea28-dd60-5061-29f8-dfbc902f4123",
        "detail-type": "New Alert(s) Detected",
        "source": "aws.one",
        "account": "123456789012",
        "time": "2025-07-17T18:28:23Z",
        "region": "us-east-1",
        "resources":
        [
            "arn:aws:one:us-east-1:123456789012:deviceInstance/12345678901234"
        ],
        "detail":
        {
            "version": "1.0.0",
            "data":
            {
                "newAlerts":
                [
                    {
                        "statusCode": "NetworkDisconnected",
                        "reportedAt": "Thu Jul 17 18:28:23 UTC 2025"
                    }
                ],
                "currentAlerts":
                [
                    {
                        "statusCode": "NetworkDisconnected",
                        "reportedAt": "Thu Jul 17 18:28:23 UTC 2025"
                    }
                ],
                "currentAlertsCount": 1,
                "assetTagId": "0000123456",
                "deviceInstanceName": "device_name",
                "siteName": "site_name",
                "siteArn": "arn:aws:one:us-east-1:123456789012:site/12345678901234"
            }
        }
      }
```