integrations
Creates, updates, deletes or gets an integration
resource or lists integrations
in a region
Overview
Name | integrations |
Type | Resource |
Description | An example resource schema demonstrating some basic constructs and validation rules. |
Id | aws.apigatewayv2.integrations |
Fields
Name | Datatype | Description |
---|---|---|
api_id | string | The API identifier. |
connection_id | string | The ID of the VPC link for a private integration. Supported only for HTTP APIs. |
connection_type | string | The 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_strategy | string | Supported only for WebSocket APIs. Specifies how to handle response payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. |
credentials_arn | string | Specifies 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. |
description | string | The description of the integration. |
integration_method | string | Specifies the integration's HTTP method type. |
integration_subtype | string | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS service action to invoke. |
integration_id | string | The integration ID. |
integration_type | string | The integration type of an integration. |
integration_uri | string | For 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_behavior | string | Specifies 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_version | string | Specifies 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_parameters | object | A key-value map specifying parameters. |
request_templates | object | 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. |
response_parameters | object | Parameters that transform the HTTP response from a backend integration before returning the response to clients. Supported only for HTTP APIs. |
template_selection_expression | string | The template selection expression for the integration. Supported only for WebSocket APIs. |
timeout_in_millis | integer | Custom 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_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. |
region | string | AWS region. |
For more information, see AWS::ApiGatewayV2::Integration
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ApiId, IntegrationType, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigatewayv2.integrations (
ApiId,
IntegrationType,
region
)
SELECT
'{{ ApiId }}',
'{{ IntegrationType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigatewayv2.integrations (
ApiId,
ConnectionId,
ConnectionType,
ContentHandlingStrategy,
CredentialsArn,
Description,
IntegrationMethod,
IntegrationSubtype,
IntegrationType,
IntegrationUri,
PassthroughBehavior,
PayloadFormatVersion,
RequestParameters,
RequestTemplates,
ResponseParameters,
TemplateSelectionExpression,
TimeoutInMillis,
TlsConfig,
region
)
SELECT
'{{ ApiId }}',
'{{ ConnectionId }}',
'{{ ConnectionType }}',
'{{ ContentHandlingStrategy }}',
'{{ CredentialsArn }}',
'{{ Description }}',
'{{ IntegrationMethod }}',
'{{ IntegrationSubtype }}',
'{{ IntegrationType }}',
'{{ IntegrationUri }}',
'{{ PassthroughBehavior }}',
'{{ PayloadFormatVersion }}',
'{{ RequestParameters }}',
'{{ RequestTemplates }}',
'{{ ResponseParameters }}',
'{{ TemplateSelectionExpression }}',
'{{ TimeoutInMillis }}',
'{{ TlsConfig }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: integration
props:
- name: ApiId
value: '{{ ApiId }}'
- name: ConnectionId
value: '{{ ConnectionId }}'
- name: ConnectionType
value: '{{ ConnectionType }}'
- name: ContentHandlingStrategy
value: '{{ ContentHandlingStrategy }}'
- name: CredentialsArn
value: '{{ CredentialsArn }}'
- name: Description
value: '{{ Description }}'
- name: IntegrationMethod
value: '{{ IntegrationMethod }}'
- name: IntegrationSubtype
value: '{{ IntegrationSubtype }}'
- name: IntegrationType
value: '{{ IntegrationType }}'
- name: IntegrationUri
value: '{{ IntegrationUri }}'
- name: PassthroughBehavior
value: '{{ PassthroughBehavior }}'
- name: PayloadFormatVersion
value: '{{ PayloadFormatVersion }}'
- name: RequestParameters
value: {}
- name: RequestTemplates
value: {}
- name: ResponseParameters
value: {}
- name: TemplateSelectionExpression
value: '{{ TemplateSelectionExpression }}'
- name: TimeoutInMillis
value: '{{ TimeoutInMillis }}'
- name: TlsConfig
value:
ServerNameToVerify: '{{ ServerNameToVerify }}'
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