模板名稱
ACS-EventBridge-PutEvents EventBridge發布事件
模板描述
發布一個事件
模板類型
自動化
所有者
Alibaba Cloud
輸入參數
參數名稱 | 描述 | 類型 | 是否必填 | 預設值 | 約束 |
eventBusName | 事件匯流排的名稱 | String | 是 | ||
source | 事件來源 | String | 是 | ||
regionId | 地區 ID | String | 否 | {{ ACS::RegionId }} | |
id | 事件ID | String | 否 | {{ ACS::ExecutionId }} | |
type | 事件類型 | String | 否 | aliyunoos:Execution:Success | |
data | 事件內容 | Json | 否 | {"name": "Eventbridge", "number": 100} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | "" |
輸出參數
參數名稱 | 描述 | 類型 |
responses | Json |
執行此模板需要的權限原則
{
"Version": "1",
"Statement": [
{
"Action": [
"eventbridge:TestPutEvents"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
模板內容
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS-EventBridge-PutEvents
name-zh-cn: EventBridge發布事件
en: Put one or more events
zh-cn: 發布一個事件
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: Region Id
zh-cn: 地區 ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
eventBusName:
Label:
en: EventBusName
zh-cn: 事件匯流排的名稱
Type: String
id:
Type: String
Label:
en: Event ID
zh-cn: 事件ID
Description:
en: Event ID. A unique value that identifies an event. The sender must ensure that source + id is unique.
zh-cn: 事件ID。標識事件的唯一值。發送端必須確保source+id是唯一的
Default: '{{ ACS::ExecutionId }}'
source:
Type: String
Label:
en: Source
zh-cn: 事件來源
Description:
en: Event source. A service that provides events. Identifies the context of the event. This typically includes the type of event source, the mechanism for publishing events, or the process that produced the event.
zh-cn: 事件來源。提供事件的服務。標識事件發生的內容。一般會包含事件來源的類型,發布事件的機制或生產事件的過程。
type:
Type: String
Label:
en: Type
zh-cn: 事件類型
Description:
en: Event type. Describes the event type associated with the event source. This parameter is used for routing, event querying, and policy execution.
zh-cn: 事件類型。描述事件來源相關的事件類型。該參數用於路由、事件查詢和策略執行等。
Default: 'aliyunoos:Execution:Success'
data:
Type: Json
Label:
en: Data
zh-cn: 事件內容
Description:
en: Event content. A JSON object whose content is determined by the service that initiates the event.
zh-cn: 事件內容。JSON對象,內容由發起事件的服務決定。
Default:
name: Eventbridge
number: 100
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: putEvents
Action: 'ACS::ExecuteAPI'
Description:
en: Publish an event
zh-cn: 發布一個事件
Properties:
Service: EVENTBRIDGE
API: TestPutEvents
Parameters:
RegionId: '{{ regionId }}'
Event:
Id: '{{ id }}'
Type: '{{ type }}'
Data: '{{ Data }}'
Source: '{{ source }}'
AliyunEventbusName: '{{ eventBusName }}'
Outputs:
response:
Type: List
ValueSelector: .
Outputs:
responses:
Type: Json
Value: '{{ putEvents.response }}'