Interface CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Jsii$Proxy
- Enclosing class:
CfnResponseHeadersPolicy
A response headers policy configuration contains metadata about the response headers policy, and configurations for sets of HTTP response headers.
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.cloudfront.*;
ResponseHeadersPolicyConfigProperty responseHeadersPolicyConfigProperty = ResponseHeadersPolicyConfigProperty.builder()
.name("name")
// the properties below are optional
.comment("comment")
.corsConfig(CorsConfigProperty.builder()
.accessControlAllowCredentials(false)
.accessControlAllowHeaders(AccessControlAllowHeadersProperty.builder()
.items(List.of("items"))
.build())
.accessControlAllowMethods(AccessControlAllowMethodsProperty.builder()
.items(List.of("items"))
.build())
.accessControlAllowOrigins(AccessControlAllowOriginsProperty.builder()
.items(List.of("items"))
.build())
.originOverride(false)
// the properties below are optional
.accessControlExposeHeaders(AccessControlExposeHeadersProperty.builder()
.items(List.of("items"))
.build())
.accessControlMaxAgeSec(123)
.build())
.customHeadersConfig(CustomHeadersConfigProperty.builder()
.items(List.of(CustomHeaderProperty.builder()
.header("header")
.override(false)
.value("value")
.build()))
.build())
.removeHeadersConfig(RemoveHeadersConfigProperty.builder()
.items(List.of(RemoveHeaderProperty.builder()
.header("header")
.build()))
.build())
.securityHeadersConfig(SecurityHeadersConfigProperty.builder()
.contentSecurityPolicy(ContentSecurityPolicyProperty.builder()
.contentSecurityPolicy("contentSecurityPolicy")
.override(false)
.build())
.contentTypeOptions(ContentTypeOptionsProperty.builder()
.override(false)
.build())
.frameOptions(FrameOptionsProperty.builder()
.frameOption("frameOption")
.override(false)
.build())
.referrerPolicy(ReferrerPolicyProperty.builder()
.override(false)
.referrerPolicy("referrerPolicy")
.build())
.strictTransportSecurity(StrictTransportSecurityProperty.builder()
.accessControlMaxAgeSec(123)
.override(false)
// the properties below are optional
.includeSubdomains(false)
.preload(false)
.build())
.xssProtection(XSSProtectionProperty.builder()
.override(false)
.protection(false)
// the properties below are optional
.modeBlock(false)
.reportUri("reportUri")
.build())
.build())
.serverTimingHeadersConfig(ServerTimingHeadersConfigProperty.builder()
.enabled(false)
// the properties below are optional
.samplingRate(123)
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classAn implementation forCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default StringA comment to describe the response headers policy.default ObjectA configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).default ObjectA configuration for a set of custom HTTP response headers.getName()A name to identify the response headers policy.default ObjectA configuration for a set of HTTP headers to remove from the HTTP response.default ObjectA configuration for a set of security-related HTTP response headers.default ObjectA configuration for enabling theServer-Timingheader in HTTP responses sent from CloudFront.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
A name to identify the response headers policy.The name must be unique for response headers policies in this AWS account .
- See Also:
-
getComment
A comment to describe the response headers policy.The comment cannot be longer than 128 characters.
- See Also:
-
getCorsConfig
A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).Returns union: either
IResolvableorCfnResponseHeadersPolicy.CorsConfigProperty- See Also:
-
getCustomHeadersConfig
A configuration for a set of custom HTTP response headers.Returns union: either
IResolvableorCfnResponseHeadersPolicy.CustomHeadersConfigProperty- See Also:
-
getRemoveHeadersConfig
A configuration for a set of HTTP headers to remove from the HTTP response.Returns union: either
IResolvableorCfnResponseHeadersPolicy.RemoveHeadersConfigProperty- See Also:
-
getSecurityHeadersConfig
A configuration for a set of security-related HTTP response headers.Returns union: either
IResolvableorCfnResponseHeadersPolicy.SecurityHeadersConfigProperty- See Also:
-
getServerTimingHeadersConfig
A configuration for enabling theServer-Timingheader in HTTP responses sent from CloudFront.Returns union: either
IResolvableorCfnResponseHeadersPolicy.ServerTimingHeadersConfigProperty- See Also:
-
builder
@Stability(Stable) static CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder builder()
-