import * as core from "@terrascript/core"; export interface TlsConfigArgs extends core.SchemaArgs { insecureSkipVerification?: boolean | core.BooleanOut; } export class TlsConfig extends core.Schema { @core.attr(Boolean) public insecureSkipVerification?: boolean | core.BooleanOut; } export interface IntegrationArgs extends core.ResourceArgs { /** * (Optional) A list of cache key parameters for the integration. */ cacheKeyParameters?: core.Array | core.ArrayOut; /** * (Optional) The integration's cache namespace. */ cacheNamespace?: string | core.StringOut; /** * (Optional) The id of the VpcLink used for the integration. **Required** if `connection_type` is `VPC * _LINK` */ connectionId?: string | core.StringOut; /** * (Optional) The integration input's [connectionType](https://docs.aws.amazon.com/apigateway/api-refer * ence/resource/integration/#connectionType). Valid values are `INTERNET` (default for connections thr * ough the public routable internet), and `VPC_LINK` (for private connections between API Gateway and * a network load balancer in a VPC). */ connectionType?: string | core.StringOut; /** * (Optional) Specifies how to handle request payload content type conversions. Supported values are `C * ONVERT_TO_BINARY` and `CONVERT_TO_TEXT`. If this property is not defined, the request payload will b * e passed through from the method request to integration request without modification, provided that * the passthroughBehaviors is configured to support payload pass-through. */ contentHandling?: string | core.StringOut; /** * (Optional) The credentials required for the integration. For `AWS` integrations, 2 options are avail * able. To specify an IAM Role for Amazon API Gateway to assume, use the role's ARN. To require that t * he caller's identity be passed through from the request, specify the string `arn:aws:iam::\*:user/\* * . */ credentials?: string | core.StringOut; /** * (Required) The HTTP method (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`, `ANY`) */ httpMethod: string | core.StringOut; /** * (Optional) The integration HTTP method */ integrationHttpMethod?: string | core.StringOut; /** * (Optional) The integration passthrough behavior (`WHEN_NO_MATCH`, `WHEN_NO_TEMPLATES`, `NEVER`). ** * Required** if `request_templates` is used. */ passthroughBehavior?: string | core.StringOut; /** * (Optional) A map of request query string parameters and headers that should be passed to the backend * responder. */ requestParameters?: core.Map | core.MapOut; /** * (Optional) A map of the integration's request templates. */ requestTemplates?: core.Map | core.MapOut; /** * (Required) The API resource ID. */ resourceId: string | core.StringOut; /** * (Required) The ID of the associated REST API. */ restApiId: string | core.StringOut; /** * (Optional) Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 millisecon * ds. */ timeoutMilliseconds?: number | core.NumberOut; /** * (Optional) Configuration block specifying the TLS configuration for an integration. Defined below. */ tlsConfig?: TlsConfig; /** * (Required) The integration input's [type](https://docs.aws.amazon.com/apigateway/api-reference/resou * rce/integration/). Valid values are `HTTP` (for HTTP backends), `MOCK` (not calling any real backend * ), `AWS` (for AWS services), `AWS_PROXY` (for Lambda proxy integration) and `HTTP_PROXY` (for HTTP p * roxy integration). An `HTTP` or `HTTP_PROXY` integration with a `connection_type` of `VPC_LINK` is r * eferred to as a private integration and uses a VpcLink to connect API Gateway to a network load bala * ncer of a VPC. */ type: string | core.StringOut; /** * (Optional) The input's URI. **Required** if `type` is `AWS`, `AWS_PROXY`, `HTTP` or `HTTP_PROXY`. */ uri?: string | core.StringOut; } export class Integration extends core.Resource { /** * (Optional) A list of cache key parameters for the integration. */ @core.attr(String, { kind: "array" }) public cacheKeyParameters?: | core.Array | core.ArrayOut; /** * (Optional) The integration's cache namespace. */ @core.attr(String, { computed: true }) public cacheNamespace?: string | core.StringOut; /** * (Optional) The id of the VpcLink used for the integration. **Required** if `connection_type` is `VPC * _LINK` */ @core.attr(String) public connectionId?: string | core.StringOut; /** * (Optional) The integration input's [connectionType](https://docs.aws.amazon.com/apigateway/api-refer * ence/resource/integration/#connectionType). Valid values are `INTERNET` (default for connections thr * ough the public routable internet), and `VPC_LINK` (for private connections between API Gateway and * a network load balancer in a VPC). */ @core.attr(String) public connectionType?: string | core.StringOut; /** * (Optional) Specifies how to handle request payload content type conversions. Supported values are `C * ONVERT_TO_BINARY` and `CONVERT_TO_TEXT`. If this property is not defined, the request payload will b * e passed through from the method request to integration request without modification, provided that * the passthroughBehaviors is configured to support payload pass-through. */ @core.attr(String) public contentHandling?: string | core.StringOut; /** * (Optional) The credentials required for the integration. For `AWS` integrations, 2 options are avail * able. To specify an IAM Role for Amazon API Gateway to assume, use the role's ARN. To require that t * he caller's identity be passed through from the request, specify the string `arn:aws:iam::\*:user/\* * . */ @core.attr(String) public credentials?: string | core.StringOut; /** * (Required) The HTTP method (`GET`, `POST`, `PUT`, `DELETE`, `HEAD`, `OPTION`, `ANY`) */ @core.attr(String) public httpMethod!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The integration HTTP method */ @core.attr(String) public integrationHttpMethod?: string | core.StringOut; /** * (Optional) The integration passthrough behavior (`WHEN_NO_MATCH`, `WHEN_NO_TEMPLATES`, `NEVER`). ** * Required** if `request_templates` is used. */ @core.attr(String, { computed: true }) public passthroughBehavior?: string | core.StringOut; /** * (Optional) A map of request query string parameters and headers that should be passed to the backend * responder. */ @core.attr(String, { kind: "map" }) public requestParameters?: | core.Map | core.MapOut; /** * (Optional) A map of the integration's request templates. */ @core.attr(String, { kind: "map" }) public requestTemplates?: | core.Map | core.MapOut; /** * (Required) The API resource ID. */ @core.attr(String) public resourceId!: string | core.StringOut; /** * (Required) The ID of the associated REST API. */ @core.attr(String) public restApiId!: string | core.StringOut; /** * (Optional) Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 millisecon * ds. */ @core.attr(Number) public timeoutMilliseconds?: number | core.NumberOut; /** * (Optional) Configuration block specifying the TLS configuration for an integration. Defined below. */ @core.attr(TlsConfig) public tlsConfig?: TlsConfig; /** * (Required) The integration input's [type](https://docs.aws.amazon.com/apigateway/api-reference/resou * rce/integration/). Valid values are `HTTP` (for HTTP backends), `MOCK` (not calling any real backend * ), `AWS` (for AWS services), `AWS_PROXY` (for Lambda proxy integration) and `HTTP_PROXY` (for HTTP p * roxy integration). An `HTTP` or `HTTP_PROXY` integration with a `connection_type` of `VPC_LINK` is r * eferred to as a private integration and uses a VpcLink to connect API Gateway to a network load bala * ncer of a VPC. */ @core.attr(String) public type!: string | core.StringOut; /** * (Optional) The input's URI. **Required** if `type` is `AWS`, `AWS_PROXY`, `HTTP` or `HTTP_PROXY`. */ @core.attr(String) public uri?: string | core.StringOut; constructor(name: string, args?: IntegrationArgs) { super(name, "aws_api_gateway_integration", args); } public override getNamespace(): string { return "aws_api_gateway"; } }