Interface CfnBucket.ICorsConfigurationProperty
Describes the cross-origin access configuration for objects in an Amazon S3 bucket.
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICorsConfigurationProperty
Syntax (vb)
Public Interface ICorsConfigurationProperty
Remarks
For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide .
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.AWS.S3;
var corsConfigurationProperty = new CorsConfigurationProperty {
CorsRules = new [] { new CorsRuleProperty {
AllowedMethods = new [] { "allowedMethods" },
AllowedOrigins = new [] { "allowedOrigins" },
// the properties below are optional
AllowedHeaders = new [] { "allowedHeaders" },
ExposedHeaders = new [] { "exposedHeaders" },
Id = "id",
MaxAge = 123
} }
};
Synopsis
Properties
CorsRules | A set of origins and methods (cross-origin access that you want to allow). |
Properties
CorsRules
A set of origins and methods (cross-origin access that you want to allow).
object CorsRules { get; }
Property Value
System.Object
Remarks
You can add up to 100 rules to the configuration.