Skip to main content

integration_responses

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

Overview

Nameintegration_responses
TypeResource
Idaws.apigatewayv2.integration_responses

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
content_handling_strategystringSpecifies how to handle response payload content type conversions. Supported only for WebSocket APIs. (CONVERT_TO_BINARY, CONVERT_TO_TEXT)
integration_response_idstringThe identifier.
integration_response_keystringAfter evaluating a selection expression, the result is compared against one or more selection keys to find a matching key. See Selection Expressions for a list of expressions and each expression's associated selection key type.
response_parametersobjectA key-value map specifying response parameters that are passed to the method response from the backend. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of method.response.header.{name}, where name is a valid and unique header name. The mapped non-static value must match the pattern of integration.response.header.{name} or integration.response.body.{JSON-expression}, where name is a valid and unique response header name and JSON-expression is a valid JSON expression without the $ prefix.
response_templatesobjectThe collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value.
template_selection_expressionstringAn expression used to extract information at runtime. See Selection Expressions for more information.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_integration_responseselectapi_id, integration_id, integration_response_id, regionGets an IntegrationResponses.
get_integration_responsesselectapi_id, integration_id, regionmaxResults, nextTokenGets the IntegrationResponses for an Integration.
create_integration_responseinsertapi_id, integration_id, region, IntegrationResponseKeyCreates an IntegrationResponses.
update_integration_responseupdateapi_id, integration_id, integration_response_id, regionUpdates an IntegrationResponses.
delete_integration_responsedeleteapi_id, integration_id, integration_response_id, regionDeletes an IntegrationResponses.

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
api_idstringThe API identifier.
integration_idstringThe integration ID.
integration_response_idstringThe integration response ID.
regionstringAWS region (default: us-east-1)
maxResultsstringThe maximum number of elements to be returned for this resource.
nextTokenstringThe next page of elements from this collection. Not valid for the last element of the collection.

SELECT examples

Gets an IntegrationResponses.

SELECT
content_handling_strategy,
integration_response_id,
integration_response_key,
response_parameters,
response_templates,
template_selection_expression
FROM aws.apigatewayv2.integration_responses
WHERE api_id = '{{ api_id }}' -- required
AND integration_id = '{{ integration_id }}' -- required
AND integration_response_id = '{{ integration_response_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an IntegrationResponses.

INSERT INTO aws.apigatewayv2.integration_responses (
ContentHandlingStrategy,
IntegrationResponseKey,
ResponseParameters,
ResponseTemplates,
TemplateSelectionExpression,
api_id,
integration_id,
region
)
SELECT
'{{ ContentHandlingStrategy }}',
'{{ IntegrationResponseKey }}' /* required */,
'{{ ResponseParameters }}',
'{{ ResponseTemplates }}',
'{{ TemplateSelectionExpression }}',
'{{ api_id }}',
'{{ integration_id }}',
'{{ region }}'
RETURNING
content_handling_strategy,
integration_response_id,
integration_response_key,
response_parameters,
response_templates,
template_selection_expression
;

UPDATE examples

Updates an IntegrationResponses.

UPDATE aws.apigatewayv2.integration_responses
SET
ContentHandlingStrategy = '{{ ContentHandlingStrategy }}',
IntegrationResponseKey = '{{ IntegrationResponseKey }}',
ResponseParameters = '{{ ResponseParameters }}',
ResponseTemplates = '{{ ResponseTemplates }}',
TemplateSelectionExpression = '{{ TemplateSelectionExpression }}'
WHERE
api_id = '{{ api_id }}' --required
AND integration_id = '{{ integration_id }}' --required
AND integration_response_id = '{{ integration_response_id }}' --required
AND region = '{{ region }}' --required
RETURNING
content_handling_strategy,
integration_response_id,
integration_response_key,
response_parameters,
response_templates,
template_selection_expression;

DELETE examples

Deletes an IntegrationResponses.

DELETE FROM aws.apigatewayv2.integration_responses
WHERE api_id = '{{ api_id }}' --required
AND integration_id = '{{ integration_id }}' --required
AND integration_response_id = '{{ integration_response_id }}' --required
AND region = '{{ region }}' --required
;