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
new Integration(name: string, args: IntegrationArgs, opts?: CustomResourceOptions);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:
- Http
Method string The HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTION,ANY) when calling the associated resource.- Resource
Id string The API resource ID.
- Rest
Api 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.- Cache
Key List<string>Parameters A list of cache key parameters for the integration.
- Cache
Namespace string The integration’s cache namespace.
- Connection
Id string The id of the VpcLink used for the integration. Required if
connection_typeisVPC_LINK- Connection
Type string The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_LINK(for private connections between API Gateway and a network load balancer in a VPC).- Content
Handling string Specifies how to handle request payload content type conversions. Supported values are
CONVERT_TO_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- Integration
Http stringMethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- Passthrough
Behavior string The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis used.- Request
Parameters 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" }- Request
Templates Dictionary<string, string> A map of the integration’s request templates.
- Timeout
Milliseconds int Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
- Uri string
The input’s URI. Required if
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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 string The HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTION,ANY) when calling the associated resource.- Resource
Id string The API resource ID.
- Rest
Api 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.- Cache
Key []stringParameters A list of cache key parameters for the integration.
- Cache
Namespace string The integration’s cache namespace.
- Connection
Id string The id of the VpcLink used for the integration. Required if
connection_typeisVPC_LINK- Connection
Type string The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_LINK(for private connections between API Gateway and a network load balancer in a VPC).- Content
Handling string Specifies how to handle request payload content type conversions. Supported values are
CONVERT_TO_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- Integration
Http stringMethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- Passthrough
Behavior string The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis used.- Request
Parameters 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" }- Request
Templates map[string]string A map of the integration’s request templates.
- Timeout
Milliseconds int Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
- Uri string
The input’s URI. Required if
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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 string The HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTION,ANY) when calling the associated resource.- resource
Id string The API resource ID.
- rest
Api 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.- cache
Key string[]Parameters A list of cache key parameters for the integration.
- cache
Namespace string The integration’s cache namespace.
- connection
Id string The id of the VpcLink used for the integration. Required if
connection_typeisVPC_LINK- connection
Type string The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_LINK(for private connections between API Gateway and a network load balancer in a VPC).- content
Handling string Specifies how to handle request payload content type conversions. Supported values are
CONVERT_TO_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- integration
Http stringMethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- passthrough
Behavior string The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis used.- request
Parameters {[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" }- request
Templates {[key: string]: string} A map of the integration’s request templates.
- timeout
Milliseconds number Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
- uri string
The input’s URI. Required if
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis referred to as a private integration and uses a VpcLink to connect API Gateway to a network load balancer of a VPC.- cache_
key_ List[str]parameters 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_typeisVPC_LINK- connection_
type str The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_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_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- integration_
http_ strmethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- passthrough_
behavior str The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis 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
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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:
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): Integrationstatic 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:
- Cache
Key List<string>Parameters A list of cache key parameters for the integration.
- Cache
Namespace string The integration’s cache namespace.
- Connection
Id string The id of the VpcLink used for the integration. Required if
connection_typeisVPC_LINK- Connection
Type string The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_LINK(for private connections between API Gateway and a network load balancer in a VPC).- Content
Handling string Specifies how to handle request payload content type conversions. Supported values are
CONVERT_TO_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- Http
Method string The HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTION,ANY) when calling the associated resource.- Integration
Http stringMethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- Passthrough
Behavior string The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis used.- Request
Parameters 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" }- Request
Templates Dictionary<string, string> A map of the integration’s request templates.
- Resource
Id string The API resource ID.
- Rest
Api string The ID of the associated REST API.
- Timeout
Milliseconds int Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
- 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis 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
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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 []stringParameters A list of cache key parameters for the integration.
- Cache
Namespace string The integration’s cache namespace.
- Connection
Id string The id of the VpcLink used for the integration. Required if
connection_typeisVPC_LINK- Connection
Type string The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_LINK(for private connections between API Gateway and a network load balancer in a VPC).- Content
Handling string Specifies how to handle request payload content type conversions. Supported values are
CONVERT_TO_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- Http
Method string The HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTION,ANY) when calling the associated resource.- Integration
Http stringMethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- Passthrough
Behavior string The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis used.- Request
Parameters 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" }- Request
Templates map[string]string A map of the integration’s request templates.
- Resource
Id string The API resource ID.
- Rest
Api interface{} The ID of the associated REST API.
- Timeout
Milliseconds int Custom timeout between 50 and 29,000 milliseconds. The default value is 29,000 milliseconds.
- 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis 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
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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 string[]Parameters A list of cache key parameters for the integration.
- cache
Namespace string The integration’s cache namespace.
- connection
Id string The id of the VpcLink used for the integration. Required if
connection_typeisVPC_LINK- connection
Type string The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_LINK(for private connections between API Gateway and a network load balancer in a VPC).- content
Handling string Specifies how to handle request payload content type conversions. Supported values are
CONVERT_TO_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- http
Method string The HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTION,ANY) when calling the associated resource.- integration
Http stringMethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- passthrough
Behavior string The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis used.- request
Parameters {[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" }- request
Templates {[key: string]: string} A map of the integration’s request templates.
- resource
Id string The API resource ID.
- rest
Api string | RestApi The ID of the associated REST API.
- timeout
Milliseconds 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis 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
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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_ List[str]parameters 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_typeisVPC_LINK- connection_
type str The integration input’s connectionType. Valid values are
INTERNET(default for connections through the public routable internet), andVPC_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_BINARYandCONVERT_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
AWSintegrations, 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 stringarn:aws:iam::\*:user/\*.- http_
method str The HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTION,ANY) when calling the associated resource.- integration_
http_ strmethod The integration HTTP method (
GET,POST,PUT,DELETE,HEAD,OPTIONs,ANY,PATCH) specifying how API Gateway will interact with the back end. Required iftypeisAWS,AWS_PROXY,HTTPorHTTP_PROXY. Not all methods are compatible with allAWSintegrations. e.g. Lambda function can only be invoked viaPOST.- passthrough_
behavior str The integration passthrough behavior (
WHEN_NO_MATCH,WHEN_NO_TEMPLATES,NEVER). Required ifrequest_templatesis 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) andHTTP_PROXY(for HTTP proxy integration). AnHTTPorHTTP_PROXYintegration with aconnection_typeofVPC_LINKis 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
typeisAWS,AWS_PROXY,HTTPorHTTP_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 formarn:aws:apigateway:{region}:{subdomain.service|service}:{path|action}/{service_api}.region,subdomainandserviceare 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
awsTerraform Provider.