本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
服務任務佇列封鎖事件
每當 AWS Batch 偵測到封鎖佇列時,都會在 Amazon CloudWatch Events 中建立事件。封鎖佇列的原因可在 DescribeServiceJob
API 動作的 statusReason
欄位中取得。
範例 服務任務佇列封鎖事件
服務任務佇列封鎖事件會以下列格式交付。detail
區段類似 AWS Batch API 參考中 DescribeServiceJob API 操作傳回的回應。如需有關 EventBridge 參數的詳細資訊,請參閱 Amazon EventBridge 使用者指南中的事件和事件模式。
注意
事件 中不包含 tags
和 serviceRequestPayload
欄位detail
。
{
"version": "0",
"id": "c8f9c4b5-76e5-d76a-f980-7011e206042b",
"detail-type": "Batch Service Job Queue Blocked",
"source": "aws.batch",
"account": "123456789012
",
"time": "2022-01-11T23:36:40Z",
"region": "us-east-1
",
"resources": [
"arn:aws:batch:us-east-1
:123456789012
:service-job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8"
],
"detail": {
"attempts": [],
"createdAt": 1641944200058,
"jobArn": "arn:aws:batch:us-east-1
:123456789012
:service-job/4c7599ae-0a82-49aa-ba5a-4727fcce14a8",
"jobId": "6271dfdf-d8a7-41b1-a4d2-55a2224f5375",
"jobName": "event-test",
"jobQueue": "arn:aws:batch:us-east-1
:123456789012
:job-queue/HappyPathJobQueue",
"serviceJobType": "SAGEMAKER_TRAINING",
"status": "RUNNABLE",
"statusReason": "blocked-reason
",
"timeoutConfig": {
"attemptDurationSeconds": 60
}
}
}