Rule Args
data class RuleArgs(val metricName: Output<String>? = null, val name: Output<String>? = null, val predicates: Output<List<RulePredicateArgs>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<RuleArgs>
Provides an WAF Regional Rule Resource for use with Application Load Balancer.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.wafregional.IpSet;
import com.pulumi.aws.wafregional.IpSetArgs;
import com.pulumi.aws.wafregional.inputs.IpSetIpSetDescriptorArgs;
import com.pulumi.aws.wafregional.Rule;
import com.pulumi.aws.wafregional.RuleArgs;
import com.pulumi.aws.wafregional.inputs.RulePredicateArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var ipset = new IpSet("ipset", IpSetArgs.builder()
.ipSetDescriptors(IpSetIpSetDescriptorArgs.builder()
.type("IPV4")
.value("192.0.7.0/24")
.build())
.build());
var wafrule = new Rule("wafrule", RuleArgs.builder()
.metricName("tfWAFRule")
.predicates(RulePredicateArgs.builder()
.type("IPMatch")
.dataId(ipset.id())
.negated(false)
.build())
.build());
}
}
Content copied to clipboard
Nested Fields
predicate
See the WAF Documentation for more information.
Arguments
type
- (Required) The type of predicate in a rule. Valid values:ByteMatch
,GeoMatch
,IPMatch
,RegexMatch
,SizeConstraint
,SqlInjectionMatch
, orXssMatch
data_id
- (Required) The unique identifier of a predicate, such as the ID of aByteMatchSet
orIPSet
.negated
- (Required) Whether to use the settings or the negated settings that you specified in the objects.
Import
WAF Regional Rule can be imported using the id, e.g.,
$ pulumi import aws:wafregional/rule:Rule wafrule a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
Content copied to clipboard