Show / Hide Table of Contents

Interface CfnApiPropsMixin.ICorsProperty

The Cors property specifies a CORS configuration for an API.

Namespace: Amazon.CDK.CfnPropertyMixins.AWS.ApiGatewayV2
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public interface CfnApiPropsMixin.ICorsProperty
Syntax (vb)
Public Interface CfnApiPropsMixin.ICorsProperty
Remarks

Supported only for HTTP APIs. See Configuring CORS for more information.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.CfnPropertyMixins.AWS.ApiGatewayV2;

             var corsProperty = new CorsProperty {
                 AllowCredentials = false,
                 AllowHeaders = new [] { "allowHeaders" },
                 AllowMethods = new [] { "allowMethods" },
                 AllowOrigins = new [] { "allowOrigins" },
                 ExposeHeaders = new [] { "exposeHeaders" },
                 MaxAge = 123
             };

Synopsis

Properties

AllowCredentials

Specifies whether credentials are included in the CORS request.

AllowHeaders

Represents a collection of allowed headers.

AllowMethods

Represents a collection of allowed HTTP methods.

AllowOrigins

Represents a collection of allowed origins.

ExposeHeaders

Represents a collection of exposed headers.

MaxAge

The number of seconds that the browser should cache preflight request results.

Properties

AllowCredentials

Specifies whether credentials are included in the CORS request.

object? AllowCredentials { get; }
Property Value

object

Remarks

Supported only for HTTP APIs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowcredentials

Type union: either bool or IResolvable

AllowHeaders

Represents a collection of allowed headers.

string[]? AllowHeaders { get; }
Property Value

string[]

Remarks

Supported only for HTTP APIs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowheaders

AllowMethods

Represents a collection of allowed HTTP methods.

string[]? AllowMethods { get; }
Property Value

string[]

Remarks

Supported only for HTTP APIs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-allowmethods

AllowOrigins

Represents a collection of allowed origins.

string[]? AllowOrigins { get; }
Property Value

string[]

Remarks

Supported only for HTTP APIs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-alloworigins

ExposeHeaders

Represents a collection of exposed headers.

string[]? ExposeHeaders { get; }
Property Value

string[]

Remarks

Supported only for HTTP APIs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-exposeheaders

MaxAge

The number of seconds that the browser should cache preflight request results.

double? MaxAge { get; }
Property Value

double?

Remarks

Supported only for HTTP APIs.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-cors.html#cfn-apigatewayv2-api-cors-maxage

Back to top Generated by DocFX