interface CorsConfigurationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.S3.CfnBucket.CorsConfigurationProperty |
![]() | software.amazon.awscdk.services.s3.CfnBucket.CorsConfigurationProperty |
![]() | aws_cdk.aws_s3.CfnBucket.CorsConfigurationProperty |
![]() | @aws-cdk/aws-s3 » CfnBucket » CorsConfigurationProperty |
Describes the cross-origin access configuration for objects in an Amazon S3 bucket.
For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as s3 from '@aws-cdk/aws-s3';
const corsConfigurationProperty: s3.CfnBucket.CorsConfigurationProperty = {
corsRules: [{
allowedMethods: ['allowedMethods'],
allowedOrigins: ['allowedOrigins'],
// the properties below are optional
allowedHeaders: ['allowedHeaders'],
exposedHeaders: ['exposedHeaders'],
id: 'id',
maxAge: 123,
}],
};
Properties
Name | Type | Description |
---|---|---|
cors | IResolvable | IResolvable | Cors [] | A set of origins and methods (cross-origin access that you want to allow). |
corsRules
Type:
IResolvable
|
IResolvable
|
Cors
[]
A set of origins and methods (cross-origin access that you want to allow).
You can add up to 100 rules to the configuration.