Class CfnResponseHeadersPolicy.CorsConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.cloudfront.CfnResponseHeadersPolicy.CorsConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnResponseHeadersPolicy.CorsConfigProperty>
- Enclosing interface:
- CfnResponseHeadersPolicy.CorsConfigProperty
@Stability(Stable)
public static final class CfnResponseHeadersPolicy.CorsConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnResponseHeadersPolicy.CorsConfigProperty>
A builder for
CfnResponseHeadersPolicy.CorsConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessControlAllowCredentials(Boolean accessControlAllowCredentials) accessControlAllowCredentials(IResolvable accessControlAllowCredentials) accessControlAllowHeaders(IResolvable accessControlAllowHeaders) accessControlAllowHeaders(CfnResponseHeadersPolicy.AccessControlAllowHeadersProperty accessControlAllowHeaders) accessControlAllowMethods(IResolvable accessControlAllowMethods) accessControlAllowMethods(CfnResponseHeadersPolicy.AccessControlAllowMethodsProperty accessControlAllowMethods) accessControlAllowOrigins(IResolvable accessControlAllowOrigins) accessControlAllowOrigins(CfnResponseHeadersPolicy.AccessControlAllowOriginsProperty accessControlAllowOrigins) accessControlExposeHeaders(IResolvable accessControlExposeHeaders) accessControlExposeHeaders(CfnResponseHeadersPolicy.AccessControlExposeHeadersProperty accessControlExposeHeaders) accessControlMaxAgeSec(Number accessControlMaxAgeSec) Sets the value ofCfnResponseHeadersPolicy.CorsConfigProperty.getAccessControlMaxAgeSec()build()Builds the configured instance.originOverride(Boolean originOverride) Sets the value ofCfnResponseHeadersPolicy.CorsConfigProperty.getOriginOverride()originOverride(IResolvable originOverride) Sets the value ofCfnResponseHeadersPolicy.CorsConfigProperty.getOriginOverride()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
accessControlAllowCredentials
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowCredentials(Boolean accessControlAllowCredentials) - Parameters:
accessControlAllowCredentials- A Boolean that CloudFront uses as the value for theAccess-Control-Allow-CredentialsHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-CredentialsHTTP response header, see Access-Control-Allow-Credentials in the MDN Web Docs.- Returns:
this
-
accessControlAllowCredentials
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowCredentials(IResolvable accessControlAllowCredentials) - Parameters:
accessControlAllowCredentials- A Boolean that CloudFront uses as the value for theAccess-Control-Allow-CredentialsHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-CredentialsHTTP response header, see Access-Control-Allow-Credentials in the MDN Web Docs.- Returns:
this
-
accessControlAllowHeaders
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowHeaders(IResolvable accessControlAllowHeaders) - Parameters:
accessControlAllowHeaders- A list of HTTP header names that CloudFront includes as values for theAccess-Control-Allow-HeadersHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-HeadersHTTP response header, see Access-Control-Allow-Headers in the MDN Web Docs.- Returns:
this
-
accessControlAllowHeaders
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowHeaders(CfnResponseHeadersPolicy.AccessControlAllowHeadersProperty accessControlAllowHeaders) - Parameters:
accessControlAllowHeaders- A list of HTTP header names that CloudFront includes as values for theAccess-Control-Allow-HeadersHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-HeadersHTTP response header, see Access-Control-Allow-Headers in the MDN Web Docs.- Returns:
this
-
accessControlAllowMethods
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowMethods(IResolvable accessControlAllowMethods) - Parameters:
accessControlAllowMethods- A list of HTTP methods that CloudFront includes as values for theAccess-Control-Allow-MethodsHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-MethodsHTTP response header, see Access-Control-Allow-Methods in the MDN Web Docs.- Returns:
this
-
accessControlAllowMethods
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowMethods(CfnResponseHeadersPolicy.AccessControlAllowMethodsProperty accessControlAllowMethods) - Parameters:
accessControlAllowMethods- A list of HTTP methods that CloudFront includes as values for theAccess-Control-Allow-MethodsHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-MethodsHTTP response header, see Access-Control-Allow-Methods in the MDN Web Docs.- Returns:
this
-
accessControlAllowOrigins
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowOrigins(IResolvable accessControlAllowOrigins) - Parameters:
accessControlAllowOrigins- A list of origins (domain names) that CloudFront can use as the value for theAccess-Control-Allow-OriginHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-OriginHTTP response header, see Access-Control-Allow-Origin in the MDN Web Docs.- Returns:
this
-
accessControlAllowOrigins
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlAllowOrigins(CfnResponseHeadersPolicy.AccessControlAllowOriginsProperty accessControlAllowOrigins) - Parameters:
accessControlAllowOrigins- A list of origins (domain names) that CloudFront can use as the value for theAccess-Control-Allow-OriginHTTP response header. This parameter is required. For more information about theAccess-Control-Allow-OriginHTTP response header, see Access-Control-Allow-Origin in the MDN Web Docs.- Returns:
this
-
originOverride
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder originOverride(Boolean originOverride) Sets the value ofCfnResponseHeadersPolicy.CorsConfigProperty.getOriginOverride()- Parameters:
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.- Returns:
this
-
originOverride
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder originOverride(IResolvable originOverride) Sets the value ofCfnResponseHeadersPolicy.CorsConfigProperty.getOriginOverride()- Parameters:
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.- Returns:
this
-
accessControlExposeHeaders
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlExposeHeaders(IResolvable accessControlExposeHeaders) - Parameters:
accessControlExposeHeaders- A list of HTTP headers that CloudFront includes as values for theAccess-Control-Expose-HeadersHTTP response header. For more information about theAccess-Control-Expose-HeadersHTTP response header, see Access-Control-Expose-Headers in the MDN Web Docs.- Returns:
this
-
accessControlExposeHeaders
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlExposeHeaders(CfnResponseHeadersPolicy.AccessControlExposeHeadersProperty accessControlExposeHeaders) - Parameters:
accessControlExposeHeaders- A list of HTTP headers that CloudFront includes as values for theAccess-Control-Expose-HeadersHTTP response header. For more information about theAccess-Control-Expose-HeadersHTTP response header, see Access-Control-Expose-Headers in the MDN Web Docs.- Returns:
this
-
accessControlMaxAgeSec
@Stability(Stable) public CfnResponseHeadersPolicy.CorsConfigProperty.Builder accessControlMaxAgeSec(Number accessControlMaxAgeSec) Sets the value ofCfnResponseHeadersPolicy.CorsConfigProperty.getAccessControlMaxAgeSec()- Parameters:
accessControlMaxAgeSec- A number that CloudFront uses as the value for theAccess-Control-Max-AgeHTTP response header. For more information about theAccess-Control-Max-AgeHTTP response header, see Access-Control-Max-Age in the MDN Web Docs.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnResponseHeadersPolicy.CorsConfigProperty>- Returns:
- a new instance of
CfnResponseHeadersPolicy.CorsConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-