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

com.pulumi.azurenative.network.inputs.PolicySettingsArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.network.inputs;

import com.pulumi.azurenative.network.enums.WebApplicationFirewallEnabledState;
import com.pulumi.azurenative.network.enums.WebApplicationFirewallMode;
import com.pulumi.azurenative.network.inputs.PolicySettingsLogScrubbingArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Defines contents of a web application firewall global configuration.
 * 
 */
public final class PolicySettingsArgs extends com.pulumi.resources.ResourceArgs {

    public static final PolicySettingsArgs Empty = new PolicySettingsArgs();

    /**
     * If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
     * 
     */
    @Import(name="customBlockResponseBody")
    private @Nullable Output customBlockResponseBody;

    /**
     * @return If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
     * 
     */
    public Optional> customBlockResponseBody() {
        return Optional.ofNullable(this.customBlockResponseBody);
    }

    /**
     * If the action type is block, customer can override the response status code.
     * 
     */
    @Import(name="customBlockResponseStatusCode")
    private @Nullable Output customBlockResponseStatusCode;

    /**
     * @return If the action type is block, customer can override the response status code.
     * 
     */
    public Optional> customBlockResponseStatusCode() {
        return Optional.ofNullable(this.customBlockResponseStatusCode);
    }

    /**
     * Whether allow WAF to enforce file upload limits.
     * 
     */
    @Import(name="fileUploadEnforcement")
    private @Nullable Output fileUploadEnforcement;

    /**
     * @return Whether allow WAF to enforce file upload limits.
     * 
     */
    public Optional> fileUploadEnforcement() {
        return Optional.ofNullable(this.fileUploadEnforcement);
    }

    /**
     * Maximum file upload size in Mb for WAF.
     * 
     */
    @Import(name="fileUploadLimitInMb")
    private @Nullable Output fileUploadLimitInMb;

    /**
     * @return Maximum file upload size in Mb for WAF.
     * 
     */
    public Optional> fileUploadLimitInMb() {
        return Optional.ofNullable(this.fileUploadLimitInMb);
    }

    /**
     * To scrub sensitive log fields
     * 
     */
    @Import(name="logScrubbing")
    private @Nullable Output logScrubbing;

    /**
     * @return To scrub sensitive log fields
     * 
     */
    public Optional> logScrubbing() {
        return Optional.ofNullable(this.logScrubbing);
    }

    /**
     * Maximum request body size in Kb for WAF.
     * 
     */
    @Import(name="maxRequestBodySizeInKb")
    private @Nullable Output maxRequestBodySizeInKb;

    /**
     * @return Maximum request body size in Kb for WAF.
     * 
     */
    public Optional> maxRequestBodySizeInKb() {
        return Optional.ofNullable(this.maxRequestBodySizeInKb);
    }

    /**
     * The mode of the policy.
     * 
     */
    @Import(name="mode")
    private @Nullable Output> mode;

    /**
     * @return The mode of the policy.
     * 
     */
    public Optional>> mode() {
        return Optional.ofNullable(this.mode);
    }

    /**
     * Whether to allow WAF to check request Body.
     * 
     */
    @Import(name="requestBodyCheck")
    private @Nullable Output requestBodyCheck;

    /**
     * @return Whether to allow WAF to check request Body.
     * 
     */
    public Optional> requestBodyCheck() {
        return Optional.ofNullable(this.requestBodyCheck);
    }

    /**
     * Whether allow WAF to enforce request body limits.
     * 
     */
    @Import(name="requestBodyEnforcement")
    private @Nullable Output requestBodyEnforcement;

    /**
     * @return Whether allow WAF to enforce request body limits.
     * 
     */
    public Optional> requestBodyEnforcement() {
        return Optional.ofNullable(this.requestBodyEnforcement);
    }

    /**
     * Max inspection limit in KB for request body inspection for WAF.
     * 
     */
    @Import(name="requestBodyInspectLimitInKB")
    private @Nullable Output requestBodyInspectLimitInKB;

    /**
     * @return Max inspection limit in KB for request body inspection for WAF.
     * 
     */
    public Optional> requestBodyInspectLimitInKB() {
        return Optional.ofNullable(this.requestBodyInspectLimitInKB);
    }

    /**
     * The state of the policy.
     * 
     */
    @Import(name="state")
    private @Nullable Output> state;

    /**
     * @return The state of the policy.
     * 
     */
    public Optional>> state() {
        return Optional.ofNullable(this.state);
    }

    private PolicySettingsArgs() {}

    private PolicySettingsArgs(PolicySettingsArgs $) {
        this.customBlockResponseBody = $.customBlockResponseBody;
        this.customBlockResponseStatusCode = $.customBlockResponseStatusCode;
        this.fileUploadEnforcement = $.fileUploadEnforcement;
        this.fileUploadLimitInMb = $.fileUploadLimitInMb;
        this.logScrubbing = $.logScrubbing;
        this.maxRequestBodySizeInKb = $.maxRequestBodySizeInKb;
        this.mode = $.mode;
        this.requestBodyCheck = $.requestBodyCheck;
        this.requestBodyEnforcement = $.requestBodyEnforcement;
        this.requestBodyInspectLimitInKB = $.requestBodyInspectLimitInKB;
        this.state = $.state;
    }

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

    public static final class Builder {
        private PolicySettingsArgs $;

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

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

        /**
         * @param customBlockResponseBody If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
         * 
         * @return builder
         * 
         */
        public Builder customBlockResponseBody(@Nullable Output customBlockResponseBody) {
            $.customBlockResponseBody = customBlockResponseBody;
            return this;
        }

        /**
         * @param customBlockResponseBody If the action type is block, customer can override the response body. The body must be specified in base64 encoding.
         * 
         * @return builder
         * 
         */
        public Builder customBlockResponseBody(String customBlockResponseBody) {
            return customBlockResponseBody(Output.of(customBlockResponseBody));
        }

        /**
         * @param customBlockResponseStatusCode If the action type is block, customer can override the response status code.
         * 
         * @return builder
         * 
         */
        public Builder customBlockResponseStatusCode(@Nullable Output customBlockResponseStatusCode) {
            $.customBlockResponseStatusCode = customBlockResponseStatusCode;
            return this;
        }

        /**
         * @param customBlockResponseStatusCode If the action type is block, customer can override the response status code.
         * 
         * @return builder
         * 
         */
        public Builder customBlockResponseStatusCode(Integer customBlockResponseStatusCode) {
            return customBlockResponseStatusCode(Output.of(customBlockResponseStatusCode));
        }

        /**
         * @param fileUploadEnforcement Whether allow WAF to enforce file upload limits.
         * 
         * @return builder
         * 
         */
        public Builder fileUploadEnforcement(@Nullable Output fileUploadEnforcement) {
            $.fileUploadEnforcement = fileUploadEnforcement;
            return this;
        }

        /**
         * @param fileUploadEnforcement Whether allow WAF to enforce file upload limits.
         * 
         * @return builder
         * 
         */
        public Builder fileUploadEnforcement(Boolean fileUploadEnforcement) {
            return fileUploadEnforcement(Output.of(fileUploadEnforcement));
        }

        /**
         * @param fileUploadLimitInMb Maximum file upload size in Mb for WAF.
         * 
         * @return builder
         * 
         */
        public Builder fileUploadLimitInMb(@Nullable Output fileUploadLimitInMb) {
            $.fileUploadLimitInMb = fileUploadLimitInMb;
            return this;
        }

        /**
         * @param fileUploadLimitInMb Maximum file upload size in Mb for WAF.
         * 
         * @return builder
         * 
         */
        public Builder fileUploadLimitInMb(Integer fileUploadLimitInMb) {
            return fileUploadLimitInMb(Output.of(fileUploadLimitInMb));
        }

        /**
         * @param logScrubbing To scrub sensitive log fields
         * 
         * @return builder
         * 
         */
        public Builder logScrubbing(@Nullable Output logScrubbing) {
            $.logScrubbing = logScrubbing;
            return this;
        }

        /**
         * @param logScrubbing To scrub sensitive log fields
         * 
         * @return builder
         * 
         */
        public Builder logScrubbing(PolicySettingsLogScrubbingArgs logScrubbing) {
            return logScrubbing(Output.of(logScrubbing));
        }

        /**
         * @param maxRequestBodySizeInKb Maximum request body size in Kb for WAF.
         * 
         * @return builder
         * 
         */
        public Builder maxRequestBodySizeInKb(@Nullable Output maxRequestBodySizeInKb) {
            $.maxRequestBodySizeInKb = maxRequestBodySizeInKb;
            return this;
        }

        /**
         * @param maxRequestBodySizeInKb Maximum request body size in Kb for WAF.
         * 
         * @return builder
         * 
         */
        public Builder maxRequestBodySizeInKb(Integer maxRequestBodySizeInKb) {
            return maxRequestBodySizeInKb(Output.of(maxRequestBodySizeInKb));
        }

        /**
         * @param mode The mode of the policy.
         * 
         * @return builder
         * 
         */
        public Builder mode(@Nullable Output> mode) {
            $.mode = mode;
            return this;
        }

        /**
         * @param mode The mode of the policy.
         * 
         * @return builder
         * 
         */
        public Builder mode(Either mode) {
            return mode(Output.of(mode));
        }

        /**
         * @param mode The mode of the policy.
         * 
         * @return builder
         * 
         */
        public Builder mode(String mode) {
            return mode(Either.ofLeft(mode));
        }

        /**
         * @param mode The mode of the policy.
         * 
         * @return builder
         * 
         */
        public Builder mode(WebApplicationFirewallMode mode) {
            return mode(Either.ofRight(mode));
        }

        /**
         * @param requestBodyCheck Whether to allow WAF to check request Body.
         * 
         * @return builder
         * 
         */
        public Builder requestBodyCheck(@Nullable Output requestBodyCheck) {
            $.requestBodyCheck = requestBodyCheck;
            return this;
        }

        /**
         * @param requestBodyCheck Whether to allow WAF to check request Body.
         * 
         * @return builder
         * 
         */
        public Builder requestBodyCheck(Boolean requestBodyCheck) {
            return requestBodyCheck(Output.of(requestBodyCheck));
        }

        /**
         * @param requestBodyEnforcement Whether allow WAF to enforce request body limits.
         * 
         * @return builder
         * 
         */
        public Builder requestBodyEnforcement(@Nullable Output requestBodyEnforcement) {
            $.requestBodyEnforcement = requestBodyEnforcement;
            return this;
        }

        /**
         * @param requestBodyEnforcement Whether allow WAF to enforce request body limits.
         * 
         * @return builder
         * 
         */
        public Builder requestBodyEnforcement(Boolean requestBodyEnforcement) {
            return requestBodyEnforcement(Output.of(requestBodyEnforcement));
        }

        /**
         * @param requestBodyInspectLimitInKB Max inspection limit in KB for request body inspection for WAF.
         * 
         * @return builder
         * 
         */
        public Builder requestBodyInspectLimitInKB(@Nullable Output requestBodyInspectLimitInKB) {
            $.requestBodyInspectLimitInKB = requestBodyInspectLimitInKB;
            return this;
        }

        /**
         * @param requestBodyInspectLimitInKB Max inspection limit in KB for request body inspection for WAF.
         * 
         * @return builder
         * 
         */
        public Builder requestBodyInspectLimitInKB(Integer requestBodyInspectLimitInKB) {
            return requestBodyInspectLimitInKB(Output.of(requestBodyInspectLimitInKB));
        }

        /**
         * @param state The state of the policy.
         * 
         * @return builder
         * 
         */
        public Builder state(@Nullable Output> state) {
            $.state = state;
            return this;
        }

        /**
         * @param state The state of the policy.
         * 
         * @return builder
         * 
         */
        public Builder state(Either state) {
            return state(Output.of(state));
        }

        /**
         * @param state The state of the policy.
         * 
         * @return builder
         * 
         */
        public Builder state(String state) {
            return state(Either.ofLeft(state));
        }

        /**
         * @param state The state of the policy.
         * 
         * @return builder
         * 
         */
        public Builder state(WebApplicationFirewallEnabledState state) {
            return state(Either.ofRight(state));
        }

        public PolicySettingsArgs build() {
            $.fileUploadEnforcement = Codegen.booleanProp("fileUploadEnforcement").output().arg($.fileUploadEnforcement).def(true).getNullable();
            $.requestBodyEnforcement = Codegen.booleanProp("requestBodyEnforcement").output().arg($.requestBodyEnforcement).def(true).getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy