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

com.pulumi.aws.wafv2.inputs.RuleGroupRuleArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.72.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.aws.wafv2.inputs;

import com.pulumi.aws.wafv2.inputs.RuleGroupRuleActionArgs;
import com.pulumi.aws.wafv2.inputs.RuleGroupRuleCaptchaConfigArgs;
import com.pulumi.aws.wafv2.inputs.RuleGroupRuleRuleLabelArgs;
import com.pulumi.aws.wafv2.inputs.RuleGroupRuleStatementArgs;
import com.pulumi.aws.wafv2.inputs.RuleGroupRuleVisibilityConfigArgs;
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.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RuleGroupRuleArgs Empty = new RuleGroupRuleArgs();

    /**
     * The action that AWS WAF should take on a web request when it matches the rule's statement. Settings at the `aws.wafv2.WebAcl` level can override the rule action setting. See Action below for details.
     * 
     */
    @Import(name="action", required=true)
    private Output action;

    /**
     * @return The action that AWS WAF should take on a web request when it matches the rule's statement. Settings at the `aws.wafv2.WebAcl` level can override the rule action setting. See Action below for details.
     * 
     */
    public Output action() {
        return this.action;
    }

    /**
     * Specifies how AWS WAF should handle CAPTCHA evaluations. See Captcha Configuration below for details.
     * 
     */
    @Import(name="captchaConfig")
    private @Nullable Output captchaConfig;

    /**
     * @return Specifies how AWS WAF should handle CAPTCHA evaluations. See Captcha Configuration below for details.
     * 
     */
    public Optional> captchaConfig() {
        return Optional.ofNullable(this.captchaConfig);
    }

    /**
     * A friendly name of the rule.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return A friendly name of the rule.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * If you define more than one Rule in a WebACL, AWS WAF evaluates each request against the `rules` in order based on the value of `priority`. AWS WAF processes rules with lower priority first.
     * 
     */
    @Import(name="priority", required=true)
    private Output priority;

    /**
     * @return If you define more than one Rule in a WebACL, AWS WAF evaluates each request against the `rules` in order based on the value of `priority`. AWS WAF processes rules with lower priority first.
     * 
     */
    public Output priority() {
        return this.priority;
    }

    /**
     * Labels to apply to web requests that match the rule match statement. See Rule Label below for details.
     * 
     */
    @Import(name="ruleLabels")
    private @Nullable Output> ruleLabels;

    /**
     * @return Labels to apply to web requests that match the rule match statement. See Rule Label below for details.
     * 
     */
    public Optional>> ruleLabels() {
        return Optional.ofNullable(this.ruleLabels);
    }

    /**
     * The AWS WAF processing statement for the rule, for example `byte_match_statement` or `geo_match_statement`. See Statement below for details.
     * 
     */
    @Import(name="statement", required=true)
    private Output statement;

    /**
     * @return The AWS WAF processing statement for the rule, for example `byte_match_statement` or `geo_match_statement`. See Statement below for details.
     * 
     */
    public Output statement() {
        return this.statement;
    }

    /**
     * Defines and enables Amazon CloudWatch metrics and web request sample collection. See Visibility Configuration below for details.
     * 
     */
    @Import(name="visibilityConfig", required=true)
    private Output visibilityConfig;

    /**
     * @return Defines and enables Amazon CloudWatch metrics and web request sample collection. See Visibility Configuration below for details.
     * 
     */
    public Output visibilityConfig() {
        return this.visibilityConfig;
    }

    private RuleGroupRuleArgs() {}

    private RuleGroupRuleArgs(RuleGroupRuleArgs $) {
        this.action = $.action;
        this.captchaConfig = $.captchaConfig;
        this.name = $.name;
        this.priority = $.priority;
        this.ruleLabels = $.ruleLabels;
        this.statement = $.statement;
        this.visibilityConfig = $.visibilityConfig;
    }

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

    public static final class Builder {
        private RuleGroupRuleArgs $;

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

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

        /**
         * @param action The action that AWS WAF should take on a web request when it matches the rule's statement. Settings at the `aws.wafv2.WebAcl` level can override the rule action setting. See Action below for details.
         * 
         * @return builder
         * 
         */
        public Builder action(Output action) {
            $.action = action;
            return this;
        }

        /**
         * @param action The action that AWS WAF should take on a web request when it matches the rule's statement. Settings at the `aws.wafv2.WebAcl` level can override the rule action setting. See Action below for details.
         * 
         * @return builder
         * 
         */
        public Builder action(RuleGroupRuleActionArgs action) {
            return action(Output.of(action));
        }

        /**
         * @param captchaConfig Specifies how AWS WAF should handle CAPTCHA evaluations. See Captcha Configuration below for details.
         * 
         * @return builder
         * 
         */
        public Builder captchaConfig(@Nullable Output captchaConfig) {
            $.captchaConfig = captchaConfig;
            return this;
        }

        /**
         * @param captchaConfig Specifies how AWS WAF should handle CAPTCHA evaluations. See Captcha Configuration below for details.
         * 
         * @return builder
         * 
         */
        public Builder captchaConfig(RuleGroupRuleCaptchaConfigArgs captchaConfig) {
            return captchaConfig(Output.of(captchaConfig));
        }

        /**
         * @param name A friendly name of the rule.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name A friendly name of the rule.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param priority If you define more than one Rule in a WebACL, AWS WAF evaluates each request against the `rules` in order based on the value of `priority`. AWS WAF processes rules with lower priority first.
         * 
         * @return builder
         * 
         */
        public Builder priority(Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority If you define more than one Rule in a WebACL, AWS WAF evaluates each request against the `rules` in order based on the value of `priority`. AWS WAF processes rules with lower priority first.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        /**
         * @param ruleLabels Labels to apply to web requests that match the rule match statement. See Rule Label below for details.
         * 
         * @return builder
         * 
         */
        public Builder ruleLabels(@Nullable Output> ruleLabels) {
            $.ruleLabels = ruleLabels;
            return this;
        }

        /**
         * @param ruleLabels Labels to apply to web requests that match the rule match statement. See Rule Label below for details.
         * 
         * @return builder
         * 
         */
        public Builder ruleLabels(List ruleLabels) {
            return ruleLabels(Output.of(ruleLabels));
        }

        /**
         * @param ruleLabels Labels to apply to web requests that match the rule match statement. See Rule Label below for details.
         * 
         * @return builder
         * 
         */
        public Builder ruleLabels(RuleGroupRuleRuleLabelArgs... ruleLabels) {
            return ruleLabels(List.of(ruleLabels));
        }

        /**
         * @param statement The AWS WAF processing statement for the rule, for example `byte_match_statement` or `geo_match_statement`. See Statement below for details.
         * 
         * @return builder
         * 
         */
        public Builder statement(Output statement) {
            $.statement = statement;
            return this;
        }

        /**
         * @param statement The AWS WAF processing statement for the rule, for example `byte_match_statement` or `geo_match_statement`. See Statement below for details.
         * 
         * @return builder
         * 
         */
        public Builder statement(RuleGroupRuleStatementArgs statement) {
            return statement(Output.of(statement));
        }

        /**
         * @param visibilityConfig Defines and enables Amazon CloudWatch metrics and web request sample collection. See Visibility Configuration below for details.
         * 
         * @return builder
         * 
         */
        public Builder visibilityConfig(Output visibilityConfig) {
            $.visibilityConfig = visibilityConfig;
            return this;
        }

        /**
         * @param visibilityConfig Defines and enables Amazon CloudWatch metrics and web request sample collection. See Visibility Configuration below for details.
         * 
         * @return builder
         * 
         */
        public Builder visibilityConfig(RuleGroupRuleVisibilityConfigArgs visibilityConfig) {
            return visibilityConfig(Output.of(visibilityConfig));
        }

        public RuleGroupRuleArgs build() {
            if ($.action == null) {
                throw new MissingRequiredPropertyException("RuleGroupRuleArgs", "action");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("RuleGroupRuleArgs", "name");
            }
            if ($.priority == null) {
                throw new MissingRequiredPropertyException("RuleGroupRuleArgs", "priority");
            }
            if ($.statement == null) {
                throw new MissingRequiredPropertyException("RuleGroupRuleArgs", "statement");
            }
            if ($.visibilityConfig == null) {
                throw new MissingRequiredPropertyException("RuleGroupRuleArgs", "visibilityConfig");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy