@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:42.739Z") @Stability(value=Stable) public interface CfnRuleGroupProps extends software.amazon.jsii.JsiiSerializable
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wafv2.*;
Object all;
Object allow;
Object allQueryArguments;
Object block;
Object captcha;
Object count;
Object method;
Object queryString;
Object singleHeader;
Object singleQueryArgument;
StatementProperty statementProperty_;
Object uriPath;
CfnRuleGroupProps cfnRuleGroupProps = CfnRuleGroupProps.builder()
.capacity(123)
.scope("scope")
.visibilityConfig(VisibilityConfigProperty.builder()
.cloudWatchMetricsEnabled(false)
.metricName("metricName")
.sampledRequestsEnabled(false)
.build())
// the properties below are optional
.customResponseBodies(Map.of(
"customResponseBodiesKey", CustomResponseBodyProperty.builder()
.content("content")
.contentType("contentType")
.build()))
.description("description")
.name("name")
.rules(List.of(RuleProperty.builder()
.name("name")
.priority(123)
.statement(StatementProperty.builder()
.andStatement(AndStatementProperty.builder()
.statements(List.of(statementProperty_))
.build())
.byteMatchStatement(ByteMatchStatementProperty.builder()
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(BodyProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.cookies(CookiesProperty.builder()
.matchPattern(CookieMatchPatternProperty.builder()
.all(all)
.excludedCookies(List.of("excludedCookies"))
.includedCookies(List.of("includedCookies"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.headers(HeadersProperty.builder()
.matchPattern(HeaderMatchPatternProperty.builder()
.all(all)
.excludedHeaders(List.of("excludedHeaders"))
.includedHeaders(List.of("includedHeaders"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.oversizeHandling("oversizeHandling")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriPath(uriPath)
.build())
.positionalConstraint("positionalConstraint")
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
// the properties below are optional
.searchString("searchString")
.searchStringBase64("searchStringBase64")
.build())
.geoMatchStatement(GeoMatchStatementProperty.builder()
.countryCodes(List.of("countryCodes"))
.forwardedIpConfig(ForwardedIPConfigurationProperty.builder()
.fallbackBehavior("fallbackBehavior")
.headerName("headerName")
.build())
.build())
.ipSetReferenceStatement(Map.of(
"arn", "arn",
// the properties below are optional
"ipSetForwardedIpConfig", Map.of(
"fallbackBehavior", "fallbackBehavior",
"headerName", "headerName",
"position", "position")))
.labelMatchStatement(LabelMatchStatementProperty.builder()
.key("key")
.scope("scope")
.build())
.notStatement(NotStatementProperty.builder()
.statement(statementProperty_)
.build())
.orStatement(OrStatementProperty.builder()
.statements(List.of(statementProperty_))
.build())
.rateBasedStatement(RateBasedStatementProperty.builder()
.aggregateKeyType("aggregateKeyType")
.limit(123)
// the properties below are optional
.forwardedIpConfig(ForwardedIPConfigurationProperty.builder()
.fallbackBehavior("fallbackBehavior")
.headerName("headerName")
.build())
.scopeDownStatement(statementProperty_)
.build())
.regexMatchStatement(RegexMatchStatementProperty.builder()
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(BodyProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.cookies(CookiesProperty.builder()
.matchPattern(CookieMatchPatternProperty.builder()
.all(all)
.excludedCookies(List.of("excludedCookies"))
.includedCookies(List.of("includedCookies"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.headers(HeadersProperty.builder()
.matchPattern(HeaderMatchPatternProperty.builder()
.all(all)
.excludedHeaders(List.of("excludedHeaders"))
.includedHeaders(List.of("includedHeaders"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.oversizeHandling("oversizeHandling")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriPath(uriPath)
.build())
.regexString("regexString")
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.regexPatternSetReferenceStatement(RegexPatternSetReferenceStatementProperty.builder()
.arn("arn")
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(BodyProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.cookies(CookiesProperty.builder()
.matchPattern(CookieMatchPatternProperty.builder()
.all(all)
.excludedCookies(List.of("excludedCookies"))
.includedCookies(List.of("includedCookies"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.headers(HeadersProperty.builder()
.matchPattern(HeaderMatchPatternProperty.builder()
.all(all)
.excludedHeaders(List.of("excludedHeaders"))
.includedHeaders(List.of("includedHeaders"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.oversizeHandling("oversizeHandling")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriPath(uriPath)
.build())
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.sizeConstraintStatement(SizeConstraintStatementProperty.builder()
.comparisonOperator("comparisonOperator")
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(BodyProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.cookies(CookiesProperty.builder()
.matchPattern(CookieMatchPatternProperty.builder()
.all(all)
.excludedCookies(List.of("excludedCookies"))
.includedCookies(List.of("includedCookies"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.headers(HeadersProperty.builder()
.matchPattern(HeaderMatchPatternProperty.builder()
.all(all)
.excludedHeaders(List.of("excludedHeaders"))
.includedHeaders(List.of("includedHeaders"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.oversizeHandling("oversizeHandling")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriPath(uriPath)
.build())
.size(123)
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.sqliMatchStatement(SqliMatchStatementProperty.builder()
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(BodyProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.cookies(CookiesProperty.builder()
.matchPattern(CookieMatchPatternProperty.builder()
.all(all)
.excludedCookies(List.of("excludedCookies"))
.includedCookies(List.of("includedCookies"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.headers(HeadersProperty.builder()
.matchPattern(HeaderMatchPatternProperty.builder()
.all(all)
.excludedHeaders(List.of("excludedHeaders"))
.includedHeaders(List.of("includedHeaders"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.oversizeHandling("oversizeHandling")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriPath(uriPath)
.build())
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
// the properties below are optional
.sensitivityLevel("sensitivityLevel")
.build())
.xssMatchStatement(XssMatchStatementProperty.builder()
.fieldToMatch(FieldToMatchProperty.builder()
.allQueryArguments(allQueryArguments)
.body(BodyProperty.builder()
.oversizeHandling("oversizeHandling")
.build())
.cookies(CookiesProperty.builder()
.matchPattern(CookieMatchPatternProperty.builder()
.all(all)
.excludedCookies(List.of("excludedCookies"))
.includedCookies(List.of("includedCookies"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.headers(HeadersProperty.builder()
.matchPattern(HeaderMatchPatternProperty.builder()
.all(all)
.excludedHeaders(List.of("excludedHeaders"))
.includedHeaders(List.of("includedHeaders"))
.build())
.matchScope("matchScope")
.oversizeHandling("oversizeHandling")
.build())
.jsonBody(JsonBodyProperty.builder()
.matchPattern(JsonMatchPatternProperty.builder()
.all(all)
.includedPaths(List.of("includedPaths"))
.build())
.matchScope("matchScope")
// the properties below are optional
.invalidFallbackBehavior("invalidFallbackBehavior")
.oversizeHandling("oversizeHandling")
.build())
.method(method)
.queryString(queryString)
.singleHeader(singleHeader)
.singleQueryArgument(singleQueryArgument)
.uriPath(uriPath)
.build())
.textTransformations(List.of(TextTransformationProperty.builder()
.priority(123)
.type("type")
.build()))
.build())
.build())
.visibilityConfig(VisibilityConfigProperty.builder()
.cloudWatchMetricsEnabled(false)
.metricName("metricName")
.sampledRequestsEnabled(false)
.build())
// the properties below are optional
.action(RuleActionProperty.builder()
.allow(allow)
.block(block)
.captcha(captcha)
.count(count)
.build())
.captchaConfig(CaptchaConfigProperty.builder()
.immunityTimeProperty(ImmunityTimePropertyProperty.builder()
.immunityTime(123)
.build())
.build())
.ruleLabels(List.of(LabelProperty.builder()
.name("name")
.build()))
.build()))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnRuleGroupProps.Builder
A builder for
CfnRuleGroupProps |
static class |
CfnRuleGroupProps.Jsii$Proxy
An implementation for
CfnRuleGroupProps |
| Modifier and Type | Method and Description |
|---|---|
static CfnRuleGroupProps.Builder |
builder() |
Number |
getCapacity()
The web ACL capacity units (WCUs) required for this rule group.
|
default Object |
getCustomResponseBodies()
A map of custom response keys and content bodies.
|
default String |
getDescription()
A description of the rule group that helps with identification.
|
default String |
getName()
The name of the rule group.
|
default Object |
getRules()
The rule statements used to identify the web requests that you want to allow, block, or count.
|
String |
getScope()
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
|
default List<CfnTag> |
getTags()
Key:value pairs associated with an AWS resource.
|
Object |
getVisibilityConfig()
Defines and enables Amazon CloudWatch metrics and web request sample collection.
|
@Stability(value=Stable) @NotNull Number getCapacity()
When you create your own rule group, you define this, and you cannot change it after creation. When you add or modify the rules in a rule group, AWS WAF enforces this limit.
AWS WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. AWS WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
@Stability(value=Stable) @NotNull String getScope()
A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AWS AppSync GraphQL API. Valid Values are CLOUDFRONT and REGIONAL .
For
CLOUDFRONT, you must create your WAFv2 resources in the US East (N. Virginia) Region,us-east-1.
@Stability(value=Stable) @NotNull Object getVisibilityConfig()
@Stability(value=Stable) @Nullable default Object getCustomResponseBodies()
When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.
For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .
For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .
@Stability(value=Stable) @Nullable default String getDescription()
@Stability(value=Stable) @Nullable default String getName()
You cannot change the name of a rule group after you create it.
@Stability(value=Stable) @Nullable default Object getRules()
Each rule includes one top-level statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.
@Stability(value=Stable) @Nullable default List<CfnTag> getTags()
The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
@Stability(value=Stable) static CfnRuleGroupProps.Builder builder()
CfnRuleGroupProps.Builder of CfnRuleGroupPropsCopyright © 2022. All rights reserved.