Create an api.


aws::api-gateway example-api
    name: "example-api"
    protocol-type: HTTP
    description: "example-desc-up"
    api-key-selection-expression: '$request.header.x-api-key'
    version: "example-version"
    disable-execute-api-endpoint: true
    route-selection-expression: "${request.method} ${request.path}"

        allow-credentials: true
        max-age: 1000

        allow-headers: [

        expose-headers: [

    tags: {
        "example-key": "example-value"


Attribute Description
api-key-selection-expression The API key selection expression. Valid values are $request.header.x-api-key or $context.authorizer.usageIdentifierKey.
cors-configuration subresource

A CORS configuration for the API.

When set to true credentials are included in the CORS request.
allow-headers list
The list of allowed headers.
allow-methods list
The list of allowed HTTP methods.
allow-origins list
The list of allowed origins.
expose-headers list
The list of exposed headers.
The number of seconds that the browser should cache preflight request results.
description The description of the API.
disable-execute-api-endpoint When set to true, clients cannot invoke your API by using the default execute-api endpoint.
name The name of the API. (Required)
protocol-type The protocol of the API. Valid values are HTTP or WEBSOCKET. (Required)
route-selection-expression The route selection expression for the API. Currently the only supported value is ${request.method} ${request.path}.
version The version identifier for the API.
tags map The list of tags for the Api.


Attribute Description
id The ID of the Api.
arn The ARN of the Api.