import * as core from "@terrascript/core"; export interface TlsConfigArgs extends core.SchemaArgs { serverNameToVerify?: string | core.StringOut; } export class TlsConfig extends core.Schema { @core.attr(String) public serverNameToVerify?: string | core.StringOut; } export interface ResponseParametersArgs extends core.SchemaArgs { mappings: core.Map | core.MapOut; statusCode: string | core.StringOut; } export class ResponseParameters extends core.Schema { @core.attr(String, { kind: "map" }) public mappings!: core.Map | core.MapOut; @core.attr(String) public statusCode!: string | core.StringOut; } export interface IntegrationArgs extends core.ResourceArgs { /** * (Required) The API identifier. */ apiId: string | core.StringOut; /** * (Optional) The ID of the [VPC link](apigatewayv2_vpc_link.html) for a private integration. Supported * only for HTTP APIs. Must be between 1 and 1024 characters in length. */ connectionId?: string | core.StringOut; /** * (Optional) The type of the network connection to the integration endpoint. Valid values: `INTERNET`, * VPC_LINK`. Default is `INTERNET`. */ connectionType?: string | core.StringOut; /** * (Optional) How to handle response payload content type conversions. Valid values: `CONVERT_TO_BINARY * , `CONVERT_TO_TEXT`. Supported only for WebSocket APIs. */ contentHandlingStrategy?: string | core.StringOut; /** * (Optional) The credentials required for the integration, if any. */ credentialsArn?: string | core.StringOut; /** * (Optional) The description of the integration. */ description?: string | core.StringOut; /** * (Optional) The integration's HTTP method. Must be specified if `integration_type` is not `MOCK`. */ integrationMethod?: string | core.StringOut; /** * (Optional) Specifies the AWS service action to invoke. Supported only for HTTP APIs when `integratio * n_type` is `AWS_PROXY`. See the [AWS service integration reference](https://docs.aws.amazon.com/apig * ateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html) documentatio * n for supported values. Must be between 1 and 128 characters in length. */ integrationSubtype?: string | core.StringOut; /** * (Required) The integration type of an integration. */ integrationType: string | core.StringOut; /** * (Optional) The URI of the Lambda function for a Lambda proxy integration, when `integration_type` is * AWS_PROXY`. */ integrationUri?: string | core.StringOut; /** * (Optional) The pass-through behavior for incoming requests based on the Content-Type header in the r * equest, and the available mapping templates specified as the `request_templates` attribute. */ passthroughBehavior?: string | core.StringOut; /** * (Optional) The [format of the payload](https://docs.aws.amazon.com/apigateway/latest/developerguide/ * http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format) sent to * an integration. Valid values: `1.0`, `2.0`. Default is `1.0`. */ payloadFormatVersion?: string | core.StringOut; /** * (Optional) For WebSocket APIs, a key-value map specifying request parameters that are passed from th * e method request to the backend. */ requestParameters?: core.Map | core.MapOut; /** * (Optional) A map of [Velocity](https://velocity.apache.org/) templates that are applied on the reque * st payload based on the value of the Content-Type header sent by the client. Supported only for WebS * ocket APIs. */ requestTemplates?: core.Map | core.MapOut; /** * (Optional) Mappings to transform the HTTP response from a backend integration before returning the r * esponse to clients. Supported only for HTTP APIs. */ responseParameters?: | core.Array | core.ArrayOut; /** * (Optional) The [template selection expression](https://docs.aws.amazon.com/apigateway/latest/develop * erguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-template-select * ion-expressions) for the integration. */ templateSelectionExpression?: string | core.StringOut; /** * (Optional) Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 3 * 0,000 milliseconds for HTTP APIs. */ timeoutMilliseconds?: number | core.NumberOut; /** * (Optional) The TLS configuration for a private integration. Supported only for HTTP APIs. */ tlsConfig?: TlsConfig; } export class Integration extends core.Resource { /** * (Required) The API identifier. */ @core.attr(String) public apiId!: string | core.StringOut; /** * (Optional) The ID of the [VPC link](apigatewayv2_vpc_link.html) for a private integration. Supported * only for HTTP APIs. Must be between 1 and 1024 characters in length. */ @core.attr(String) public connectionId?: string | core.StringOut; /** * (Optional) The type of the network connection to the integration endpoint. Valid values: `INTERNET`, * VPC_LINK`. Default is `INTERNET`. */ @core.attr(String) public connectionType?: string | core.StringOut; /** * (Optional) How to handle response payload content type conversions. Valid values: `CONVERT_TO_BINARY * , `CONVERT_TO_TEXT`. Supported only for WebSocket APIs. */ @core.attr(String) public contentHandlingStrategy?: string | core.StringOut; /** * (Optional) The credentials required for the integration, if any. */ @core.attr(String) public credentialsArn?: string | core.StringOut; /** * (Optional) The description of the integration. */ @core.attr(String) public description?: string | core.StringOut; /** * The integration identifier. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The integration's HTTP method. Must be specified if `integration_type` is not `MOCK`. */ @core.attr(String) public integrationMethod?: string | core.StringOut; /** * The [integration response selection expression](https://docs.aws.amazon.com/apigateway/latest/develo * perguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-integration-re * sponse-selection-expressions) for the integration. */ @core.attr(String, { computed: true }) public integrationResponseSelectionExpression!: string | core.StringOut; /** * (Optional) Specifies the AWS service action to invoke. Supported only for HTTP APIs when `integratio * n_type` is `AWS_PROXY`. See the [AWS service integration reference](https://docs.aws.amazon.com/apig * ateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html) documentatio * n for supported values. Must be between 1 and 128 characters in length. */ @core.attr(String) public integrationSubtype?: string | core.StringOut; /** * (Required) The integration type of an integration. */ @core.attr(String) public integrationType!: string | core.StringOut; /** * (Optional) The URI of the Lambda function for a Lambda proxy integration, when `integration_type` is * AWS_PROXY`. */ @core.attr(String) public integrationUri?: string | core.StringOut; /** * (Optional) The pass-through behavior for incoming requests based on the Content-Type header in the r * equest, and the available mapping templates specified as the `request_templates` attribute. */ @core.attr(String) public passthroughBehavior?: string | core.StringOut; /** * (Optional) The [format of the payload](https://docs.aws.amazon.com/apigateway/latest/developerguide/ * http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format) sent to * an integration. Valid values: `1.0`, `2.0`. Default is `1.0`. */ @core.attr(String) public payloadFormatVersion?: string | core.StringOut; /** * (Optional) For WebSocket APIs, a key-value map specifying request parameters that are passed from th * e method request to the backend. */ @core.attr(String, { kind: "map" }) public requestParameters?: | core.Map | core.MapOut; /** * (Optional) A map of [Velocity](https://velocity.apache.org/) templates that are applied on the reque * st payload based on the value of the Content-Type header sent by the client. Supported only for WebS * ocket APIs. */ @core.attr(String, { kind: "map" }) public requestTemplates?: | core.Map | core.MapOut; /** * (Optional) Mappings to transform the HTTP response from a backend integration before returning the r * esponse to clients. Supported only for HTTP APIs. */ @core.attr(ResponseParameters, { kind: "array" }) public responseParameters?: | core.Array | core.ArrayOut; /** * (Optional) The [template selection expression](https://docs.aws.amazon.com/apigateway/latest/develop * erguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-template-select * ion-expressions) for the integration. */ @core.attr(String) public templateSelectionExpression?: string | core.StringOut; /** * (Optional) Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and between 50 and 3 * 0,000 milliseconds for HTTP APIs. */ @core.attr(Number, { computed: true }) public timeoutMilliseconds?: number | core.NumberOut; /** * (Optional) The TLS configuration for a private integration. Supported only for HTTP APIs. */ @core.attr(TlsConfig) public tlsConfig?: TlsConfig; constructor(name: string, args?: IntegrationArgs) { super(name, "aws_apigatewayv2_integration", args); } public override getNamespace(): string { return "aws_apigatewayv2"; } }