View a markdown version of this page

AWS DevOps 代理事件详细信息参考 - AWS DevOps 代理人

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

AWS DevOps 代理事件详细信息参考

来自 AWS 服务的事件具有常见的元数据字段source,包括detail-typeaccount、、region、和time。这些事件还包含一个包含特定于该服务的数据的detail字段。对于 AWS DevOps 代理事件,始终source是aws.aidevops,标detail-type识特定事件。

该time字段是上次更新调查或缓解措施的时间。现在不是 EventBridge 收到活动的时间。中没有值detail的字段将被省略而不是设置为null。因此,必须将metadata.execution_id和data.summary_record_id视为可选。

调查事件

以下detail-type值标识调查事件:

  • Investigation Created

  • Investigation Priority Updated

  • Investigation In Progress

  • Investigation Completed

  • Investigation Failed

  • Investigation Timed Out

  • Investigation Cancelled

  • Investigation Pending Triage

  • Investigation Linked

  • Investigation Skipped

下面包含source和detail-type字段,因为它们包含 AWS DevOps 代理事件的特定值。有关所有事件中包含的其他元数据字段的定义,请参阅《亚马逊事件参考》中的 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(字符串)— 包含调查结果的简要记录的标识符。在为处决编写简要记录时包括在内,否则省略,包括在已完成但没有提供摘要的调查中。该事件不包含摘要文本。要读取该值,请ListJournalRecords使用事件的 metadata.agent_space_id and metadata.execution_id、a recordType 调用investigation_summary_md,然后选择与该值recordId匹配的返回记录。有关检索摘要的更多信息,请参阅检索调查或缓解摘要。

示例:调查已完成事件

{ "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 Progress

  • Mitigation Completed

  • Mitigation Failed

  • Mitigation Timed Out

  • Mitigation Cancelled

下面包含source和detail-type字段,因为它们包含 AWS DevOps 代理事件的特定值。有关所有事件中包含的其他元数据字段的定义,请参阅《亚马逊事件参考》中的 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(字符串)— 包含缓解结果的摘要记录的标识符。在为执行编写简要记录时包括在内,否则省略,包括已完成但未生成摘要的缓解措施。该事件不包含摘要文本。按照调查事件ListJournalRecords中所述,使用 o recordType f 进行检索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" } } }