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

com.pulumi.aws.waf.inputs.SizeConstraintSetSizeConstraintArgs 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.waf.inputs;

import com.pulumi.aws.waf.inputs.SizeConstraintSetSizeConstraintFieldToMatchArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;


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

    public static final SizeConstraintSetSizeConstraintArgs Empty = new SizeConstraintSetSizeConstraintArgs();

    /**
     * Type of comparison you want to perform, such as `EQ`, `NE`, `LT`, or `GT`. Please refer to the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_SizeConstraint.html) for a complete list of supported values.
     * 
     */
    @Import(name="comparisonOperator", required=true)
    private Output comparisonOperator;

    /**
     * @return Type of comparison you want to perform, such as `EQ`, `NE`, `LT`, or `GT`. Please refer to the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_SizeConstraint.html) for a complete list of supported values.
     * 
     */
    public Output comparisonOperator() {
        return this.comparisonOperator;
    }

    /**
     * Parameter that specifies where in a web request to look for the size constraint.
     * 
     */
    @Import(name="fieldToMatch", required=true)
    private Output fieldToMatch;

    /**
     * @return Parameter that specifies where in a web request to look for the size constraint.
     * 
     */
    public Output fieldToMatch() {
        return this.fieldToMatch;
    }

    /**
     * Size in bytes that you want to compare against the size of the specified `field_to_match`. Valid values for `size` are between 0 and 21474836480 bytes (0 and 20 GB).
     * 
     */
    @Import(name="size", required=true)
    private Output size;

    /**
     * @return Size in bytes that you want to compare against the size of the specified `field_to_match`. Valid values for `size` are between 0 and 21474836480 bytes (0 and 20 GB).
     * 
     */
    public Output size() {
        return this.size;
    }

    /**
     * Parameter is used to eliminate unusual formatting that attackers may use in web requests to bypass AWS WAF. When a transformation is specified, AWS WAF performs the transformation on the `field_to_match` before inspecting the request for a match. Some examples of supported transformations are `CMD_LINE`, `HTML_ENTITY_DECODE`, and `NONE`. You can find a complete list of supported values in the [AWS WAF API Reference](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-TextTransformation).
     * **Note:** If you choose `BODY` as the `type`, you must also choose `NONE` because CloudFront only forwards the first 8192 bytes for inspection.
     * 
     */
    @Import(name="textTransformation", required=true)
    private Output textTransformation;

    /**
     * @return Parameter is used to eliminate unusual formatting that attackers may use in web requests to bypass AWS WAF. When a transformation is specified, AWS WAF performs the transformation on the `field_to_match` before inspecting the request for a match. Some examples of supported transformations are `CMD_LINE`, `HTML_ENTITY_DECODE`, and `NONE`. You can find a complete list of supported values in the [AWS WAF API Reference](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-TextTransformation).
     * **Note:** If you choose `BODY` as the `type`, you must also choose `NONE` because CloudFront only forwards the first 8192 bytes for inspection.
     * 
     */
    public Output textTransformation() {
        return this.textTransformation;
    }

    private SizeConstraintSetSizeConstraintArgs() {}

    private SizeConstraintSetSizeConstraintArgs(SizeConstraintSetSizeConstraintArgs $) {
        this.comparisonOperator = $.comparisonOperator;
        this.fieldToMatch = $.fieldToMatch;
        this.size = $.size;
        this.textTransformation = $.textTransformation;
    }

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

    public static final class Builder {
        private SizeConstraintSetSizeConstraintArgs $;

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

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

        /**
         * @param comparisonOperator Type of comparison you want to perform, such as `EQ`, `NE`, `LT`, or `GT`. Please refer to the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_SizeConstraint.html) for a complete list of supported values.
         * 
         * @return builder
         * 
         */
        public Builder comparisonOperator(Output comparisonOperator) {
            $.comparisonOperator = comparisonOperator;
            return this;
        }

        /**
         * @param comparisonOperator Type of comparison you want to perform, such as `EQ`, `NE`, `LT`, or `GT`. Please refer to the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_wafRegional_SizeConstraint.html) for a complete list of supported values.
         * 
         * @return builder
         * 
         */
        public Builder comparisonOperator(String comparisonOperator) {
            return comparisonOperator(Output.of(comparisonOperator));
        }

        /**
         * @param fieldToMatch Parameter that specifies where in a web request to look for the size constraint.
         * 
         * @return builder
         * 
         */
        public Builder fieldToMatch(Output fieldToMatch) {
            $.fieldToMatch = fieldToMatch;
            return this;
        }

        /**
         * @param fieldToMatch Parameter that specifies where in a web request to look for the size constraint.
         * 
         * @return builder
         * 
         */
        public Builder fieldToMatch(SizeConstraintSetSizeConstraintFieldToMatchArgs fieldToMatch) {
            return fieldToMatch(Output.of(fieldToMatch));
        }

        /**
         * @param size Size in bytes that you want to compare against the size of the specified `field_to_match`. Valid values for `size` are between 0 and 21474836480 bytes (0 and 20 GB).
         * 
         * @return builder
         * 
         */
        public Builder size(Output size) {
            $.size = size;
            return this;
        }

        /**
         * @param size Size in bytes that you want to compare against the size of the specified `field_to_match`. Valid values for `size` are between 0 and 21474836480 bytes (0 and 20 GB).
         * 
         * @return builder
         * 
         */
        public Builder size(Integer size) {
            return size(Output.of(size));
        }

        /**
         * @param textTransformation Parameter is used to eliminate unusual formatting that attackers may use in web requests to bypass AWS WAF. When a transformation is specified, AWS WAF performs the transformation on the `field_to_match` before inspecting the request for a match. Some examples of supported transformations are `CMD_LINE`, `HTML_ENTITY_DECODE`, and `NONE`. You can find a complete list of supported values in the [AWS WAF API Reference](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-TextTransformation).
         * **Note:** If you choose `BODY` as the `type`, you must also choose `NONE` because CloudFront only forwards the first 8192 bytes for inspection.
         * 
         * @return builder
         * 
         */
        public Builder textTransformation(Output textTransformation) {
            $.textTransformation = textTransformation;
            return this;
        }

        /**
         * @param textTransformation Parameter is used to eliminate unusual formatting that attackers may use in web requests to bypass AWS WAF. When a transformation is specified, AWS WAF performs the transformation on the `field_to_match` before inspecting the request for a match. Some examples of supported transformations are `CMD_LINE`, `HTML_ENTITY_DECODE`, and `NONE`. You can find a complete list of supported values in the [AWS WAF API Reference](http://docs.aws.amazon.com/waf/latest/APIReference/API_SizeConstraint.html#WAF-Type-SizeConstraint-TextTransformation).
         * **Note:** If you choose `BODY` as the `type`, you must also choose `NONE` because CloudFront only forwards the first 8192 bytes for inspection.
         * 
         * @return builder
         * 
         */
        public Builder textTransformation(String textTransformation) {
            return textTransformation(Output.of(textTransformation));
        }

        public SizeConstraintSetSizeConstraintArgs build() {
            if ($.comparisonOperator == null) {
                throw new MissingRequiredPropertyException("SizeConstraintSetSizeConstraintArgs", "comparisonOperator");
            }
            if ($.fieldToMatch == null) {
                throw new MissingRequiredPropertyException("SizeConstraintSetSizeConstraintArgs", "fieldToMatch");
            }
            if ($.size == null) {
                throw new MissingRequiredPropertyException("SizeConstraintSetSizeConstraintArgs", "size");
            }
            if ($.textTransformation == null) {
                throw new MissingRequiredPropertyException("SizeConstraintSetSizeConstraintArgs", "textTransformation");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy