aws-cdk-lib.aws_sam.CfnApi.CorsConfigurationProperty

interface CorsConfigurationProperty

LanguageType name
.NETAmazon.CDK.AWS.SAM.CfnApi.CorsConfigurationProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssam#CfnApi_CorsConfigurationProperty
Javasoftware.amazon.awscdk.services.sam.CfnApi.CorsConfigurationProperty
Pythonaws_cdk.aws_sam.CfnApi.CorsConfigurationProperty
TypeScript aws-cdk-lib » aws_sam » CfnApi » CorsConfigurationProperty

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sam as sam } from 'aws-cdk-lib';
const corsConfigurationProperty: sam.CfnApi.CorsConfigurationProperty = {
  allowOrigin: 'allowOrigin',

  // the properties below are optional
  allowCredentials: false,
  allowHeaders: 'allowHeaders',
  allowMethods: 'allowMethods',
  maxAge: 'maxAge',
};

Properties

NameTypeDescription
allowOriginstringCfnApi.CorsConfigurationProperty.AllowOrigin.
allowCredentials?boolean | IResolvableCfnApi.CorsConfigurationProperty.AllowCredentials.
allowHeaders?stringCfnApi.CorsConfigurationProperty.AllowHeaders.
allowMethods?stringCfnApi.CorsConfigurationProperty.AllowMethods.
maxAge?stringCfnApi.CorsConfigurationProperty.MaxAge.

allowOrigin

Type: string

CfnApi.CorsConfigurationProperty.AllowOrigin.


allowCredentials?

Type: boolean | IResolvable (optional)

CfnApi.CorsConfigurationProperty.AllowCredentials.


allowHeaders?

Type: string (optional)

CfnApi.CorsConfigurationProperty.AllowHeaders.


allowMethods?

Type: string (optional)

CfnApi.CorsConfigurationProperty.AllowMethods.


maxAge?

Type: string (optional)

CfnApi.CorsConfigurationProperty.MaxAge.