

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

# 資源群組生命週期事件的結構和語法
<a name="monitor-groups-syntax"></a>

**Topics**
+ [`detail` 欄位的結構](monitor-groups-syntax-detail.md)
+ [不同使用案例的 EventBridge 自訂事件模式範例](monitor-groups-example-eventbridge-filters.md)

的生命週期事件採用下列一般格式的 [JSON](https://json.org) 物件字串 AWS Resource Groups 形式。

```
{
    "version": "0",
    "id": "08f00e24-2e30-ec44-b824-8acddf1ac868",
    "detail-type": "ResourceGroups Group ... Change",
    "source": "aws.resource-groups",
    "account": "123456789012",
    "time": "2020-09-29T09:59:01Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:resource-groups:us-east-1:123456789012:group/MyGroupName"
    ],
    "detail": {
        ...
    }
}
```

如需所有 Amazon EventBridge 事件通用欄位的詳細資訊，請參閱《[Amazon EventBridge 使用者指南](https://docs.aws.amazon.com//eventbridge/latest/userguide/aws-events.html)*》中的 Amazon EventBridge *事件。下表說明資源群組特有的詳細資訊。


| 欄位名稱 | Type | Description | 
| --- | --- | --- | 
| detail-type | String |  對於資源群組， `detail-type` 欄位一律是下列其中一個值： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/ARG/latest/userguide/monitor-groups-syntax.html)  | 
| source | String | 對於資源群組，此值一律為 "aws.resource-groups"。 | 
| resources | Amazon Resource Name (ARNs陣列 |  此欄位一律包含群組的 [Amazon 資源名稱 (ARN)](https://docs.aws.amazon.com//general/latest/gr/aws-arns-and-namespaces.html)，其中包含觸發此事件的變更。 如果適用，此欄位也可以包含從群組新增或移除的任何資源ARNs。  | 
|  `detail`  | JSON 物件字串 | 這是事件的承載。detail 欄位的內容會根據 的值而有所不同detail-type。[如需詳細資訊，請參閱下一節。](monitor-groups-syntax-detail.md) | 