All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.cloudfront.inputs.ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.cloudfront.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs Empty = new ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs();

    /**
     * Whether CloudFront includes the `mode=block` directive in the `X-XSS-Protection` header.
     * 
     */
    @Import(name="modeBlock")
    private @Nullable Output modeBlock;

    /**
     * @return Whether CloudFront includes the `mode=block` directive in the `X-XSS-Protection` header.
     * 
     */
    public Optional> modeBlock() {
        return Optional.ofNullable(this.modeBlock);
    }

    /**
     * Whether CloudFront overrides the `X-XSS-Protection` HTTP response header received from the origin with the one specified in this response headers policy.
     * 
     */
    @Import(name="override", required=true)
    private Output override;

    /**
     * @return Whether CloudFront overrides the `X-XSS-Protection` HTTP response header received from the origin with the one specified in this response headers policy.
     * 
     */
    public Output override() {
        return this.override;
    }

    /**
     * A Boolean value that determines the value of the `X-XSS-Protection` HTTP response header. When this setting is `true`, the value of the `X-XSS-Protection` header is `1`. When this setting is `false`, the value of the `X-XSS-Protection` header is `0`.
     * 
     */
    @Import(name="protection", required=true)
    private Output protection;

    /**
     * @return A Boolean value that determines the value of the `X-XSS-Protection` HTTP response header. When this setting is `true`, the value of the `X-XSS-Protection` header is `1`. When this setting is `false`, the value of the `X-XSS-Protection` header is `0`.
     * 
     */
    public Output protection() {
        return this.protection;
    }

    /**
     * A reporting URI, which CloudFront uses as the value of the report directive in the `X-XSS-Protection` header. You cannot specify a `report_uri` when `mode_block` is `true`.
     * 
     */
    @Import(name="reportUri")
    private @Nullable Output reportUri;

    /**
     * @return A reporting URI, which CloudFront uses as the value of the report directive in the `X-XSS-Protection` header. You cannot specify a `report_uri` when `mode_block` is `true`.
     * 
     */
    public Optional> reportUri() {
        return Optional.ofNullable(this.reportUri);
    }

    private ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs() {}

    private ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs(ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs $) {
        this.modeBlock = $.modeBlock;
        this.override = $.override;
        this.protection = $.protection;
        this.reportUri = $.reportUri;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs $;

        public Builder() {
            $ = new ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs();
        }

        public Builder(ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs defaults) {
            $ = new ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param modeBlock Whether CloudFront includes the `mode=block` directive in the `X-XSS-Protection` header.
         * 
         * @return builder
         * 
         */
        public Builder modeBlock(@Nullable Output modeBlock) {
            $.modeBlock = modeBlock;
            return this;
        }

        /**
         * @param modeBlock Whether CloudFront includes the `mode=block` directive in the `X-XSS-Protection` header.
         * 
         * @return builder
         * 
         */
        public Builder modeBlock(Boolean modeBlock) {
            return modeBlock(Output.of(modeBlock));
        }

        /**
         * @param override Whether CloudFront overrides the `X-XSS-Protection` HTTP response header received from the origin with the one specified in this response headers policy.
         * 
         * @return builder
         * 
         */
        public Builder override(Output override) {
            $.override = override;
            return this;
        }

        /**
         * @param override Whether CloudFront overrides the `X-XSS-Protection` HTTP response header received from the origin with the one specified in this response headers policy.
         * 
         * @return builder
         * 
         */
        public Builder override(Boolean override) {
            return override(Output.of(override));
        }

        /**
         * @param protection A Boolean value that determines the value of the `X-XSS-Protection` HTTP response header. When this setting is `true`, the value of the `X-XSS-Protection` header is `1`. When this setting is `false`, the value of the `X-XSS-Protection` header is `0`.
         * 
         * @return builder
         * 
         */
        public Builder protection(Output protection) {
            $.protection = protection;
            return this;
        }

        /**
         * @param protection A Boolean value that determines the value of the `X-XSS-Protection` HTTP response header. When this setting is `true`, the value of the `X-XSS-Protection` header is `1`. When this setting is `false`, the value of the `X-XSS-Protection` header is `0`.
         * 
         * @return builder
         * 
         */
        public Builder protection(Boolean protection) {
            return protection(Output.of(protection));
        }

        /**
         * @param reportUri A reporting URI, which CloudFront uses as the value of the report directive in the `X-XSS-Protection` header. You cannot specify a `report_uri` when `mode_block` is `true`.
         * 
         * @return builder
         * 
         */
        public Builder reportUri(@Nullable Output reportUri) {
            $.reportUri = reportUri;
            return this;
        }

        /**
         * @param reportUri A reporting URI, which CloudFront uses as the value of the report directive in the `X-XSS-Protection` header. You cannot specify a `report_uri` when `mode_block` is `true`.
         * 
         * @return builder
         * 
         */
        public Builder reportUri(String reportUri) {
            return reportUri(Output.of(reportUri));
        }

        public ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs build() {
            if ($.override == null) {
                throw new MissingRequiredPropertyException("ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs", "override");
            }
            if ($.protection == null) {
                throw new MissingRequiredPropertyException("ResponseHeadersPolicySecurityHeadersConfigXssProtectionArgs", "protection");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy