Class CfnBucket.CorsConfigurationProperty
Describes the cross-origin access configuration for objects in an Amazon S3 bucket.
Inheritance
System.Object
CfnBucket.CorsConfigurationProperty
Implements
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CorsConfigurationProperty : Object, CfnBucket.ICorsConfigurationProperty
Syntax (vb)
Public Class CorsConfigurationProperty
Inherits Object
Implements CfnBucket.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
Constructors
CorsConfigurationProperty() |
Properties
CorsRules | A set of origins and methods (cross-origin access that you want to allow). |
Constructors
CorsConfigurationProperty()
public CorsConfigurationProperty()
Properties
CorsRules
A set of origins and methods (cross-origin access that you want to allow).
public object CorsRules { get; set; }
Property Value
System.Object
Remarks
You can add up to 100 rules to the configuration.