connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | aws.apigatewaymanagementapi.connections |
Fields
The following fields are returned by SELECT queries:
- get_connection
| Name | Datatype | Description |
|---|---|---|
connected_at | string (date-time) | The time in ISO 8601 format for when the connection was established. |
identity | object | |
last_active_at | string (date-time) | The time in ISO 8601 format for when the connection was last active. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_connection | select | connection_id, region | Get information about the connection with the provided id. | |
delete_connection | delete | connection_id, region | Delete the connection with the provided id. | |
post_to_connection | exec | connection_id, region, Data | Sends the provided data to the specified connection. |
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 |
|---|---|---|
connection_id | string | The identifier of the connection that a specific client is using. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_connection
Get information about the connection with the provided id.
SELECT
connected_at,
identity,
last_active_at
FROM aws.apigatewaymanagementapi.connections
WHERE connection_id = '{{ connection_id }}' -- required
AND region = '{{ region }}' -- required
;
DELETE examples
- delete_connection
Delete the connection with the provided id.
DELETE FROM aws.apigatewaymanagementapi.connections
WHERE connection_id = '{{ connection_id }}' --required
AND region = '{{ region }}' --required
;
Lifecycle Methods
- post_to_connection
Sends the provided data to the specified connection.
EXEC aws.apigatewaymanagementapi.connections.post_to_connection
@connection_id='{{ connection_id }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Data": "{{ Data }}"
}'
;