@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:26.059Z") public class CfnRuleGroup extends CfnResource implements IInspectable
This is the latest version of AWS WAF , named AWS WAF V2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide .
Use an RuleGroup
to define a collection of rules for inspecting and controlling web requests. You use a rule group in an WebACL
by providing its Amazon Resource Name (ARN) to the rule statement RuleGroupReferenceStatement
, when you add rules to the web ACL.
When you create a rule group, you define an immutable capacity limit. If you update a rule group, you must stay within the capacity. This allows others to reuse the rule group with confidence in its capacity requirements.
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; CfnRuleGroup cfnRuleGroup = CfnRuleGroup.Builder.create(this, "MyCfnRuleGroup") .capacity(123) .scope("scope") .visibilityConfig(VisibilityConfigProperty.builder() .cloudWatchMetricsEnabled(false) .metricName("metricName") .sampledRequestsEnabled(false) .build()) // the properties below are optional .availableLabels(List.of(LabelSummaryProperty.builder() .name("name") .build())) .consumedLabels(List.of(LabelSummaryProperty.builder() .name("name") .build())) .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) .challenge(ChallengeActionProperty.builder() .customRequestHandling(CustomRequestHandlingProperty.builder() .insertHeaders(List.of(CustomHTTPHeaderProperty.builder() .name("name") .value("value") .build())) .build()) .build()) .count(count) .build()) .captchaConfig(CaptchaConfigProperty.builder() .immunityTimeProperty(ImmunityTimePropertyProperty.builder() .immunityTime(123) .build()) .build()) .challengeConfig(ChallengeConfigProperty.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 | Class and Description |
---|---|
static interface |
CfnRuleGroup.AllowActionProperty
Specifies that AWS WAF should allow the request and optionally defines additional custom handling for the request.
|
static interface |
CfnRuleGroup.AndStatementProperty
A logical rule statement used to combine other rule statements with AND logic.
|
static interface |
CfnRuleGroup.BlockActionProperty
Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request.
|
static interface |
CfnRuleGroup.BodyProperty
Inspect the body of the web request.
|
static class |
CfnRuleGroup.Builder
A fluent builder for
CfnRuleGroup . |
static interface |
CfnRuleGroup.ByteMatchStatementProperty
A rule statement that defines a string match search for AWS WAF to apply to web requests.
|
static interface |
CfnRuleGroup.CaptchaActionProperty
Specifies that AWS WAF should run a `CAPTCHA` check against the request:.
|
static interface |
CfnRuleGroup.CaptchaConfigProperty
Specifies how AWS WAF should handle `CAPTCHA` evaluations.
|
static interface |
CfnRuleGroup.ChallengeActionProperty
Specifies that AWS WAF should run a `Challenge` check against the request to verify that the request is coming from a legitimate client session: - If the request includes a valid, unexpired challenge token, AWS WAF applies any custom request handling and labels that you've configured and then allows the web request inspection to proceed to the next rule, similar to a `CountAction` .
|
static interface |
CfnRuleGroup.ChallengeConfigProperty
Specifies how AWS WAF should handle `Challenge` evaluations.
|
static interface |
CfnRuleGroup.CookieMatchPatternProperty
The filter to use to identify the subset of cookies to inspect in a web request.
|
static interface |
CfnRuleGroup.CookiesProperty
Inspect the cookies in the web request.
|
static interface |
CfnRuleGroup.CountActionProperty
Specifies that AWS WAF should count the request.
|
static interface |
CfnRuleGroup.CustomHTTPHeaderProperty
A custom header for custom request and response handling.
|
static interface |
CfnRuleGroup.CustomRequestHandlingProperty
Custom request handling behavior that inserts custom headers into a web request.
|
static interface |
CfnRuleGroup.CustomResponseBodyProperty
The response body to use in a custom response to a web request.
|
static interface |
CfnRuleGroup.CustomResponseProperty
A custom response to send to the client.
|
static interface |
CfnRuleGroup.FieldToMatchProperty
The part of the web request that you want AWS WAF to inspect.
|
static interface |
CfnRuleGroup.ForwardedIPConfigurationProperty
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.
|
static interface |
CfnRuleGroup.GeoMatchStatementProperty
A rule statement that labels web requests by country and region and that matches against web requests based on country code.
|
static interface |
CfnRuleGroup.HeaderMatchPatternProperty
The filter to use to identify the subset of headers to inspect in a web request.
|
static interface |
CfnRuleGroup.HeadersProperty
Inspect all headers in the web request.
|
static interface |
CfnRuleGroup.ImmunityTimePropertyProperty
Used for CAPTCHA and challenge token settings.
|
static interface |
CfnRuleGroup.IPSetForwardedIPConfigurationProperty
The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.
|
static interface |
CfnRuleGroup.IPSetReferenceStatementProperty
A rule statement used to detect web requests coming from particular IP addresses or address ranges.
|
static interface |
CfnRuleGroup.JsonBodyProperty
Inspect the body of the web request as JSON.
|
static interface |
CfnRuleGroup.JsonMatchPatternProperty
The patterns to look for in the JSON body.
|
static interface |
CfnRuleGroup.LabelMatchStatementProperty
A rule statement to match against labels that have been added to the web request by rules that have already run in the web ACL.
|
static interface |
CfnRuleGroup.LabelProperty
A single label container.
|
static interface |
CfnRuleGroup.LabelSummaryProperty
List of labels used by one or more of the rules of a `RuleGroup` .
|
static interface |
CfnRuleGroup.NotStatementProperty
A logical rule statement used to negate the results of another rule statement.
|
static interface |
CfnRuleGroup.OrStatementProperty
A logical rule statement used to combine other rule statements with OR logic.
|
static interface |
CfnRuleGroup.RateBasedStatementProperty
A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span.
|
static interface |
CfnRuleGroup.RegexMatchStatementProperty
A rule statement used to search web request components for a match against a single regular expression.
|
static interface |
CfnRuleGroup.RegexPatternSetReferenceStatementProperty
A rule statement used to search web request components for matches with regular expressions.
|
static interface |
CfnRuleGroup.RuleActionProperty
The action that AWS WAF should take on a web request when it matches a rule's statement.
|
static interface |
CfnRuleGroup.RuleProperty
A single rule, which you can use in a `WebACL` or `RuleGroup` to identify web requests that you want to allow, block, or count.
|
static interface |
CfnRuleGroup.SingleHeaderProperty
Inspect one of the headers in the web request, identified by name, for example, `User-Agent` or `Referer` .
|
static interface |
CfnRuleGroup.SingleQueryArgumentProperty
Inspect one query argument in the web request, identified by name, for example *UserName* or *SalesRegion* .
|
static interface |
CfnRuleGroup.SizeConstraintStatementProperty
A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<).
|
static interface |
CfnRuleGroup.SqliMatchStatementProperty
A rule statement that inspects for malicious SQL code.
|
static interface |
CfnRuleGroup.StatementProperty
The processing guidance for a rule, used by AWS WAF to determine whether a web request matches the rule.
|
static interface |
CfnRuleGroup.TextTransformationProperty
Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection.
|
static interface |
CfnRuleGroup.VisibilityConfigProperty
Defines and enables Amazon CloudWatch metrics and web request sample collection.
|
static interface |
CfnRuleGroup.XssMatchStatementProperty
A rule statement that inspects for cross-site scripting (XSS) attacks.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnRuleGroup(Construct scope,
java.lang.String id,
CfnRuleGroupProps props)
Create a new `AWS::WAFv2::RuleGroup`.
|
protected |
CfnRuleGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnRuleGroup(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the rule group.
|
java.lang.String |
getAttrId()
The ID of the rule group.
|
java.lang.String |
getAttrLabelNamespace()
The label namespace prefix for this rule group.
|
java.lang.Object |
getAvailableLabels()
The labels that one or more rules in this rule group add to matching web requests.
|
java.lang.Number |
getCapacity()
The web ACL capacity units (WCUs) required for this rule group.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getConsumedLabels()
The labels that one or more rules in this rule group match against in label match statements.
|
java.lang.Object |
getCustomResponseBodies()
A map of custom response keys and content bodies.
|
java.lang.String |
getDescription()
A description of the rule group that helps with identification.
|
java.lang.String |
getName()
The name of the rule group.
|
java.lang.Object |
getRules()
The rule statements used to identify the web requests that you want to allow, block, or count.
|
java.lang.String |
getScope()
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
|
TagManager |
getTags()
Key:value pairs associated with an AWS resource.
|
java.lang.Object |
getVisibilityConfig()
Defines and enables Amazon CloudWatch metrics and web request sample collection.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAvailableLabels(IResolvable value)
The labels that one or more rules in this rule group add to matching web requests.
|
void |
setAvailableLabels(java.util.List<java.lang.Object> value)
The labels that one or more rules in this rule group add to matching web requests.
|
void |
setCapacity(java.lang.Number value)
The web ACL capacity units (WCUs) required for this rule group.
|
void |
setConsumedLabels(IResolvable value)
The labels that one or more rules in this rule group match against in label match statements.
|
void |
setConsumedLabels(java.util.List<java.lang.Object> value)
The labels that one or more rules in this rule group match against in label match statements.
|
void |
setCustomResponseBodies(IResolvable value)
A map of custom response keys and content bodies.
|
void |
setCustomResponseBodies(java.util.Map<java.lang.String,java.lang.Object> value)
A map of custom response keys and content bodies.
|
void |
setDescription(java.lang.String value)
A description of the rule group that helps with identification.
|
void |
setName(java.lang.String value)
The name of the rule group.
|
void |
setRules(IResolvable value)
The rule statements used to identify the web requests that you want to allow, block, or count.
|
void |
setRules(java.util.List<java.lang.Object> value)
The rule statements used to identify the web requests that you want to allow, block, or count.
|
void |
setScope(java.lang.String value)
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
|
void |
setVisibilityConfig(CfnRuleGroup.VisibilityConfigProperty value)
Defines and enables Amazon CloudWatch metrics and web request sample collection.
|
void |
setVisibilityConfig(IResolvable value)
Defines and enables Amazon CloudWatch metrics and web request sample collection.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnRuleGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnRuleGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnRuleGroup(Construct scope, java.lang.String id, CfnRuleGroupProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
public java.lang.String getAttrId()
public java.lang.String getAttrLabelNamespace()
All labels added by rules in this rule group have this prefix.
The syntax for the label namespace prefix for a rule group is the following: awswaf:<account ID>:rule group:<rule group name>:
When a rule with a label matches a web request, AWS WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon.
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager 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.
public java.lang.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.
public void setCapacity(java.lang.Number value)
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.
public java.lang.String getScope()
A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, or an AWS App Runner service. Valid Values are CLOUDFRONT
and REGIONAL
.
For
CLOUDFRONT
, you must create your WAFv2 resources in the US East (N. Virginia) Region,us-east-1
.
public void setScope(java.lang.String value)
A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, or an AWS App Runner service. Valid Values are CLOUDFRONT
and REGIONAL
.
For
CLOUDFRONT
, you must create your WAFv2 resources in the US East (N. Virginia) Region,us-east-1
.
public java.lang.Object getVisibilityConfig()
public void setVisibilityConfig(IResolvable value)
public void setVisibilityConfig(CfnRuleGroup.VisibilityConfigProperty value)
public java.lang.Object getAvailableLabels()
These labels are defined in the RuleLabels
for a Rule
.
public void setAvailableLabels(IResolvable value)
These labels are defined in the RuleLabels
for a Rule
.
public void setAvailableLabels(java.util.List<java.lang.Object> value)
These labels are defined in the RuleLabels
for a Rule
.
public java.lang.Object getConsumedLabels()
These labels are defined in a LabelMatchStatement
specification, in the Statement
definition of a rule.
public void setConsumedLabels(IResolvable value)
These labels are defined in a LabelMatchStatement
specification, in the Statement
definition of a rule.
public void setConsumedLabels(java.util.List<java.lang.Object> value)
These labels are defined in a LabelMatchStatement
specification, in the Statement
definition of a rule.
public java.lang.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 .
public void setCustomResponseBodies(IResolvable value)
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 .
public void setCustomResponseBodies(java.util.Map<java.lang.String,java.lang.Object> value)
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 .
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getName()
You cannot change the name of a rule group after you create it.
public void setName(java.lang.String value)
You cannot change the name of a rule group after you create it.
public java.lang.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.
public void setRules(IResolvable value)
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.
public void setRules(java.util.List<java.lang.Object> value)
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.