

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

# サービスジョブのプリエンプションイベント
<a name="batch-service-job-preemption-events"></a>

プリエンプションイベントは、プリエンプションシーケンスが開始または完了するたびに発行されます。開始イベントは、借用容量を再利用するためにプリエンプションが最初にトリガーされたときに作成されます。完了したイベントは、プリエンプションシーケンスが終了すると作成され、プリエンプションされた試行の概要が含まれます。

**Example サービスジョブのプリエンプション開始イベント**  
サービスジョブのプリエンプション開始イベントは、次の形式で配信されます。EventBridge パラメータの詳細については、*Amazon EventBridge ユーザーガイド*の[イベントとイベントパターン](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html)を参照してください。  

```
{
  "version": "0",
  "id": "1b4a511e-2737-226a-a1e7-fc97f1cd9681",
  "detail-type": "Batch Service Job Preemption Started",
  "source": "aws.batch",
  "account": "{{123456789012}}",
  "time": "2026-03-16T19:57:27Z",
  "region": "{{us-east-1}}",
  "resources": [
    "arn:aws:batch:{{us-east-1}}:{{123456789012}}:service-job/51f245a9-2995-4a53-bced-7b3c00028f84"
  ],
  "detail": {
    "statusReason": "PREEMPTION_IN_PROGRESS: Cross-share preemption triggered to reclaim borrowed capacity",
    "preemptedJobArn": "arn:aws:batch:{{us-east-1}}:{{123456789012}}:service-job/51f245a9-2995-4a53-bced-7b3c00028f84",
    "status": "RUNNING"
  }
}
```

**Example サービスジョブのプリエンプション完了イベント**  
サービスジョブのプリエンプションが完了したイベントは、次の形式で配信されます。`preemptionSummary` フィールドには、カウントや最新のプリエンプションされた試行情報など、プリエンプションされた試行に関する詳細が含まれます。  

```
{
  "version": "0",
  "id": "2b1c6151-c166-edf5-822c-211b3bfd46b2",
  "detail-type": "Batch Service Job Preemption Completed",
  "source": "aws.batch",
  "account": "{{123456789012}}",
  "time": "2026-03-16T19:57:47Z",
  "region": "{{us-east-1}}",
  "resources": [
    "arn:aws:batch:{{us-east-1}}:{{123456789012}}:service-job/51f245a9-2995-4a53-bced-7b3c00028f84"
  ],
  "detail": {
    "preemptedJobArn": "arn:aws:batch:{{us-east-1}}:{{123456789012}}:service-job/51f245a9-2995-4a53-bced-7b3c00028f84",
    "preemptionSummary": {
      "preemptedAttemptCount": 1,
      "recentPreemptedAttempts": [
        {
          "serviceResourceId": {
            "name": "TrainingJobArn",
            "value": "arn:aws:sagemaker:us-east-1:123456789012:training-job/AWSBatchqm-training-job9b2f08f911cf3dd794c1b3e72ae7ca5f"
          },
          "startedAt": 1773690923359,
          "stoppedAt": 1773691064669,
          "statusReason": "Cross-share preemption triggered to reclaim borrowed capacity"
        }
      ]
    },
    "status": "RUNNABLE"
  }
}
```