Interface CfnBucket.CorsConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnBucket.CorsConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnBucket
@Stability(Stable)
public static interface CfnBucket.CorsConfigurationProperty
extends software.amazon.jsii.JsiiSerializable
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 software.amazon.awscdk.services.s3.*;
CorsConfigurationProperty corsConfigurationProperty = CorsConfigurationProperty.builder()
.corsRules(List.of(CorsRuleProperty.builder()
.allowedMethods(List.of("allowedMethods"))
.allowedOrigins(List.of("allowedOrigins"))
// the properties below are optional
.allowedHeaders(List.of("allowedHeaders"))
.exposedHeaders(List.of("exposedHeaders"))
.id("id")
.maxAge(123)
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnBucket.CorsConfigurationPropertystatic final classAn implementation forCfnBucket.CorsConfigurationProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()A set of origins and methods (cross-origin access that you want to allow).Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCorsRules
A set of origins and methods (cross-origin access that you want to allow).You can add up to 100 rules to the configuration.
Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnBucket.CorsRuleProperty>- See Also:
-
builder
-