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

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


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

    public static final RulePredicateArgs Empty = new RulePredicateArgs();

    /**
     * A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID.
     * 
     */
    @Import(name="dataId", required=true)
    private Output dataId;

    /**
     * @return A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID.
     * 
     */
    public Output dataId() {
        return this.dataId;
    }

    /**
     * Set this to `false` if you want to allow, block, or count requests
     * based on the settings in the specified waf_byte_match_set, waf_ipset, aws_waf_size_constraint_set, aws.waf.SqlInjectionMatchSet or aws_waf_xss_match_set.
     * For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address.
     * If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses except `192.0.2.44`.
     * 
     */
    @Import(name="negated", required=true)
    private Output negated;

    /**
     * @return Set this to `false` if you want to allow, block, or count requests
     * based on the settings in the specified waf_byte_match_set, waf_ipset, aws_waf_size_constraint_set, aws.waf.SqlInjectionMatchSet or aws_waf_xss_match_set.
     * For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address.
     * If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses except `192.0.2.44`.
     * 
     */
    public Output negated() {
        return this.negated;
    }

    /**
     * The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`.
     * 
     */
    public Output type() {
        return this.type;
    }

    private RulePredicateArgs() {}

    private RulePredicateArgs(RulePredicateArgs $) {
        this.dataId = $.dataId;
        this.negated = $.negated;
        this.type = $.type;
    }

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

    public static final class Builder {
        private RulePredicateArgs $;

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

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

        /**
         * @param dataId A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID.
         * 
         * @return builder
         * 
         */
        public Builder dataId(Output dataId) {
            $.dataId = dataId;
            return this;
        }

        /**
         * @param dataId A unique identifier for a predicate in the rule, such as Byte Match Set ID or IPSet ID.
         * 
         * @return builder
         * 
         */
        public Builder dataId(String dataId) {
            return dataId(Output.of(dataId));
        }

        /**
         * @param negated Set this to `false` if you want to allow, block, or count requests
         * based on the settings in the specified waf_byte_match_set, waf_ipset, aws_waf_size_constraint_set, aws.waf.SqlInjectionMatchSet or aws_waf_xss_match_set.
         * For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address.
         * If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses except `192.0.2.44`.
         * 
         * @return builder
         * 
         */
        public Builder negated(Output negated) {
            $.negated = negated;
            return this;
        }

        /**
         * @param negated Set this to `false` if you want to allow, block, or count requests
         * based on the settings in the specified waf_byte_match_set, waf_ipset, aws_waf_size_constraint_set, aws.waf.SqlInjectionMatchSet or aws_waf_xss_match_set.
         * For example, if an IPSet includes the IP address `192.0.2.44`, AWS WAF will allow or block requests based on that IP address.
         * If set to `true`, AWS WAF will allow, block, or count requests based on all IP addresses except `192.0.2.44`.
         * 
         * @return builder
         * 
         */
        public Builder negated(Boolean negated) {
            return negated(Output.of(negated));
        }

        /**
         * @param type The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The type of predicate in a rule. Valid values: `ByteMatch`, `GeoMatch`, `IPMatch`, `RegexMatch`, `SizeConstraint`, `SqlInjectionMatch`, or `XssMatch`.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public RulePredicateArgs build() {
            if ($.dataId == null) {
                throw new MissingRequiredPropertyException("RulePredicateArgs", "dataId");
            }
            if ($.negated == null) {
                throw new MissingRequiredPropertyException("RulePredicateArgs", "negated");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("RulePredicateArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy