Integration

Provides an HTTP Method Integration for an API Gateway Integration.

Lambda integration

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

const config = new pulumi.Config();
// Variables
const myregion = config.require("myregion");
const accountId = config.require("accountId");

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

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

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

" },
            },
            ResourceId = myDemoResource.Id,
            RestApi = myDemoAPI.Id,
            TimeoutMilliseconds = 29000,
            Type = "MOCK",
        });
    }

}
package main

import (
    "fmt"

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

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

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

""",
    },
    resource_id=my_demo_resource.id,
    rest_api=my_demo_api.id,
    timeout_milliseconds=29000,
    type="MOCK")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

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

Create a Integration Resource

def Integration(resource_name, opts=None, cache_key_parameters=None, cache_namespace=None, connection_id=None, connection_type=None, content_handling=None, credentials=None, http_method=None, integration_http_method=None, passthrough_behavior=None, request_parameters=None, request_templates=None, resource_id=None, rest_api=None, timeout_milliseconds=None, type=None, uri=None, __props__=None);
func NewIntegration(ctx *Context, name string, args IntegrationArgs, opts ...ResourceOption) (*Integration, error)
public Integration(string name, IntegrationArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args IntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args IntegrationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args IntegrationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Integration Resource Properties

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

Inputs

The Integration resource accepts the following input properties:

HttpMethod string

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

ResourceId string

The API resource ID.

RestApi string

The ID of the associated REST API.

Type string

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

CacheKeyParameters List<string>

A list of cache key parameters for the integration.

CacheNamespace string

The integration’s cache namespace.

ConnectionId string

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

ConnectionType string

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

ContentHandling string

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

Credentials string

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

IntegrationHttpMethod string

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

PassthroughBehavior string

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

RequestParameters Dictionary<string, string>

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

RequestTemplates Dictionary<string, string>

A map of the integration’s request templates.

TimeoutMilliseconds int

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

Uri string

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

HttpMethod string

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

ResourceId string

The API resource ID.

RestApi interface{}

The ID of the associated REST API.

Type string

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

CacheKeyParameters []string

A list of cache key parameters for the integration.

CacheNamespace string

The integration’s cache namespace.

ConnectionId string

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

ConnectionType string

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

ContentHandling string

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

Credentials string

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

IntegrationHttpMethod string

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

PassthroughBehavior string

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

RequestParameters map[string]string

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

RequestTemplates map[string]string

A map of the integration’s request templates.

TimeoutMilliseconds int

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

Uri string

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

httpMethod string

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

resourceId string

The API resource ID.

restApi string | RestApi

The ID of the associated REST API.

type string

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

cacheKeyParameters string[]

A list of cache key parameters for the integration.

cacheNamespace string

The integration’s cache namespace.

connectionId string

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

connectionType string

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

contentHandling string

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

credentials string

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

integrationHttpMethod string

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

passthroughBehavior string

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

requestParameters {[key: string]: string}

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

requestTemplates {[key: string]: string}

A map of the integration’s request templates.

timeoutMilliseconds number

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

uri string

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

http_method str

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

resource_id str

The API resource ID.

rest_api string | str

The ID of the associated REST API.

type str

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

cache_key_parameters List[str]

A list of cache key parameters for the integration.

cache_namespace str

The integration’s cache namespace.

connection_id str

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

connection_type str

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

content_handling str

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

credentials str

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

integration_http_method str

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

passthrough_behavior str

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

request_parameters Dict[str, str]

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

request_templates Dict[str, str]

A map of the integration’s request templates.

timeout_milliseconds float

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

uri str

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

Outputs

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

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

Look up an Existing Integration Resource

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

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

The following state arguments are supported:

CacheKeyParameters List<string>

A list of cache key parameters for the integration.

CacheNamespace string

The integration’s cache namespace.

ConnectionId string

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

ConnectionType string

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

ContentHandling string

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

Credentials string

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

HttpMethod string

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

IntegrationHttpMethod string

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

PassthroughBehavior string

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

RequestParameters Dictionary<string, string>

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

RequestTemplates Dictionary<string, string>

A map of the integration’s request templates.

ResourceId string

The API resource ID.

RestApi string

The ID of the associated REST API.

TimeoutMilliseconds int

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

Type string

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

Uri string

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

CacheKeyParameters []string

A list of cache key parameters for the integration.

CacheNamespace string

The integration’s cache namespace.

ConnectionId string

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

ConnectionType string

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

ContentHandling string

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

Credentials string

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

HttpMethod string

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

IntegrationHttpMethod string

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

PassthroughBehavior string

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

RequestParameters map[string]string

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

RequestTemplates map[string]string

A map of the integration’s request templates.

ResourceId string

The API resource ID.

RestApi interface{}

The ID of the associated REST API.

TimeoutMilliseconds int

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

Type string

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

Uri string

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

cacheKeyParameters string[]

A list of cache key parameters for the integration.

cacheNamespace string

The integration’s cache namespace.

connectionId string

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

connectionType string

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

contentHandling string

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

credentials string

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

httpMethod string

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

integrationHttpMethod string

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

passthroughBehavior string

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

requestParameters {[key: string]: string}

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

requestTemplates {[key: string]: string}

A map of the integration’s request templates.

resourceId string

The API resource ID.

restApi string | RestApi

The ID of the associated REST API.

timeoutMilliseconds number

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

type string

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

uri string

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

cache_key_parameters List[str]

A list of cache key parameters for the integration.

cache_namespace str

The integration’s cache namespace.

connection_id str

The id of the VpcLink used for the integration. Required if connection_type is VPC_LINK

connection_type str

The integration input’s connectionType. Valid values are INTERNET (default for connections through the public routable internet), and VPC_LINK (for private connections between API Gateway and a network load balancer in a VPC).

content_handling str

Specifies how to handle request payload content type conversions. Supported values are CONVERT_TO_BINARY and CONVERT_TO_TEXT. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the passthroughBehaviors is configured to support payload pass-through.

credentials str

The credentials required for the integration. For AWS integrations, 2 options are available. To specify an IAM Role for Amazon API Gateway to assume, use the role’s ARN. To require that the caller’s identity be passed through from the request, specify the string arn:aws:iam::\*:user/\*.

http_method str

The HTTP method (GET, POST, PUT, DELETE, HEAD, OPTION, ANY) when calling the associated resource.

integration_http_method str

The integration HTTP method (GET, POST, PUT, DELETE, HEAD, OPTIONs, ANY, PATCH) specifying how API Gateway will interact with the back end. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. Not all methods are compatible with all AWS integrations. e.g. Lambda function can only be invoked via POST.

passthrough_behavior str

The integration passthrough behavior (WHEN_NO_MATCH, WHEN_NO_TEMPLATES, NEVER). Required if request_templates is used.

request_parameters Dict[str, str]

A map of request query string parameters and headers that should be passed to the backend responder. For example: request_parameters = { "integration.request.header.X-Some-Other-Header" = "method.request.header.X-Some-Header" }

request_templates Dict[str, str]

A map of the integration’s request templates.

resource_id str

The API resource ID.

rest_api string | str

The ID of the associated REST API.

timeout_milliseconds float

Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.

type str

The integration input’s type. Valid values are HTTP (for HTTP backends), MOCK (not calling any real backend), AWS (for AWS services), AWS_PROXY (for Lambda proxy integration) and HTTP_PROXY (for HTTP proxy integration). An HTTP or HTTP_PROXY integration with a connection_type of VPC_LINK is referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.

uri str

The input’s URI. Required if type is AWS, AWS_PROXY, HTTP or HTTP_PROXY. For HTTP integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification . For AWS integrations, the URI should be of the form arn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}. region, subdomain and service are used to determine the right endpoint. e.g. arn:aws:apigateway:eu-west-1:lambda:path/2015-03-31/functions/arn:aws:lambda:eu-west-1:012345678901:function:my-func/invocations. For private integrations, the URI parameter is not used for routing requests to your endpoint, but is used for setting the Host header and for certificate validation.

Package Details

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