AWS::Events::EventBus - AWS CloudFormation

AWS::Events::EventBus

Specifies an 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.

Note

As an aid to help you jumpstart developing CloudFormation templates, the EventBridge console enables you to create templates from the existing event buses in your account. For more information, see Generating CloudFormation templates from an EventBridge event bus in the Amazon EventBridge User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::Events::EventBus", "Properties" : { "EventSourceName" : String, "Name" : String, "Policy" : Json, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::Events::EventBus Properties: EventSourceName: String Name: String Policy: Json Tags: - Tag

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

Pattern: aws\.partner(/[\.\-_A-Za-z0-9]+){2,}

Minimum: 1

Maximum: 256

Update requires: No interruption

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

Pattern: [/\.\-_A-Za-z0-9]+

Minimum: 1

Maximum: 256

Update requires: Replacement

Policy

The permissions policy of the event bus, describing which other AWS accounts can write events to this event bus.

Required: No

Type: Json

Update requires: No interruption

Tags

Tags to associate with the event bus.

Required: No

Type: Array of Tag

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.

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"