1. Packages
  2. AWS API Gateway
  3. API Docs
  4. RestAPI
AWS API Gateway v2.6.1 published on Wednesday, Oct 2, 2024 by Pulumi

aws-apigateway.RestAPI

Explore with Pulumi AI

aws-apigateway logo
AWS API Gateway v2.6.1 published on Wednesday, Oct 2, 2024 by Pulumi

    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

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

    Constructor syntax

    new RestAPI(name: string, args?: RestAPIArgs, opts?: ComponentResourceOptions);
    @overload
    def RestAPI(resource_name: str,
                args: Optional[RestAPIArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def RestAPI(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                api_key_source: Optional[APIKeySource] = None,
                binary_media_types: Optional[Sequence[str]] = None,
                description: Optional[str] = None,
                disable_execute_api_endpoint: Optional[bool] = 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,
                tags: Optional[Mapping[str, str]] = None)
    func NewRestAPI(ctx *Context, name string, args *RestAPIArgs, opts ...ResourceOption) (*RestAPI, error)
    public RestAPI(string name, RestAPIArgs? args = null, ComponentResourceOptions? opts = null)
    public RestAPI(String name, RestAPIArgs args)
    public RestAPI(String name, RestAPIArgs args, ComponentResourceOptions options)
    
    type: aws-apigateway:RestAPI
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Constructor example

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

    var restAPIResource = new AwsApiGateway.RestAPI("restAPIResource", new()
    {
        ApiKeySource = AwsApiGateway.APIKeySource.HEADER,
        BinaryMediaTypes = new()
        {
            "string",
        },
        Description = "string",
        DisableExecuteApiEndpoint = false,
        GatewayResponses = 
        {
            { "string", new AwsApiGateway.Inputs.SwaggerGatewayResponseArgs
            {
                ResponseParameters = 
                {
                    { "string", "string" },
                },
                ResponseTemplates = 
                {
                    { "string", "string" },
                },
                StatusCode = 0,
            } },
        },
        RequestValidator = AwsApiGateway.RequestValidator.ALL,
        Routes = new()
        {
            new AwsApiGateway.Inputs.RouteArgs
            {
                Path = "string",
                Data = "any",
                ContentType = "string",
                ApiKeyRequired = false,
                EventHandler = function,
                IamAuthEnabled = false,
                Index = "string",
                LocalPath = "string",
                Method = AwsApiGateway.Method.ANY,
                Authorizers = new()
                {
                    new AwsApiGateway.Inputs.AuthorizerArgs
                    {
                        ParameterName = "string",
                        AuthType = "string",
                        AuthorizerName = "string",
                        AuthorizerResultTtlInSeconds = 0,
                        Handler = function,
                        IdentitySource = new()
                        {
                            "string",
                        },
                        IdentityValidationExpression = "string",
                        MethodsToAuthorize = new()
                        {
                            "string",
                        },
                        ParameterLocation = "string",
                        ProviderARNs = new()
                        {
                            "string",
                        },
                        Type = "string",
                    },
                },
                RequestValidator = AwsApiGateway.RequestValidator.ALL,
                RequiredParameters = new()
                {
                    new AwsApiGateway.Inputs.RequiredParameterArgs
                    {
                        In = "string",
                        Name = "string",
                    },
                },
                Target = new AwsApiGateway.Inputs.TargetArgs
                {
                    Type = AwsApiGateway.IntegrationType.Aws,
                    ConnectionId = "string",
                    ConnectionType = AwsApiGateway.IntegrationConnectionType.INTERNET,
                    HttpMethod = "ANY",
                    PassthroughBehaviour = AwsApiGateway.IntegrationPassthroughBehavior.When_no_match,
                    Uri = "string",
                },
            },
        },
        StageName = "string",
        StaticRoutesBucket = bucket,
        SwaggerString = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := awsapigateway.NewRestAPI(ctx, "restAPIResource", &awsapigateway.RestAPIArgs{
    	ApiKeySource: awsapigateway.APIKeySourceHEADER,
    	BinaryMediaTypes: []pulumi.String{
    		pulumi.String("string"),
    	},
    	Description:               pulumi.String("string"),
    	DisableExecuteApiEndpoint: pulumi.Bool(false),
    	GatewayResponses: map[string]apigateway.SwaggerGatewayResponseArgs{
    		"string": &apigateway.SwaggerGatewayResponseArgs{
    			ResponseParameters: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			ResponseTemplates: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			StatusCode: pulumi.Float64(0),
    		},
    	},
    	RequestValidator: awsapigateway.RequestValidatorALL,
    	Routes: []apigateway.RouteArgs{
    		{
    			Path:           "string",
    			Data:           "any",
    			ContentType:    "string",
    			ApiKeyRequired: false,
    			EventHandler:   pulumi.Any(function),
    			IamAuthEnabled: false,
    			Index:          "string",
    			LocalPath:      "string",
    			Method:         awsapigateway.MethodANY,
    			Authorizers: []apigateway.AuthorizerArgs{
    				{
    					ParameterName:                "string",
    					AuthType:                     "string",
    					AuthorizerName:               "string",
    					AuthorizerResultTtlInSeconds: 0,
    					Handler:                      pulumi.Any(function),
    					IdentitySource: []string{
    						"string",
    					},
    					IdentityValidationExpression: "string",
    					MethodsToAuthorize: []string{
    						"string",
    					},
    					ParameterLocation: "string",
    					ProviderARNs: []pulumi.String{
    						pulumi.String("string"),
    					},
    					Type: "string",
    				},
    			},
    			RequestValidator: awsapigateway.RequestValidatorALL,
    			RequiredParameters: []apigateway.RequiredParameterArgs{
    				{
    					In:   pulumi.String("string"),
    					Name: pulumi.String("string"),
    				},
    			},
    			Target: {
    				Type:                 awsapigateway.IntegrationTypeAws,
    				ConnectionId:         pulumi.String("string"),
    				ConnectionType:       awsapigateway.IntegrationConnectionTypeINTERNET,
    				HttpMethod:           pulumi.String("ANY"),
    				PassthroughBehaviour: awsapigateway.IntegrationPassthroughBehavior_When_no_match,
    				Uri:                  pulumi.String("string"),
    			},
    		},
    	},
    	StageName:          pulumi.String("string"),
    	StaticRoutesBucket: pulumi.Any(bucket),
    	SwaggerString:      pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var restAPIResource = new RestAPI("restAPIResource", RestAPIArgs.builder()
        .apiKeySource("HEADER")
        .binaryMediaTypes("string")
        .description("string")
        .disableExecuteApiEndpoint(false)
        .gatewayResponses(Map.of("string", Map.ofEntries(
            Map.entry("responseParameters", Map.of("string", "string")),
            Map.entry("responseTemplates", Map.of("string", "string")),
            Map.entry("statusCode", 0)
        )))
        .requestValidator("ALL")
        .routes(RouteArgs.builder()
            .path("string")
            .data("any")
            .contentType("string")
            .apiKeyRequired(false)
            .eventHandler(function)
            .iamAuthEnabled(false)
            .index("string")
            .localPath("string")
            .method("ANY")
            .authorizers(AuthorizerArgs.builder()
                .parameterName("string")
                .authType("string")
                .authorizerName("string")
                .authorizerResultTtlInSeconds(0)
                .handler(function)
                .identitySource("string")
                .identityValidationExpression("string")
                .methodsToAuthorize("string")
                .parameterLocation("string")
                .providerARNs("string")
                .type("string")
                .build())
            .requestValidator("ALL")
            .requiredParameters(RequiredParameterArgs.builder()
                .in("string")
                .name("string")
                .build())
            .target(TargetArgs.builder()
                .type("aws")
                .connectionId("string")
                .connectionType("INTERNET")
                .httpMethod("ANY")
                .passthroughBehaviour("when_no_match")
                .uri("string")
                .build())
            .build())
        .stageName("string")
        .staticRoutesBucket(bucket)
        .swaggerString("string")
        .tags(Map.of("string", "string"))
        .build());
    
    rest_api_resource = aws_apigateway.RestAPI("restAPIResource",
        api_key_source=aws_apigateway.APIKeySource.HEADER,
        binary_media_types=["string"],
        description="string",
        disable_execute_api_endpoint=False,
        gateway_responses={
            "string": {
                "response_parameters": {
                    "string": "string",
                },
                "response_templates": {
                    "string": "string",
                },
                "status_code": 0,
            },
        },
        request_validator=aws_apigateway.RequestValidator.ALL,
        routes=[{
            "path": "string",
            "data": "any",
            "content_type": "string",
            "api_key_required": False,
            "event_handler": function,
            "iam_auth_enabled": False,
            "index": "string",
            "local_path": "string",
            "method": aws_apigateway.Method.ANY,
            "authorizers": [{
                "parameter_name": "string",
                "auth_type": "string",
                "authorizer_name": "string",
                "authorizer_result_ttl_in_seconds": 0,
                "handler": function,
                "identity_source": ["string"],
                "identity_validation_expression": "string",
                "methods_to_authorize": ["string"],
                "parameter_location": "string",
                "provider_arns": ["string"],
                "type": "string",
            }],
            "request_validator": aws_apigateway.RequestValidator.ALL,
            "required_parameters": [{
                "in_": "string",
                "name": "string",
            }],
            "target": {
                "type": aws_apigateway.IntegrationType.AWS,
                "connection_id": "string",
                "connection_type": aws_apigateway.IntegrationConnectionType.INTERNET,
                "http_method": "ANY",
                "passthrough_behaviour": aws_apigateway.IntegrationPassthroughBehavior.WHEN_NO_MATCH,
                "uri": "string",
            },
        }],
        stage_name="string",
        static_routes_bucket=bucket,
        swagger_string="string",
        tags={
            "string": "string",
        })
    
    const restAPIResource = new aws_apigateway.RestAPI("restAPIResource", {
        apiKeySource: aws_apigateway.APIKeySource.HEADER,
        binaryMediaTypes: ["string"],
        description: "string",
        disableExecuteApiEndpoint: false,
        gatewayResponses: {
            string: {
                responseParameters: {
                    string: "string",
                },
                responseTemplates: {
                    string: "string",
                },
                statusCode: 0,
            },
        },
        requestValidator: aws_apigateway.RequestValidator.ALL,
        routes: [{
            path: "string",
            data: "any",
            contentType: "string",
            apiKeyRequired: false,
            eventHandler: _function,
            iamAuthEnabled: false,
            index: "string",
            localPath: "string",
            method: aws_apigateway.Method.ANY,
            authorizers: [{
                parameterName: "string",
                authType: "string",
                authorizerName: "string",
                authorizerResultTtlInSeconds: 0,
                handler: _function,
                identitySource: ["string"],
                identityValidationExpression: "string",
                methodsToAuthorize: ["string"],
                parameterLocation: "string",
                providerARNs: ["string"],
                type: "string",
            }],
            requestValidator: aws_apigateway.RequestValidator.ALL,
            requiredParameters: [{
                "in": "string",
                name: "string",
            }],
            target: {
                type: aws_apigateway.IntegrationType.Aws,
                connectionId: "string",
                connectionType: aws_apigateway.IntegrationConnectionType.INTERNET,
                httpMethod: "ANY",
                passthroughBehaviour: aws_apigateway.IntegrationPassthroughBehavior.When_no_match,
                uri: "string",
            },
        }],
        stageName: "string",
        staticRoutesBucket: bucket,
        swaggerString: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws-apigateway:RestAPI
    properties:
        apiKeySource: HEADER
        binaryMediaTypes:
            - string
        description: string
        disableExecuteApiEndpoint: false
        gatewayResponses:
            string:
                responseParameters:
                    string: string
                responseTemplates:
                    string: string
                statusCode: 0
        requestValidator: ALL
        routes:
            - apiKeyRequired: false
              authorizers:
                - authType: string
                  authorizerName: string
                  authorizerResultTtlInSeconds: 0
                  handler: ${function}
                  identitySource:
                    - string
                  identityValidationExpression: string
                  methodsToAuthorize:
                    - string
                  parameterLocation: string
                  parameterName: string
                  providerARNs:
                    - string
                  type: string
              contentType: string
              data: any
              eventHandler: ${function}
              iamAuthEnabled: false
              index: string
              localPath: string
              method: ANY
              path: string
              requestValidator: ALL
              requiredParameters:
                - in: string
                  name: string
              target:
                connectionId: string
                connectionType: INTERNET
                httpMethod: ANY
                passthroughBehaviour: when_no_match
                type: aws
                uri: string
        stageName: string
        staticRoutesBucket: ${bucket}
        swaggerString: string
        tags:
            string: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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.
    BinaryMediaTypes List<string>
    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.
    Description string
    Description of the REST API.
    DisableExecuteApiEndpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false.
    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.Route>

    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.

    This type is defined in the AWS Classic package.

    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.

    Tags Dictionary<string, string>
    'Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    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.
    BinaryMediaTypes []string
    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.
    Description string
    Description of the REST API.
    DisableExecuteApiEndpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false.
    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.

    This type is defined in the AWS Classic package.

    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.

    Tags map[string]string
    'Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    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.
    binaryMediaTypes List<String>
    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.
    description String
    Description of the REST API.
    disableExecuteApiEndpoint Boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false.
    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<Route>

    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.

    This type is defined in the AWS Classic package.

    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.

    tags Map<String,String>
    'Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    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.
    binaryMediaTypes string[]
    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.
    description string
    Description of the REST API.
    disableExecuteApiEndpoint boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false.
    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 Route[]

    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.

    This type is defined in the AWS Classic package.

    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.

    tags {[key: string]: string}
    'Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    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.
    binary_media_types Sequence[str]
    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.
    description str
    Description of the REST API.
    disable_execute_api_endpoint bool
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false.
    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 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.

    This type is defined in the AWS Classic package.

    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.

    tags Mapping[str, str]
    'Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    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.
    binaryMediaTypes List<String>
    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.
    description String
    Description of the REST API.
    disableExecuteApiEndpoint Boolean
    Whether clients can invoke your API by using the default execute-api endpoint. By default, clients can invoke your API with the default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint. Defaults to false.
    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.

    This type is defined in the AWS Classic package.

    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.

    tags Map<String>
    'Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    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.

    This type is defined in the AWS Classic package.

    Deployment Pulumi.Aws.ApiGateway.Deployment

    The underlying Deployment resource.

    This type is defined in the AWS Classic package.

    Stage Pulumi.Aws.ApiGateway.Stage

    The underlying Stage resource.

    This type is defined in the AWS Classic package.

    Url string
    The URL where the Rest API is exposed.
    ApiPolicy Pulumi.Aws.ApiGateway.RestApiPolicy

    The underlying RestAPIPolicy resource.

    This type is defined in the AWS Classic package.

    Api RestApi

    The underlying RestAPI resource.

    This type is defined in the AWS Classic package.

    Deployment Deployment

    The underlying Deployment resource.

    This type is defined in the AWS Classic package.

    Stage Stage

    The underlying Stage resource.

    This type is defined in the AWS Classic package.

    Url string
    The URL where the Rest API is exposed.
    ApiPolicy RestApiPolicy

    The underlying RestAPIPolicy resource.

    This type is defined in the AWS Classic package.

    api RestApi

    The underlying RestAPI resource.

    This type is defined in the AWS Classic package.

    deployment Deployment

    The underlying Deployment resource.

    This type is defined in the AWS Classic package.

    stage Stage

    The underlying Stage resource.

    This type is defined in the AWS Classic package.

    url String
    The URL where the Rest API is exposed.
    apiPolicy RestApiPolicy

    The underlying RestAPIPolicy resource.

    This type is defined in the AWS Classic package.

    api pulumiAwsapigatewayRestApi

    The underlying RestAPI resource.

    This type is defined in the AWS Classic package.

    deployment pulumiAwsapigatewayDeployment

    The underlying Deployment resource.

    This type is defined in the AWS Classic package.

    stage pulumiAwsapigatewayStage

    The underlying Stage resource.

    This type is defined in the AWS Classic package.

    url string
    The URL where the Rest API is exposed.
    apiPolicy pulumiAwsapigatewayRestApiPolicy

    The underlying RestAPIPolicy resource.

    This type is defined in the AWS Classic package.

    api pulumi_aws.apigateway.RestApi

    The underlying RestAPI resource.

    This type is defined in the AWS Classic package.

    deployment pulumi_aws.apigateway.Deployment

    The underlying Deployment resource.

    This type is defined in the AWS Classic package.

    stage pulumi_aws.apigateway.Stage

    The underlying Stage resource.

    This type is defined in the AWS Classic package.

    url str
    The URL where the Rest API is exposed.
    api_policy pulumi_aws.apigateway.RestApiPolicy

    The underlying RestAPIPolicy resource.

    This type is defined in the AWS Classic package.

    api aws:apigateway:RestApi

    The underlying RestAPI resource.

    This type is defined in the AWS Classic package.

    deployment aws:apigateway:Deployment

    The underlying Deployment resource.

    This type is defined in the AWS Classic package.

    stage aws:apigateway:Stage

    The underlying Stage resource.

    This type is defined in the AWS Classic package.

    url String
    The URL where the Rest API is exposed.
    apiPolicy aws:apigateway:RestApiPolicy

    The underlying RestAPIPolicy resource.

    This type is defined in the AWS Classic package.

    Supporting Types

    APIKeySource, APIKeySourceArgs

    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, AuthorizerArgs

    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.

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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 pulumi_aws.lambda_.Function

    The authorizerHandler specifies information about the authorizing Lambda.

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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, IntegrationConnectionTypeArgs

    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, IntegrationPassthroughBehaviorArgs

    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, IntegrationTypeArgs

    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, MethodArgs

    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, RequestValidatorArgs

    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, RequiredParameterArgs

    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, 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.
    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.

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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 pulumi_aws.lambda_.Function

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

    This type is defined in the AWS Classic package.

    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.

    This type is defined in the AWS Classic package.

    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, SwaggerGatewayResponseArgs

    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, TargetArgs

    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.

    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.

    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 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.

    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.

    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 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.

    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.

    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 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.

    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.

    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 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.

    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.

    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.

    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.

    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
    aws-apigateway logo
    AWS API Gateway v2.6.1 published on Wednesday, Oct 2, 2024 by Pulumi