

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

# Amazon EventBridge 事件詳細資訊參考
<a name="event-reference"></a>

EventBridge 本身會發出下列事件。這些事件會自動傳送至預設事件匯流排，就像任何其他 AWS 服務一樣。

如需所有事件中包含的中繼資料欄位定義，請參閱 [AWS 事件參考中的服務事件中繼資料](https://docs.aws.amazon.com/eventbridge/latest/ref/events-structure.html)。 **


| 事件詳細資訊類型 | Description | 
| --- | --- | 
|   [排程事件](#event-detail-scheduled-event)   |  代表排程的事件。 | 
|   [已建立結構描述](#event-detail-schema-created)   |  代表建立新事件結構描述。 | 
|   [已建立結構描述版本](#event-detail-schema-version-created)   |  代表建立新版本的新或現有事件結構描述。  | 
|   [連線狀態事件](#event-detail-connection-state)   |  代表連線狀態的變更。  | 
|   [API 目的地狀態事件](#event-detail-api-destination-state)   |  代表 API 目的地狀態的變更。  | 

## 排程事件
<a name="event-reference-schedules"></a>

EventBridge 會將下列排程事件傳送至預設事件匯流排。如需詳細資訊，請參閱[排程器](using-eventbridge-scheduler.md)。

### 排程事件
<a name="event-detail-scheduled-event"></a>

代表排程的事件。

包含 `source`和 `detail-type` 欄位，因為它們包含 EventBridge 事件的特定值。如需所有事件中包含的其他中繼資料欄位的定義，請參閱 [AWS 事件參考中的服務事件中繼資料](https://docs.aws.amazon.com/eventbridge/latest/ref/events-structure.html)。 **

```
{
  . . .,
  "detail-type": "Scheduled Event",
  "source": "aws.events",
  . . .,
  "detail": {}
}
```

`detail-type`  <a name="scheduled-event-detail-type"></a>
識別事件的類型。  
對於此事件，此值為 `Scheduled Event`。  
必要：是

`source`  <a name="scheduled-event-source"></a>
識別產生事件的服務。對於 EventBridge 事件，此值為 `aws.events`。  
必要：是

`detail`  <a name="scheduled-event-detail"></a>
包含事件相關資訊的 JSON 物件。產生事件的服務會決定此欄位的內容。  
必要：是  
此物件中沒有`Scheduled Event`事件的必要欄位。

**Example 排程事件範例**  <a name="event-detail-scheduled-event.example"></a>

```
{
  "version": "0",
  "id": "89d1a02d-5ec7-412e-82f5-13505f849b41",
  "detail-type": "Scheduled Event",
  "source": "aws.events",
  "account": "123456789012",
  "time": "2016-12-30T18:44:49Z",
  "region": "us-east-1",
  "resources": ["arn:aws:events:us-east-1:123456789012:rule/SampleRule"],
  "detail": {}
}
```

## 結構描述登錄檔事件
<a name="event-reference-schemas"></a>

EventBridge 會將下列結構描述登錄事件傳送至預設事件匯流排。如需詳細資訊，請參閱[](eb-schema.md)。

### 已建立結構描述
<a name="event-detail-schema-created"></a>

代表建立新結構描述。

建立結構描述時， 會同時 EventBridge 傳送 `Schema Created`和 `Schema Version Created`事件。

包含 `source`和 `detail-type` 欄位，因為它們包含 EventBridge 事件的特定值。如需所有事件中包含的其他中繼資料欄位的定義，請參閱 [AWS 事件參考中的服務事件中繼資料](https://docs.aws.amazon.com/eventbridge/latest/ref/events-structure.html)。 **

```
{
  . . .,
  "detail-type": "Schema Created",
  "source": "aws.schemas",
  . . .,
  "detail": {
    "SchemaName" : "String",
    "SchemaType" : "String",
    "RegistryName" : "String",
    "CreationDate" : "DateTime",
    "Version" : "Number"
  }
}
```

`detail-type`  <a name="schema-created-detail-type"></a>
識別事件的類型。  
對於此事件，此值為 `Schema Created`。  
必要：是

`source`  <a name="schema-created-source"></a>
識別產生事件的服務。對於 EventBridge 事件，此值為 `aws.schemas`。  
必要：是

`detail`  <a name="schema-created-detail"></a>
包含事件相關資訊的 JSON 物件。產生事件的服務會決定此欄位的內容。  
必要：是  
對於此事件，此資料包含：    
`SchemaName`  <a name="schema-created-schema-name"></a>
結構描述的名稱。  
必要：是  
`SchemaType`  <a name="schema-created-schema-type"></a>
結構描述的類型。  
有效值：`OpenApi3` \$1 `JSONSchemaDraft4`  
必要：是  
`RegistryName`  <a name="schema-created-registry-name"></a>
包含結構描述的登錄檔的名稱。  
必要：是  
`CreationDate`  <a name="schema-created-creation-date"></a>
建立結構描述的日期。  
必要：是  
`Version`  <a name="schema-created-version"></a>
此結構描述的版本。  
對於 `Schema Created` 事件，此值一律為 `1`。  
必要：是

**Example 已建立的結構描述事件範例**  <a name="event-detail-schema-created.example"></a>

```
{
  "version": "0",
  "id": "01234567-0123-0123-0123-012345678901",
  "detail-type": "Schema Created",
  "source": "aws.schemas",
  "account": "123456789012",
  "time": "2019-05-31T21:49:54Z",
  "region": "us-east-1",
  "resources": ["arn:aws:schemas:us-east-1::schema/myRegistry/mySchema"],
  "detail": {
    "SchemaName": "mySchema",
    "SchemaType": "OpenApi3",
    "RegistryName": "myRegistry",
    "CreationDate": "2019-11-29T20:08:55Z",
    "Version": "1"
  }
}
```

### 已建立結構描述版本
<a name="event-detail-schema-version-created"></a>

代表建立新版本的新或現有事件結構描述。

建立結構描述時， 會同時 EventBridge 傳送 `Schema Created`和 `Schema Version Created`事件。

包含 `source`和 `detail-type` 欄位，因為它們包含 EventBridge 事件的特定值。如需所有事件中包含的其他中繼資料欄位的定義，請參閱 [AWS 事件參考中的服務事件中繼資料](https://docs.aws.amazon.com/eventbridge/latest/ref/events-structure.html)。 **

```
{
  . . .,
  "detail-type": "Schema Version Created",
  "source": "aws.schemas",
  . . .,
  "detail": {
    "SchemaName" : "String",
    "SchemaType" : "String",
    "RegistryName" : "String",
    "CreationDate" : "DateTime",
    "Version" : "Number"
  }
}
```

`detail-type`  <a name="schema-version-created-detail-type"></a>
識別事件的類型。  
對於此事件，此值為 `Schema Version Created`。  
必要：是

`source`  <a name="schema-version-created-source"></a>
識別產生事件的服務。對於 EventBridge 事件，此值為 `aws.schemas`。  
必要：是

`detail`  <a name="schema-version-created-detail"></a>
包含事件相關資訊的 JSON 物件。產生事件的服務會決定此欄位的內容。  
必要：是  
對於此事件，此資料包含：    
`SchemaName`  <a name="schema-version-created-schema-name"></a>
結構描述的名稱。  
必要：是  
`SchemaType`  <a name="schema-version-created-schema-type"></a>
結構描述的類型。  
有效值：`OpenApi3` \$1 `JSONSchemaDraft4`  
必要：是  
`RegistryName`  <a name="schema-version-created-registry-name"></a>
包含結構描述的登錄檔的名稱。  
必要：是  
`CreationDate`  <a name="schema-version-created-creation-date"></a>
建立結構描述版本的日期。  
必要：是  
`Version`  <a name="schema-version-created-version"></a>
此結構描述的版本。  
必要：是

**Example 已建立的結構描述版本事件範例**  <a name="event-detail-schema-version-created.example"></a>

```
{
  "version": "0",
  "id": "01234567-0123-0123-0123-012345678901",
  "detail-type": "Schema Version Created",
  "source": "aws.schemas",
  "account": "123456789012",
  "time": "2019-05-31T21:49:54Z",
  "region": "us-east-1",
  "resources": ["arn:aws:schemas:us-east-1::schema/myRegistry/mySchema"],
  "detail": {
    "SchemaName": "mySchema",
    "SchemaType": "OpenApi3",
    "RegistryName": "myRegistry",
    "CreationDate": "2019-11-29T20:08:55Z",
    "Version": "5"
  }
}
```

## 連線事件
<a name="event-reference-connections"></a>

EventBridge 會將下列連線事件傳送至預設事件匯流排。如需詳細資訊，請參閱[連線](eb-target-connection.md)。

### 連線狀態事件
<a name="event-detail-connection-state"></a>

這些事件各自代表新連線或現有連線的狀態變更。

包含 `source`和 `detail-type` 欄位，因為它們包含 EventBridge 事件的特定值。如需所有事件中包含的其他中繼資料欄位的定義，請參閱 [AWS 事件參考中的服務事件中繼資料](https://docs.aws.amazon.com/eventbridge/latest/ref/events-structure.html)。 **

```
{
  . . .,
  "detail-type": "Connection status",
  "source": "aws.events",
  . . .,
  "detail": {
    "ConnectionName" : "String",
    "StateReason" : "String",
    "Timestamp" : "DateTime"
  }
}
```

`detail-type`  <a name="connection-state-detail-type"></a>
識別事件的類型。  
對於此事件，此值為下列其中一項：  
+ `Connection Creation Started`
+ `Connection Update Started`
+ `Connection Deletion Started`
+ `Connection Activated`
+ `Connection Authorized`
+ `Connection Authorization Started`
+ `Connection Deauthorization Started`
+ `Connection Deauthorized`
+ `Connection Failed Connectivity`
必要：是

`source`  <a name="connection-state-source"></a>
識別產生事件的服務。對於 EventBridge 事件，此值為 `aws.events`。  
必要：是

`detail`  <a name="connection-state-detail"></a>
包含事件相關資訊的 JSON 物件。產生事件的服務會決定此欄位的內容。  
必要：是  
對於此事件，此資料包含：    
`ConnectionName`  <a name="connection-state-connection-name"></a>
連線的名稱。  
必要：是  
`StateReason`  <a name="connection-state-state-reason"></a>
連線狀態變更的原因。  
必要：否  
`Timestamp`  <a name="connection-state-timestamp"></a>
連線狀態變更的時間和日期。  
必要：是

**Example 連線狀態事件範例**  <a name="event-detail-connection-state.example"></a>

```
{
    "version": "0",
    "id": "1d7a4ac6-a50a-745f-a331-a0d802f7badb",
    "detail-type": "Connection Creation Started",
    "source": "aws.events",
    "account": "123456789012",
    "time": "2024-10-28T09:08:20Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:events:us-east-1:123456789012:connection/sample-connection/ee7e4d52-8df0-4bed-a0d5-fa7dea43fcf8"
    ],
    "detail": {
        "ConnectionName": "sample-connection",
        "Timestamp": "2024-10-24 09:26:35 +0000 UTC"
    }
}
```

## API 目的地事件
<a name="event-reference-api-destinations"></a>

EventBridge 會將下列 API 目的地事件傳送至預設事件匯流排。如需詳細資訊，請參閱[API 目的地](eb-api-destinations.md)。

### API 目的地狀態事件
<a name="event-detail-api-destination-state"></a>

這些事件各自代表 API 目的地的狀態變更。

包含 `source`和 `detail-type` 欄位，因為它們包含 EventBridge 事件的特定值。如需所有事件中包含的其他中繼資料欄位的定義，請參閱 [AWS 事件參考中的服務事件中繼資料](https://docs.aws.amazon.com/eventbridge/latest/ref/events-structure.html)。 **

```
{
  . . .,
  "detail-type": "API Destination status",
  "source": "aws.events",
  . . .,
  "detail": {
    "ApiDestinationName" : "String",
    "Timestamp" : "DateTime"
  }
}
```

`detail-type`  <a name="api-destination-state-detail-type"></a>
識別事件的類型。  
對於此事件，此值為下列其中一項：  
+ `API Destination Activated`
+ `API Destination Deactivated`
必要：是

`source`  <a name="api-destination-state-source"></a>
識別產生事件的服務。對於 EventBridge 事件，此值為 `aws.events`。  
必要：是

`detail`  <a name="api-destination-state-detail"></a>
包含事件相關資訊的 JSON 物件。產生事件的服務會決定此欄位的內容。  
必要：是  
對於此事件，此資料包含：    
`ApiDestinationName`  <a name="api-destination-state-connection-name"></a>
API 目的地的名稱。  
必要：是  
`Timestamp`  <a name="api-destination-state-timestamp"></a>
API 目的地狀態變更的時間和日期。  
必要：是

**Example API 目的地狀態事件範例**  <a name="event-detail-api-destination-state.example"></a>

```
{
    "version": "0",
    "id": "1d7a4ac6-a50a-745f-a331-a0d802f7badb",
    "detail-type": "API Destination Deactivated",
    "source": "aws.events",
    "account": "123456789012",
    "time": "2024-10-28T09:08:20Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:events:us-east-1:123456789012:api-destination/sample-api-destination/ee7e4d52-8df0-4bed-a0d5-fa7dea43fcf8"
    ],
    "detail": {
        "ApiDestinationName": "sample-api-destination",
        "Timestamp": "2024-10-24 09:26:35 +0000 UTC"
    }
}
```