@Stability(value=Stable)
public static interface CfnBucket.CorsConfigurationProperty
extends software.amazon.jsii.JsiiSerializable
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();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnBucket.CorsConfigurationProperty.Builder
A builder for
CfnBucket.CorsConfigurationProperty |
static class |
CfnBucket.CorsConfigurationProperty.Jsii$Proxy
An implementation for
CfnBucket.CorsConfigurationProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnBucket.CorsConfigurationProperty.Builder |
builder() |
Object |
getCorsRules()
A set of origins and methods (cross-origin access that you want to allow).
|
@Stability(value=Stable) @NotNull Object getCorsRules()
You can add up to 100 rules to the configuration.
@Stability(value=Stable) static CfnBucket.CorsConfigurationProperty.Builder builder()
Copyright © 2022. All rights reserved.