integrations
Creates, updates, deletes, gets or lists an integrations resource.
Overview
| Name | integrations |
| Type | Resource |
| Id | aws.apigatewayv2.integrations |
Fields
The following fields are returned by SELECT queries:
- get_integration
- get_integrations
| Name | Datatype | Description |
|---|---|---|
api_gateway_managed | boolean | Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it. |
connection_id | string | A string with a length between [1-1024]. |
connection_type | string | Represents a connection type. (INTERNET, VPC_LINK) |
content_handling_strategy | string | Specifies how to handle response payload content type conversions. Supported only for WebSocket APIs. (CONVERT_TO_BINARY, CONVERT_TO_TEXT) |
credentials_arn | string | Represents an Amazon Resource Name (ARN). |
description | string | A string with a length between [0-1024]. |
integration_id | string | The identifier. |
integration_method | string | A string with a length between [1-64]. |
integration_response_selection_expression | string | An expression used to extract information at runtime. See Selection Expressions for more information. |
integration_subtype | string | A string with a length between [1-128]. |
integration_type | string | Represents an API method integration type. (AWS, HTTP, MOCK, HTTP_PROXY, AWS_PROXY) |
integration_uri | string | A string representation of a URI with a length between [1-2048]. |
passthrough_behavior | string | Represents passthrough behavior for an integration response. Supported only for WebSocket APIs. (WHEN_NO_MATCH, NEVER, WHEN_NO_TEMPLATES) |
payload_format_version | string | A string with a length between [1-64]. |
request_parameters | object | For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs. For HTTP API integrations, without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to backend integrations. The key should follow the pattern <action>:<header|querystring|path>.<location>. The action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses. |
request_templates | object | Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs. |
response_parameters | object | Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern <action>:<header>.<location> or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses. |
template_selection_expression | string | An expression used to extract information at runtime. See Selection Expressions for more information. |
timeout_in_millis | integer | An integer with a value between [50-30000]. |
tls_config | object | The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs. |
| Name | Datatype | Description |
|---|---|---|
api_gateway_managed | boolean | Specifies whether an integration is managed by API Gateway. If you created an API using using quick create, the resulting integration is managed by API Gateway. You can update a managed integration, but you can't delete it. |
connection_id | string | A string with a length between [1-1024]. |
connection_type | string | Represents a connection type. (INTERNET, VPC_LINK) |
content_handling_strategy | string | Specifies how to handle response payload content type conversions. Supported only for WebSocket APIs. (CONVERT_TO_BINARY, CONVERT_TO_TEXT) |
credentials_arn | string | Represents an Amazon Resource Name (ARN). |
description | string | A string with a length between [0-1024]. |
integration_id | string | The identifier. |
integration_method | string | A string with a length between [1-64]. |
integration_response_selection_expression | string | An expression used to extract information at runtime. See Selection Expressions for more information. |
integration_subtype | string | A string with a length between [1-128]. |
integration_type | string | Represents an API method integration type. (AWS, HTTP, MOCK, HTTP_PROXY, AWS_PROXY) |
integration_uri | string | A string representation of a URI with a length between [1-2048]. |
passthrough_behavior | string | Represents passthrough behavior for an integration response. Supported only for WebSocket APIs. (WHEN_NO_MATCH, NEVER, WHEN_NO_TEMPLATES) |
payload_format_version | string | A string with a length between [1-64]. |
request_parameters | object | For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs. For HTTP API integrations, without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to backend integrations. The key should follow the pattern <action>:<header|querystring|path>.<location>. The action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses. |
request_templates | object | Represents a map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client. The content type value is the key in this map, and the template (as a String) is the value. Supported only for WebSocket APIs. |
response_parameters | object | Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients. Specify a key-value map from a selection key to response parameters. The selection key must be a valid HTTP status code within the range of 200-599. Response parameters are a key-value map. The key must match pattern <action>:<header>.<location> or overwrite.statuscode. The action can be append, overwrite or remove. The value can be a static value, or map to response data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses. |
template_selection_expression | string | An expression used to extract information at runtime. See Selection Expressions for more information. |
timeout_in_millis | integer | An integer with a value between [50-30000]. |
tls_config | object | The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_integration | select | api_id, integration_id, region | Gets an Integration. | |
get_integrations | select | api_id, region | maxResults, nextToken | Gets the Integrations for an API. |
create_integration | insert | api_id, region, IntegrationType | Creates an Integration. | |
update_integration | update | api_id, integration_id, region | Updates an Integration. | |
delete_integration | delete | api_id, integration_id, region | Deletes an Integration. |
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 |
|---|---|---|
api_id | string | The API identifier. |
integration_id | string | The integration ID. |
region | string | AWS region (default: us-east-1) |
maxResults | string | The maximum number of elements to be returned for this resource. |
nextToken | string | The next page of elements from this collection. Not valid for the last element of the collection. |
SELECT examples
- get_integration
- get_integrations
Gets an Integration.
SELECT
api_gateway_managed,
connection_id,
connection_type,
content_handling_strategy,
credentials_arn,
description,
integration_id,
integration_method,
integration_response_selection_expression,
integration_subtype,
integration_type,
integration_uri,
passthrough_behavior,
payload_format_version,
request_parameters,
request_templates,
response_parameters,
template_selection_expression,
timeout_in_millis,
tls_config
FROM aws.apigatewayv2.integrations
WHERE api_id = '{{ api_id }}' -- required
AND integration_id = '{{ integration_id }}' -- required
AND region = '{{ region }}' -- required
;
Gets the Integrations for an API.
SELECT
api_gateway_managed,
connection_id,
connection_type,
content_handling_strategy,
credentials_arn,
description,
integration_id,
integration_method,
integration_response_selection_expression,
integration_subtype,
integration_type,
integration_uri,
passthrough_behavior,
payload_format_version,
request_parameters,
request_templates,
response_parameters,
template_selection_expression,
timeout_in_millis,
tls_config
FROM aws.apigatewayv2.integrations
WHERE api_id = '{{ api_id }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_integration
- Manifest
Creates an Integration.
INSERT INTO aws.apigatewayv2.integrations (
ConnectionId,
ConnectionType,
ContentHandlingStrategy,
CredentialsArn,
Description,
IntegrationMethod,
IntegrationSubtype,
IntegrationType,
IntegrationUri,
PassthroughBehavior,
PayloadFormatVersion,
RequestParameters,
RequestTemplates,
ResponseParameters,
TemplateSelectionExpression,
TimeoutInMillis,
TlsConfig,
api_id,
region
)
SELECT
'{{ ConnectionId }}',
'{{ ConnectionType }}',
'{{ ContentHandlingStrategy }}',
'{{ CredentialsArn }}',
'{{ Description }}',
'{{ IntegrationMethod }}',
'{{ IntegrationSubtype }}',
'{{ IntegrationType }}' /* required */,
'{{ IntegrationUri }}',
'{{ PassthroughBehavior }}',
'{{ PayloadFormatVersion }}',
'{{ RequestParameters }}',
'{{ RequestTemplates }}',
'{{ ResponseParameters }}',
'{{ TemplateSelectionExpression }}',
{{ TimeoutInMillis }},
'{{ TlsConfig }}',
'{{ api_id }}',
'{{ region }}'
RETURNING
api_gateway_managed,
connection_id,
connection_type,
content_handling_strategy,
credentials_arn,
description,
integration_id,
integration_method,
integration_response_selection_expression,
integration_subtype,
integration_type,
integration_uri,
passthrough_behavior,
payload_format_version,
request_parameters,
request_templates,
response_parameters,
template_selection_expression,
timeout_in_millis,
tls_config
;
# Description fields are for documentation purposes
- name: integrations
props:
- name: api_id
value: "{{ api_id }}"
description: Required parameter for the integrations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the integrations resource.
- name: ConnectionId
value: "{{ ConnectionId }}"
description: |
A string with a length between [1-1024].
- name: ConnectionType
value: "{{ ConnectionType }}"
description: |
Represents a connection type.
valid_values: ['INTERNET', 'VPC_LINK']
- name: ContentHandlingStrategy
value: "{{ ContentHandlingStrategy }}"
description: |
Specifies how to handle response payload content type conversions. Supported only for WebSocket APIs.
valid_values: ['CONVERT_TO_BINARY', 'CONVERT_TO_TEXT']
- name: CredentialsArn
value: "{{ CredentialsArn }}"
description: |
Represents an Amazon Resource Name (ARN).
- name: Description
value: "{{ Description }}"
description: |
A string with a length between [0-1024].
- name: IntegrationMethod
value: "{{ IntegrationMethod }}"
description: |
A string with a length between [1-64].
- name: IntegrationSubtype
value: "{{ IntegrationSubtype }}"
description: |
A string with a length between [1-128].
- name: IntegrationType
value: "{{ IntegrationType }}"
description: |
Represents an API method integration type.
valid_values: ['AWS', 'HTTP', 'MOCK', 'HTTP_PROXY', 'AWS_PROXY']
- name: IntegrationUri
value: "{{ IntegrationUri }}"
description: |
A string representation of a URI with a length between [1-2048].
- name: PassthroughBehavior
value: "{{ PassthroughBehavior }}"
description: |
Represents passthrough behavior for an integration response. Supported only for WebSocket APIs.
valid_values: ['WHEN_NO_MATCH', 'NEVER', 'WHEN_NO_TEMPLATES']
- name: PayloadFormatVersion
value: "{{ PayloadFormatVersion }}"
description: |
A string with a length between [1-64].
- name: RequestParameters
value: "{{ RequestParameters }}"
description: |
For WebSocket APIs, a key-value map specifying request parameters that are passed from the method request to the backend. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the backend. The method request parameter value must match the pattern of method.request.{location}.{name} , where {location} is querystring, path, or header; and {name} must be a valid and unique method request parameter name. For HTTP API integrations with a specified integrationSubtype, request parameters are a key-value map specifying parameters that are passed to AWS_PROXY integrations. You can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Working with AWS service integrations for HTTP APIs. For HTTP API integrations without a specified integrationSubtype request parameters are a key-value map specifying how to transform HTTP requests before sending them to the backend. The key should follow the pattern `<action>`:<header|querystring|path>.`<location>` where action can be append, overwrite or remove. For values, you can provide static values, or map request data, stage variables, or context variables that are evaluated at runtime. To learn more, see Transforming API requests and responses.
- name: RequestTemplates
value: "{{ RequestTemplates }}"
description: |
A mapping of identifier keys to templates. The value is an actual template script. The key is typically a SelectionKey which is chosen based on evaluating a selection expression.
- name: ResponseParameters
value: "{{ ResponseParameters }}"
description: |
Supported only for HTTP APIs. You use response parameters to transform the HTTP response from a backend integration before returning the response to clients.
- name: TemplateSelectionExpression
value: "{{ TemplateSelectionExpression }}"
description: |
An expression used to extract information at runtime. See Selection Expressions for more information.
- name: TimeoutInMillis
value: {{ TimeoutInMillis }}
description: |
An integer with a value between [50-30000].
- name: TlsConfig
description: |
The TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.
value:
ServerNameToVerify: "{{ ServerNameToVerify }}"
UPDATE examples
- update_integration
Updates an Integration.
UPDATE aws.apigatewayv2.integrations
SET
ConnectionId = '{{ ConnectionId }}',
ConnectionType = '{{ ConnectionType }}',
ContentHandlingStrategy = '{{ ContentHandlingStrategy }}',
CredentialsArn = '{{ CredentialsArn }}',
Description = '{{ Description }}',
IntegrationMethod = '{{ IntegrationMethod }}',
IntegrationSubtype = '{{ IntegrationSubtype }}',
IntegrationType = '{{ IntegrationType }}',
IntegrationUri = '{{ IntegrationUri }}',
PassthroughBehavior = '{{ PassthroughBehavior }}',
PayloadFormatVersion = '{{ PayloadFormatVersion }}',
RequestParameters = '{{ RequestParameters }}',
RequestTemplates = '{{ RequestTemplates }}',
ResponseParameters = '{{ ResponseParameters }}',
TemplateSelectionExpression = '{{ TemplateSelectionExpression }}',
TimeoutInMillis = {{ TimeoutInMillis }},
TlsConfig = '{{ TlsConfig }}'
WHERE
api_id = '{{ api_id }}' --required
AND integration_id = '{{ integration_id }}' --required
AND region = '{{ region }}' --required
RETURNING
api_gateway_managed,
connection_id,
connection_type,
content_handling_strategy,
credentials_arn,
description,
integration_id,
integration_method,
integration_response_selection_expression,
integration_subtype,
integration_type,
integration_uri,
passthrough_behavior,
payload_format_version,
request_parameters,
request_templates,
response_parameters,
template_selection_expression,
timeout_in_millis,
tls_config;
DELETE examples
- delete_integration
Deletes an Integration.
DELETE FROM aws.apigatewayv2.integrations
WHERE api_id = '{{ api_id }}' --required
AND integration_id = '{{ integration_id }}' --required
AND region = '{{ region }}' --required
;