Class ResponseHeadersPolicy.Builder

java.lang.Object
software.amazon.awscdk.services.cloudfront.ResponseHeadersPolicy.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<ResponseHeadersPolicy>
Enclosing class:
ResponseHeadersPolicy

@Stability(Stable) public static final class ResponseHeadersPolicy.Builder extends Object implements software.amazon.jsii.Builder<ResponseHeadersPolicy>
A fluent builder for ResponseHeadersPolicy.
  • Method Details

    • create

      @Stability(Stable) public static ResponseHeadersPolicy.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of ResponseHeadersPolicy.Builder.
    • comment

      @Stability(Stable) public ResponseHeadersPolicy.Builder comment(String comment)
      A comment to describe the response headers policy.

      Default: - no comment

      Parameters:
      comment - A comment to describe the response headers policy. This parameter is required.
      Returns:
      this
    • corsBehavior

      @Stability(Stable) public ResponseHeadersPolicy.Builder corsBehavior(ResponseHeadersCorsBehavior corsBehavior)
      A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS).

      Default: - no cors behavior

      Parameters:
      corsBehavior - A configuration for a set of HTTP response headers that are used for cross-origin resource sharing (CORS). This parameter is required.
      Returns:
      this
    • customHeadersBehavior

      @Stability(Stable) public ResponseHeadersPolicy.Builder customHeadersBehavior(ResponseCustomHeadersBehavior customHeadersBehavior)
      A configuration for a set of custom HTTP response headers.

      Default: - no custom headers behavior

      Parameters:
      customHeadersBehavior - A configuration for a set of custom HTTP response headers. This parameter is required.
      Returns:
      this
    • responseHeadersPolicyName

      @Stability(Stable) public ResponseHeadersPolicy.Builder responseHeadersPolicyName(String responseHeadersPolicyName)
      A unique name to identify the response headers policy.

      Default: - generated from the `id`

      Parameters:
      responseHeadersPolicyName - A unique name to identify the response headers policy. This parameter is required.
      Returns:
      this
    • securityHeadersBehavior

      @Stability(Stable) public ResponseHeadersPolicy.Builder securityHeadersBehavior(ResponseSecurityHeadersBehavior securityHeadersBehavior)
      A configuration for a set of security-related HTTP response headers.

      Default: - no security headers behavior

      Parameters:
      securityHeadersBehavior - A configuration for a set of security-related HTTP response headers. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public ResponseHeadersPolicy build()
      Specified by:
      build in interface software.amazon.jsii.Builder<ResponseHeadersPolicy>
      Returns:
      a newly built instance of ResponseHeadersPolicy.