AWS::ApiGatewayV2::Api Cors - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::ApiGatewayV2::Api Cors

The Cors property specifies a CORS configuration for an API. Supported only for HTTP APIs. See Configuring CORS for more information.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "AllowCredentials" : Boolean, "AllowHeaders" : [ String, ... ], "AllowMethods" : [ String, ... ], "AllowOrigins" : [ String, ... ], "ExposeHeaders" : [ String, ... ], "MaxAge" : Integer }

YAML

AllowCredentials: Boolean AllowHeaders: - String AllowMethods: - String AllowOrigins: - String ExposeHeaders: - String MaxAge: Integer

Properties

AllowCredentials

Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

Required: No

Type: Boolean

Update requires: No interruption

AllowHeaders

Represents a collection of allowed headers. Supported only for HTTP APIs.

Required: No

Type: Array of String

Update requires: No interruption

AllowMethods

Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

Required: No

Type: Array of String

Update requires: No interruption

AllowOrigins

Represents a collection of allowed origins. Supported only for HTTP APIs.

Required: No

Type: Array of String

Update requires: No interruption

ExposeHeaders

Represents a collection of exposed headers. Supported only for HTTP APIs.

Required: No

Type: Array of String

Update requires: No interruption

MaxAge

The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.

Required: No

Type: Integer

Update requires: No interruption