Skip to main content

event_bus

Creates, updates, deletes, gets or lists an event_bus resource.

Overview

Nameevent_bus
TypeResource
Idaws.events.event_bus

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the account permitted to write events to the current account.
creation_timestring (date-time)The time the event bus was created.
dead_letter_configobjectConfiguration details of the Amazon SQS queue for EventBridge to use as a dead-letter queue (DLQ). For more information, see Using dead-letter queues to process undelivered events in the EventBridge User Guide.
descriptionstringThe event bus description.
kms_key_identifierstringThe identifier of the KMS customer managed key for EventBridge to use to encrypt events on this event bus, if one has been specified. For more information, see Data encryption in EventBridge in the Amazon EventBridge User Guide. (pattern: <code>^[a-zA-Z0-9_-/:]*$</code>)
last_modified_timestring (date-time)The time the event bus was last modified.
log_configobjectThe logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide.
namestringThe name of the event bus. Currently, this is always default.
policystringThe policy that enables the external account to send events to your account.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_event_busselectregionDisplays details about an event bus in your account. This can include the external Amazon Web Services accounts that are permitted to write events to your default event bus, and the associated policy. For custom event buses and partner event buses, it displays the name, ARN, policy, state, and creation time. To enable your account to receive events from other accounts on its default event bus, use PutPermission. For more information about partner event buses, see CreateEventBus.
create_event_businsertregionCreates 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.
update_event_busupdateregionUpdates the specified event bus.
delete_event_busdeleteregionDeletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be deleted. You can't delete your account's default event bus.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Displays details about an event bus in your account. This can include the external Amazon Web Services accounts that are permitted to write events to your default event bus, and the associated policy. For custom event buses and partner event buses, it displays the name, ARN, policy, state, and creation time. To enable your account to receive events from other accounts on its default event bus, use PutPermission. For more information about partner event buses, see CreateEventBus.

SELECT
arn,
creation_time,
dead_letter_config,
description,
kms_key_identifier,
last_modified_time,
log_config,
name,
policy
FROM aws.events.event_bus
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.events.event_bus (
Name,
EventSourceName,
Description,
KmsKeyIdentifier,
DeadLetterConfig,
LogConfig,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ EventSourceName }}',
'{{ Description }}',
'{{ KmsKeyIdentifier }}',
'{{ DeadLetterConfig }}',
'{{ LogConfig }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
dead_letter_config,
description,
event_bus_arn,
kms_key_identifier,
log_config
;

UPDATE examples

Updates the specified event bus.

UPDATE aws.events.event_bus
SET
Name = '{{ Name }}',
KmsKeyIdentifier = '{{ KmsKeyIdentifier }}',
Description = '{{ Description }}',
DeadLetterConfig = '{{ DeadLetterConfig }}',
LogConfig = '{{ LogConfig }}'
WHERE
region = '{{ region }}' --required
RETURNING
arn,
dead_letter_config,
description,
kms_key_identifier,
log_config,
name;

DELETE examples

Deletes the specified custom event bus or partner event bus. All rules associated with this event bus need to be deleted. You can't delete your account's default event bus.

DELETE FROM aws.events.event_bus
WHERE region = '{{ region }}' --required
;