EventDestinations
Returns event destinations and supports creating, updating, and deleting them.
Table-Specific Information
SELECT
The add-in uses the Stripe API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the add-in.
| Column | Supported Operators |
| Id | = |
SELECT * FROM EventDestinations WHERE Id = 'ed_test_61ScMeWkvhZiG8UHk16SbC3W0eSQEvCjDyDENOLjs2G0'
INSERT
The 'Name', 'Type', 'EventPayload' and 'EnabledEvents' columns are required for insertion.Additionally, to create an event destination of Type: 'amazon_eventbridge', the 'AmazonEventbridgeAWSAccountId' and 'AmazonEventbridgeAwsRegion' columns are also required.
INSERT INTO EventDestinations (Name, Type, EnabledEvents, EventPayload, AmazonEventbridgeAWSAccountId, AmazonEventbridgeAwsRegion, EventsFrom, MetadataAggregate) VALUES ('eventdest.', 'amazon_eventbridge', '[\"v1.billing.meter.error_report_triggered\", \"v1.billing.meter.no_meter_found\"]', 'thin', '123456789012', 'us-east-2', '[\"other_accounts\", \"self\"]', '{\"key\": \"value\"}')
To create an event destination of Type: 'webhook_endpoint', the WebhookEndpointUrl column is also required.
INSERT INTO EventDestinations (Name, Type, EnabledEvents, EventPayload, WebhookEndpointUrl, EventsFrom, Description) VALUES ('eventdest2', 'webhook_endpoint', '[\"v1.billing.meter.error_report_triggered\", \"v1.billing.meter.no_meter_found\"]', 'thin', 'https://127.0.0.1:9210', '[\"other_accounts\", \"self\"]', 'the description.')
UPDATE
Only the 'Description', 'EnabledEvents', 'MetadataAggregate', 'Name' and 'WebhookEndpointUrl' columns can be updated.
UPDATE EventDestinations SET Name = 'Updated name', Description = 'Updated description.', EnabledEvents = '[\"v1.billing.meter.error_report_triggered\"]', MetadataAggregate = '{\"key1\": \"updated value 1\", \"key2\": \"updated value 2\"}', WebhookEndpointUrl = 'https://127.0.0.1:1234' WHERE Id = 'ed_test_61Sd4rsO8phhbLRqg16SbC3W0eSQEvCjDyDENOLjs4Rc'
To remove a key-value pair from the MetadataAggregate, set its key's value to null. The following example will remove the key-value pairs with keys 'key1' and 'key2' from MetadataAggregate.
UPDATE EventDestinations SET MetadataAggregate = '{\"key1\": null, \"key2\": null}' WHERE Id = 'ed_test_61Sd4rsO8phhbLRqg16SbC3W0eSQEvCjDyDENOLjs4Rc'
DELETE
Delete an event destination using its Id.
DELETE FROM EventDestinations WHERE Id = 'ed_test_61Sd5CO1V93vipg6v16SbC3W0eSQEvCjDyDENOLjs02C'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The unique identifier for the event destination. | |
| Object | String | True |
The string representing the object's type. Objects of the same type share the same value of the object field. | |
| AmazonEventbridgeAWSAccountId | String | False |
The AWS account Id. | |
| AmazonEventbridgeAWSEventSourceArn | String | True |
The ARN of the AWS event source. | |
| AmazonEventbridgeAWSEventSourceStatus | String | True |
The state of the AWS event source. The allowed values are active, deleted, pending, unknown. | |
| Created | Datetime | True |
The date and time at which the event destination was created. | |
| Description | String | False |
An optional description of what the event destination is used for. | |
| EnabledEvents | String | False |
The list of events to enable for this event destination. | |
| EventPayload | String | False |
The payload type of the events being subscribed to. The allowed values are snapshot, thin. | |
| EventsFrom | String | False |
Specifies where events are routed from. | |
| Livemode | Boolean | True |
Indicates whether the object exists in live mode. The value is true in live mode and false in test mode. | |
| MetadataAggregate | String | False |
A set of key-value pairs that you can attach to the event destination for storing additional information. | |
| Name | String | False |
The name of the event destination. | |
| SnapshotApiVersion | String | False |
The API version that events are rendered as when using the snapshot event payload. | |
| Status | String | True |
The status of the event destination. It can be set to either enabled or disabled. The allowed values are disabled, enabled. | |
| StatusDetailsDisabledReason | String | True |
The reason the event destination has been disabled. The allowed values are no_aws_event_source_exists, user. | |
| Type | String | False |
The type of the event destination. The allowed values are amazon_eventbridge, webhook_endpoint. | |
| Updated | Datetime | True |
The date and time at which the event destination was last updated. | |
| WebhookEndpointSigningSecret | String | True |
The signing secret of the webhook endpoint. This value is only included on creation. | |
| WebhookEndpointUrl | String | False |
The URL of the webhook endpoint. |
Pseudocolumns
Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| AmazonEventbridgeAwsRegion | String |
The region of the AWS event source. |