event_bus
Creates, updates, deletes, gets or lists an event_bus resource.
Overview
| Name | event_bus |
| Type | Resource |
| Id | aws.events.event_bus |
Fields
The following fields are returned by SELECT queries:
- describe_event_bus
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the account permitted to write events to the current account. |
creation_time | string (date-time) | The time the event bus was created. |
dead_letter_config | object | Configuration 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. |
description | string | The event bus description. |
kms_key_identifier | string | The 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_time | string (date-time) | The time the event bus was last modified. |
log_config | object | The logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide. |
name | string | The name of the event bus. Currently, this is always default. |
policy | string | The policy that enables the external account to send events to your account. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_event_bus | select | region | 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. | |
create_event_bus | insert | region | 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. | |
update_event_bus | update | region | Updates the specified event bus. | |
delete_event_bus | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_event_bus
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
- create_event_bus
- Manifest
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
;
# Description fields are for documentation purposes
- name: event_bus
props:
- name: region
value: "{{ region }}"
description: Required parameter for the event_bus resource.
- name: Name
value: "{{ Name }}"
description: |
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.
- name: EventSourceName
value: "{{ EventSourceName }}"
description: |
If you are creating a partner event bus, this specifies the partner event source that the new event bus will be matched with.
- name: Description
value: "{{ Description }}"
description: |
The event bus description.
- name: KmsKeyIdentifier
value: "{{ KmsKeyIdentifier }}"
description: |
The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt events on this event bus. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt events on the event bus. For more information, see Identify and view keys in the Key Management Service Developer Guide. Schema discovery is not supported for event buses encrypted using a customer managed key. EventBridge returns an error if: You call CreateDiscoverer on an event bus set to use a customer managed key for encryption. You call UpdatedEventBus to set a customer managed key on an event bus with schema discovery enabled. To enable schema discovery on an event bus, choose to use an Amazon Web Services owned key. For more information, see Encrypting events in the Amazon EventBridge User Guide. If you have specified that EventBridge use a customer managed key for encrypting the source event bus, we strongly recommend you also specify a customer managed key for any archives for the event bus as well. For more information, see Encrypting archives in the Amazon EventBridge User Guide.
- name: DeadLetterConfig
description: |
Configuration 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.
value:
Arn: "{{ Arn }}"
- name: LogConfig
description: |
The logging configuration settings for the event bus. For more information, see Configuring logs for event buses in the EventBridge User Guide.
value:
IncludeDetail: "{{ IncludeDetail }}"
Level: "{{ Level }}"
- name: Tags
description: |
Tags to associate with the event bus.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_event_bus
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
- delete_event_bus
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
;