public static final class ResponseHeadersCorsBehavior.Builder
extends java.lang.Object
ResponseHeadersCorsBehavior
Constructor and Description |
---|
Builder() |
public ResponseHeadersCorsBehavior.Builder accessControlAllowCredentials(java.lang.Boolean accessControlAllowCredentials)
ResponseHeadersCorsBehavior.getAccessControlAllowCredentials()
accessControlAllowCredentials
- A Boolean that CloudFront uses as the value for the Access-Control-Allow-Credentials HTTP response header. This parameter is required.this
public ResponseHeadersCorsBehavior.Builder accessControlAllowHeaders(java.util.List<java.lang.String> accessControlAllowHeaders)
ResponseHeadersCorsBehavior.getAccessControlAllowHeaders()
accessControlAllowHeaders
- A list of HTTP header names that CloudFront includes as values for the Access-Control-Allow-Headers HTTP response header. This parameter is required.
You can specify ['*']
to allow all headers.this
public ResponseHeadersCorsBehavior.Builder accessControlAllowMethods(java.util.List<java.lang.String> accessControlAllowMethods)
ResponseHeadersCorsBehavior.getAccessControlAllowMethods()
accessControlAllowMethods
- A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods HTTP response header. This parameter is required.this
public ResponseHeadersCorsBehavior.Builder accessControlAllowOrigins(java.util.List<java.lang.String> accessControlAllowOrigins)
ResponseHeadersCorsBehavior.getAccessControlAllowOrigins()
accessControlAllowOrigins
- A list of origins (domain names) that CloudFront can use as the value for the Access-Control-Allow-Origin HTTP response header. This parameter is required.
You can specify ['*']
to allow all origins.this
public ResponseHeadersCorsBehavior.Builder originOverride(java.lang.Boolean originOverride)
ResponseHeadersCorsBehavior.getOriginOverride()
originOverride
- A Boolean that determines whether CloudFront overrides HTTP response headers received from the origin with the ones specified in this response headers policy. This parameter is required.this
public ResponseHeadersCorsBehavior.Builder accessControlExposeHeaders(java.util.List<java.lang.String> accessControlExposeHeaders)
ResponseHeadersCorsBehavior.getAccessControlExposeHeaders()
accessControlExposeHeaders
- A list of HTTP headers that CloudFront includes as values for the Access-Control-Expose-Headers HTTP response header.
You can specify ['*']
to expose all headers.this
public ResponseHeadersCorsBehavior.Builder accessControlMaxAge(Duration accessControlMaxAge)
ResponseHeadersCorsBehavior.getAccessControlMaxAge()
accessControlMaxAge
- A number that CloudFront uses as the value for the Access-Control-Max-Age HTTP response header.this
public ResponseHeadersCorsBehavior build()
ResponseHeadersCorsBehavior
java.lang.NullPointerException
- if any required attribute was not provided