本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
使用 Amazon 监控回收站 EventBridge
回收站会向 Amazon 发送 EventBridge 针对保留规则执行操作的事件。使用 EventBridge,您可以建立规则,启动程序化操作以响应这些事件。例如,您可以创建一个 EventBridge 规则,当保留规则解锁并进入解锁延迟期限时,该规则会向您的电子邮件发送通知。有关更多信息,请参阅创建对事件做出反应的 Amazon EventBridge 规则。
中的事件以 EventBridge JSON对象的形式表示。事件特有的字段包含在JSON对象的detail
部分中。event
字段包含事件名称。result
字段包含启动事件的操作的已完成状态。有关更多信息,请参阅《亚马逊 EventBridge 用户指南》中的亚马逊 EventBridge 事件模式。
有关亚马逊的更多信息 EventBridge,请参阅什么是亚马逊 EventBridge? 在《亚马逊 EventBridge 用户指南》中。
RuleLocked
以下是成功锁定保留规则时回收站生成的事件示例。此事件可以由CreateRule和LockRule请求生成。api-name
字段中会记录生成事件的。API
{ "version": "0", "id": "exampleb-b491-4cf7-a9f1-bf370example", "detail-type": "Recycle Bin Rule Locked", "source": "aws.rbin", "account": "123456789012", "time": "2022-08-10T16:37:50Z", "region": "us-west-2", "resources": [ "arn:aws:rbin:us-west-2:123456789012:rule/a12345abcde" ], "detail": { "detail-version": " 1.0.0", "rule-id": "a12345abcde", "rule-description": "locked account level rule", "unlock-delay-period": "30 days", "api-name": "CreateRule" } }
RuleChangeAttempted
以下是回收站针对尝试修改或删除锁定规则失败生成的事件示例。此事件可以由DeleteRule和UpdateRule请求生成。api-name
字段中会记录生成事件的。API
{ "version": "0", "id": "exampleb-b491-4cf7-a9f1-bf370example", "detail-type": "Recycle Bin Rule Change Attempted", "source": "aws.rbin", "account": "123456789012", "time": "2022-08-10T16:37:50Z", "region": "us-west-2", "resources": [ "arn:aws:rbin:us-west-2:123456789012:rule/a12345abcde" ], "detail": { "detail-version": " 1.0.0", "rule-id": "a12345abcde", "rule-description": "locked account level rule", "unlock-delay-period": "30 days", "api-name": "DeleteRule" } }
RuleUnlockScheduled
以下是在解锁保留规则并且其解锁延迟期开始时回收站生成的事件示例。
{ "version": "0", "id": "exampleb-b491-4cf7-a9f1-bf370example", "detail-type": "Recycle Bin Rule Unlock Scheduled", "source": "aws.rbin", "account": "123456789012", "time": "2022-08-10T16:37:50Z", "region": "us-west-2", "resources": [ "arn:aws:rbin:us-west-2:123456789012:rule/a12345abcde" ], "detail": { "detail-version": " 1.0.0", "rule-id": "a12345abcde", "rule-description": "locked account level rule", "unlock-delay-period": "30 days", "scheduled-unlock-time": "2022-09-10T16:37:50Z", } }
RuleUnlockingNotice
以下是保留规则处于解锁延迟期,直到解锁延迟期到期前一天,回收站每天生成的事件示例。
{ "version": "0", "id": "exampleb-b491-4cf7-a9f1-bf370example", "detail-type": "Recycle Bin Rule Unlocking Notice", "source": "aws.rbin", "account": "123456789012", "time": "2022-08-10T16:37:50Z", "region": "us-west-2", "resources": [ "arn:aws:rbin:us-west-2:123456789012:rule/a12345abcde" ], "detail": { "detail-version": " 1.0.0", "rule-id": "a12345abcde", "rule-description": "locked account level rule", "unlock-delay-period": "30 days", "scheduled-unlock-time": "2022-09-10T16:37:50Z" } }
RuleUnlocked
以下是保留规则的解锁延迟期到期且可对保留规则进行修改或删除时,回收站生成的事件示例。
{ "version": "0", "id": "exampleb-b491-4cf7-a9f1-bf370example", "detail-type": "Recycle Bin Rule Unlocked", "source": "aws.rbin", "account": "123456789012", "time": "2022-08-10T16:37:50Z", "region": "us-west-2", "resources": [ "arn:aws:rbin:us-west-2:123456789012:rule/a12345abcde" ], "detail": { "detail-version": " 1.0.0", "rule-id": "a12345abcde", "rule-description": "locked account level rule", "unlock-delay-period": "30 days", "scheduled-unlock-time": "2022-09-10T16:37:50Z" } }