Skip to content

list_activated_rules_in_rule_group

list_activated_rules_in_rule_group(
    *,
    config_overrides: Optional[WAFClientConfig] = None,
    rule_group_id: Optional[ResourceId] = None,
    next_marker: Optional[NextMarker] = None,
    limit: Optional[PaginationLimit] = None,
) -> ListActivatedRulesInRuleGroupResponse

This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide.

For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use.

Returns an array of ActivatedRule objects.

Parameters:

  • rule_group_id (Optional[ResourceId], default: None ) –

    The RuleGroupId of the RuleGroup for which you want to get a list of ActivatedRule objects.

  • next_marker (Optional[NextMarker], default: None ) –

    If you specify a value for Limit and you have more ActivatedRules than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of ActivatedRules. For the second and subsequent ListActivatedRulesInRuleGroup requests, specify the value of NextMarker from the previous response to get information about another batch of ActivatedRules.

  • limit (Optional[PaginationLimit], default: None ) –

    Specifies the number of ActivatedRules that you want AWS WAF to return for this request. If you have more ActivatedRules than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of ActivatedRules.

Raises:

  • WAFInternalErrorException –

    The operation failed because of a system problem, even though the request was valid. Retry your request.

  • WAFInvalidParameterException –

    The operation failed because AWS WAF didn't recognize a parameter in the request. For example:

    • You specified an invalid parameter name.

    • You specified an invalid value.

    • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE.

    • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT.

    • You tried to create a RateBasedRule with a RateKey value other than IP.

    • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT.

    • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY.

    • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data.

    • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated.

  • WAFNonexistentItemException –

    The operation failed because the referenced object doesn't exist.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_waf/_services/waf.py
def list_activated_rules_in_rule_group(
    self,
    *,
    config_overrides: Optional[WAFClientConfig] = None,
    rule_group_id: Optional["capo_waf.types.resource_id.ResourceId"] = None,
    next_marker: Optional["capo_waf.types.next_marker.NextMarker"] = None,
    limit: Optional["capo_waf.types.pagination_limit.PaginationLimit"] = None,
) -> "capo_waf.types.list_activated_rules_in_rule_group_response.ListActivatedRulesInRuleGroupResponse":
    """<note> <p>This is <b>AWS WAF Classic</b> documentation. For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html">AWS WAF Classic</a> in the developer guide.</p> <p> <b>For the latest version of AWS WAF</b>, use the AWS WAFV2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a>. With the latest version, AWS WAF has a single set of endpoints for regional and global use. </p> </note> <p>Returns an array of <a>ActivatedRule</a> objects.</p>

    Args:
        rule_group_id: <p>The <code>RuleGroupId</code> of the <a>RuleGroup</a> for which you want to get a list of <a>ActivatedRule</a> objects.</p>
        next_marker: <p>If you specify a value for <code>Limit</code> and you have more <code>ActivatedRules</code> than the value of <code>Limit</code>, AWS WAF returns a <code>NextMarker</code> value in the response that allows you to list another group of <code>ActivatedRules</code>. For the second and subsequent <code>ListActivatedRulesInRuleGroup</code> requests, specify the value of <code>NextMarker</code> from the previous response to get information about another batch of <code>ActivatedRules</code>.</p>
        limit: <p>Specifies the number of <code>ActivatedRules</code> that you want AWS WAF to return for this request. If you have more <code>ActivatedRules</code> than the number that you specify for <code>Limit</code>, the response includes a <code>NextMarker</code> value that you can use to get another batch of <code>ActivatedRules</code>.</p>

    Raises:
        capo_waf.errors.waf_internal_error_exception.WAFInternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_waf.errors.waf_invalid_parameter_exception.WAFInvalidParameterException: <p>The operation failed because AWS WAF didn't recognize a parameter in the request. For example:</p> <ul> <li> <p>You specified an invalid parameter name.</p> </li> <li> <p>You specified an invalid value.</p> </li> <li> <p>You tried to update an object (<code>ByteMatchSet</code>, <code>IPSet</code>, <code>Rule</code>, or <code>WebACL</code>) using an action other than <code>INSERT</code> or <code>DELETE</code>.</p> </li> <li> <p>You tried to create a <code>WebACL</code> with a <code>DefaultAction</code> <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>, or <code>COUNT</code>.</p> </li> <li> <p>You tried to create a <code>RateBasedRule</code> with a <code>RateKey</code> value other than <code>IP</code>.</p> </li> <li> <p>You tried to update a <code>WebACL</code> with a <code>WafAction</code> <code>Type</code> other than <code>ALLOW</code>, <code>BLOCK</code>, or <code>COUNT</code>.</p> </li> <li> <p>You tried to update a <code>ByteMatchSet</code> with a <code>FieldToMatch</code> <code>Type</code> other than HEADER, METHOD, QUERY_STRING, URI, or BODY.</p> </li> <li> <p>You tried to update a <code>ByteMatchSet</code> with a <code>Field</code> of <code>HEADER</code> but no value for <code>Data</code>.</p> </li> <li> <p>Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated.</p> </li> </ul>
        capo_waf.errors.waf_nonexistent_item_exception.WAFNonexistentItemException: <p>The operation failed because the referenced object doesn't exist.</p>
        capo_waf.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_waf.types.list_activated_rules_in_rule_group_request.ListActivatedRulesInRuleGroupRequest]",
    ) -> OperationResponse[
        "capo_waf.types.list_activated_rules_in_rule_group_response.ListActivatedRulesInRuleGroupResponse"
    ]:
        import capo_waf._operations.awswaf_20150824.list_activated_rules_in_rule_group

        output, http_response = (
            capo_waf._operations.awswaf_20150824.list_activated_rules_in_rule_group.list_activated_rules_in_rule_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListActivatedRulesInRuleGroup")
    )
    input_: capo_waf.types.list_activated_rules_in_rule_group_request.ListActivatedRulesInRuleGroupRequest = {}
    if rule_group_id is not None:
        input_["rule_group_id"] = rule_group_id
    if next_marker is not None:
        input_["next_marker"] = next_marker
    if limit is not None:
        input_["limit"] = limit

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output