ByteMatchSet |
Provides a WAF Byte Match Set Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.ByteMatchSet;
import com.pulumi.aws.waf.ByteMatchSetArgs;
import com.pulumi.aws.waf.inputs.ByteMatchSetByteMatchTupleArgs;
import com.pulumi.aws.waf.inputs.ByteMatchSetByteMatchTupleFieldToMatchArgs;
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 byteSet = new ByteMatchSet("byteSet", ByteMatchSetArgs.builder()
.byteMatchTuples(ByteMatchSetByteMatchTupleArgs.builder()
.fieldToMatch(ByteMatchSetByteMatchTupleFieldToMatchArgs.builder()
.data("referer")
.type("HEADER")
.build())
.positionalConstraint("CONTAINS")
.targetString("badrefer1")
.textTransformation("NONE")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import WAF Byte Match Set using the id.
|
ByteMatchSetArgs |
|
ByteMatchSetArgs.Builder |
|
GeoMatchSet |
Provides a WAF Geo Match Set Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.GeoMatchSet;
import com.pulumi.aws.waf.GeoMatchSetArgs;
import com.pulumi.aws.waf.inputs.GeoMatchSetGeoMatchConstraintArgs;
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 geoMatchSet = new GeoMatchSet("geoMatchSet", GeoMatchSetArgs.builder()
.geoMatchConstraints(
GeoMatchSetGeoMatchConstraintArgs.builder()
.type("Country")
.value("US")
.build(),
GeoMatchSetGeoMatchConstraintArgs.builder()
.type("Country")
.value("CA")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import WAF Geo Match Set using their ID.
|
GeoMatchSetArgs |
|
GeoMatchSetArgs.Builder |
|
IpSet |
Provides a WAF IPSet Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.IpSet;
import com.pulumi.aws.waf.IpSetArgs;
import com.pulumi.aws.waf.inputs.IpSetIpSetDescriptorArgs;
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(),
IpSetIpSetDescriptorArgs.builder()
.type("IPV4")
.value("10.16.16.0/16")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import WAF IPSets using their ID.
|
IpSetArgs |
|
IpSetArgs.Builder |
|
RateBasedRule |
Provides a WAF Rate Based Rule Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.IpSet;
import com.pulumi.aws.waf.IpSetArgs;
import com.pulumi.aws.waf.inputs.IpSetIpSetDescriptorArgs;
import com.pulumi.aws.waf.RateBasedRule;
import com.pulumi.aws.waf.RateBasedRuleArgs;
import com.pulumi.aws.waf.inputs.RateBasedRulePredicateArgs;
import com.pulumi.resources.CustomResourceOptions;
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 RateBasedRule("wafrule", RateBasedRuleArgs.builder()
.metricName("tfWAFRule")
.rateKey("IP")
.rateLimit(100)
.predicates(RateBasedRulePredicateArgs.builder()
.dataId(ipset.id())
.negated(false)
.type("IPMatch")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(ipset)
.build());
}
}
```
## Import
Using `pulumi import`, import WAF Rated Based Rule using the id.
|
RateBasedRuleArgs |
|
RateBasedRuleArgs.Builder |
|
RegexMatchSet |
Provides a WAF Regex Match Set Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.RegexPatternSet;
import com.pulumi.aws.waf.RegexPatternSetArgs;
import com.pulumi.aws.waf.RegexMatchSet;
import com.pulumi.aws.waf.RegexMatchSetArgs;
import com.pulumi.aws.waf.inputs.RegexMatchSetRegexMatchTupleArgs;
import com.pulumi.aws.waf.inputs.RegexMatchSetRegexMatchTupleFieldToMatchArgs;
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 exampleRegexPatternSet = new RegexPatternSet("exampleRegexPatternSet", RegexPatternSetArgs.builder()
.regexPatternStrings(
"one",
"two")
.build());
var exampleRegexMatchSet = new RegexMatchSet("exampleRegexMatchSet", RegexMatchSetArgs.builder()
.regexMatchTuples(RegexMatchSetRegexMatchTupleArgs.builder()
.fieldToMatch(RegexMatchSetRegexMatchTupleFieldToMatchArgs.builder()
.data("User-Agent")
.type("HEADER")
.build())
.regexPatternSetId(exampleRegexPatternSet.id())
.textTransformation("NONE")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import WAF Regex Match Set using their ID.
|
RegexMatchSetArgs |
|
RegexMatchSetArgs.Builder |
|
RegexPatternSet |
Provides a WAF Regex Pattern Set Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.RegexPatternSet;
import com.pulumi.aws.waf.RegexPatternSetArgs;
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 example = new RegexPatternSet("example", RegexPatternSetArgs.builder()
.regexPatternStrings(
"one",
"two")
.build());
}
}
```
## Import
Using `pulumi import`, import AWS WAF Regex Pattern Set using their ID.
|
RegexPatternSetArgs |
|
RegexPatternSetArgs.Builder |
|
Rule |
Provides a WAF Rule Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.IpSet;
import com.pulumi.aws.waf.IpSetArgs;
import com.pulumi.aws.waf.inputs.IpSetIpSetDescriptorArgs;
import com.pulumi.aws.waf.Rule;
import com.pulumi.aws.waf.RuleArgs;
import com.pulumi.aws.waf.inputs.RulePredicateArgs;
import com.pulumi.resources.CustomResourceOptions;
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()
.dataId(ipset.id())
.negated(false)
.type("IPMatch")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(ipset)
.build());
}
}
```
## Import
Using `pulumi import`, import WAF rules using the id.
|
RuleArgs |
|
RuleArgs.Builder |
|
RuleGroup |
Provides a WAF Rule Group Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.Rule;
import com.pulumi.aws.waf.RuleArgs;
import com.pulumi.aws.waf.RuleGroup;
import com.pulumi.aws.waf.RuleGroupArgs;
import com.pulumi.aws.waf.inputs.RuleGroupActivatedRuleArgs;
import com.pulumi.aws.waf.inputs.RuleGroupActivatedRuleActionArgs;
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 exampleRule = new Rule("exampleRule", RuleArgs.builder()
.metricName("example")
.build());
var exampleRuleGroup = new RuleGroup("exampleRuleGroup", RuleGroupArgs.builder()
.metricName("example")
.activatedRules(RuleGroupActivatedRuleArgs.builder()
.action(RuleGroupActivatedRuleActionArgs.builder()
.type("COUNT")
.build())
.priority(50)
.ruleId(exampleRule.id())
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import WAF Rule Group using the id.
|
RuleGroupArgs |
|
RuleGroupArgs.Builder |
|
SizeConstraintSet |
Provides a WAF Size Constraint Set Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.SizeConstraintSet;
import com.pulumi.aws.waf.SizeConstraintSetArgs;
import com.pulumi.aws.waf.inputs.SizeConstraintSetSizeConstraintArgs;
import com.pulumi.aws.waf.inputs.SizeConstraintSetSizeConstraintFieldToMatchArgs;
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 sizeConstraintSet = new SizeConstraintSet("sizeConstraintSet", SizeConstraintSetArgs.builder()
.sizeConstraints(SizeConstraintSetSizeConstraintArgs.builder()
.comparisonOperator("EQ")
.fieldToMatch(SizeConstraintSetSizeConstraintFieldToMatchArgs.builder()
.type("BODY")
.build())
.size("4096")
.textTransformation("NONE")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import AWS WAF Size Constraint Set using their ID.
|
SizeConstraintSetArgs |
|
SizeConstraintSetArgs.Builder |
|
SqlInjectionMatchSet |
Provides a WAF SQL Injection Match Set Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.SqlInjectionMatchSet;
import com.pulumi.aws.waf.SqlInjectionMatchSetArgs;
import com.pulumi.aws.waf.inputs.SqlInjectionMatchSetSqlInjectionMatchTupleArgs;
import com.pulumi.aws.waf.inputs.SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs;
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 sqlInjectionMatchSet = new SqlInjectionMatchSet("sqlInjectionMatchSet", SqlInjectionMatchSetArgs.builder()
.sqlInjectionMatchTuples(SqlInjectionMatchSetSqlInjectionMatchTupleArgs.builder()
.fieldToMatch(SqlInjectionMatchSetSqlInjectionMatchTupleFieldToMatchArgs.builder()
.type("QUERY_STRING")
.build())
.textTransformation("URL_DECODE")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import AWS WAF SQL Injection Match Set using their ID.
|
SqlInjectionMatchSetArgs |
|
SqlInjectionMatchSetArgs.Builder |
|
WafFunctions |
|
WebAcl |
Provides a WAF Web ACL Resource
## Example Usage
This example blocks requests coming from `192.0.7.0/24` and allows everything else.
|
WebAclArgs |
|
WebAclArgs.Builder |
|
XssMatchSet |
Provides a WAF XSS Match Set Resource
## Example Usage
```java
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.waf.XssMatchSet;
import com.pulumi.aws.waf.XssMatchSetArgs;
import com.pulumi.aws.waf.inputs.XssMatchSetXssMatchTupleArgs;
import com.pulumi.aws.waf.inputs.XssMatchSetXssMatchTupleFieldToMatchArgs;
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 xssMatchSet = new XssMatchSet("xssMatchSet", XssMatchSetArgs.builder()
.xssMatchTuples(
XssMatchSetXssMatchTupleArgs.builder()
.fieldToMatch(XssMatchSetXssMatchTupleFieldToMatchArgs.builder()
.type("URI")
.build())
.textTransformation("NONE")
.build(),
XssMatchSetXssMatchTupleArgs.builder()
.fieldToMatch(XssMatchSetXssMatchTupleFieldToMatchArgs.builder()
.type("QUERY_STRING")
.build())
.textTransformation("NONE")
.build())
.build());
}
}
```
## Import
Using `pulumi import`, import WAF XSS Match Set using their ID.
|
XssMatchSetArgs |
|
XssMatchSetArgs.Builder |
|