Template name
ACS-EventBridge-PutEvents
Template description
Publishes an event.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
Parameter | Description | Data type | Required | Default value | Limit |
eventBusName | The name of the event bus. | String | Yes | ||
source | The event source. | String | Yes | ||
regionId | The region ID. | String | No | {{ ACS::RegionId }} | |
id | Event type | String | No | {{ ACS::ExecutionId }} | |
type | The event type. | String | No | aliyunoos:Execution:Success | |
data | The event content. | Json | No | {"name": "EventBridge", "number": 100} | |
OOSAssumeRole | The RAM role that is assumed by CloudOps Orchestration Service (OOS). | String | No | "" |
Output parameters
Parameter | Description | Data type |
responses | Json |
Permission policy that is required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"eventbridge:TestPutEvents"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Details
Template content
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS-EventBridge-PutEvents
en: Publishes an event.
categories:
- security
Parameters:
regionId:
Type: String
Label:
en: Region ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
eventBusName:
Label:
en: EventBusName
Type: String
id:
Type: String
Label:
en: Event ID
Description:
en: The event ID. A unique value that identifies an event. The sender must ensure that the combination of source and id is unique.
Default: '{{ ACS::ExecutionId }}'
source:
Type: String
Label:
en: Source
Description:
en: The event source. A service that provides events. It 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.
type:
Type: String
Label:
en: Type
Description:
en: The event type. It describes the event type associated with the event source. This parameter is used for routing, event queries, and policy execution.
Default: 'aliyunoos:Execution:Success'
data:
Type: Json
Label:
en: Data
Description:
en: The event content. A JSON object whose content is determined by the service that initiates the event.
Default:
name: EventBridge
number: 100
OOSAssumeRole:
Label:
en: OOSAssumeRole
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: putEvents
Action: 'ACS::ExecuteAPI'
Description:
en: Publish an event
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 }}'