本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
資源回收筒會將事件傳送至 Amazon EventBridge,以便針對保留規則執行的動作。使用 EventBridge,您可建立可初始化程式設計動作的規則,以便回應這些事件。例如,您可以建立 EventBridge 規則,即在保留規則解除鎖定且進入解除鎖定延遲期間時,傳送通知至您的電子郵件。如需詳細資訊,請參閱建立回應事件的 Amazon EventBridge 規則。
EventBridge 中的事件以 JSON 物件表示。事件的獨特欄位會包含在 JSON 物件的 detail
區段中。event
欄位則包含事件名稱。result
欄位包含初始化事件之動作的完成狀態。如需詳細資訊,請參閱「Amazon EventBridge 使用者指南」中的「Amazon EventBridge 事件模式」。
如需 Amazon EventBridge 的詳細資訊,請參閱 Amazon EventBridge 使用者指南中的什麼是 Amazon 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
以下是資源回收筒因嘗試修改或刪除鎖定的規則失敗而產生的事件範例。此事件可以由 DeleteRule 和 UpdateRule 請求產生。產生事件的 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"
}
}