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,
binary_media_types: Optional[Sequence[str]] = 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:
- Api
Key Pulumi.Source Aws Api Gateway. APIKey Source 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.- Binary
Media List<string>Types List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Gateway
Responses Dictionary<string, Pulumi.Aws Api Gateway. Inputs. Swagger Gateway Response Args> Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.
- Request
Validator Pulumi.Aws Api Gateway. Request Validator Request Validator specifies the validator to use at the API level. Note method level validators override this.
- Routes
List<Pulumi.
Aws Api Gateway. Inputs. Route> Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.
Either
swaggerString
orroutes
must be specified.- Stage
Name string The stage name for your API. This will get added as a base path to your API url.
- Static
Routes Pulumi.Bucket 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
StaticRoute
s are provided.- Swagger
String 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
orroutes
must be specified.
- Api
Key APIKeySource Source 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.- Binary
Media []stringTypes List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- Gateway
Responses map[string]SwaggerGateway Response Args 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
[]Route
Args Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.
Either
swaggerString
orroutes
must be specified.- Stage
Name string The stage name for your API. This will get added as a base path to your API url.
- Static
Routes BucketBucket Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any
StaticRoute
s are provided.- Swagger
String 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
orroutes
must be specified.
- api
Key APIKeySource Source 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.- binary
Media List<String>Types List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- gateway
Responses Map<String,SwaggerGateway Response Args> 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 List<Route>
Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.
Either
swaggerString
orroutes
must be specified.- stage
Name String The stage name for your API. This will get added as a base path to your API url.
- static
Routes BucketBucket Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any
StaticRoute
s are provided.- swagger
String 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
orroutes
must be specified.
- api
Key APIKeySource Source 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.- binary
Media string[]Types List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- gateway
Responses {[key: string]: SwaggerGateway Response Args} 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 Route[]
Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.
Either
swaggerString
orroutes
must be specified.- stage
Name string The stage name for your API. This will get added as a base path to your API url.
- static
Routes pulumiBucket Awss3Bucket Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any
StaticRoute
s are provided.- swagger
String 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
orroutes
must be specified.
- api_
key_ APIKeysource Source 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.- binary_
media_ Sequence[str]types List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- gateway_
responses Mapping[str, SwaggerGateway Response Args] 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[Route
Args] Routes to use to initialize the APIGateway. These will be used to create the Swagger specification for the API.
Either
swaggerString
orroutes
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_ Bucketbucket Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any
StaticRoute
s 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
orroutes
must be specified.
- api
Key "HEADER" | "AUTHORIZER"Source 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.- binary
Media List<String>Types List of binary media types supported by the REST API. By default, the REST API supports only UTF-8-encoded text payloads. If importing an OpenAPI specification via the body argument, this corresponds to the x-amazon-apigateway-binary-media-types extension. If the argument value is provided and is different than the OpenAPI value, the argument value will override the OpenAPI value.
- gateway
Responses Map<Property Map> Define custom gateway responses for the API. This can be used to properly enable CORS for Lambda Authorizers.
- request
Validator "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
orroutes
must be specified.- stage
Name String The stage name for your API. This will get added as a base path to your API url.
- static
Routes aws:s3:BucketBucket Bucket to use for placing resources for static resources. If not provided a default one will be created on your behalf if any
StaticRoute
s are provided.- swagger
String 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
orroutes
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. Api Gateway. Rest Api The underlying RestAPI resource.
- Deployment
Pulumi.
Aws. Api Gateway. Deployment The underlying Deployment resource.
- Stage
Pulumi.
Aws. Api Gateway. Stage The underlying Stage resource.
- Url string
The URL where the Rest API is exposed.
- Api
Policy Pulumi.Aws. Api Gateway. Rest Api Policy The underlying RestAPIPolicy resource.
- Api
Rest
Api 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.
- Api
Policy RestApi Policy The underlying RestAPIPolicy resource.
- api
Rest
Api 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.
- api
Policy RestApi Policy The underlying RestAPIPolicy resource.
- api
pulumi
Awsapigateway Rest Api The underlying RestAPI resource.
- deployment
pulumi
Awsapigateway Deployment The underlying Deployment resource.
- stage
pulumi
Awsapigateway Stage The underlying Stage resource.
- url string
The URL where the Rest API is exposed.
- api
Policy pulumiAwsapigateway Rest Api Policy The underlying RestAPIPolicy resource.
- api
Rest
Api 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 RestApi Policy The underlying RestAPIPolicy resource.
- api
aws:apigateway:Rest
Api 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.
- api
Policy aws:apigateway:RestApi Policy The underlying RestAPIPolicy resource.
Supporting Types
APIKeySource, APIKeySourceArgs
- HEADER
- HEADER
- AUTHORIZER
- AUTHORIZER
- APIKey
Source HEADER - HEADER
- APIKey
Source AUTHORIZER - AUTHORIZER
- HEADER
- HEADER
- AUTHORIZER
- AUTHORIZER
- HEADER
- HEADER
- AUTHORIZER
- AUTHORIZER
- HEADER
- HEADER
- AUTHORIZER
- AUTHORIZER
- "HEADER"
- HEADER
- "AUTHORIZER"
- AUTHORIZER
Authorizer, AuthorizerArgs
- Parameter
Name string parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.
- Auth
Type string Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".
- 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.
- 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.
- Identity
Source 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"]
- Identity
Validation stringExpression 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]+".
- 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
- Parameter
Location 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".
- Provider
ARNs 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
- Parameter
Name string parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.
- Auth
Type string Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".
- 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.
- 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.
- Identity
Source []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"]
- Identity
Validation stringExpression 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]+".
- []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
- Parameter
Location 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".
- Provider
ARNs []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 String parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.
- auth
Type String Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".
- 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.
- 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.
- identity
Source 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"]
- identity
Validation StringExpression 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]+".
- 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
- parameter
Location 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".
- provider
ARNs 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
- parameter
Name string parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.
- auth
Type string Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".
- 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.
- 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
pulumi
Awslambda Function The authorizerHandler specifies information about the authorizing Lambda.
- identity
Source 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"]
- identity
Validation stringExpression 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]+".
- 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
- parameter
Location 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".
- provider
ARNs 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".
- 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.
- 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_ strexpression 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]+".
- 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
- parameter
Name String parameterName is the name of the header or query parameter containing the authorization token. Must be "Unused" for multiple identity sources.
- auth
Type String Specifies the authorization mechanism for the client. Typical values are "oauth2" or "custom".
- 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.
- 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.
- identity
Source 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"]
- identity
Validation StringExpression 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]+".
- 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
- parameter
Location 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".
- provider
ARNs 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, IntegrationConnectionTypeArgs
- INTERNET
- INTERNET
- VPC_LINK
- VPC_LINK
- Integration
Connection Type INTERNET - INTERNET
- Integration
Connection Type_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, IntegrationPassthroughBehaviorArgs
- When_
no_ match - when_no_match
- When_
no_ templates - when_no_templates
- Never
- never
- Integration
Passthrough Behavior_When_ no_ match - when_no_match
- Integration
Passthrough Behavior_When_ no_ templates - when_no_templates
- Integration
Passthrough Behavior 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
- "when_
no_ match" - when_no_match
- "when_
no_ templates" - when_no_templates
- "never"
- never
IntegrationType, IntegrationTypeArgs
- Aws
- aws
- Aws_
proxy - aws_proxy
- Http
- http
- Http_
proxy - http_proxy
- Mock
- mock
- Integration
Type Aws - aws
- Integration
Type_Aws_ proxy - aws_proxy
- Integration
Type Http - http
- Integration
Type_Http_ proxy - http_proxy
- Integration
Type 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
- "aws"
- aws
- "aws_
proxy" - aws_proxy
- "http"
- http
- "http_
proxy" - http_proxy
- "mock"
- mock
Method, MethodArgs
- ANY
- ANY
- GET
- GET
- PUT
- PUT
- POST
- POST
- DELETE
- DELETE
- PATCH
- PATCH
- OPTIONS
- OPTIONS
- HEAD
- HEAD
- Method
ANY - ANY
- Method
GET - GET
- Method
PUT - PUT
- Method
POST - POST
- Method
DELETE - DELETE
- Method
PATCH - PATCH
- Method
OPTIONS - OPTIONS
- Method
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
- "ANY"
- ANY
- "GET"
- GET
- "PUT"
- PUT
- "POST"
- POST
- "DELETE"
- DELETE
- "PATCH"
- PATCH
- "OPTIONS"
- OPTIONS
- "HEAD"
- HEAD
RequestValidator, RequestValidatorArgs
- ALL
- ALL
- PARAMS_ONLY
- PARAMS_ONLY
- BODY_ONLY
- BODY_ONLY
- Request
Validator ALL - ALL
- Request
Validator_PARAMS_ONLY - PARAMS_ONLY
- Request
Validator_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, RequiredParameterArgs
Route, RouteArgs
- 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.- Api
Key boolRequired 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.
- List<Pulumi.
Aws Api Gateway. Inputs. Authorizer> Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.
- Content
Type string The
content-type
to serve the file as. Only valid whenlocalPath
points to a file. IflocalPath
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.
- Event
Handler Pulumi.Aws. Lambda. Function A Lambda function which will handle the route for the given path and method.
- Iam
Auth boolEnabled By default, the route method auth type is set to
NONE
. If true, the auth type will be set toAWS_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 passfalse
or supply a new index document name.- Local
Path 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.
Aws Api Gateway. Method The REST method of the route to match. Only valid with
eventHandler
ordata
routes.- Request
Validator Pulumi.Aws Api Gateway. Request Validator Request Validator specifies the validator to use at the method level. This will override anything defined at the API level.
- Required
Parameters List<Pulumi.Aws Api Gateway. Inputs. Required Parameter> 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.
Aws Api Gateway. 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.- Api
Key boolRequired 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.
- []Authorizer
Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.
- Content
Type string The
content-type
to serve the file as. Only valid whenlocalPath
points to a file. IflocalPath
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.
- Event
Handler Function A Lambda function which will handle the route for the given path and method.
- Iam
Auth boolEnabled By default, the route method auth type is set to
NONE
. If true, the auth type will be set toAWS_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 passfalse
or supply a new index document name.- Local
Path 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
ordata
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 []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.- api
Key BooleanRequired 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.
- List<Authorizer>
Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.
- content
Type String The
content-type
to serve the file as. Only valid whenlocalPath
points to a file. IflocalPath
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.
- event
Handler Function A Lambda function which will handle the route for the given path and method.
- iam
Auth BooleanEnabled By default, the route method auth type is set to
NONE
. If true, the auth type will be set toAWS_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 passfalse
or supply a new index document name.- local
Path 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
ordata
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 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.- api
Key booleanRequired 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.
- Authorizer[]
Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.
- content
Type string The
content-type
to serve the file as. Only valid whenlocalPath
points to a file. IflocalPath
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 pulumiAwslambda Function A Lambda function which will handle the route for the given path and method.
- iam
Auth booleanEnabled By default, the route method auth type is set to
NONE
. If true, the auth type will be set toAWS_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 passfalse
or supply a new index document name.- local
Path 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
ordata
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 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_ boolrequired 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.
- 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 whenlocalPath
points to a file. IflocalPath
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_ boolenabled By default, the route method auth type is set to
NONE
. If true, the auth type will be set toAWS_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 passfalse
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
ordata
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.- api
Key BooleanRequired 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.
- List<Property Map>
Authorizers allows you to define Lambda authorizers be applied for authorization when the the route is called.
- content
Type String The
content-type
to serve the file as. Only valid whenlocalPath
points to a file. IflocalPath
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 aws:lambda:Function A Lambda function which will handle the route for the given path and method.
- iam
Auth BooleanEnabled By default, the route method auth type is set to
NONE
. If true, the auth type will be set toAWS_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 passfalse
or supply a new index document name.- local
Path 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
ordata
routes.- request
Validator "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.
- required
Parameters 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, SwaggerGatewayResponseArgs
- Response
Parameters Dictionary<string, string> - Response
Templates Dictionary<string, string> - Status
Code double
- Response
Parameters map[string]string - Response
Templates map[string]string - Status
Code float64
- response
Parameters Map<String,String> - response
Templates Map<String,String> - status
Code Double
- response
Parameters {[key: string]: string} - response
Templates {[key: string]: string} - status
Code number
- response_
parameters Mapping[str, str] - response_
templates Mapping[str, str] - status_
code float
- response
Parameters Map<String> - response
Templates Map<String> - status
Code Number
Target, TargetArgs
- Type
Pulumi.
Aws Api Gateway. Integration Type 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.
- Connection
Id string The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
- Connection
Type Pulumi.Aws Api Gateway. Integration Connection Type The type of the network connection to the integration endpoint. The valid value is
INTERNET
for connections through the public routable internet orVPC_LINK
for private connections between API Gateway and a network load balancer in a VPC. The default value isINTERNET
.- Passthrough
Behaviour Pulumi.Aws Api Gateway. Integration Passthrough Behavior 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.- 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}.
- Type
Integration
Type 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.
- Connection
Id string The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
- Connection
Type IntegrationConnection Type The type of the network connection to the integration endpoint. The valid value is
INTERNET
for connections through the public routable internet orVPC_LINK
for private connections between API Gateway and a network load balancer in a VPC. The default value isINTERNET
.- Passthrough
Behaviour IntegrationPassthrough Behavior 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.- 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}.
- type
Integration
Type 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.
- connection
Id String The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
- connection
Type IntegrationConnection Type The type of the network connection to the integration endpoint. The valid value is
INTERNET
for connections through the public routable internet orVPC_LINK
for private connections between API Gateway and a network load balancer in a VPC. The default value isINTERNET
.- passthrough
Behaviour IntegrationPassthrough Behavior 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.- 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}.
- type
Integration
Type 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.
- connection
Id string The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
- connection
Type IntegrationConnection Type The type of the network connection to the integration endpoint. The valid value is
INTERNET
for connections through the public routable internet orVPC_LINK
for private connections between API Gateway and a network load balancer in a VPC. The default value isINTERNET
.- passthrough
Behaviour IntegrationPassthrough Behavior 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.- 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}.
- type
Integration
Type 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.
- connection_
id str The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
- connection_
type IntegrationConnection Type The type of the network connection to the integration endpoint. The valid value is
INTERNET
for connections through the public routable internet orVPC_LINK
for private connections between API Gateway and a network load balancer in a VPC. The default value isINTERNET
.- passthrough_
behaviour IntegrationPassthrough Behavior 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.- 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}.
- 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.
- connection
Id String The (id) of the VpcLink used for the integration when connectionType=VPC_LINK and undefined, otherwise.
- connection
Type "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 orVPC_LINK
for private connections between API Gateway and a network load balancer in a VPC. The default value isINTERNET
.- passthrough
Behaviour "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.- 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}.
Package Details
- Repository
- AWS API Gateway pulumi/pulumi-aws-apigateway
- License
- Apache-2.0