aws-apigateway logo
AWS API Gateway v1.0.1, Dec 9 22

aws-apigateway.RestAPI

Explore with Pulumi AI

The RestAPI component offers a simple interface for creating a fully functional API Gateway REST API. The REST API can define any number of routes, each of which maps a path and HTTP method to one of (1) an event hander route that invokes a Lambda Function (2) a local path route which uploads local files into an S3 bucket and serves them or (3) an integration target such as an HTTP proxy or service integration.

Create RestAPI Resource

new RestAPI(name: string, args?: RestAPIArgs, opts?: CustomResourceOptions);
@overload
def RestAPI(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            api_key_source: Optional[APIKeySource] = None,
            gateway_responses: Optional[Mapping[str, SwaggerGatewayResponseArgs]] = None,
            request_validator: Optional[RequestValidator] = None,
            routes: Optional[Sequence[RouteArgs]] = None,
            stage_name: Optional[str] = None,
            static_routes_bucket: Optional[pulumi_aws.s3.Bucket] = None,
            swagger_string: Optional[str] = None)
@overload
def RestAPI(resource_name: str,
            args: Optional[RestAPIArgs] = None,
            opts: Optional[ResourceOptions] = None)
func NewRestAPI(ctx *Context, name string, args *RestAPIArgs, opts ...ResourceOption) (*RestAPI, error)
public RestAPI(string name, RestAPIArgs? args = null, CustomResourceOptions? opts = null)
public RestAPI(String name, RestAPIArgs args)
public RestAPI(String name, RestAPIArgs args, CustomResourceOptions options)
type: aws-apigateway:RestAPI
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

RestAPI 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 RestAPI resource accepts the following input properties:

ApiKeySource Pulumi.AwsApiGateway.APIKeySource

The source for the apikey. This can either be a HEADER or AUTHORIZER. If apiKeyRequired is set to true on a route, and this is not defined the value will default to HEADER.

GatewayResponses Dictionary<string, Pulumi.AwsApiGateway.Inputs.SwaggerGatewayResponseArgs>

Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.

RequestValidator Pulumi.AwsApiGateway.RequestValidator

Request Validator specifies the validator to use at the API level. Note method level validators override this.

Routes List<Pulumi.AwsApiGateway.Inputs.RouteArgs>

Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.

Either swaggerString or routes must be specified.

StageName string

The stage name for your API. This will get added as a base path to your API url.

StaticRoutesBucket Pulumi.Aws.S3.Bucket

Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any StaticRoutes are provided.

SwaggerString string

A Swagger specification already in string form to use to initialize the APIGateway. Note that you must manually provide permission for any route targets to be invoked by API Gateway when using swaggerString.

Either swaggerString or routes must be specified.

ApiKeySource APIKeySource

The source for the apikey. This can either be a HEADER or AUTHORIZER. If apiKeyRequired is set to true on a route, and this is not defined the value will default to HEADER.

GatewayResponses map[string]SwaggerGatewayResponseArgs

Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.

RequestValidator RequestValidator

Request Validator specifies the validator to use at the API level. Note method level validators override this.

Routes []RouteArgs

Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.

Either swaggerString or routes must be specified.

StageName string

The stage name for your API. This will get added as a base path to your API url.

StaticRoutesBucket Bucket

Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any StaticRoutes are provided.

SwaggerString string

A Swagger specification already in string form to use to initialize the APIGateway. Note that you must manually provide permission for any route targets to be invoked by API Gateway when using swaggerString.

Either swaggerString or routes must be specified.

apiKeySource APIKeySource

The source for the apikey. This can either be a HEADER or AUTHORIZER. If apiKeyRequired is set to true on a route, and this is not defined the value will default to HEADER.

gatewayResponses Map<String,SwaggerGatewayResponseArgs>

Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.

requestValidator RequestValidator

Request Validator specifies the validator to use at the API level. Note method level validators override this.

routes List<RouteArgs>

Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.

Either swaggerString or routes must be specified.

stageName String

The stage name for your API. This will get added as a base path to your API url.

staticRoutesBucket Bucket

Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any StaticRoutes are provided.

swaggerString String

A Swagger specification already in string form to use to initialize the APIGateway. Note that you must manually provide permission for any route targets to be invoked by API Gateway when using swaggerString.

Either swaggerString or routes must be specified.

apiKeySource APIKeySource

The source for the apikey. This can either be a HEADER or AUTHORIZER. If apiKeyRequired is set to true on a route, and this is not defined the value will default to HEADER.

gatewayResponses {[key: string]: SwaggerGatewayResponseArgs}

Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.

requestValidator RequestValidator

Request Validator specifies the validator to use at the API level. Note method level validators override this.

routes RouteArgs[]

Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.

Either swaggerString or routes must be specified.

stageName string

The stage name for your API. This will get added as a base path to your API url.

staticRoutesBucket pulumiAwss3Bucket

Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any StaticRoutes are provided.

swaggerString string

A Swagger specification already in string form to use to initialize the APIGateway. Note that you must manually provide permission for any route targets to be invoked by API Gateway when using swaggerString.

Either swaggerString or routes must be specified.

api_key_source APIKeySource

The source for the apikey. This can either be a HEADER or AUTHORIZER. If apiKeyRequired is set to true on a route, and this is not defined the value will default to HEADER.

gateway_responses Mapping[str, SwaggerGatewayResponseArgs]

Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.

request_validator RequestValidator

Request Validator specifies the validator to use at the API level. Note method level validators override this.

routes Sequence[RouteArgs]

Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.

Either swaggerString or routes must be specified.

stage_name str

The stage name for your API. This will get added as a base path to your API url.

static_routes_bucket Bucket

Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any StaticRoutes are provided.

swagger_string str

A Swagger specification already in string form to use to initialize the APIGateway. Note that you must manually provide permission for any route targets to be invoked by API Gateway when using swaggerString.

Either swaggerString or routes must be specified.

apiKeySource "HEADER" | "AUTHORIZER"

The source for the apikey. This can either be a HEADER or AUTHORIZER. If apiKeyRequired is set to true on a route, and this is not defined the value will default to HEADER.

gatewayResponses Map<Property Map>

Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.

requestValidator "ALL" | "PARAMS_ONLY" | "BODY_ONLY"

Request Validator specifies the validator to use at the API level. Note method level validators override this.

routes List<Property Map>

Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.

Either swaggerString or routes must be specified.

stageName String

The stage name for your API. This will get added as a base path to your API url.

staticRoutesBucket aws:s3:Bucket

Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any StaticRoutes are provided.

swaggerString String

A Swagger specification already in string form to use to initialize the APIGateway. Note that you must manually provide permission for any route targets to be invoked by API Gateway when using swaggerString.

Either swaggerString or routes must be specified.

Outputs

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

Api Pulumi.Aws.ApiGateway.RestApi

The underlying RestAPI resource.

Deployment Pulumi.Aws.ApiGateway.Deployment

The underlying Deployment resource.

Stage Pulumi.Aws.ApiGateway.Stage

The underlying Stage resource.

Url string

The URL where the Rest API is exposed.

ApiPolicy Pulumi.Aws.ApiGateway.RestApiPolicy

The underlying RestAPIPolicy resource.

Api RestApi

The underlying RestAPI resource.

Deployment Deployment

The underlying Deployment resource.

Stage Stage

The underlying Stage resource.

Url string

The URL where the Rest API is exposed.

ApiPolicy RestApiPolicy

The underlying RestAPIPolicy resource.

api RestApi

The underlying RestAPI resource.

deployment Deployment

The underlying Deployment resource.

stage Stage

The underlying Stage resource.

url String

The URL where the Rest API is exposed.

apiPolicy RestApiPolicy

The underlying RestAPIPolicy resource.

api pulumiAwsapigatewayRestApi

The underlying RestAPI resource.

deployment pulumiAwsapigatewayDeployment

The underlying Deployment resource.

stage pulumiAwsapigatewayStage

The underlying Stage resource.

url string

The URL where the Rest API is exposed.

apiPolicy pulumiAwsapigatewayRestApiPolicy

The underlying RestAPIPolicy resource.

api RestApi

The underlying RestAPI resource.

deployment Deployment

The underlying Deployment resource.

stage Stage

The underlying Stage resource.

url str

The URL where the Rest API is exposed.

api_policy RestApiPolicy

The underlying RestAPIPolicy resource.

api aws:apigateway:RestApi

The underlying RestAPI resource.

deployment aws:apigateway:Deployment

The underlying Deployment resource.

stage aws:apigateway:Stage

The underlying Stage resource.

url String

The URL where the Rest API is exposed.

apiPolicy aws:apigateway:RestApiPolicy

The underlying RestAPIPolicy resource.

Supporting Types

APIKeySource

HEADER
HEADER
AUTHORIZER
AUTHORIZER
APIKeySourceHEADER
HEADER
APIKeySourceAUTHORIZER
AUTHORIZER
HEADER
HEADER
AUTHORIZER
AUTHORIZER
HEADER
HEADER
AUTHORIZER
AUTHORIZER
HEADER
HEADER
AUTHORIZER
AUTHORIZER
"HEADER"
HEADER
"AUTHORIZER"
AUTHORIZER

Authorizer

ParameterName string

parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.

AuthType string

Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".

AuthorizerName string

The name for the Authorizer to be referenced as. This must be unique for each unique authorizer within the API. If no name if specified, a name will be generated for you.

AuthorizerResultTtlInSeconds double

The number of seconds during which the resulting IAM policy is cached. Default is 300s. You can set this value to 0 to disable caching. Max value is 3600s. Note - if you are sharing an authorizer across more than one route you will want to disable the cache or else it will cause problems for you.

Handler Pulumi.Aws.Lambda.Function

The authorizerHandler specifies information about the authorizing Lambda.

IdentitySource List<string>

List of mapping expressions of the request parameters as the identity source. This indicates where in the request identity information is expected. Applicable for the authorizer of the "request" type only. Example: ["method.request.header.HeaderAuth1", "method.request.querystring.QueryString1"]

IdentityValidationExpression string

A regular expression for validating the token as the incoming identity. It only invokes the authorizer's lambda if there is a match, else it will return a 401. This does not apply to REQUEST Lambda Authorizers. Example: "^x-[a-z]+".

MethodsToAuthorize List<string>

For method authorization, you can define resource servers and custom scopes by specifying the "resource-server/scope". e.g. ["com.hamuta.movies/drama.view", "http://my.resource.com/file.read"] For more information on resource servers and custom scopes visit the AWS documentation - https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html

ParameterLocation string

Defines where in the request API Gateway should look for identity information. The value must be "header" or "query". If there are multiple identity sources, the value must be "header".

ProviderARNs List<string>

The ARNs of the Cognito User Pools to use.

Type string

The type of the authorizer. This value must be one of the following:

  • "token", for an authorizer with the caller identity embedded in an authorization token
  • "request", for an authorizer with the caller identity contained in request parameters
ParameterName string

parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.

AuthType string

Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".

AuthorizerName string

The name for the Authorizer to be referenced as. This must be unique for each unique authorizer within the API. If no name if specified, a name will be generated for you.

AuthorizerResultTtlInSeconds float64

The number of seconds during which the resulting IAM policy is cached. Default is 300s. You can set this value to 0 to disable caching. Max value is 3600s. Note - if you are sharing an authorizer across more than one route you will want to disable the cache or else it will cause problems for you.

Handler Function

The authorizerHandler specifies information about the authorizing Lambda.

IdentitySource []string

List of mapping expressions of the request parameters as the identity source. This indicates where in the request identity information is expected. Applicable for the authorizer of the "request" type only. Example: ["method.request.header.HeaderAuth1", "method.request.querystring.QueryString1"]

IdentityValidationExpression string

A regular expression for validating the token as the incoming identity. It only invokes the authorizer's lambda if there is a match, else it will return a 401. This does not apply to REQUEST Lambda Authorizers. Example: "^x-[a-z]+".

MethodsToAuthorize []string

For method authorization, you can define resource servers and custom scopes by specifying the "resource-server/scope". e.g. ["com.hamuta.movies/drama.view", "http://my.resource.com/file.read"] For more information on resource servers and custom scopes visit the AWS documentation - https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html

ParameterLocation string

Defines where in the request API Gateway should look for identity information. The value must be "header" or "query". If there are multiple identity sources, the value must be "header".

ProviderARNs []string

The ARNs of the Cognito User Pools to use.

Type string

The type of the authorizer. This value must be one of the following:

  • "token", for an authorizer with the caller identity embedded in an authorization token
  • "request", for an authorizer with the caller identity contained in request parameters
parameterName String

parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.

authType String

Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".

authorizerName String

The name for the Authorizer to be referenced as. This must be unique for each unique authorizer within the API. If no name if specified, a name will be generated for you.

authorizerResultTtlInSeconds Double

The number of seconds during which the resulting IAM policy is cached. Default is 300s. You can set this value to 0 to disable caching. Max value is 3600s. Note - if you are sharing an authorizer across more than one route you will want to disable the cache or else it will cause problems for you.

handler Function

The authorizerHandler specifies information about the authorizing Lambda.

identitySource List<String>

List of mapping expressions of the request parameters as the identity source. This indicates where in the request identity information is expected. Applicable for the authorizer of the "request" type only. Example: ["method.request.header.HeaderAuth1", "method.request.querystring.QueryString1"]

identityValidationExpression String

A regular expression for validating the token as the incoming identity. It only invokes the authorizer's lambda if there is a match, else it will return a 401. This does not apply to REQUEST Lambda Authorizers. Example: "^x-[a-z]+".

methodsToAuthorize List<String>

For method authorization, you can define resource servers and custom scopes by specifying the "resource-server/scope". e.g. ["com.hamuta.movies/drama.view", "http://my.resource.com/file.read"] For more information on resource servers and custom scopes visit the AWS documentation - https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html

parameterLocation String

Defines where in the request API Gateway should look for identity information. The value must be "header" or "query". If there are multiple identity sources, the value must be "header".

providerARNs List<String>

The ARNs of the Cognito User Pools to use.

type String

The type of the authorizer. This value must be one of the following:

  • "token", for an authorizer with the caller identity embedded in an authorization token
  • "request", for an authorizer with the caller identity contained in request parameters
parameterName string

parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.

authType string

Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".

authorizerName string

The name for the Authorizer to be referenced as. This must be unique for each unique authorizer within the API. If no name if specified, a name will be generated for you.

authorizerResultTtlInSeconds number

The number of seconds during which the resulting IAM policy is cached. Default is 300s. You can set this value to 0 to disable caching. Max value is 3600s. Note - if you are sharing an authorizer across more than one route you will want to disable the cache or else it will cause problems for you.

handler pulumiAwslambdaFunction

The authorizerHandler specifies information about the authorizing Lambda.

identitySource string[]

List of mapping expressions of the request parameters as the identity source. This indicates where in the request identity information is expected. Applicable for the authorizer of the "request" type only. Example: ["method.request.header.HeaderAuth1", "method.request.querystring.QueryString1"]

identityValidationExpression string

A regular expression for validating the token as the incoming identity. It only invokes the authorizer's lambda if there is a match, else it will return a 401. This does not apply to REQUEST Lambda Authorizers. Example: "^x-[a-z]+".

methodsToAuthorize string[]

For method authorization, you can define resource servers and custom scopes by specifying the "resource-server/scope". e.g. ["com.hamuta.movies/drama.view", "http://my.resource.com/file.read"] For more information on resource servers and custom scopes visit the AWS documentation - https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html

parameterLocation string

Defines where in the request API Gateway should look for identity information. The value must be "header" or "query". If there are multiple identity sources, the value must be "header".

providerARNs string[]

The ARNs of the Cognito User Pools to use.

type string

The type of the authorizer. This value must be one of the following:

  • "token", for an authorizer with the caller identity embedded in an authorization token
  • "request", for an authorizer with the caller identity contained in request parameters
parameter_name str

parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.

auth_type str

Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".

authorizer_name str

The name for the Authorizer to be referenced as. This must be unique for each unique authorizer within the API. If no name if specified, a name will be generated for you.

authorizer_result_ttl_in_seconds float

The number of seconds during which the resulting IAM policy is cached. Default is 300s. You can set this value to 0 to disable caching. Max value is 3600s. Note - if you are sharing an authorizer across more than one route you will want to disable the cache or else it will cause problems for you.

handler Function

The authorizerHandler specifies information about the authorizing Lambda.

identity_source Sequence[str]

List of mapping expressions of the request parameters as the identity source. This indicates where in the request identity information is expected. Applicable for the authorizer of the "request" type only. Example: ["method.request.header.HeaderAuth1", "method.request.querystring.QueryString1"]

identity_validation_expression str

A regular expression for validating the token as the incoming identity. It only invokes the authorizer's lambda if there is a match, else it will return a 401. This does not apply to REQUEST Lambda Authorizers. Example: "^x-[a-z]+".

methods_to_authorize Sequence[str]

For method authorization, you can define resource servers and custom scopes by specifying the "resource-server/scope". e.g. ["com.hamuta.movies/drama.view", "http://my.resource.com/file.read"] For more information on resource servers and custom scopes visit the AWS documentation - https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html

parameter_location str

Defines where in the request API Gateway should look for identity information. The value must be "header" or "query". If there are multiple identity sources, the value must be "header".

provider_arns Sequence[str]

The ARNs of the Cognito User Pools to use.

type str

The type of the authorizer. This value must be one of the following:

  • "token", for an authorizer with the caller identity embedded in an authorization token
  • "request", for an authorizer with the caller identity contained in request parameters
parameterName String

parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.

authType String

Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".

authorizerName String

The name for the Authorizer to be referenced as. This must be unique for each unique authorizer within the API. If no name if specified, a name will be generated for you.

authorizerResultTtlInSeconds Number

The number of seconds during which the resulting IAM policy is cached. Default is 300s. You can set this value to 0 to disable caching. Max value is 3600s. Note - if you are sharing an authorizer across more than one route you will want to disable the cache or else it will cause problems for you.

handler aws:lambda:Function

The authorizerHandler specifies information about the authorizing Lambda.

identitySource List<String>

List of mapping expressions of the request parameters as the identity source. This indicates where in the request identity information is expected. Applicable for the authorizer of the "request" type only. Example: ["method.request.header.HeaderAuth1", "method.request.querystring.QueryString1"]

identityValidationExpression String

A regular expression for validating the token as the incoming identity. It only invokes the authorizer's lambda if there is a match, else it will return a 401. This does not apply to REQUEST Lambda Authorizers. Example: "^x-[a-z]+".

methodsToAuthorize List<String>

For method authorization, you can define resource servers and custom scopes by specifying the "resource-server/scope". e.g. ["com.hamuta.movies/drama.view", "http://my.resource.com/file.read"] For more information on resource servers and custom scopes visit the AWS documentation - https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-define-resource-servers.html

parameterLocation String

Defines where in the request API Gateway should look for identity information. The value must be "header" or "query". If there are multiple identity sources, the value must be "header".

providerARNs List<String>

The ARNs of the Cognito User Pools to use.

type String

The type of the authorizer. This value must be one of the following:

  • "token", for an authorizer with the caller identity embedded in an authorization token
  • "request", for an authorizer with the caller identity contained in request parameters

IntegrationConnectionType

INTERNET
INTERNET
VPC_LINK
VPC_LINK
IntegrationConnectionTypeINTERNET
INTERNET
IntegrationConnectionType_VPC_LINK
VPC_LINK
INTERNET
INTERNET
VPC_LINK
VPC_LINK
INTERNET
INTERNET
VPC_LINK
VPC_LINK
INTERNET
INTERNET
VP_C_LINK
VPC_LINK
"INTERNET"
INTERNET
"VPC_LINK"
VPC_LINK

IntegrationPassthroughBehavior

When_no_match
when_no_match
When_no_templates
when_no_templates
Never
never
IntegrationPassthroughBehavior_When_no_match
when_no_match
IntegrationPassthroughBehavior_When_no_templates
when_no_templates
IntegrationPassthroughBehaviorNever
never
When_no_match
when_no_match
When_no_templates
when_no_templates
Never
never
When_no_match
when_no_match
When_no_templates
when_no_templates
Never
never
WHEN_NO_MATCH
when_no_match
WHEN_NO_TEMPLATES
when_no_templates
NEVER
never
"when_no_match"
when_no_match
"when_no_templates"
when_no_templates
"never"
never

IntegrationType

Aws
aws
Aws_proxy
aws_proxy
Http
http
Http_proxy
http_proxy
Mock
mock
IntegrationTypeAws
aws
IntegrationType_Aws_proxy
aws_proxy
IntegrationTypeHttp
http
IntegrationType_Http_proxy
http_proxy
IntegrationTypeMock
mock
Aws
aws
Aws_proxy
aws_proxy
Http
http
Http_proxy
http_proxy
Mock
mock
Aws
aws
Aws_proxy
aws_proxy
Http
http
Http_proxy
http_proxy
Mock
mock
AWS
aws
AWS_PROXY
aws_proxy
HTTP
http
HTTP_PROXY
http_proxy
MOCK
mock
"aws"
aws
"aws_proxy"
aws_proxy
"http"
http
"http_proxy"
http_proxy
"mock"
mock

Method

ANY
ANY
GET
GET
PUT
PUT
POST
POST
DELETE
DELETE
PATCH
PATCH
OPTIONS
OPTIONS
HEAD
HEAD
MethodANY
ANY
MethodGET
GET
MethodPUT
PUT
MethodPOST
POST
MethodDELETE
DELETE
MethodPATCH
PATCH
MethodOPTIONS
OPTIONS
MethodHEAD
HEAD
ANY
ANY
GET
GET
PUT
PUT
POST
POST
DELETE
DELETE
PATCH
PATCH
OPTIONS
OPTIONS
HEAD
HEAD
ANY
ANY
GET
GET
PUT
PUT
POST
POST
DELETE
DELETE
PATCH
PATCH
OPTIONS
OPTIONS
HEAD
HEAD
ANY
ANY
GET
GET
PUT
PUT
POST
POST
DELETE
DELETE
PATCH
PATCH
OPTIONS
OPTIONS
HEAD
HEAD
"ANY"
ANY
"GET"
GET
"PUT"
PUT
"POST"
POST
"DELETE"
DELETE
"PATCH"
PATCH
"OPTIONS"
OPTIONS
"HEAD"
HEAD

RequestValidator

ALL
ALL
PARAMS_ONLY
PARAMS_ONLY
BODY_ONLY
BODY_ONLY
RequestValidatorALL
ALL
RequestValidator_PARAMS_ONLY
PARAMS_ONLY
RequestValidator_BODY_ONLY
BODY_ONLY
ALL
ALL
PARAMS_ONLY
PARAMS_ONLY
BODY_ONLY
BODY_ONLY
ALL
ALL
PARAMS_ONLY
PARAMS_ONLY
BODY_ONLY
BODY_ONLY
ALL
ALL
PARAM_S_ONLY
PARAMS_ONLY
BOD_Y_ONLY
BODY_ONLY
"ALL"
ALL
"PARAMS_ONLY"
PARAMS_ONLY
"BODY_ONLY"
BODY_ONLY

RequiredParameter

In string
Name string
In string
Name string
in String
name String
in string
name string
in_ str
name str
in String
name String

Route

Path string

The path on the API that will serve this route. If not prefixed with /, then a / will be added automatically to the beginning.

ApiKeyRequired bool

If true, an API key will be required for this route. The source for the API Key can be set at the API level and by default, the source will be the HEADER.

Authorizers List<Pulumi.AwsApiGateway.Inputs.Authorizer>

Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.

ContentType string

The content-type to serve the file as. Only valid when localPath points to a file. If localPath points to a directory, the content types for all files will be inferred.

Data object

A raw Swagger object to include verbatim in the integration for this path.

EventHandler Pulumi.Aws.Lambda.Function

A Lambda function which will handle the route for the given path and method.

IamAuthEnabled bool

By default, the route method auth type is set to NONE. If true, the auth type will be set to AWS_IAM.

Index string | bool

By default a localPath hosting static content will also serve 'index.html' in response to a request on a directory. To disable this pass false or supply a new index document name.

LocalPath string

The local path on disk to create static S3 resources for. Files will be uploaded into S3 objects, and directories will be recursively walked into.

Method Pulumi.AwsApiGateway.Method

The REST method of the route to match. Only valid with eventHandler or data routes.

RequestValidator Pulumi.AwsApiGateway.RequestValidator

Request Validator specifies the validator to use at the method level. This will override anything defined at the API level.

RequiredParameters List<Pulumi.AwsApiGateway.Inputs.RequiredParameter>

Required Parameters to validate. If the request validator is set to ALL or PARAMS_ONLY, api gateway will validate these before sending traffic to the event handler.

Target Pulumi.AwsApiGateway.Inputs.Target

The target for an integration route (see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html).

Path string

The path on the API that will serve this route. If not prefixed with /, then a / will be added automatically to the beginning.

ApiKeyRequired bool

If true, an API key will be required for this route. The source for the API Key can be set at the API level and by default, the source will be the HEADER.

Authorizers []Authorizer

Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.

ContentType string

The content-type to serve the file as. Only valid when localPath points to a file. If localPath points to a directory, the content types for all files will be inferred.

Data interface{}

A raw Swagger object to include verbatim in the integration for this path.

EventHandler Function

A Lambda function which will handle the route for the given path and method.

IamAuthEnabled bool

By default, the route method auth type is set to NONE. If true, the auth type will be set to AWS_IAM.

Index string | bool

By default a localPath hosting static content will also serve 'index.html' in response to a request on a directory. To disable this pass false or supply a new index document name.

LocalPath string

The local path on disk to create static S3 resources for. Files will be uploaded into S3 objects, and directories will be recursively walked into.

Method Method

The REST method of the route to match. Only valid with eventHandler or data routes.

RequestValidator RequestValidator

Request Validator specifies the validator to use at the method level. This will override anything defined at the API level.

RequiredParameters []RequiredParameter

Required Parameters to validate. If the request validator is set to ALL or PARAMS_ONLY, api gateway will validate these before sending traffic to the event handler.

Target Target

The target for an integration route (see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html).

path String

The path on the API that will serve this route. If not prefixed with /, then a / will be added automatically to the beginning.

apiKeyRequired Boolean

If true, an API key will be required for this route. The source for the API Key can be set at the API level and by default, the source will be the HEADER.

authorizers List<Authorizer>

Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.

contentType String

The content-type to serve the file as. Only valid when localPath points to a file. If localPath points to a directory, the content types for all files will be inferred.

data Object

A raw Swagger object to include verbatim in the integration for this path.

eventHandler Function

A Lambda function which will handle the route for the given path and method.

iamAuthEnabled Boolean

By default, the route method auth type is set to NONE. If true, the auth type will be set to AWS_IAM.

index String | Boolean

By default a localPath hosting static content will also serve 'index.html' in response to a request on a directory. To disable this pass false or supply a new index document name.

localPath String

The local path on disk to create static S3 resources for. Files will be uploaded into S3 objects, and directories will be recursively walked into.

method Method

The REST method of the route to match. Only valid with eventHandler or data routes.

requestValidator RequestValidator

Request Validator specifies the validator to use at the method level. This will override anything defined at the API level.

requiredParameters List<RequiredParameter>

Required Parameters to validate. If the request validator is set to ALL or PARAMS_ONLY, api gateway will validate these before sending traffic to the event handler.

target Target

The target for an integration route (see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html).

path string

The path on the API that will serve this route. If not prefixed with /, then a / will be added automatically to the beginning.

apiKeyRequired boolean

If true, an API key will be required for this route. The source for the API Key can be set at the API level and by default, the source will be the HEADER.

authorizers Authorizer[]

Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.

contentType string

The content-type to serve the file as. Only valid when localPath points to a file. If localPath points to a directory, the content types for all files will be inferred.

data any

A raw Swagger object to include verbatim in the integration for this path.

eventHandler pulumiAwslambdaFunction

A Lambda function which will handle the route for the given path and method.

iamAuthEnabled boolean

By default, the route method auth type is set to NONE. If true, the auth type will be set to AWS_IAM.

index string | boolean

By default a localPath hosting static content will also serve 'index.html' in response to a request on a directory. To disable this pass false or supply a new index document name.

localPath string

The local path on disk to create static S3 resources for. Files will be uploaded into S3 objects, and directories will be recursively walked into.

method Method

The REST method of the route to match. Only valid with eventHandler or data routes.

requestValidator RequestValidator

Request Validator specifies the validator to use at the method level. This will override anything defined at the API level.

requiredParameters RequiredParameter[]

Required Parameters to validate. If the request validator is set to ALL or PARAMS_ONLY, api gateway will validate these before sending traffic to the event handler.

target Target

The target for an integration route (see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html).

path str

The path on the API that will serve this route. If not prefixed with /, then a / will be added automatically to the beginning.

api_key_required bool

If true, an API key will be required for this route. The source for the API Key can be set at the API level and by default, the source will be the HEADER.

authorizers Sequence[Authorizer]

Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.

content_type str

The content-type to serve the file as. Only valid when localPath points to a file. If localPath points to a directory, the content types for all files will be inferred.

data Any

A raw Swagger object to include verbatim in the integration for this path.

event_handler Function

A Lambda function which will handle the route for the given path and method.

iam_auth_enabled bool

By default, the route method auth type is set to NONE. If true, the auth type will be set to AWS_IAM.

index str | bool

By default a localPath hosting static content will also serve 'index.html' in response to a request on a directory. To disable this pass false or supply a new index document name.

local_path str

The local path on disk to create static S3 resources for. Files will be uploaded into S3 objects, and directories will be recursively walked into.

method Method

The REST method of the route to match. Only valid with eventHandler or data routes.

request_validator RequestValidator

Request Validator specifies the validator to use at the method level. This will override anything defined at the API level.

required_parameters Sequence[RequiredParameter]

Required Parameters to validate. If the request validator is set to ALL or PARAMS_ONLY, api gateway will validate these before sending traffic to the event handler.

target Target

The target for an integration route (see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html).

path String

The path on the API that will serve this route. If not prefixed with /, then a / will be added automatically to the beginning.

apiKeyRequired Boolean

If true, an API key will be required for this route. The source for the API Key can be set at the API level and by default, the source will be the HEADER.

authorizers List<Property Map>

Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.

contentType String

The content-type to serve the file as. Only valid when localPath points to a file. If localPath points to a directory, the content types for all files will be inferred.

data Any

A raw Swagger object to include verbatim in the integration for this path.

eventHandler aws:lambda:Function

A Lambda function which will handle the route for the given path and method.

iamAuthEnabled Boolean

By default, the route method auth type is set to NONE. If true, the auth type will be set to AWS_IAM.

index String | Boolean

By default a localPath hosting static content will also serve 'index.html' in response to a request on a directory. To disable this pass false or supply a new index document name.

localPath String

The local path on disk to create static S3 resources for. Files will be uploaded into S3 objects, and directories will be recursively walked into.

method "ANY" | "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "OPTIONS" | "HEAD"

The REST method of the route to match. Only valid with eventHandler or data routes.

requestValidator "ALL" | "PARAMS_ONLY" | "BODY_ONLY"

Request Validator specifies the validator to use at the method level. This will override anything defined at the API level.

requiredParameters List<Property Map>

Required Parameters to validate. If the request validator is set to ALL or PARAMS_ONLY, api gateway will validate these before sending traffic to the event handler.

target Property Map

The target for an integration route (see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-integration-types.html).

SwaggerGatewayResponse

ResponseParameters Dictionary<string, string>
ResponseTemplates Dictionary<string, string>
StatusCode double
ResponseParameters map[string]string
ResponseTemplates map[string]string
StatusCode float64
responseParameters Map<String,String>
responseTemplates Map<String,String>
statusCode Double
responseParameters {[key: string]: string}
responseTemplates {[key: string]: string}
statusCode number
response_parameters Mapping[str, str]
response_templates Mapping[str, str]
status_code float
responseParameters Map<String>
responseTemplates Map<String>
statusCode Number

Target

Type Pulumi.AwsApiGateway.IntegrationType

Specifies an API method integration type. The valid value is one of the following:

  • aws: for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.

  • aws_proxy: for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration.

  • http: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration.

  • http_proxy: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration.

  • mock: for integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend.

Uri string

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}.

ConnectionId string

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

ConnectionType Pulumi.AwsApiGateway.IntegrationConnectionType

The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

PassthroughBehaviour Pulumi.AwsApiGateway.IntegrationPassthroughBehavior

Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.

The valid value is one of the following:

  • WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.

  • WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.

  • NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

Defaults to WHEN_NO_MATCH if unspecified.

Type IntegrationType

Specifies an API method integration type. The valid value is one of the following:

  • aws: for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.

  • aws_proxy: for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration.

  • http: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration.

  • http_proxy: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration.

  • mock: for integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend.

Uri string

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}.

ConnectionId string

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

ConnectionType IntegrationConnectionType

The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

PassthroughBehaviour IntegrationPassthroughBehavior

Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.

The valid value is one of the following:

  • WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.

  • WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.

  • NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

Defaults to WHEN_NO_MATCH if unspecified.

type IntegrationType

Specifies an API method integration type. The valid value is one of the following:

  • aws: for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.

  • aws_proxy: for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration.

  • http: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration.

  • http_proxy: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration.

  • mock: for integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend.

uri String

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}.

connectionId String

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

connectionType IntegrationConnectionType

The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

passthroughBehaviour IntegrationPassthroughBehavior

Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.

The valid value is one of the following:

  • WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.

  • WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.

  • NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

Defaults to WHEN_NO_MATCH if unspecified.

type IntegrationType

Specifies an API method integration type. The valid value is one of the following:

  • aws: for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.

  • aws_proxy: for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration.

  • http: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration.

  • http_proxy: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration.

  • mock: for integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend.

uri string

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}.

connectionId string

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

connectionType IntegrationConnectionType

The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

passthroughBehaviour IntegrationPassthroughBehavior

Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.

The valid value is one of the following:

  • WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.

  • WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.

  • NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

Defaults to WHEN_NO_MATCH if unspecified.

type IntegrationType

Specifies an API method integration type. The valid value is one of the following:

  • aws: for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.

  • aws_proxy: for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration.

  • http: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration.

  • http_proxy: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration.

  • mock: for integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend.

uri str

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}.

connection_id str

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

connection_type IntegrationConnectionType

The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

passthrough_behaviour IntegrationPassthroughBehavior

Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.

The valid value is one of the following:

  • WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.

  • WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.

  • NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

Defaults to WHEN_NO_MATCH if unspecified.

type "aws" | "aws_proxy" | "http" | "http_proxy" | "mock"

Specifies an API method integration type. The valid value is one of the following:

  • aws: for integrating the API method request with an AWS service action, including the Lambda function-invoking action. With the Lambda function-invoking action, this is referred to as the Lambda custom integration. With any other AWS service action, this is known as AWS integration.

  • aws_proxy: for integrating the API method request with the Lambda function-invoking action with the client request passed through as-is. This integration is also referred to as the Lambda proxy integration.

  • http: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC. This integration is also referred to as the HTTP custom integration.

  • http_proxy: for integrating the API method request with an HTTP endpoint, including a private HTTP endpoint within a VPC, with the client request passed through as-is. This is also referred to as the HTTP proxy integration.

  • mock: for integrating the API method request with API Gateway as a "loop-back" endpoint without invoking any backend.

uri String

Specifies Uniform Resource Identifier (URI) of the integration endpoint.

For HTTP or HTTP_PROXY integrations, the URI must be a fully formed, encoded HTTP(S) URL according to the RFC-3986 specification, for either standard integration, where connectionType is not VPC_LINK, or private integration, where connectionType is VPC_LINK. For a private HTTP integration, the URI is not used for routing.

For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&{p1}={v1}&p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&Bucket={bucket}&Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}.

connectionId String

The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.

connectionType "INTERNET" | "VPC_LINK"

The type of the network connection to the integration endpoint. The valid value is INTERNET for connections through the public routable internet or VPC_LINK for private connections between API Gateway and a network load balancer in a VPC. The default value is INTERNET.

passthroughBehaviour "when_no_match" | "when_no_templates" | "never"

Specifies how the method request body of an unmapped content type will be passed through the integration request to the back end without transformation.

The valid value is one of the following:

  • WHEN_NO_MATCH: passes the method request body through the integration request to the back end without transformation when the method request content type does not match any content type associated with the mapping templates defined in the integration request.

  • WHEN_NO_TEMPLATES: passes the method request body through the integration request to the back end without transformation when no mapping template is defined in the integration request. If a template is defined when this option is selected, the method request of an unmapped content-type will be rejected with an HTTP 415 Unsupported Media Type response.

  • NEVER: rejects the method request with an HTTP 415 Unsupported Media Type response when either the method request content type does not match any content type associated with the mapping templates defined in the integration request or no mapping template is defined in the integration request.

Defaults to WHEN_NO_MATCH if unspecified.

Package Details

Repository
AWS API Gateway
License
Apache-2.0