connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | aws.events.connections |
Fields
The following fields are returned by SELECT queries:
- describe_connection
| Name | Datatype | Description |
|---|---|---|
auth_parameters | object | The parameters to use for authorization for the connection. |
authorization_type | string | The type of authorization specified for the connection. (BASIC, OAUTH_CLIENT_CREDENTIALS, API_KEY) |
connection_arn | string | The ARN of the connection retrieved. (pattern: <code>^arn:aws([a-z]|-):events:([a-z]|\d|-):([0-9]{12})?:connection/[.-_A-Za-z0-9]+/[-A-Za-z0-9]+$</code>) |
connection_state | string | The state of the connection retrieved. (CREATING, UPDATING, DELETING, AUTHORIZED, DEAUTHORIZED, AUTHORIZING, DEAUTHORIZING, ACTIVE, FAILED_CONNECTIVITY) |
creation_time | string (date-time) | A time stamp for the time that the connection was created. |
description | string | The description for the connection retrieved. (pattern: <code>.*</code>) |
invocation_connectivity_parameters | object | For connections to private APIs The parameters EventBridge uses to invoke the resource endpoint. For more information, see Connecting to private APIs in the Amazon EventBridge User Guide . |
kms_key_identifier | string | The identifier of the KMS customer managed key for EventBridge to use to encrypt the connection, if one has been specified. For more information, see Encrypting connections in the Amazon EventBridge User Guide. (pattern: <code>^[a-zA-Z0-9_-/:]*$</code>) |
last_authorized_time | string (date-time) | A time stamp for the time that the connection was last authorized. |
last_modified_time | string (date-time) | A time stamp for the time that the connection was last modified. |
name | string | The name of the connection retrieved. (pattern: <code>[.-_A-Za-z0-9]+</code>) |
secret_arn | string | The ARN of the secret created from the authorization parameters specified for the connection. (pattern: <code>^arn:aws([a-z]|-):secretsmanager:([a-z]|\d|-):([0-9]{12})?㊙️[/_+=.@-A-Za-z0-9]+$</code>) |
state_reason | string | The reason that the connection is in the current connection state. (pattern: <code>.*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_connection | select | region | Retrieves details about a connection. | |
create_connection | insert | region, AuthorizationType, AuthParameters | Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint. For more information, see Connections for endpoint targets in the Amazon EventBridge User Guide. | |
update_connection | update | region | Updates settings for a connection. | |
delete_connection | delete | region | Deletes a connection. | |
list_connections | exec | region | Retrieves a list of connections from the account. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_connection
Retrieves details about a connection.
SELECT
auth_parameters,
authorization_type,
connection_arn,
connection_state,
creation_time,
description,
invocation_connectivity_parameters,
kms_key_identifier,
last_authorized_time,
last_modified_time,
name,
secret_arn,
state_reason
FROM aws.events.connections
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_connection
- Manifest
Creates a connection. A connection defines the authorization type and credentials to use for authorization with an API destination HTTP endpoint. For more information, see Connections for endpoint targets in the Amazon EventBridge User Guide.
INSERT INTO aws.events.connections (
Name,
Description,
AuthorizationType,
AuthParameters,
InvocationConnectivityParameters,
KmsKeyIdentifier,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ AuthorizationType }}' /* required */,
'{{ AuthParameters }}' /* required */,
'{{ InvocationConnectivityParameters }}',
'{{ KmsKeyIdentifier }}',
'{{ region }}'
RETURNING
connection_arn,
connection_state,
creation_time,
last_modified_time
;
# Description fields are for documentation purposes
- name: connections
props:
- name: region
value: "{{ region }}"
description: Required parameter for the connections resource.
- name: Name
value: "{{ Name }}"
description: |
The name for the connection to create.
- name: Description
value: "{{ Description }}"
description: |
A description for the connection to create.
- name: AuthorizationType
value: "{{ AuthorizationType }}"
description: |
The type of authorization to use for the connection. OAUTH tokens are refreshed when a 401 or 407 response is returned.
valid_values: ['BASIC', 'OAUTH_CLIENT_CREDENTIALS', 'API_KEY']
- name: AuthParameters
description: |
The authorization parameters to use to authorize with the endpoint. You must include only authorization parameters for the AuthorizationType you specify.
value:
BasicAuthParameters:
Username: "{{ Username }}"
Password: "{{ Password }}"
OAuthParameters:
ClientParameters:
ClientID: "{{ ClientID }}"
ClientSecret: "{{ ClientSecret }}"
AuthorizationEndpoint: "{{ AuthorizationEndpoint }}"
HttpMethod: "{{ HttpMethod }}"
OAuthHttpParameters:
HeaderParameters:
- Key: "{{ Key }}"
Value: "{{ Value }}"
IsValueSecret: {{ IsValueSecret }}
QueryStringParameters:
- Key: "{{ Key }}"
Value: "{{ Value }}"
IsValueSecret: {{ IsValueSecret }}
BodyParameters:
- Key: "{{ Key }}"
Value: "{{ Value }}"
IsValueSecret: {{ IsValueSecret }}
ApiKeyAuthParameters:
ApiKeyName: "{{ ApiKeyName }}"
ApiKeyValue: "{{ ApiKeyValue }}"
InvocationHttpParameters:
HeaderParameters:
- Key: "{{ Key }}"
Value: "{{ Value }}"
IsValueSecret: {{ IsValueSecret }}
QueryStringParameters:
- Key: "{{ Key }}"
Value: "{{ Value }}"
IsValueSecret: {{ IsValueSecret }}
BodyParameters:
- Key: "{{ Key }}"
Value: "{{ Value }}"
IsValueSecret: {{ IsValueSecret }}
ConnectivityParameters:
ResourceParameters:
ResourceConfigurationArn: "{{ ResourceConfigurationArn }}"
- name: InvocationConnectivityParameters
description: |
For connections to private APIs, the parameters to use for invoking the API. For more information, see Connecting to private APIs in the Amazon EventBridge User Guide .
value:
ResourceParameters:
ResourceConfigurationArn: "{{ ResourceConfigurationArn }}"
- name: KmsKeyIdentifier
value: "{{ KmsKeyIdentifier }}"
description: |
The identifier of the KMS customer managed key for EventBridge to use, if you choose to use a customer managed key to encrypt this connection. The identifier can be the key Amazon Resource Name (ARN), KeyId, key alias, or key alias ARN. If you do not specify a customer managed key identifier, EventBridge uses an Amazon Web Services owned key to encrypt the connection. For more information, see Identify and view keys in the Key Management Service Developer Guide.
UPDATE examples
- update_connection
Updates settings for a connection.
UPDATE aws.events.connections
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
AuthorizationType = '{{ AuthorizationType }}',
AuthParameters = '{{ AuthParameters }}',
InvocationConnectivityParameters = '{{ InvocationConnectivityParameters }}',
KmsKeyIdentifier = '{{ KmsKeyIdentifier }}'
WHERE
region = '{{ region }}' --required
RETURNING
connection_arn,
connection_state,
creation_time,
last_authorized_time,
last_modified_time;
DELETE examples
- delete_connection
Deletes a connection.
DELETE FROM aws.events.connections
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- list_connections
Retrieves a list of connections from the account.
EXEC aws.events.connections.list_connections
@region='{{ region }}' --required
@@json=
'{
"NamePrefix": "{{ NamePrefix }}",
"ConnectionState": "{{ ConnectionState }}",
"NextToken": "{{ NextToken }}",
"Limit": {{ Limit }}
}'
;