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 | awscc.apigatewayv2.integrations |
Fields
- get (all properties)
- list (identifiers only)
| 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. |
| Name | Datatype | Description |
|---|---|---|
api_id | string | The API identifier. |
integration_id | string | The integration ID. |
region | string | AWS region. |
For more information, see AWS::ApiGatewayV2::Integration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | integrations | INSERT | ApiId, IntegrationType, region |
delete_resource | integrations | DELETE | Identifier, region |
update_resource | integrations | UPDATE | Identifier, PatchDocument, region |
list_resources | integrations_list_only | SELECT | region |
get_resource | integrations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.apigatewayv2.integrations
WHERE
region = 'us-east-1' AND
Identifier = '{{ api_id }}|{{ integration_id }}';
Lists all integrations in a region.
SELECT
region,
api_id,
integration_id
FROM awscc.apigatewayv2.integrations_list_only
WHERE
region = 'us-east-1';
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 awscc.apigatewayv2.integrations (
ApiId,
IntegrationType,
region
)
SELECT
'{{ api_id }}',
'{{ integration_type }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.apigatewayv2.integrations (
ApiId,
ConnectionId,
ConnectionType,
ContentHandlingStrategy,
CredentialsArn,
Description,
IntegrationMethod,
IntegrationSubtype,
IntegrationType,
IntegrationUri,
PassthroughBehavior,
PayloadFormatVersion,
RequestParameters,
RequestTemplates,
ResponseParameters,
TemplateSelectionExpression,
TimeoutInMillis,
TlsConfig,
region
)
SELECT
'{{ api_id }}',
'{{ connection_id }}',
'{{ connection_type }}',
'{{ content_handling_strategy }}',
'{{ credentials_arn }}',
'{{ description }}',
'{{ integration_method }}',
'{{ 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 }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: integration
props:
- name: api_id
value: '{{ api_id }}'
- name: connection_id
value: '{{ connection_id }}'
- name: connection_type
value: '{{ connection_type }}'
- name: content_handling_strategy
value: '{{ content_handling_strategy }}'
- name: credentials_arn
value: '{{ credentials_arn }}'
- name: description
value: '{{ description }}'
- name: integration_method
value: '{{ integration_method }}'
- name: integration_subtype
value: '{{ integration_subtype }}'
- name: integration_type
value: '{{ integration_type }}'
- name: integration_uri
value: '{{ integration_uri }}'
- name: passthrough_behavior
value: '{{ passthrough_behavior }}'
- name: payload_format_version
value: '{{ payload_format_version }}'
- name: request_parameters
value: {}
- name: request_templates
value: {}
- name: response_parameters
value: {}
- name: template_selection_expression
value: '{{ template_selection_expression }}'
- name: timeout_in_millis
value: '{{ timeout_in_millis }}'
- name: tls_config
value:
server_name_to_verify: '{{ server_name_to_verify }}'
UPDATE example
Use the following StackQL query and manifest file to update a integration resource, using stack-deploy.
/*+ update */
UPDATE awscc.apigatewayv2.integrations
SET PatchDocument = string('{{ {
"ConnectionId": connection_id,
"ConnectionType": connection_type,
"ContentHandlingStrategy": content_handling_strategy,
"CredentialsArn": credentials_arn,
"Description": description,
"IntegrationMethod": integration_method,
"IntegrationSubtype": integration_subtype,
"IntegrationType": integration_type,
"IntegrationUri": integration_uri,
"PassthroughBehavior": passthrough_behavior,
"PayloadFormatVersion": payload_format_version,
"RequestParameters": request_parameters,
"RequestTemplates": request_templates,
"ResponseParameters": response_parameters,
"TemplateSelectionExpression": template_selection_expression,
"TimeoutInMillis": timeout_in_millis,
"TlsConfig": tls_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ api_id }}|{{ integration_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.apigatewayv2.integrations
WHERE
Identifier = '{{ api_id }}|{{ integration_id }}' AND
region = 'us-east-1';
Permissions
To operate on the integrations resource, the following permissions are required:
- Create
- Update
- Read
- Delete
- List
apigateway:POST,
iam:PassRole
apigateway:PATCH,
apigateway:GET,
apigateway:PUT,
iam:PassRole
apigateway:GET
apigateway:GET,
apigateway:DELETE
apigateway:GET