1. Packages
  2. AWS Classic
  3. API Docs
  4. apigateway
  5. Integration

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

aws.apigateway.Integration

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi

    Provides an HTTP Method Integration for an API Gateway Integration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const myDemoAPI = new aws.apigateway.RestApi("MyDemoAPI", {
        name: "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('')
    }
    `,
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    my_demo_api = aws.apigateway.RestApi("MyDemoAPI",
        name="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('$')
    }
    """,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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{
    			Name:        pulumi.String("MyDemoAPI"),
    			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("{\n   \"body\" : $input.json('$')\n}\n"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var myDemoAPI = new Aws.ApiGateway.RestApi("MyDemoAPI", new()
        {
            Name = "MyDemoAPI",
            Description = "This is my API for demonstration purposes",
        });
    
        var myDemoResource = new Aws.ApiGateway.Resource("MyDemoResource", new()
        {
            RestApi = myDemoAPI.Id,
            ParentId = myDemoAPI.RootResourceId,
            PathPart = "mydemoresource",
        });
    
        var myDemoMethod = new Aws.ApiGateway.Method("MyDemoMethod", new()
        {
            RestApi = myDemoAPI.Id,
            ResourceId = myDemoResource.Id,
            HttpMethod = "GET",
            Authorization = "NONE",
        });
    
        var myDemoIntegration = new Aws.ApiGateway.Integration("MyDemoIntegration", new()
        {
            RestApi = myDemoAPI.Id,
            ResourceId = myDemoResource.Id,
            HttpMethod = myDemoMethod.HttpMethod,
            Type = "MOCK",
            CacheKeyParameters = new[]
            {
                "method.request.path.param",
            },
            CacheNamespace = "foobar",
            TimeoutMilliseconds = 29000,
            RequestParameters = 
            {
                { "integration.request.header.X-Authorization", "'static'" },
            },
            RequestTemplates = 
            {
                { "application/xml", @"{
       ""body"" : $input.json('$')
    }
    " },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apigateway.RestApi;
    import com.pulumi.aws.apigateway.RestApiArgs;
    import com.pulumi.aws.apigateway.Resource;
    import com.pulumi.aws.apigateway.ResourceArgs;
    import com.pulumi.aws.apigateway.Method;
    import com.pulumi.aws.apigateway.MethodArgs;
    import com.pulumi.aws.apigateway.Integration;
    import com.pulumi.aws.apigateway.IntegrationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myDemoAPI = new RestApi("myDemoAPI", RestApiArgs.builder()
                .name("MyDemoAPI")
                .description("This is my API for demonstration purposes")
                .build());
    
            var myDemoResource = new Resource("myDemoResource", ResourceArgs.builder()
                .restApi(myDemoAPI.id())
                .parentId(myDemoAPI.rootResourceId())
                .pathPart("mydemoresource")
                .build());
    
            var myDemoMethod = new Method("myDemoMethod", MethodArgs.builder()
                .restApi(myDemoAPI.id())
                .resourceId(myDemoResource.id())
                .httpMethod("GET")
                .authorization("NONE")
                .build());
    
            var myDemoIntegration = new Integration("myDemoIntegration", IntegrationArgs.builder()
                .restApi(myDemoAPI.id())
                .resourceId(myDemoResource.id())
                .httpMethod(myDemoMethod.httpMethod())
                .type("MOCK")
                .cacheKeyParameters("method.request.path.param")
                .cacheNamespace("foobar")
                .timeoutMilliseconds(29000)
                .requestParameters(Map.of("integration.request.header.X-Authorization", "'static'"))
                .requestTemplates(Map.of("application/xml", """
    {
       "body" : $input.json('$')
    }
                """))
                .build());
    
        }
    }
    
    resources:
      myDemoAPI:
        type: aws:apigateway:RestApi
        name: MyDemoAPI
        properties:
          name: MyDemoAPI
          description: This is my API for demonstration purposes
      myDemoResource:
        type: aws:apigateway:Resource
        name: MyDemoResource
        properties:
          restApi: ${myDemoAPI.id}
          parentId: ${myDemoAPI.rootResourceId}
          pathPart: mydemoresource
      myDemoMethod:
        type: aws:apigateway:Method
        name: MyDemoMethod
        properties:
          restApi: ${myDemoAPI.id}
          resourceId: ${myDemoResource.id}
          httpMethod: GET
          authorization: NONE
      myDemoIntegration:
        type: aws:apigateway:Integration
        name: MyDemoIntegration
        properties:
          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('$')
              }          
    

    Lambda integration

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as std from "@pulumi/std";
    
    const config = new pulumi.Config();
    const myregion = config.requireObject("myregion");
    const accountId = config.requireObject("accountId");
    // API Gateway
    const api = new aws.apigateway.RestApi("api", {name: "myapi"});
    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 assumeRole = aws.iam.getPolicyDocument({
        statements: [{
            effect: "Allow",
            principals: [{
                type: "Service",
                identifiers: ["lambda.amazonaws.com"],
            }],
            actions: ["sts:AssumeRole"],
        }],
    });
    const role = new aws.iam.Role("role", {
        name: "myrole",
        assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json),
    });
    const lambda = new aws.lambda.Function("lambda", {
        code: new pulumi.asset.FileArchive("lambda.zip"),
        name: "mylambda",
        role: role.arn,
        handler: "lambda.lambda_handler",
        runtime: aws.lambda.Runtime.Python3d7,
        sourceCodeHash: std.filebase64sha256({
            input: "lambda.zip",
        }).then(invoke => invoke.result),
    });
    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("apigw_lambda", {
        statementId: "AllowExecutionFromAPIGateway",
        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
    import pulumi_std as std
    
    config = pulumi.Config()
    myregion = config.require_object("myregion")
    account_id = config.require_object("accountId")
    # API Gateway
    api = aws.apigateway.RestApi("api", name="myapi")
    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
    assume_role = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
        effect="Allow",
        principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
            type="Service",
            identifiers=["lambda.amazonaws.com"],
        )],
        actions=["sts:AssumeRole"],
    )])
    role = aws.iam.Role("role",
        name="myrole",
        assume_role_policy=assume_role.json)
    lambda_ = aws.lambda_.Function("lambda",
        code=pulumi.FileArchive("lambda.zip"),
        name="mylambda",
        role=role.arn,
        handler="lambda.lambda_handler",
        runtime=aws.lambda_.Runtime.PYTHON3D7,
        source_code_hash=std.filebase64sha256(input="lambda.zip").result)
    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("apigw_lambda",
        statement_id="AllowExecutionFromAPIGateway",
        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}"))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lambda"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"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, "")
    		myregion := cfg.RequireObject("myregion")
    		accountId := cfg.RequireObject("accountId")
    		// API Gateway
    		api, err := apigateway.NewRestApi(ctx, "api", &apigateway.RestApiArgs{
    			Name: pulumi.String("myapi"),
    		})
    		if err != nil {
    			return err
    		}
    		resource, err := apigateway.NewResource(ctx, "resource", &apigateway.ResourceArgs{
    			PathPart: pulumi.String("resource"),
    			ParentId: api.RootResourceId,
    			RestApi:  api.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		method, err := apigateway.NewMethod(ctx, "method", &apigateway.MethodArgs{
    			RestApi:       api.ID(),
    			ResourceId:    resource.ID(),
    			HttpMethod:    pulumi.String("GET"),
    			Authorization: pulumi.String("NONE"),
    		})
    		if err != nil {
    			return err
    		}
    		// IAM
    		assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
    			Statements: []iam.GetPolicyDocumentStatement{
    				{
    					Effect: pulumi.StringRef("Allow"),
    					Principals: []iam.GetPolicyDocumentStatementPrincipal{
    						{
    							Type: "Service",
    							Identifiers: []string{
    								"lambda.amazonaws.com",
    							},
    						},
    					},
    					Actions: []string{
    						"sts:AssumeRole",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		role, err := iam.NewRole(ctx, "role", &iam.RoleArgs{
    			Name:             pulumi.String("myrole"),
    			AssumeRolePolicy: pulumi.String(assumeRole.Json),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFilebase64sha256, err := std.Filebase64sha256(ctx, &std.Filebase64sha256Args{
    			Input: "lambda.zip",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		lambda, err := lambda.NewFunction(ctx, "lambda", &lambda.FunctionArgs{
    			Code:           pulumi.NewFileArchive("lambda.zip"),
    			Name:           pulumi.String("mylambda"),
    			Role:           role.Arn,
    			Handler:        pulumi.String("lambda.lambda_handler"),
    			Runtime:        pulumi.String(lambda.RuntimePython3d7),
    			SourceCodeHash: invokeFilebase64sha256.Result,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apigateway.NewIntegration(ctx, "integration", &apigateway.IntegrationArgs{
    			RestApi:               api.ID(),
    			ResourceId:            resource.ID(),
    			HttpMethod:            method.HttpMethod,
    			IntegrationHttpMethod: pulumi.String("POST"),
    			Type:                  pulumi.String("AWS_PROXY"),
    			Uri:                   lambda.InvokeArn,
    		})
    		if err != nil {
    			return err
    		}
    		// Lambda
    		_, err = lambda.NewPermission(ctx, "apigw_lambda", &lambda.PermissionArgs{
    			StatementId: pulumi.String("AllowExecutionFromAPIGateway"),
    			Action:      pulumi.String("lambda:InvokeFunction"),
    			Function:    lambda.Name,
    			Principal:   pulumi.String("apigateway.amazonaws.com"),
    			SourceArn: pulumi.All(api.ID(), method.HttpMethod, resource.Path).ApplyT(func(_args []interface{}) (string, error) {
    				id := _args[0].(string)
    				httpMethod := _args[1].(string)
    				path := _args[2].(string)
    				return fmt.Sprintf("arn:aws:execute-api:%v:%v:%v/*/%v%v", myregion, accountId, id, httpMethod, path), nil
    			}).(pulumi.StringOutput),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        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()
        {
            Name = "myapi",
        });
    
        var resource = new Aws.ApiGateway.Resource("resource", new()
        {
            PathPart = "resource",
            ParentId = api.RootResourceId,
            RestApi = api.Id,
        });
    
        var method = new Aws.ApiGateway.Method("method", new()
        {
            RestApi = api.Id,
            ResourceId = resource.Id,
            HttpMethod = "GET",
            Authorization = "NONE",
        });
    
        // IAM
        var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
        {
            Statements = new[]
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
                {
                    Effect = "Allow",
                    Principals = new[]
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                        {
                            Type = "Service",
                            Identifiers = new[]
                            {
                                "lambda.amazonaws.com",
                            },
                        },
                    },
                    Actions = new[]
                    {
                        "sts:AssumeRole",
                    },
                },
            },
        });
    
        var role = new Aws.Iam.Role("role", new()
        {
            Name = "myrole",
            AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
        });
    
        var lambda = new Aws.Lambda.Function("lambda", new()
        {
            Code = new FileArchive("lambda.zip"),
            Name = "mylambda",
            Role = role.Arn,
            Handler = "lambda.lambda_handler",
            Runtime = Aws.Lambda.Runtime.Python3d7,
            SourceCodeHash = Std.Filebase64sha256.Invoke(new()
            {
                Input = "lambda.zip",
            }).Apply(invoke => invoke.Result),
        });
    
        var integration = new Aws.ApiGateway.Integration("integration", new()
        {
            RestApi = api.Id,
            ResourceId = resource.Id,
            HttpMethod = method.HttpMethod,
            IntegrationHttpMethod = "POST",
            Type = "AWS_PROXY",
            Uri = lambda.InvokeArn,
        });
    
        // Lambda
        var apigwLambda = new Aws.Lambda.Permission("apigw_lambda", new()
        {
            StatementId = "AllowExecutionFromAPIGateway",
            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}";
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apigateway.RestApi;
    import com.pulumi.aws.apigateway.RestApiArgs;
    import com.pulumi.aws.apigateway.Resource;
    import com.pulumi.aws.apigateway.ResourceArgs;
    import com.pulumi.aws.apigateway.Method;
    import com.pulumi.aws.apigateway.MethodArgs;
    import com.pulumi.aws.iam.IamFunctions;
    import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
    import com.pulumi.aws.iam.Role;
    import com.pulumi.aws.iam.RoleArgs;
    import com.pulumi.aws.lambda.Function;
    import com.pulumi.aws.lambda.FunctionArgs;
    import com.pulumi.aws.apigateway.Integration;
    import com.pulumi.aws.apigateway.IntegrationArgs;
    import com.pulumi.aws.lambda.Permission;
    import com.pulumi.aws.lambda.PermissionArgs;
    import com.pulumi.asset.FileArchive;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var myregion = config.get("myregion");
            final var accountId = config.get("accountId");
            // API Gateway
            var api = new RestApi("api", RestApiArgs.builder()
                .name("myapi")
                .build());
    
            var resource = new Resource("resource", ResourceArgs.builder()
                .pathPart("resource")
                .parentId(api.rootResourceId())
                .restApi(api.id())
                .build());
    
            var method = new Method("method", MethodArgs.builder()
                .restApi(api.id())
                .resourceId(resource.id())
                .httpMethod("GET")
                .authorization("NONE")
                .build());
    
            // IAM
            final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                .statements(GetPolicyDocumentStatementArgs.builder()
                    .effect("Allow")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("Service")
                        .identifiers("lambda.amazonaws.com")
                        .build())
                    .actions("sts:AssumeRole")
                    .build())
                .build());
    
            var role = new Role("role", RoleArgs.builder()
                .name("myrole")
                .assumeRolePolicy(assumeRole.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
                .build());
    
            var lambda = new Function("lambda", FunctionArgs.builder()
                .code(new FileArchive("lambda.zip"))
                .name("mylambda")
                .role(role.arn())
                .handler("lambda.lambda_handler")
                .runtime("python3.7")
                .sourceCodeHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder()
                    .input("lambda.zip")
                    .build()).result())
                .build());
    
            var integration = new Integration("integration", IntegrationArgs.builder()
                .restApi(api.id())
                .resourceId(resource.id())
                .httpMethod(method.httpMethod())
                .integrationHttpMethod("POST")
                .type("AWS_PROXY")
                .uri(lambda.invokeArn())
                .build());
    
            // Lambda
            var apigwLambda = new Permission("apigwLambda", PermissionArgs.builder()
                .statementId("AllowExecutionFromAPIGateway")
                .action("lambda:InvokeFunction")
                .function(lambda.name())
                .principal("apigateway.amazonaws.com")
                .sourceArn(Output.tuple(api.id(), method.httpMethod(), resource.path()).applyValue(values -> {
                    var id = values.t1;
                    var httpMethod = values.t2;
                    var path = values.t3;
                    return String.format("arn:aws:execute-api:%s:%s:%s/*/%s%s", myregion,accountId,id,httpMethod,path);
                }))
                .build());
    
        }
    }
    
    configuration:
      # Variables
      myregion:
        type: dynamic
      accountId:
        type: dynamic
    resources:
      # API Gateway
      api:
        type: aws:apigateway:RestApi
        properties:
          name: myapi
      resource:
        type: aws:apigateway:Resource
        properties:
          pathPart: resource
          parentId: ${api.rootResourceId}
          restApi: ${api.id}
      method:
        type: aws:apigateway:Method
        properties:
          restApi: ${api.id}
          resourceId: ${resource.id}
          httpMethod: GET
          authorization: NONE
      integration:
        type: aws:apigateway:Integration
        properties:
          restApi: ${api.id}
          resourceId: ${resource.id}
          httpMethod: ${method.httpMethod}
          integrationHttpMethod: POST
          type: AWS_PROXY
          uri: ${lambda.invokeArn}
      # Lambda
      apigwLambda:
        type: aws:lambda:Permission
        name: apigw_lambda
        properties:
          statementId: AllowExecutionFromAPIGateway
          action: lambda:InvokeFunction
          function: ${lambda.name}
          principal: apigateway.amazonaws.com
          sourceArn: arn:aws:execute-api:${myregion}:${accountId}:${api.id}/*/${method.httpMethod}${resource.path}
      lambda:
        type: aws:lambda:Function
        properties:
          code:
            fn::FileArchive: lambda.zip
          name: mylambda
          role: ${role.arn}
          handler: lambda.lambda_handler
          runtime: python3.7
          sourceCodeHash:
            fn::invoke:
              Function: std:filebase64sha256
              Arguments:
                input: lambda.zip
              Return: result
      role:
        type: aws:iam:Role
        properties:
          name: myrole
          assumeRolePolicy: ${assumeRole.json}
    variables:
      # IAM
      assumeRole:
        fn::invoke:
          Function: aws:iam:getPolicyDocument
          Arguments:
            statements:
              - effect: Allow
                principals:
                  - type: Service
                    identifiers:
                      - lambda.amazonaws.com
                actions:
                  - sts:AssumeRole
    
    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 test = new aws.lb.LoadBalancer("test", {
        name: name,
        internal: true,
        loadBalancerType: "network",
        subnets: [subnetId],
    });
    const testVpcLink = new aws.apigateway.VpcLink("test", {
        name: name,
        targetArn: test.arn,
    });
    const testRestApi = new aws.apigateway.RestApi("test", {name: name});
    const testResource = new aws.apigateway.Resource("test", {
        restApi: testRestApi.id,
        parentId: testRestApi.rootResourceId,
        pathPart: "test",
    });
    const testMethod = new aws.apigateway.Method("test", {
        restApi: testRestApi.id,
        resourceId: testResource.id,
        httpMethod: "GET",
        authorization: "NONE",
        requestModels: {
            "application/json": "Error",
        },
    });
    const testIntegration = new aws.apigateway.Integration("test", {
        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 = aws.lb.LoadBalancer("test",
        name=name,
        internal=True,
        load_balancer_type="network",
        subnets=[subnet_id])
    test_vpc_link = aws.apigateway.VpcLink("test",
        name=name,
        target_arn=test.arn)
    test_rest_api = aws.apigateway.RestApi("test", name=name)
    test_resource = aws.apigateway.Resource("test",
        rest_api=test_rest_api.id,
        parent_id=test_rest_api.root_resource_id,
        path_part="test")
    test_method = aws.apigateway.Method("test",
        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("test",
        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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
    	"github.com/pulumi/pulumi-aws/sdk/v6/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")
    		test, err := lb.NewLoadBalancer(ctx, "test", &lb.LoadBalancerArgs{
    			Name:             pulumi.Any(name),
    			Internal:         pulumi.Bool(true),
    			LoadBalancerType: pulumi.String("network"),
    			Subnets: pulumi.StringArray{
    				subnetId,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		testVpcLink, err := apigateway.NewVpcLink(ctx, "test", &apigateway.VpcLinkArgs{
    			Name:      pulumi.Any(name),
    			TargetArn: test.Arn,
    		})
    		if err != nil {
    			return err
    		}
    		testRestApi, err := apigateway.NewRestApi(ctx, "test", &apigateway.RestApiArgs{
    			Name: pulumi.Any(name),
    		})
    		if err != nil {
    			return err
    		}
    		testResource, err := apigateway.NewResource(ctx, "test", &apigateway.ResourceArgs{
    			RestApi:  testRestApi.ID(),
    			ParentId: testRestApi.RootResourceId,
    			PathPart: pulumi.String("test"),
    		})
    		if err != nil {
    			return err
    		}
    		testMethod, err := apigateway.NewMethod(ctx, "test", &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, "test", &apigateway.IntegrationArgs{
    			RestApi:    testRestApi.ID(),
    			ResourceId: testResource.ID(),
    			HttpMethod: testMethod.HttpMethod,
    			RequestTemplates: pulumi.StringMap{
    				"application/json": pulumi.String(""),
    				"application/xml":  pulumi.String("#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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.RequireObject<dynamic>("name");
        var subnetId = config.RequireObject<dynamic>("subnetId");
        var test = new Aws.LB.LoadBalancer("test", new()
        {
            Name = name,
            Internal = true,
            LoadBalancerType = "network",
            Subnets = new[]
            {
                subnetId,
            },
        });
    
        var testVpcLink = new Aws.ApiGateway.VpcLink("test", new()
        {
            Name = name,
            TargetArn = test.Arn,
        });
    
        var testRestApi = new Aws.ApiGateway.RestApi("test", new()
        {
            Name = name,
        });
    
        var testResource = new Aws.ApiGateway.Resource("test", new()
        {
            RestApi = testRestApi.Id,
            ParentId = testRestApi.RootResourceId,
            PathPart = "test",
        });
    
        var testMethod = new Aws.ApiGateway.Method("test", new()
        {
            RestApi = testRestApi.Id,
            ResourceId = testResource.Id,
            HttpMethod = "GET",
            Authorization = "NONE",
            RequestModels = 
            {
                { "application/json", "Error" },
            },
        });
    
        var testIntegration = new Aws.ApiGateway.Integration("test", new()
        {
            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 generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.lb.LoadBalancer;
    import com.pulumi.aws.lb.LoadBalancerArgs;
    import com.pulumi.aws.apigateway.VpcLink;
    import com.pulumi.aws.apigateway.VpcLinkArgs;
    import com.pulumi.aws.apigateway.RestApi;
    import com.pulumi.aws.apigateway.RestApiArgs;
    import com.pulumi.aws.apigateway.Resource;
    import com.pulumi.aws.apigateway.ResourceArgs;
    import com.pulumi.aws.apigateway.Method;
    import com.pulumi.aws.apigateway.MethodArgs;
    import com.pulumi.aws.apigateway.Integration;
    import com.pulumi.aws.apigateway.IntegrationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name");
            final var subnetId = config.get("subnetId");
            var test = new LoadBalancer("test", LoadBalancerArgs.builder()
                .name(name)
                .internal(true)
                .loadBalancerType("network")
                .subnets(subnetId)
                .build());
    
            var testVpcLink = new VpcLink("testVpcLink", VpcLinkArgs.builder()
                .name(name)
                .targetArn(test.arn())
                .build());
    
            var testRestApi = new RestApi("testRestApi", RestApiArgs.builder()
                .name(name)
                .build());
    
            var testResource = new Resource("testResource", ResourceArgs.builder()
                .restApi(testRestApi.id())
                .parentId(testRestApi.rootResourceId())
                .pathPart("test")
                .build());
    
            var testMethod = new Method("testMethod", MethodArgs.builder()
                .restApi(testRestApi.id())
                .resourceId(testResource.id())
                .httpMethod("GET")
                .authorization("NONE")
                .requestModels(Map.of("application/json", "Error"))
                .build());
    
            var testIntegration = new Integration("testIntegration", IntegrationArgs.builder()
                .restApi(testRestApi.id())
                .resourceId(testResource.id())
                .httpMethod(testMethod.httpMethod())
                .requestTemplates(Map.ofEntries(
                    Map.entry("application/json", ""),
                    Map.entry("application/xml", """
    #set($inputRoot = $input.path('$'))
    { }                """)
                ))
                .requestParameters(Map.ofEntries(
                    Map.entry("integration.request.header.X-Authorization", "'static'"),
                    Map.entry("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())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: dynamic
      subnetId:
        type: dynamic
    resources:
      test:
        type: aws:lb:LoadBalancer
        properties:
          name: ${name}
          internal: true
          loadBalancerType: network
          subnets:
            - ${subnetId}
      testVpcLink:
        type: aws:apigateway:VpcLink
        name: test
        properties:
          name: ${name}
          targetArn: ${test.arn}
      testRestApi:
        type: aws:apigateway:RestApi
        name: test
        properties:
          name: ${name}
      testResource:
        type: aws:apigateway:Resource
        name: test
        properties:
          restApi: ${testRestApi.id}
          parentId: ${testRestApi.rootResourceId}
          pathPart: test
      testMethod:
        type: aws:apigateway:Method
        name: test
        properties:
          restApi: ${testRestApi.id}
          resourceId: ${testResource.id}
          httpMethod: GET
          authorization: NONE
          requestModels:
            application/json: Error
      testIntegration:
        type: aws:apigateway:Integration
        name: test
        properties:
          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}
    

    Create Integration Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Integration(name: string, args: IntegrationArgs, opts?: CustomResourceOptions);
    @overload
    def Integration(resource_name: str,
                    args: IntegrationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Integration(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    http_method: Optional[str] = None,
                    type: Optional[str] = None,
                    rest_api: Optional[str] = None,
                    resource_id: Optional[str] = None,
                    content_handling: Optional[str] = None,
                    credentials: Optional[str] = None,
                    cache_key_parameters: Optional[Sequence[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,
                    connection_type: Optional[str] = None,
                    connection_id: Optional[str] = None,
                    timeout_milliseconds: Optional[int] = None,
                    tls_config: Optional[IntegrationTlsConfigArgs] = None,
                    cache_namespace: Optional[str] = None,
                    uri: Optional[str] = None)
    func NewIntegration(ctx *Context, name string, args IntegrationArgs, opts ...ResourceOption) (*Integration, error)
    public Integration(string name, IntegrationArgs args, CustomResourceOptions? opts = null)
    public Integration(String name, IntegrationArgs args)
    public Integration(String name, IntegrationArgs args, CustomResourceOptions options)
    
    type: aws:apigateway:Integration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    name String
    The unique name of the resource.
    args IntegrationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var integrationResource = new Aws.ApiGateway.Integration("integrationResource", new()
    {
        HttpMethod = "string",
        Type = "string",
        RestApi = "string",
        ResourceId = "string",
        ContentHandling = "string",
        Credentials = "string",
        CacheKeyParameters = new[]
        {
            "string",
        },
        IntegrationHttpMethod = "string",
        PassthroughBehavior = "string",
        RequestParameters = 
        {
            { "string", "string" },
        },
        RequestTemplates = 
        {
            { "string", "string" },
        },
        ConnectionType = "string",
        ConnectionId = "string",
        TimeoutMilliseconds = 0,
        TlsConfig = new Aws.ApiGateway.Inputs.IntegrationTlsConfigArgs
        {
            InsecureSkipVerification = false,
        },
        CacheNamespace = "string",
        Uri = "string",
    });
    
    example, err := apigateway.NewIntegration(ctx, "integrationResource", &apigateway.IntegrationArgs{
    	HttpMethod:      pulumi.String("string"),
    	Type:            pulumi.String("string"),
    	RestApi:         pulumi.Any("string"),
    	ResourceId:      pulumi.String("string"),
    	ContentHandling: pulumi.String("string"),
    	Credentials:     pulumi.String("string"),
    	CacheKeyParameters: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IntegrationHttpMethod: pulumi.String("string"),
    	PassthroughBehavior:   pulumi.String("string"),
    	RequestParameters: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	RequestTemplates: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	ConnectionType:      pulumi.String("string"),
    	ConnectionId:        pulumi.String("string"),
    	TimeoutMilliseconds: pulumi.Int(0),
    	TlsConfig: &apigateway.IntegrationTlsConfigArgs{
    		InsecureSkipVerification: pulumi.Bool(false),
    	},
    	CacheNamespace: pulumi.String("string"),
    	Uri:            pulumi.String("string"),
    })
    
    var integrationResource = new Integration("integrationResource", IntegrationArgs.builder()
        .httpMethod("string")
        .type("string")
        .restApi("string")
        .resourceId("string")
        .contentHandling("string")
        .credentials("string")
        .cacheKeyParameters("string")
        .integrationHttpMethod("string")
        .passthroughBehavior("string")
        .requestParameters(Map.of("string", "string"))
        .requestTemplates(Map.of("string", "string"))
        .connectionType("string")
        .connectionId("string")
        .timeoutMilliseconds(0)
        .tlsConfig(IntegrationTlsConfigArgs.builder()
            .insecureSkipVerification(false)
            .build())
        .cacheNamespace("string")
        .uri("string")
        .build());
    
    integration_resource = aws.apigateway.Integration("integrationResource",
        http_method="string",
        type="string",
        rest_api="string",
        resource_id="string",
        content_handling="string",
        credentials="string",
        cache_key_parameters=["string"],
        integration_http_method="string",
        passthrough_behavior="string",
        request_parameters={
            "string": "string",
        },
        request_templates={
            "string": "string",
        },
        connection_type="string",
        connection_id="string",
        timeout_milliseconds=0,
        tls_config=aws.apigateway.IntegrationTlsConfigArgs(
            insecure_skip_verification=False,
        ),
        cache_namespace="string",
        uri="string")
    
    const integrationResource = new aws.apigateway.Integration("integrationResource", {
        httpMethod: "string",
        type: "string",
        restApi: "string",
        resourceId: "string",
        contentHandling: "string",
        credentials: "string",
        cacheKeyParameters: ["string"],
        integrationHttpMethod: "string",
        passthroughBehavior: "string",
        requestParameters: {
            string: "string",
        },
        requestTemplates: {
            string: "string",
        },
        connectionType: "string",
        connectionId: "string",
        timeoutMilliseconds: 0,
        tlsConfig: {
            insecureSkipVerification: false,
        },
        cacheNamespace: "string",
        uri: "string",
    });
    
    type: aws:apigateway:Integration
    properties:
        cacheKeyParameters:
            - string
        cacheNamespace: string
        connectionId: string
        connectionType: string
        contentHandling: string
        credentials: string
        httpMethod: string
        integrationHttpMethod: string
        passthroughBehavior: string
        requestParameters:
            string: string
        requestTemplates:
            string: string
        resourceId: string
        restApi: string
        timeoutMilliseconds: 0
        tlsConfig:
            insecureSkipVerification: false
        type: string
        uri: string
    

    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    ResourceId string
    API resource ID.
    RestApi string | string
    ID of the associated REST API.
    Type string
    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>
    List of cache key parameters for the integration.
    CacheNamespace string
    Integration's cache namespace.
    ConnectionId string
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    ConnectionType string
    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
    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
    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
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    RequestParameters Dictionary<string, string>
    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>
    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 IntegrationTlsConfig
    TLS configuration. See below.
    Uri string
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    ResourceId string
    API resource ID.
    RestApi string | string
    ID of the associated REST API.
    Type string
    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
    List of cache key parameters for the integration.
    CacheNamespace string
    Integration's cache namespace.
    ConnectionId string
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    ConnectionType string
    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
    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
    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
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    RequestParameters map[string]string
    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
    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
    TLS configuration. See below.
    Uri string
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    resourceId String
    API resource ID.
    restApi String | String
    ID of the associated REST API.
    type String
    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>
    List of cache key parameters for the integration.
    cacheNamespace String
    Integration's cache namespace.
    connectionId String
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connectionType String
    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
    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
    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
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    requestParameters Map<String,String>
    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>
    Map of the integration's request templates.
    timeoutMilliseconds Integer
    Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
    tlsConfig IntegrationTlsConfig
    TLS configuration. See below.
    uri String
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    resourceId string
    API resource ID.
    restApi string | RestApi
    ID of the associated REST API.
    type string
    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[]
    List of cache key parameters for the integration.
    cacheNamespace string
    Integration's cache namespace.
    connectionId string
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connectionType string
    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
    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
    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
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    requestParameters {[key: string]: string}
    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}
    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 IntegrationTlsConfig
    TLS configuration. See below.
    uri string
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    resource_id str
    API resource ID.
    rest_api str | str
    ID of the associated REST API.
    type str
    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]
    List of cache key parameters for the integration.
    cache_namespace str
    Integration's cache namespace.
    connection_id str
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connection_type str
    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
    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
    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
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    request_parameters Mapping[str, str]
    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]
    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
    TLS configuration. See below.
    uri str
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    resourceId String
    API resource ID.
    restApi String |
    ID of the associated REST API.
    type String
    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>
    List of cache key parameters for the integration.
    cacheNamespace String
    Integration's cache namespace.
    connectionId String
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connectionType String
    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
    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
    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
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    requestParameters Map<String>
    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>
    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 Property Map
    TLS configuration. See below.
    uri String
    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 string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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)
    public static Integration get(String name, Output<String> id, IntegrationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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>
    List of cache key parameters for the integration.
    CacheNamespace string
    Integration's cache namespace.
    ConnectionId string
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    ConnectionType string
    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
    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
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    IntegrationHttpMethod string
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    RequestParameters Dictionary<string, string>
    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>
    Map of the integration's request templates.
    ResourceId string
    API resource ID.
    RestApi string | string
    ID of the associated REST API.
    TimeoutMilliseconds int
    Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
    TlsConfig IntegrationTlsConfig
    TLS configuration. See below.
    Type string
    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
    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
    List of cache key parameters for the integration.
    CacheNamespace string
    Integration's cache namespace.
    ConnectionId string
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    ConnectionType string
    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
    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
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    IntegrationHttpMethod string
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    RequestParameters map[string]string
    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
    Map of the integration's request templates.
    ResourceId string
    API resource ID.
    RestApi string | string
    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
    TLS configuration. See below.
    Type string
    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
    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 List<String>
    List of cache key parameters for the integration.
    cacheNamespace String
    Integration's cache namespace.
    connectionId String
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connectionType String
    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
    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
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    integrationHttpMethod String
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    requestParameters Map<String,String>
    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>
    Map of the integration's request templates.
    resourceId String
    API resource ID.
    restApi String | String
    ID of the associated REST API.
    timeoutMilliseconds Integer
    Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
    tlsConfig IntegrationTlsConfig
    TLS configuration. See below.
    type String
    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
    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[]
    List of cache key parameters for the integration.
    cacheNamespace string
    Integration's cache namespace.
    connectionId string
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connectionType string
    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
    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
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    integrationHttpMethod string
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    requestParameters {[key: string]: string}
    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}
    Map of the integration's request templates.
    resourceId string
    API resource ID.
    restApi string | RestApi
    ID of the associated REST API.
    timeoutMilliseconds number
    Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
    tlsConfig IntegrationTlsConfig
    TLS configuration. See below.
    type string
    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
    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]
    List of cache key parameters for the integration.
    cache_namespace str
    Integration's cache namespace.
    connection_id str
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connection_type str
    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
    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
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    integration_http_method str
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    request_parameters Mapping[str, str]
    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]
    Map of the integration's request templates.
    resource_id str
    API resource ID.
    rest_api str | str
    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
    TLS configuration. See below.
    type str
    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
    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 List<String>
    List of cache key parameters for the integration.
    cacheNamespace String
    Integration's cache namespace.
    connectionId String
    ID of the VpcLink used for the integration. Required if connection_type is VPC_LINK
    connectionType String
    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
    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
    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
    HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.
    integrationHttpMethod String
    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
    Integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.
    requestParameters Map<String>
    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>
    Map of the integration's request templates.
    resourceId String
    API resource ID.
    restApi String |
    ID of the associated REST API.
    timeoutMilliseconds Number
    Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
    tlsConfig Property Map
    TLS configuration. See below.
    type String
    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
    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, IntegrationTlsConfigArgs

    InsecureSkipVerification bool
    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
    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
    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
    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
    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
    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

    Using pulumi import, import aws_api_gateway_integration using REST-API-ID/RESOURCE-ID/HTTP-METHOD. For example:

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.41.0 published on Tuesday, Jun 18, 2024 by Pulumi