Skip to main content

integrations

Creates, updates, deletes or gets an integration resource or lists integrations in a region

Overview

Nameintegrations
TypeResource
DescriptionAn example resource schema demonstrating some basic constructs and validation rules.
Idaws.apigatewayv2.integrations

Fields

NameDatatypeDescription
api_idstringThe API identifier.
connection_idstringThe ID of the VPC link for a private integration. Supported only for HTTP APIs.
connection_typestringThe type of the network connection to the integration endpoint. Specify INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and resources in a VPC. The default value is INTERNET.
content_handling_strategystringSupported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT.
credentials_arnstringSpecifies the credentials required for the integration, if any. For AWS integrations, three options are available. To specify an IAM Role for API Gateway to assume, use the role's Amazon Resource Name (ARN). To require that the caller's identity be passed through from the request, specify the string arn:aws:iam::*:user/*. To use resource-based permissions on supported AWS services, don't specify this parameter.
descriptionstringThe description of the integration.
integration_methodstringSpecifies the integration's HTTP method type.
integration_subtypestringSupported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke.
integration_idstringThe integration ID.
integration_typestringThe integration type of an integration.
integration_uristringFor a Lambda integration, specify the URI of a Lambda function. For an HTTP integration, specify a fully-qualified URL. For an HTTP API private integration, specify the ARN of an Application Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map service.
passthrough_behaviorstringSpecifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the requestTemplates property on the Integration resource. There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and NEVER. Supported only for WebSocket APIs.
payload_format_versionstringSpecifies the format of the payload sent to an integration. Required for HTTP APIs. For HTTP APIs, supported values for Lambda proxy integrations are 1.0 and 2.0 For all other integrations, 1.0 is the only supported value.
request_parametersobjectA key-value map specifying parameters.
request_templatesobjectA map of Velocity templates that are applied on the request payload based on the value of the Content-Type header sent by the client.
response_parametersobjectParameters that transform the HTTP response from a backend integration before returning the response to clients. Supported only for HTTP APIs.
template_selection_expressionstringThe template selection expression for the integration. Supported only for WebSocket APIs.
timeout_in_millisintegerCustom timeout between 50 and 29000 milliseconds for WebSocket APIs and between 50 and 30000 milliseconds for HTTP APIs. The default timeout is 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
tls_configobjectThe TLS configuration for a private integration. If you specify a TLS configuration, private integration traffic uses the HTTPS protocol. Supported only for HTTP APIs.
regionstringAWS region.

For more information, see AWS::ApiGatewayV2::Integration.

Methods

NameAccessible byRequired Params
create_resourceINSERTApiId, IntegrationType, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all integrations in a region.

SELECT
region,
api_id,
connection_id,
connection_type,
content_handling_strategy,
credentials_arn,
description,
integration_method,
integration_subtype,
integration_id,
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 region = 'us-east-1';

Gets all properties from an individual integration.

SELECT
region,
api_id,
connection_id,
connection_type,
content_handling_strategy,
credentials_arn,
description,
integration_method,
integration_subtype,
integration_id,
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 region = 'us-east-1' AND data__Identifier = '<ApiId>|<IntegrationId>';

INSERT example

Use the following StackQL query and manifest file to create a new integration resource, using stack-deploy.

/*+ create */
INSERT INTO aws.apigatewayv2.integrations (
ApiId,
IntegrationType,
region
)
SELECT
'{{ ApiId }}',
'{{ IntegrationType }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.apigatewayv2.integrations
WHERE data__Identifier = '<ApiId|IntegrationId>'
AND region = 'us-east-1';

Permissions

To operate on the integrations resource, the following permissions are required:

Create

apigateway:POST

Update

apigateway:PATCH,
apigateway:GET,
apigateway:PUT

Read

apigateway:GET

Delete

apigateway:GET,
apigateway:DELETE

List

apigateway:GET