public ActivatedRule withAction(WafAction action) {
        setAction(action);
        return this;
    }
<p>
Specifies the action that CloudFront or AWS WAF takes when a web request matches the conditions in the
<code>Rule</code>. Valid values for <code>Action</code> include the following:
</p>
<ul>
<li>
<p>
<code>ALLOW</code>: CloudFront responds with the requested object.
</p>
</li>
<li>
<p>
<code>BLOCK</code>: CloudFront responds with an HTTP 403 (Forbidden) status code.
</p>
</li>
<li>
<p>
<code>COUNT</code>: AWS WAF increments a counter of requests that match the conditions in the rule and then
continues to inspect the web request based on the remaining rules in the web ACL.
</p>
</li>
</ul>
<p>
<code>ActivatedRule|OverrideAction</code> applies only when updating or adding a <code>RuleGroup</code> to a
<code>WebACL</code>. In this case, you do not use <code>ActivatedRule|Action</code>. For all other update
requests, <code>ActivatedRule|Action</code> is used instead of <code>ActivatedRule|OverrideAction</code>.
</p>

@param action
       Specifies the action that CloudFront or AWS WAF takes when a web request matches the conditions in the
       <code>Rule</code>. Valid values for <code>Action</code> include the following:</p>
       <ul>
       <li>
       <p>
       <code>ALLOW</code>: CloudFront responds with the requested object.
       </p>
       </li>
       <li>
       <p>
       <code>BLOCK</code>: CloudFront responds with an HTTP 403 (Forbidden) status code.
       </p>
       </li>
       <li>
       <p>
       <code>COUNT</code>: AWS WAF increments a counter of requests that match the conditions in the rule and
       then continues to inspect the web request based on the remaining rules in the web ACL.
       </p>
       </li>
       </ul>
       <p>
       <code>ActivatedRule|OverrideAction</code> applies only when updating or adding a <code>RuleGroup</code> to
       a <code>WebACL</code>. In this case, you do not use <code>ActivatedRule|Action</code>. For all other
       update requests, <code>ActivatedRule|Action</code> is used instead of
       <code>ActivatedRule|OverrideAction</code>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/ActivatedRule.java