關於庫存事件的 EventBridge 監控 - AWS Systems Manager

關於庫存事件的 EventBridge 監控

您可以在 Amazon EventBridge 中設定規則以建立回應 AWS Systems Manager 庫存資源狀態變更的事件。EventBridge 支援下列庫存狀態變更的事件。盡可能傳送所有事件。

已刪除特定執行個體的自訂庫存類型:如果規則設定為監控此事件,則 EventBridge 會在刪除特定受管執行個體上的自訂庫存類型時建立事件。EventBridge 會針對每個自訂庫存類型的每個節點傳送一個事件。以下是範例事件模式。

{ "timestampMillis": 1610042981103, "source": "SSM", "account": "123456789012", "type": "INVENTORY_RESOURCE_STATE_CHANGE", "startTime": "Jan 7, 2021 6:09:41 PM", "resources": [ { "arn": "arn:aws:ssm:us-east-1:123456789012:managed-instance/i-12345678" } ], "body": { "action-status": "succeeded", "action": "delete", "resource-type": "managed-instance", "resource-id": "i-12345678", "action-reason": "", "type-name": "Custom:MyCustomInventoryType" } }

已刪除所有執行個體的自訂庫存類型:如果規則設定為監控此事件,則 EventBridge 會在刪除所有受管節點上的自訂庫存類型時建立事件。以下是範例事件模式。

{ "timestampMillis": 1610042904712, "source": "SSM", "account": "123456789012", "type": "INVENTORY_RESOURCE_STATE_CHANGE", "startTime": "Jan 7, 2021 6:08:24 PM", "resources": [ ], "body": { "action-status": "succeeded", "action": "delete-summary", "resource-type": "managed-instance", "resource-id": "", "action-reason": "The delete for type name Custom:SomeCustomInventoryType was completed. The deletion summary is: {\"totalCount\":1,\"remainingCount\":0,\"summaryItems\":[{\"version\":\"1.1\",\"count\":1,\"remainingCount\":0}]}", "type-name": "Custom:MyCustomInventoryType" } }

PutInventory 使用舊的結構描述版本事件進行呼叫:如果規則設定為監控此事件時,則 EventBridge 會在 PutInventory 進行呼叫時建立事件,使用低於目前結構描述之版本的結構描述版本。此事件適用於所有庫存類型。以下是範例事件模式。

{ "timestampMillis": 1610042629548, "source": "SSM", "account": "123456789012", "type": "INVENTORY_RESOURCE_STATE_CHANGE", "startTime": "Jan 7, 2021 6:03:49 PM", "resources": [ { "arn": "arn:aws:ssm:us-east-1:123456789012:managed-instance/i-12345678" } ], "body": { "action-status": "failed", "action": "put", "resource-type": "managed-instance", "resource-id": "i-01f017c1b2efbe2bc", "action-reason": "The inventory item with type name Custom:MyCustomInventoryType was sent with a disabled schema verison 1.0. You must send a version greater than 1.0", "type-name": "Custom:MyCustomInventoryType" } }

如需如何將 EventBridge 設定為監控這些事件的詳細資訊,請參閱 為 Systems Manager 事件設定 EventBridge