EventDestinations
Returns event destinations, including their type, enabled events, and delivery configuration details.
Table-Specific Information
SELECT
The provider 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 provider.
| 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. For example:
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 removes 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 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 event destination. | |
| EventPayload | String | False |
The payload type of the events being subscribed to. The allowed values are snapshot, thin. | |
| EventsFrom | String | False |
The location from which events are routed. | |
| Livemode | Boolean | True |
Indicates whether the object exists in live mode, which is true in live mode and false in test mode. | |
| MetadataAggregate | String | False |
The set of key-value pairs attached to the event destination for storing additional structured 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, which 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, azure_event_grid, webhook_endpoint. | |
| Updated | Datetime | True |
The time at which the object was last updated. | |
| WebhookEndpointSigningSecret | String | True |
The signing secret of the webhook endpoint, which is only included on creation. | |
| WebhookEndpointUrl | String | False |
The URL of the webhook endpoint. | |
| AzureEventGridTopicEndpoint | String | True |
DEPRECATED. The topic endpoint URL for Azure Event Grid events. | |
| AzureEventGridAzurePartnerTopicName | String | True |
The name of the Azure partner topic. | |
| AzureEventGridAzurePartnerTopicStatus | String | True |
The status of the Azure partner topic. The allowed values are activated, deleted, never_activated, unknown. | |
| AzureEventGridAzureRegion | String | False |
The Azure region. | |
| AzureEventGridAzureResourceGroupName | String | False |
The name of the Azure resource group. | |
| AzureEventGridAzureSubscriptionId | String | False |
The Azure subscription ID. |
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. |