EventDestinations
Create, update, query and delete event destinations.
Table Specific Information
Select
Server-Side Query Support
The driver 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 driver.
- Id supports the following operator: =.
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 |
Unique identifier for the event. | |
| Object | String | True |
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 |
Time at which the object 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 endpoint. | |
| EventPayload | String | False |
Payload type of events being subscribed to. The allowed values are snapshot, thin. | |
| EventsFrom | String | False |
Where events should be routed from. | |
| Livemode | Boolean | True |
Has the value true if the object exists in live mode or the value false if the object exists in test mode. | |
| MetadataAggregate | String | False |
Metadata. | |
| Name | String | False |
Event destination name. | |
| SnapshotApiVersion | String | False |
If using the snapshot event payload, the API version events are rendered as. | |
| Status | String | True |
Status. It can be set to either enabled or disabled. The allowed values are disabled, enabled. | |
| StatusDetailsDisabledReason | String | True |
Reason event destination has been disabled. The allowed values are no_aws_event_source_exists, user. | |
| Type | String | False |
Event destination type. The allowed values are amazon_eventbridge, webhook_endpoint. | |
| Updated | Datetime | True |
Time at which the object was last updated. | |
| WebhookEndpointSigningSecret | String | True |
The signing secret of the webhook endpoint, only includable on creation. | |
| WebhookEndpointUrl | String | False |
The URL of the webhook endpoint, includable. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| AmazonEventbridgeAwsRegion | String |
The region of the AWS event source. |