Skip to main content

api_destinations

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

Overview

Nameapi_destinations
TypeResource
Idaws.events.api_destinations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
api_destination_arnstringThe ARN of the API destination retrieved. (pattern: <code>^arn:aws([a-z]|-):events:([a-z]|\d|-):([0-9]{12})?:api-destination/[.-_A-Za-z0-9]+/[-A-Za-z0-9]+$</code>)
api_destination_statestringThe state of the API destination retrieved. (ACTIVE, INACTIVE)
connection_arnstringThe ARN of the connection specified for the API destination retrieved. (pattern: <code>^arn:aws([a-z]|-):events:([a-z]|\d|-):([0-9]{12})?:connection/[.-_A-Za-z0-9]+/[-A-Za-z0-9]+$</code>)
creation_timestring (date-time)A time stamp for the time that the API destination was created.
descriptionstringThe description for the API destination retrieved. (pattern: <code>.*</code>)
http_methodstringThe method to use to connect to the HTTP endpoint. (POST, GET, HEAD, OPTIONS, PUT, PATCH, DELETE)
invocation_endpointstringThe URL to use to connect to the HTTP endpoint. (pattern: <code>^((%[0-9A-Fa-f]{2}|[-()_.!~*';/?:@\x26=+$,A-Za-z0-9])+)([).!';/?:,])?$</code>)
invocation_rate_limit_per_secondintegerThe maximum number of invocations per second to specified for the API destination. Note that if you set the invocation rate maximum to a value lower the rate necessary to send all events received on to the destination HTTP endpoint, some events may not be delivered within the 24-hour retry window. If you plan to set the rate lower than the rate necessary to deliver all events, consider using a dead-letter queue to catch events that are not delivered within 24 hours.
last_modified_timestring (date-time)A time stamp for the time that the API destination was last modified.
namestringThe name of the API destination retrieved. (pattern: <code>[.-_A-Za-z0-9]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_api_destinationselectregionRetrieves details about an API destination.
create_api_destinationinsertregion, ConnectionArn, InvocationEndpoint, HttpMethodCreates an API destination, which is an HTTP invocation endpoint configured as a target for events. API destinations do not support private destinations, such as interface VPC endpoints. For more information, see API destinations in the EventBridge User Guide.
update_api_destinationupdateregionUpdates an API destination.
delete_api_destinationdeleteregionDeletes the specified API destination.
list_api_destinationsexecregionRetrieves a list of API destination in the account in the current Region.

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

Retrieves details about an API destination.

SELECT
api_destination_arn,
api_destination_state,
connection_arn,
creation_time,
description,
http_method,
invocation_endpoint,
invocation_rate_limit_per_second,
last_modified_time,
name
FROM aws.events.api_destinations
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an API destination, which is an HTTP invocation endpoint configured as a target for events. API destinations do not support private destinations, such as interface VPC endpoints. For more information, see API destinations in the EventBridge User Guide.

INSERT INTO aws.events.api_destinations (
Name,
Description,
ConnectionArn,
InvocationEndpoint,
HttpMethod,
InvocationRateLimitPerSecond,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ ConnectionArn }}' /* required */,
'{{ InvocationEndpoint }}' /* required */,
'{{ HttpMethod }}' /* required */,
{{ InvocationRateLimitPerSecond }},
'{{ region }}'
RETURNING
api_destination_arn,
api_destination_state,
creation_time,
last_modified_time
;

UPDATE examples

Updates an API destination.

UPDATE aws.events.api_destinations
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
ConnectionArn = '{{ ConnectionArn }}',
InvocationEndpoint = '{{ InvocationEndpoint }}',
HttpMethod = '{{ HttpMethod }}',
InvocationRateLimitPerSecond = {{ InvocationRateLimitPerSecond }}
WHERE
region = '{{ region }}' --required
RETURNING
api_destination_arn,
api_destination_state,
creation_time,
last_modified_time;

DELETE examples

Deletes the specified API destination.

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

Lifecycle Methods

Retrieves a list of API destination in the account in the current Region.

EXEC aws.events.api_destinations.list_api_destinations
@region='{{ region }}' --required
@@json=
'{
"NamePrefix": "{{ NamePrefix }}",
"ConnectionArn": "{{ ConnectionArn }}",
"NextToken": "{{ NextToken }}",
"Limit": {{ Limit }}
}'
;