Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.25.0 published on Friday, Oct 15, 2021 by Pulumi

Integration

Provides an HTTP Method Integration for an API Gateway Integration.

Lambda integration

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const myregion = config.requireObject("myregion");
const accountId = config.requireObject("accountId");
// API Gateway
const api = new aws.apigateway.RestApi("api", {});
const resource = new aws.apigateway.Resource("resource", {
    pathPart: "resource",
    parentId: api.rootResourceId,
    restApi: api.id,
});
const method = new aws.apigateway.Method("method", {
    restApi: api.id,
    resourceId: resource.id,
    httpMethod: "GET",
    authorization: "NONE",
});
// IAM
const role = new aws.iam.Role("role", {assumeRolePolicy: `{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "lambda.amazonaws.com"
      },
      "Effect": "Allow",
      "Sid": ""
    }
  ]
}
`});
const lambda = new aws.lambda.Function("lambda", {
    code: new pulumi.asset.FileArchive("lambda.zip"),
    role: role.arn,
    handler: "lambda.lambda_handler",
    runtime: "python3.6",
});
const integration = new aws.apigateway.Integration("integration", {
    restApi: api.id,
    resourceId: resource.id,
    httpMethod: method.httpMethod,
    integrationHttpMethod: "POST",
    type: "AWS_PROXY",
    uri: lambda.invokeArn,
});
// Lambda
const apigwLambda = new aws.lambda.Permission("apigwLambda", {
    action: "lambda:InvokeFunction",
    "function": lambda.name,
    principal: "apigateway.amazonaws.com",
    sourceArn: pulumi.interpolate`arn:aws:execute-api:${myregion}:${accountId}:${api.id}/*/${method.httpMethod}${resource.path}`,
});
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
myregion = config.require_object("myregion")
account_id = config.require_object("accountId")
# API Gateway
api = aws.apigateway.RestApi("api")
resource = aws.apigateway.Resource("resource",
    path_part="resource",
    parent_id=api.root_resource_id,
    rest_api=api.id)
method = aws.apigateway.Method("method",
    rest_api=api.id,
    resource_id=resource.id,
    http_method="GET",
    authorization="NONE")
# IAM
role = aws.iam.Role("role", assume_role_policy="""{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "lambda.amazonaws.com"
      },
      "Effect": "Allow",
      "Sid": ""
    }
  ]
}
""")
lambda_ = aws.lambda_.Function("lambda",
    code=pulumi.FileArchive("lambda.zip"),
    role=role.arn,
    handler="lambda.lambda_handler",
    runtime="python3.6")
integration = aws.apigateway.Integration("integration",
    rest_api=api.id,
    resource_id=resource.id,
    http_method=method.http_method,
    integration_http_method="POST",
    type="AWS_PROXY",
    uri=lambda_.invoke_arn)
# Lambda
apigw_lambda = aws.lambda_.Permission("apigwLambda",
    action="lambda:InvokeFunction",
    function=lambda_.name,
    principal="apigateway.amazonaws.com",
    source_arn=pulumi.Output.all(api.id, method.http_method, resource.path).apply(lambda id, http_method, path: f"arn:aws:execute-api:{myregion}:{account_id}:{id}/*/{http_method}{path}"))
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var myregion = config.RequireObject<dynamic>("myregion");
        var accountId = config.RequireObject<dynamic>("accountId");
        // API Gateway
        var api = new Aws.ApiGateway.RestApi("api", new Aws.ApiGateway.RestApiArgs
        {
        });
        var resource = new Aws.ApiGateway.Resource("resource", new Aws.ApiGateway.ResourceArgs
        {
            PathPart = "resource",
            ParentId = api.RootResourceId,
            RestApi = api.Id,
        });
        var method = new Aws.ApiGateway.Method("method", new Aws.ApiGateway.MethodArgs
        {
            RestApi = api.Id,
            ResourceId = resource.Id,
            HttpMethod = "GET",
            Authorization = "NONE",
        });
        // IAM
        var role = new Aws.Iam.Role("role", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {
      ""Action"": ""sts:AssumeRole"",
      ""Principal"": {
        ""Service"": ""lambda.amazonaws.com""
      },
      ""Effect"": ""Allow"",
      ""Sid"": """"
    }
  ]
}
",
        });
        var lambda = new Aws.Lambda.Function("lambda", new Aws.Lambda.FunctionArgs
        {
            Code = new FileArchive("lambda.zip"),
            Role = role.Arn,
            Handler = "lambda.lambda_handler",
            Runtime = "python3.6",
        });
        var integration = new Aws.ApiGateway.Integration("integration", new Aws.ApiGateway.IntegrationArgs
        {
            RestApi = api.Id,
            ResourceId = resource.Id,
            HttpMethod = method.HttpMethod,
            IntegrationHttpMethod = "POST",
            Type = "AWS_PROXY",
            Uri = lambda.InvokeArn,
        });
        // Lambda
        var apigwLambda = new Aws.Lambda.Permission("apigwLambda", new Aws.Lambda.PermissionArgs
        {
            Action = "lambda:InvokeFunction",
            Function = lambda.Name,
            Principal = "apigateway.amazonaws.com",
            SourceArn = Output.Tuple(api.Id, method.HttpMethod, resource.Path).Apply(values =>
            {
                var id = values.Item1;
                var httpMethod = values.Item2;
                var path = values.Item3;
                return $"arn:aws:execute-api:{myregion}:{accountId}:{id}/*/{httpMethod}{path}";
            }),
        });
    }

}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const name = config.requireObject("name");
const subnetId = config.requireObject("subnetId");
const testLoadBalancer = new aws.lb.LoadBalancer("testLoadBalancer", {
    internal: true,
    loadBalancerType: "network",
    subnets: [subnetId],
});
const testVpcLink = new aws.apigateway.VpcLink("testVpcLink", {targetArn: [testLoadBalancer.arn]});
const testRestApi = new aws.apigateway.RestApi("testRestApi", {});
const testResource = new aws.apigateway.Resource("testResource", {
    restApi: testRestApi.id,
    parentId: testRestApi.rootResourceId,
    pathPart: "test",
});
const testMethod = new aws.apigateway.Method("testMethod", {
    restApi: testRestApi.id,
    resourceId: testResource.id,
    httpMethod: "GET",
    authorization: "NONE",
    requestModels: {
        "application/json": "Error",
    },
});
const testIntegration = new aws.apigateway.Integration("testIntegration", {
    restApi: testRestApi.id,
    resourceId: testResource.id,
    httpMethod: testMethod.httpMethod,
    requestTemplates: {
        "application/json": "",
        "application/xml": `#set($inputRoot = $input.path('$'))
{ }`,
    },
    requestParameters: {
        "integration.request.header.X-Authorization": "'static'",
        "integration.request.header.X-Foo": "'Bar'",
    },
    type: "HTTP",
    uri: "https://www.google.de",
    integrationHttpMethod: "GET",
    passthroughBehavior: "WHEN_NO_MATCH",
    contentHandling: "CONVERT_TO_TEXT",
    connectionType: "VPC_LINK",
    connectionId: testVpcLink.id,
});
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
name = config.require_object("name")
subnet_id = config.require_object("subnetId")
test_load_balancer = aws.lb.LoadBalancer("testLoadBalancer",
    internal=True,
    load_balancer_type="network",
    subnets=[subnet_id])
test_vpc_link = aws.apigateway.VpcLink("testVpcLink", target_arn=[test_load_balancer.arn])
test_rest_api = aws.apigateway.RestApi("testRestApi")
test_resource = aws.apigateway.Resource("testResource",
    rest_api=test_rest_api.id,
    parent_id=test_rest_api.root_resource_id,
    path_part="test")
test_method = aws.apigateway.Method("testMethod",
    rest_api=test_rest_api.id,
    resource_id=test_resource.id,
    http_method="GET",
    authorization="NONE",
    request_models={
        "application/json": "Error",
    })
test_integration = aws.apigateway.Integration("testIntegration",
    rest_api=test_rest_api.id,
    resource_id=test_resource.id,
    http_method=test_method.http_method,
    request_templates={
        "application/json": "",
        "application/xml": """#set($inputRoot = $input.path('$'))
{ }""",
    },
    request_parameters={
        "integration.request.header.X-Authorization": "'static'",
        "integration.request.header.X-Foo": "'Bar'",
    },
    type="HTTP",
    uri="https://www.google.de",
    integration_http_method="GET",
    passthrough_behavior="WHEN_NO_MATCH",
    content_handling="CONVERT_TO_TEXT",
    connection_type="VPC_LINK",
    connection_id=test_vpc_link.id)
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var name = config.RequireObject<dynamic>("name");
        var subnetId = config.RequireObject<dynamic>("subnetId");
        var testLoadBalancer = new Aws.LB.LoadBalancer("testLoadBalancer", new Aws.LB.LoadBalancerArgs
        {
            Internal = true,
            LoadBalancerType = "network",
            Subnets = 
            {
                subnetId,
            },
        });
        var testVpcLink = new Aws.ApiGateway.VpcLink("testVpcLink", new Aws.ApiGateway.VpcLinkArgs
        {
            TargetArn = 
            {
                testLoadBalancer.Arn,
            },
        });
        var testRestApi = new Aws.ApiGateway.RestApi("testRestApi", new Aws.ApiGateway.RestApiArgs
        {
        });
        var testResource = new Aws.ApiGateway.Resource("testResource", new Aws.ApiGateway.ResourceArgs
        {
            RestApi = testRestApi.Id,
            ParentId = testRestApi.RootResourceId,
            PathPart = "test",
        });
        var testMethod = new Aws.ApiGateway.Method("testMethod", new Aws.ApiGateway.MethodArgs
        {
            RestApi = testRestApi.Id,
            ResourceId = testResource.Id,
            HttpMethod = "GET",
            Authorization = "NONE",
            RequestModels = 
            {
                { "application/json", "Error" },
            },
        });
        var testIntegration = new Aws.ApiGateway.Integration("testIntegration", new Aws.ApiGateway.IntegrationArgs
        {
            RestApi = testRestApi.Id,
            ResourceId = testResource.Id,
            HttpMethod = testMethod.HttpMethod,
            RequestTemplates = 
            {
                { "application/json", "" },
                { "application/xml", @"#set($inputRoot = $input.path('$'))
{ }" },
            },
            RequestParameters = 
            {
                { "integration.request.header.X-Authorization", "'static'" },
                { "integration.request.header.X-Foo", "'Bar'" },
            },
            Type = "HTTP",
            Uri = "https://www.google.de",
            IntegrationHttpMethod = "GET",
            PassthroughBehavior = "WHEN_NO_MATCH",
            ContentHandling = "CONVERT_TO_TEXT",
            ConnectionType = "VPC_LINK",
            ConnectionId = testVpcLink.Id,
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/apigateway"
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/lb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := cfg.RequireObject("name")
		subnetId := cfg.RequireObject("subnetId")
		testLoadBalancer, err := lb.NewLoadBalancer(ctx, "testLoadBalancer", &lb.LoadBalancerArgs{
			Internal:         pulumi.Bool(true),
			LoadBalancerType: pulumi.String("network"),
			Subnets: pulumi.StringArray{
				pulumi.Any(subnetId),
			},
		})
		if err != nil {
			return err
		}
		testVpcLink, err := apigateway.NewVpcLink(ctx, "testVpcLink", &apigateway.VpcLinkArgs{
			TargetArn: pulumi.String{
				testLoadBalancer.Arn,
			},
		})
		if err != nil {
			return err
		}
		testRestApi, err := apigateway.NewRestApi(ctx, "testRestApi", nil)
		if err != nil {
			return err
		}
		testResource, err := apigateway.NewResource(ctx, "testResource", &apigateway.ResourceArgs{
			RestApi:  testRestApi.ID(),
			ParentId: testRestApi.RootResourceId,
			PathPart: pulumi.String("test"),
		})
		if err != nil {
			return err
		}
		testMethod, err := apigateway.NewMethod(ctx, "testMethod", &apigateway.MethodArgs{
			RestApi:       testRestApi.ID(),
			ResourceId:    testResource.ID(),
			HttpMethod:    pulumi.String("GET"),
			Authorization: pulumi.String("NONE"),
			RequestModels: pulumi.StringMap{
				"application/json": pulumi.String("Error"),
			},
		})
		if err != nil {
			return err
		}
		_, err = apigateway.NewIntegration(ctx, "testIntegration", &apigateway.IntegrationArgs{
			RestApi:    testRestApi.ID(),
			ResourceId: testResource.ID(),
			HttpMethod: testMethod.HttpMethod,
			RequestTemplates: pulumi.StringMap{
				"application/json": pulumi.String(""),
				"application/xml":  pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v", "#set(", "$", "inputRoot = ", "$", "input.path('", "$", "'))\n{ }")),
			},
			RequestParameters: pulumi.StringMap{
				"integration.request.header.X-Authorization": pulumi.String("'static'"),
				"integration.request.header.X-Foo":           pulumi.String("'Bar'"),
			},
			Type:                  pulumi.String("HTTP"),
			Uri:                   pulumi.String("https://www.google.de"),
			IntegrationHttpMethod: pulumi.String("GET"),
			PassthroughBehavior:   pulumi.String("WHEN_NO_MATCH"),
			ContentHandling:       pulumi.String("CONVERT_TO_TEXT"),
			ConnectionType:        pulumi.String("VPC_LINK"),
			ConnectionId:          testVpcLink.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var myDemoAPI = new Aws.ApiGateway.RestApi("myDemoAPI", new Aws.ApiGateway.RestApiArgs
        {
            Description = "This is my API for demonstration purposes",
        });
        var myDemoResource = new Aws.ApiGateway.Resource("myDemoResource", new Aws.ApiGateway.ResourceArgs
        {
            RestApi = myDemoAPI.Id,
            ParentId = myDemoAPI.RootResourceId,
            PathPart = "mydemoresource",
        });
        var myDemoMethod = new Aws.ApiGateway.Method("myDemoMethod", new Aws.ApiGateway.MethodArgs
        {
            RestApi = myDemoAPI.Id,
            ResourceId = myDemoResource.Id,
            HttpMethod = "GET",
            Authorization = "NONE",
        });
        var myDemoIntegration = new Aws.ApiGateway.Integration("myDemoIntegration", new Aws.ApiGateway.IntegrationArgs
        {
            RestApi = myDemoAPI.Id,
            ResourceId = myDemoResource.Id,
            HttpMethod = myDemoMethod.HttpMethod,
            Type = "MOCK",
            CacheKeyParameters = 
            {
                "method.request.path.param",
            },
            CacheNamespace = "foobar",
            TimeoutMilliseconds = 29000,
            RequestParameters = 
            {
                { "integration.request.header.X-Authorization", "'static'" },
            },
            RequestTemplates = 
            {
                { "application/xml", @"{
   ""body"" : $input.json('$')
}
" },
            },
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		myDemoAPI, err := apigateway.NewRestApi(ctx, "myDemoAPI", &apigateway.RestApiArgs{
			Description: pulumi.String("This is my API for demonstration purposes"),
		})
		if err != nil {
			return err
		}
		myDemoResource, err := apigateway.NewResource(ctx, "myDemoResource", &apigateway.ResourceArgs{
			RestApi:  myDemoAPI.ID(),
			ParentId: myDemoAPI.RootResourceId,
			PathPart: pulumi.String("mydemoresource"),
		})
		if err != nil {
			return err
		}
		myDemoMethod, err := apigateway.NewMethod(ctx, "myDemoMethod", &apigateway.MethodArgs{
			RestApi:       myDemoAPI.ID(),
			ResourceId:    myDemoResource.ID(),
			HttpMethod:    pulumi.String("GET"),
			Authorization: pulumi.String("NONE"),
		})
		if err != nil {
			return err
		}
		_, err = apigateway.NewIntegration(ctx, "myDemoIntegration", &apigateway.IntegrationArgs{
			RestApi:    myDemoAPI.ID(),
			ResourceId: myDemoResource.ID(),
			HttpMethod: myDemoMethod.HttpMethod,
			Type:       pulumi.String("MOCK"),
			CacheKeyParameters: pulumi.StringArray{
				pulumi.String("method.request.path.param"),
			},
			CacheNamespace:      pulumi.String("foobar"),
			TimeoutMilliseconds: pulumi.Int(29000),
			RequestParameters: pulumi.StringMap{
				"integration.request.header.X-Authorization": pulumi.String("'static'"),
			},
			RequestTemplates: pulumi.StringMap{
				"application/xml": pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v", "{\n", "   \"body\" : ", "$", "input.json('", "$", "')\n", "}\n")),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

my_demo_api = aws.apigateway.RestApi("myDemoAPI", description="This is my API for demonstration purposes")
my_demo_resource = aws.apigateway.Resource("myDemoResource",
    rest_api=my_demo_api.id,
    parent_id=my_demo_api.root_resource_id,
    path_part="mydemoresource")
my_demo_method = aws.apigateway.Method("myDemoMethod",
    rest_api=my_demo_api.id,
    resource_id=my_demo_resource.id,
    http_method="GET",
    authorization="NONE")
my_demo_integration = aws.apigateway.Integration("myDemoIntegration",
    rest_api=my_demo_api.id,
    resource_id=my_demo_resource.id,
    http_method=my_demo_method.http_method,
    type="MOCK",
    cache_key_parameters=["method.request.path.param"],
    cache_namespace="foobar",
    timeout_milliseconds=29000,
    request_parameters={
        "integration.request.header.X-Authorization": "'static'",
    },
    request_templates={
        "application/xml": """{
   "body" : $input.json('$')
}
""",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const myDemoAPI = new aws.apigateway.RestApi("myDemoAPI", {description: "This is my API for demonstration purposes"});
const myDemoResource = new aws.apigateway.Resource("myDemoResource", {
    restApi: myDemoAPI.id,
    parentId: myDemoAPI.rootResourceId,
    pathPart: "mydemoresource",
});
const myDemoMethod = new aws.apigateway.Method("myDemoMethod", {
    restApi: myDemoAPI.id,
    resourceId: myDemoResource.id,
    httpMethod: "GET",
    authorization: "NONE",
});
const myDemoIntegration = new aws.apigateway.Integration("myDemoIntegration", {
    restApi: myDemoAPI.id,
    resourceId: myDemoResource.id,
    httpMethod: myDemoMethod.httpMethod,
    type: "MOCK",
    cacheKeyParameters: ["method.request.path.param"],
    cacheNamespace: "foobar",
    timeoutMilliseconds: 29000,
    requestParameters: {
        "integration.request.header.X-Authorization": "'static'",
    },
    requestTemplates: {
        "application/xml": `{
   "body" : $input.json('$')
}
`,
    },
});

Create a Integration Resource

new Integration(name: string, args: IntegrationArgs, opts?: CustomResourceOptions);
@overload
def Integration(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                cache_key_parameters: Optional[Sequence[str]] = None,
                cache_namespace: Optional[str] = None,
                connection_id: Optional[str] = None,
                connection_type: Optional[str] = None,
                content_handling: Optional[str] = None,
                credentials: Optional[str] = None,
                http_method: Optional[str] = None,
                integration_http_method: Optional[str] = None,
                passthrough_behavior: Optional[str] = None,
                request_parameters: Optional[Mapping[str, str]] = None,
                request_templates: Optional[Mapping[str, str]] = None,
                resource_id: Optional[str] = None,
                rest_api: Optional[str] = None,
                timeout_milliseconds: Optional[int] = None,
                tls_config: Optional[IntegrationTlsConfigArgs] = None,
                type: Optional[str] = None,
                uri: Optional[str] = None)
@overload
def Integration(resource_name: str,
                args: IntegrationArgs,
                opts: Optional[ResourceOptions] = None)
func NewIntegration(ctx *Context, name string, args IntegrationArgs, opts ...ResourceOption) (*Integration, error)
public Integration(string name, IntegrationArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args IntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args IntegrationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args IntegrationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Integration Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Integration resource accepts the following input properties:

HttpMethod string
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
ResourceId string
The API resource ID.
RestApi string | string
The ID of the associated REST API.
Type string
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
CacheKeyParameters List<string>
A list of cache key parameters for the integration.
CacheNamespace string
The integration’s cache namespace.
ConnectionId string
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
ConnectionType string
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
ContentHandling string
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
Credentials string
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
IntegrationHttpMethod string
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
PassthroughBehavior string
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
RequestParameters Dictionary<string, string>
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
RequestTemplates Dictionary<string, string>
A map of the integration’s request templates.
TimeoutMilliseconds int
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
TlsConfig IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
Uri string
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
HttpMethod string
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
ResourceId string
The API resource ID.
RestApi string | string
The ID of the associated REST API.
Type string
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
CacheKeyParameters []string
A list of cache key parameters for the integration.
CacheNamespace string
The integration’s cache namespace.
ConnectionId string
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
ConnectionType string
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
ContentHandling string
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
Credentials string
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
IntegrationHttpMethod string
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
PassthroughBehavior string
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
RequestParameters map[string]string
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
RequestTemplates map[string]string
A map of the integration’s request templates.
TimeoutMilliseconds int
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
TlsConfig IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
Uri string
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
httpMethod string
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
resourceId string
The API resource ID.
restApi string | RestApi
The ID of the associated REST API.
type string
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
cacheKeyParameters string[]
A list of cache key parameters for the integration.
cacheNamespace string
The integration’s cache namespace.
connectionId string
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
connectionType string
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
contentHandling string
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
credentials string
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
integrationHttpMethod string
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
passthroughBehavior string
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
requestParameters {[key: string]: string}
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
requestTemplates {[key: string]: string}
A map of the integration’s request templates.
timeoutMilliseconds number
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
tlsConfig IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
uri string
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
http_method str
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
resource_id str
The API resource ID.
rest_api str | str
The ID of the associated REST API.
type str
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
cache_key_parameters Sequence[str]
A list of cache key parameters for the integration.
cache_namespace str
The integration’s cache namespace.
connection_id str
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
connection_type str
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
content_handling str
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
credentials str
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
integration_http_method str
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
passthrough_behavior str
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
request_parameters Mapping[str, str]
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
request_templates Mapping[str, str]
A map of the integration’s request templates.
timeout_milliseconds int
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
tls_config IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
uri str
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

Outputs

All input properties are implicitly available as output properties. Additionally, the Integration resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Integration Resource

Get an existing Integration resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: IntegrationState, opts?: CustomResourceOptions): Integration
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cache_key_parameters: Optional[Sequence[str]] = None,
        cache_namespace: Optional[str] = None,
        connection_id: Optional[str] = None,
        connection_type: Optional[str] = None,
        content_handling: Optional[str] = None,
        credentials: Optional[str] = None,
        http_method: Optional[str] = None,
        integration_http_method: Optional[str] = None,
        passthrough_behavior: Optional[str] = None,
        request_parameters: Optional[Mapping[str, str]] = None,
        request_templates: Optional[Mapping[str, str]] = None,
        resource_id: Optional[str] = None,
        rest_api: Optional[str] = None,
        timeout_milliseconds: Optional[int] = None,
        tls_config: Optional[IntegrationTlsConfigArgs] = None,
        type: Optional[str] = None,
        uri: Optional[str] = None) -> Integration
func GetIntegration(ctx *Context, name string, id IDInput, state *IntegrationState, opts ...ResourceOption) (*Integration, error)
public static Integration Get(string name, Input<string> id, IntegrationState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

CacheKeyParameters List<string>
A list of cache key parameters for the integration.
CacheNamespace string
The integration’s cache namespace.
ConnectionId string
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
ConnectionType string
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
ContentHandling string
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
Credentials string
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
HttpMethod string
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
IntegrationHttpMethod string
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
PassthroughBehavior string
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
RequestParameters Dictionary<string, string>
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
RequestTemplates Dictionary<string, string>
A map of the integration’s request templates.
ResourceId string
The API resource ID.
RestApi string | string
The ID of the associated REST API.
TimeoutMilliseconds int
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
TlsConfig IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
Type string
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
Uri string
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
CacheKeyParameters []string
A list of cache key parameters for the integration.
CacheNamespace string
The integration’s cache namespace.
ConnectionId string
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
ConnectionType string
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
ContentHandling string
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
Credentials string
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
HttpMethod string
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
IntegrationHttpMethod string
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
PassthroughBehavior string
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
RequestParameters map[string]string
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
RequestTemplates map[string]string
A map of the integration’s request templates.
ResourceId string
The API resource ID.
RestApi string | string
The ID of the associated REST API.
TimeoutMilliseconds int
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
TlsConfig IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
Type string
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
Uri string
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
cacheKeyParameters string[]
A list of cache key parameters for the integration.
cacheNamespace string
The integration’s cache namespace.
connectionId string
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
connectionType string
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
contentHandling string
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
credentials string
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
httpMethod string
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
integrationHttpMethod string
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
passthroughBehavior string
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
requestParameters {[key: string]: string}
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
requestTemplates {[key: string]: string}
A map of the integration’s request templates.
resourceId string
The API resource ID.
restApi string | RestApi
The ID of the associated REST API.
timeoutMilliseconds number
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
tlsConfig IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
type string
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
uri string
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.
cache_key_parameters Sequence[str]
A list of cache key parameters for the integration.
cache_namespace str
The integration’s cache namespace.
connection_id str
The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK
connection_type str
The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).
content_handling str
Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.
credentials str
The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.
http_method str
The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
integration_http_method str
The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.
passthrough_behavior str
The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
request_parameters Mapping[str, str]
A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }
request_templates Mapping[str, str]
A map of the integration’s request templates.
resource_id str
The API resource ID.
rest_api str | str
The ID of the associated REST API.
timeout_milliseconds int
Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
tls_config IntegrationTlsConfigArgs
Configuration block specifying the TLS configuration for an integration. Defined below.
type str
The integration input’s type. 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 proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.
uri str
The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

Supporting Types

IntegrationTlsConfig

InsecureSkipVerification bool
Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is issued by a supported certificate authority. This isn’t recommended, but it enables you to use certificates that are signed by private certificate authorities, or certificates that are self-signed. If enabled, API Gateway still performs basic certificate validation, which includes checking the certificate’s expiration date, hostname, and presence of a root certificate authority. Supported only for HTTP and HTTP_PROXY integrations.
InsecureSkipVerification bool
Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is issued by a supported certificate authority. This isn’t recommended, but it enables you to use certificates that are signed by private certificate authorities, or certificates that are self-signed. If enabled, API Gateway still performs basic certificate validation, which includes checking the certificate’s expiration date, hostname, and presence of a root certificate authority. Supported only for HTTP and HTTP_PROXY integrations.
insecureSkipVerification boolean
Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is issued by a supported certificate authority. This isn’t recommended, but it enables you to use certificates that are signed by private certificate authorities, or certificates that are self-signed. If enabled, API Gateway still performs basic certificate validation, which includes checking the certificate’s expiration date, hostname, and presence of a root certificate authority. Supported only for HTTP and HTTP_PROXY integrations.
insecure_skip_verification bool
Specifies whether or not API Gateway skips verification that the certificate for an integration endpoint is issued by a supported certificate authority. This isn’t recommended, but it enables you to use certificates that are signed by private certificate authorities, or certificates that are self-signed. If enabled, API Gateway still performs basic certificate validation, which includes checking the certificate’s expiration date, hostname, and presence of a root certificate authority. Supported only for HTTP and HTTP_PROXY integrations.

Import

aws_api_gateway_integration can be imported using REST-API-ID/RESOURCE-ID/HTTP-METHOD, e.g.

 $ pulumi import aws:apigateway/integration:Integration example 12345abcde/67890fghij/GET

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.