AWS::Events::EventBus - AWS CloudFormation

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.

Custom event bus names can't contain the / character, but you can use the / character in partner event bus names. In addition, for partner event buses, the name must exactly match the name of the partner event source that this event bus is matched to.

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.

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: No interruption

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.

Arn

The ARN of the event bus, such as arn:aws:events:us-east-2:123456789012:event-bus/aws.partner/PartnerName/acct1/repo1.

Name

The name of the event bus, such as PartnerName/acct1/repo1.

Policy

The policy for the event bus in JSON form.

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"