使用 Amazon 監控資源回收筒 EventBridge - Amazon EBS

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用 Amazon 監控資源回收筒 EventBridge

資源回收筒會將事件傳送至 Amazon EventBridge ,以便在保留規則上執行動作。使用 EventBridge,您可以建立規則來啟動程式設計動作以回應這些事件。例如,您可以建立規則,在保留 EventBridge 規則解除鎖定並進入其解除鎖定延遲期間時,將通知傳送至您的電子郵件。如需詳細資訊,請參閱建立對事件做出反應的 Amazon EventBridge 規則

中的事件 EventBridge 會以JSON物件表示。事件獨有的欄位包含在 JSON 物件的 detail區段中。event 欄位則包含事件名稱。result 欄位包含初始化事件之動作的完成狀態。如需詳細資訊,請參閱《Amazon 使用者指南》中的 Amazon EventBridge 事件模式 EventBridge

如需 Amazon 的詳細資訊 EventBridge,請參閱《Amazon 使用者指南》中的什麼是 Amazon EventBridge? EventBridge

RuleLocked

以下是成功鎖定保留規則時資源回收筒所產生之事件的範例。此事件可由 CreateRule LockRule請求產生。API 產生事件的 會記錄在 api-name 欄位中。

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

以下是資源回收筒因嘗試修改或刪除鎖定的規則失敗而產生的事件範例。此事件可由 DeleteRuleUpdateRule請求產生。API 產生事件的 會記錄在 api-name 欄位中。

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