本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
AWS DevOps 代理事件详细信息参考
来自 AWS 服务的事件具有通用的元数据字段source,包括detail-typeaccount、、region、和time。这些事件还包含一个包含特定于该服务的数据的detail字段。对于 AWS DevOps 代理事件,始终source为aws.aidevops,标detail-type识特定事件。
调查事件
以下detail-type值用于标识调查事件:
Investigation CreatedInvestigation Priority UpdatedInvestigation In ProgressInvestigation CompletedInvestigation FailedInvestigation Timed OutInvestigation CancelledInvestigation Pending TriageInvestigation LinkedInvestigation Skipped
下面包含source和detail-type字段,因为它们包含 AWS DevOps 代理事件的特定值。有关所有事件中包含的其他元数据字段的定义,请参阅 Amazon Events 参考中的 EventBridge 事件结构。
以下是调查事件的 JSON 结构。
{ . . ., "detail-type" : "string", "source" : "aws.aidevops", . . ., "detail" : { "version" : "string", "metadata" : { "agent_space_id" : "string", "task_id" : "string", "execution_id" : "string" }, "data" : { "task_type" : "string", "priority" : "string", "status" : "string", "created_at" : "string", "updated_at" : "string", "summary_record_id" : "string" } } }
detail-type标识事件的类型。对于调查事件,这是前面列出的事件名称之一。
source标识生成事件的服务。对于 AWS DevOps 代理事件,此值为aws.aidevops。
detail包含事件特定数据的 JSON 对象。该detail对象包括以下字段:
version(字符串)-事件详细信息的架构版本。目前1.0.0。metadata.agent_space_id(字符串)-事件起源的代理空间的唯一标识符。metadata.task_id(字符串)-任务的唯一标识符。metadata.execution_id(字符串)-执行运行的唯一标识符。当调查被指派执行死刑时在场。data.task_type(字符串)-任务的类型。值:INVESTIGATION。data.priority(字符串)-优先级。值:CRITICAL、HIGH、MEDIUM、LOW、MINIMAL。data.status(字符串)-当前状态。值:PENDING_START、IN_PROGRESS、COMPLETED、FAILED、、TIMED_OUT、CANCELLED、PENDING_TRIAGE、LINKED、SKIPPED。data.created_at(字符串)— 创建任务时的 ISO 8601 时间戳。data.updated_at(字符串)— 上次更新任务时的 ISO 8601 时间戳。data.summary_record_id(字符串)-包含调查结果的摘要记录的标识符。在为已完成的调查生成摘要时包括在内。您可以通过 AWS DevOps 代理 API 检索摘要内容,方法是使用此标识符来查找记录类型为的日记记录investigation_summary_md。
示例:调查已完成事件
{ "version": "0", "id": "12345678-1234-1234-1234-123456789015", "detail-type": "Investigation Completed", "source": "aws.aidevops", "account": "123456789012", "time": "2026-03-12T18:10:00Z", "region": "us-east-1", "resources": [ "arn:aws:aidevops:us-east-1:123456789012:agentspace/8f6187a7-0388-4926-8217-3a0fe32f757c" ], "detail": { "version": "1.0.0", "metadata": { "agent_space_id": "8f6187a7-0388-4926-8217-3a0fe32f757c", "task_id": "a1b2c3d4-5678-90ab-cdef-example11111", "execution_id": "b2c3d4e5-6789-01ab-cdef-example22222" }, "data": { "task_type": "INVESTIGATION", "priority": "CRITICAL", "status": "COMPLETED", "created_at": "2026-03-12T18:00:00Z", "updated_at": "2026-03-12T18:10:00Z", "summary_record_id": "d4e5f6g7-6789-01ab-cdef-example44444" } } }
示例:调查失败事件
{ "version": "0", "id": "12345678-1234-1234-1234-123456789016", "detail-type": "Investigation Failed", "source": "aws.aidevops", "account": "123456789012", "time": "2026-03-12T18:10:00Z", "region": "us-east-1", "resources": [ "arn:aws:aidevops:us-east-1:123456789012:agentspace/8f6187a7-0388-4926-8217-3a0fe32f757c" ], "detail": { "version": "1.0.0", "metadata": { "agent_space_id": "8f6187a7-0388-4926-8217-3a0fe32f757c", "task_id": "a1b2c3d4-5678-90ab-cdef-example11111", "execution_id": "b2c3d4e5-6789-01ab-cdef-example22222" }, "data": { "task_type": "INVESTIGATION", "priority": "CRITICAL", "status": "FAILED", "created_at": "2026-03-12T18:00:00Z", "updated_at": "2026-03-12T18:10:00Z" } } }
缓解事件
以下detail-type值用于标识缓解事件:
Mitigation In ProgressMitigation CompletedMitigation FailedMitigation Timed OutMitigation Cancelled
下面包含source和detail-type字段,因为它们包含 AWS DevOps 代理事件的特定值。有关所有事件中包含的其他元数据字段的定义,请参阅 Amazon Events 参考中的 EventBridge 事件结构。
以下是缓解事件的 JSON 结构。
{ . . ., "detail-type" : "string", "source" : "aws.aidevops", . . ., "detail" : { "version" : "string", "metadata" : { "agent_space_id" : "string", "task_id" : "string", "execution_id" : "string" }, "data" : { "task_type" : "string", "priority" : "string", "status" : "string", "created_at" : "string", "updated_at" : "string", "summary_record_id" : "string" } } }
detail-type标识事件的类型。对于缓解事件,这是前面列出的事件名称之一。
source标识生成事件的服务。对于 AWS DevOps 代理事件,此值为aws.aidevops。
detail包含事件特定数据的 JSON 对象。该detail对象包括以下字段:
version(字符串)-事件详细信息的架构版本。目前1.0.0。metadata.agent_space_id(字符串)-事件起源的代理空间的唯一标识符。metadata.task_id(字符串)-任务的唯一标识符。metadata.execution_id(字符串)-执行运行的唯一标识符。在为缓解措施分配执行时出现。data.task_type(字符串)-任务的类型。值:INVESTIGATION。data.priority(字符串)-优先级。值:CRITICAL、HIGH、MEDIUM、LOW、MINIMAL。data.status(字符串)-当前状态。值:IN_PROGRESS、COMPLETED、FAILED、TIMED_OUT、CANCELLED。data.created_at(字符串)— 创建任务时的 ISO 8601 时间戳。data.updated_at(字符串)— 上次更新任务时的 ISO 8601 时间戳。data.summary_record_id(字符串)-包含缓解结果的摘要记录的标识符。在为已完成的缓解措施生成摘要时包括在内。您可以通过 AWS DevOps 代理 API 检索摘要内容,方法是使用此标识符来查找记录类型为的日记记录mitigation_summary_md。
示例:缓解已完成事件
{ "version": "0", "id": "12345678-1234-1234-1234-12345678901c", "detail-type": "Mitigation Completed", "source": "aws.aidevops", "account": "123456789012", "time": "2026-03-12T18:20:00Z", "region": "us-east-1", "resources": [ "arn:aws:aidevops:us-east-1:123456789012:agentspace/8f6187a7-0388-4926-8217-3a0fe32f757c" ], "detail": { "version": "1.0.0", "metadata": { "agent_space_id": "8f6187a7-0388-4926-8217-3a0fe32f757c", "task_id": "a1b2c3d4-5678-90ab-cdef-example11111", "execution_id": "c3d4e5f6-7890-12ab-cdef-example33333" }, "data": { "task_type": "INVESTIGATION", "priority": "CRITICAL", "status": "COMPLETED", "created_at": "2026-03-12T18:00:00Z", "updated_at": "2026-03-12T18:20:00Z", "summary_record_id": "e5f6g7h8-7890-12ab-cdef-example55555" } } }
示例:缓解失败事件
{ "version": "0", "id": "12345678-1234-1234-1234-12345678901d", "detail-type": "Mitigation Failed", "source": "aws.aidevops", "account": "123456789012", "time": "2026-03-12T18:20:00Z", "region": "us-east-1", "resources": [ "arn:aws:aidevops:us-east-1:123456789012:agentspace/8f6187a7-0388-4926-8217-3a0fe32f757c" ], "detail": { "version": "1.0.0", "metadata": { "agent_space_id": "8f6187a7-0388-4926-8217-3a0fe32f757c", "task_id": "a1b2c3d4-5678-90ab-cdef-example11111", "execution_id": "c3d4e5f6-7890-12ab-cdef-example33333" }, "data": { "task_type": "INVESTIGATION", "priority": "CRITICAL", "status": "FAILED", "created_at": "2026-03-12T18:00:00Z", "updated_at": "2026-03-12T18:20:00Z" } } }