Interface CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Jsii$Proxy
- Enclosing class:
CfnResponseHeadersPolicy
@Stability(Stable)
public static interface CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty
extends software.amazon.jsii.JsiiSerializable
A response headers policy configuration.
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
Modifier and TypeInterfaceDescriptionstatic final class
static final class
An implementation forCfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default String
A comment to describe the response headers policy.default Object
A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).default Object
A configuration for a set of custom HTTP response headers.getName()
A name to identify the response headers policy.default Object
A configuration for a set of HTTP headers to remove from the HTTP response.default Object
A configuration for a set of security-related HTTP response headers.default Object
A configuration for enabling theServer-Timing
header 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).- See Also:
-
getCustomHeadersConfig
A configuration for a set of custom HTTP response headers.- See Also:
-
getRemoveHeadersConfig
A configuration for a set of HTTP headers to remove from the HTTP response.- See Also:
-
getSecurityHeadersConfig
A configuration for a set of security-related HTTP response headers.- See Also:
-
getServerTimingHeadersConfig
A configuration for enabling theServer-Timing
header in HTTP responses sent from CloudFront.- See Also:
-
builder
@Stability(Stable) static CfnResponseHeadersPolicy.ResponseHeadersPolicyConfigProperty.Builder builder()
-