AWS::Events::EventBus
Creates a new event bus within your account. This can be a custom event bus which you can use to receive events from your custom applications and services, or it can be a partner event bus which can be matched to a partner event source.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Events::EventBus", "Properties" : { "EventSourceName" :
String
, "Name" :String
, "Tags" :[ TagEntry, ... ]
} }
YAML
Type: AWS::Events::EventBus Properties: EventSourceName:
String
Name:String
Tags:- TagEntry
Properties
EventSourceName
-
If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
Required: No
Type: String
Minimum:
1
Maximum:
256
Pattern:
aws\.partner(/[\.\-_A-Za-z0-9]+){2,}
Update requires: Replacement
Name
-
The name of the new event bus.
Event bus names cannot contain the / character. You can't use the name
default
for a custom event bus, as this name is already used for your account's default event bus.If this is a partner event bus, the name must exactly match the name of the partner event source that this event bus is matched to.
Required: Yes
Type: String
Minimum:
1
Maximum:
256
Pattern:
[/\.\-_A-Za-z0-9]+
Update requires: Replacement
Tags
-
Tags to associate with the event bus.
Required: No
Type: List of TagEntry
Update requires: Replacement
Return values
Ref
The name of the new event bus.
Fn::GetAtt
The ARN of the task definition to use. If no task revision is supplied, it defaults to the most recent revision at the time of resource creation.
Examples
Create a partner event bus
The following example creates a partner event bus named
aws.partner.repo1
.
JSON
"SamplePartnerEventBus": { "Type": "AWS::Events::EventBus", "Properties": { "EventSourceName": "aws.partner/PartnerName/acct1/repo1", "Name": "aws.partner.repo1" } }
YAML
SamplePartnerEventBus: Type: AWS::Events::EventBus Properties: EventSourceName: "aws.partner/PartnerName/acct1/repo1" Name: "aws.partner.repo1"
Create a custom event bus
The following example creates a custom event bus named
MyCustomEventBus
.
JSON
"SampleCustomEventBus": { "Type": "AWS::Events::EventBus", "Properties": { "Name": "MyCustomEventBus" } }
YAML
SampleCustomEventBus: Type: AWS::Events::EventBus Properties: Name: "MyCustomEventBus"