Skip to content
v2.273.0

CorsConfigurationProperty Struct ​

Example ​

ts
// 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.CfnFunction.CorsConfigurationProperty = {
  allowOrigin: 'allowOrigin',

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

Properties ​

allowCredentialsboolean | IResolvableallow_credentialstyping.Union[bool, IResolvable]allowCredentialsBooleanAllowCredentialsboolAllowCredentialsinterface{}#
allowHeadersstringallow_headersstrallowHeadersStringAllowHeadersstringAllowHeaders*string#
allowMethodsstringallow_methodsstrallowMethodsStringAllowMethodsstringAllowMethods*string#
allowOriginstringallow_originstrallowOriginStringAllowOriginstringAllowOrigin*stringrequired#
maxAgestringmax_agestrmaxAgeStringMaxAgestringMaxAge*string#