Skip to content

describe_managed_rule_group async

describe_managed_rule_group(
    vendor_name: VendorName,
    name: EntityName,
    scope: Scope,
    *,
    config_overrides: Optional[AsyncWAFV2ClientConfig] = None,
    version_name: Optional[VersionKeyString] = None,
) -> DescribeManagedRuleGroupResponse

Provides high-level information for a managed rule group, including descriptions of the rules.

Parameters:

  • vendor_name (VendorName) –

    The name of the managed rule group vendor. You use this, along with the rule group name, to identify a rule group.

  • name (EntityName) –

    The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.

  • scope (Scope) –

    Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use CLOUDFRONT.

    To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

    • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1.

    • API and SDKs - For all calls, use the Region endpoint us-east-1.

  • version_name (Optional[VersionKeyString], default: None ) –

    The version of the rule group. You can only use a version that is not scheduled for expiration. If you don't provide this, WAF uses the vendor's default version.

Raises:

  • WAFExpiredManagedRuleGroupVersionException –

    The operation failed because the specified version for the managed rule group has expired. You can retrieve the available versions for the managed rule group by calling ListAvailableManagedRuleGroupVersions.

  • WAFInternalErrorException –

    Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

  • WAFInvalidOperationException –

    The operation isn't valid.

  • WAFInvalidParameterException –

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

    • You specified a parameter name or value that isn't valid.

    • Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.

    • You tried to update a WebACL with a DefaultAction that isn't among the types available at DefaultAction.

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

  • WAFInvalidResourceException –

    WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.

  • WAFNonexistentItemException –

    WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.

  • UnknownServiceError –

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

Source code in docs_src/capo_wafv2/_services/async_wafv2.py
async def describe_managed_rule_group(
    self,
    vendor_name: "capo_wafv2.types.vendor_name.VendorName",
    name: "capo_wafv2.types.entity_name.EntityName",
    scope: "capo_wafv2.types.scope.Scope",
    *,
    config_overrides: Optional[AsyncWAFV2ClientConfig] = None,
    version_name: Optional[
        "capo_wafv2.types.version_key_string.VersionKeyString"
    ] = None,
) -> "capo_wafv2.types.describe_managed_rule_group_response.DescribeManagedRuleGroupResponse":
    """<p>Provides high-level information for a managed rule group, including descriptions of the rules. </p>

    Args:
        vendor_name: <p>The name of the managed rule group vendor. You use this, along with the rule group name, to identify a rule group.</p>
        name: <p>The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.</p>
        scope: <p>Specifies whether this is for a global resource type, such as a Amazon CloudFront distribution. For an Amplify application, use <code>CLOUDFRONT</code>.</p> <p>To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows: </p> <ul> <li> <p>CLI - Specify the Region when you use the CloudFront scope: <code>--scope=CLOUDFRONT --region=us-east-1</code>. </p> </li> <li> <p>API and SDKs - For all calls, use the Region endpoint us-east-1. </p> </li> </ul>
        version_name: <p>The version of the rule group. You can only use a version that is not scheduled for expiration. If you don't provide this, WAF uses the vendor's default version. </p>

    Raises:
        capo_wafv2.errors.waf_expired_managed_rule_group_version_exception.WAFExpiredManagedRuleGroupVersionException: <p>The operation failed because the specified version for the managed rule group has expired. You can retrieve the available versions for the managed rule group by calling <a>ListAvailableManagedRuleGroupVersions</a>.</p>
        capo_wafv2.errors.waf_internal_error_exception.WAFInternalErrorException: <p>Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request. </p>
        capo_wafv2.errors.waf_invalid_operation_exception.WAFInvalidOperationException: <p>The operation isn't valid. </p>
        capo_wafv2.errors.waf_invalid_parameter_exception.WAFInvalidParameterException: <p>The operation failed because WAF didn't recognize a parameter in the request. For example: </p> <ul> <li> <p>You specified a parameter name or value that isn't valid.</p> </li> <li> <p>Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested. </p> </li> <li> <p>You tried to update a <code>WebACL</code> with a <code>DefaultAction</code> that isn't among the types available at <a>DefaultAction</a>.</p> </li> <li> <p>Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.</p> </li> </ul>
        capo_wafv2.errors.waf_invalid_resource_exception.WAFInvalidResourceException: <p>WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.</p>
        capo_wafv2.errors.waf_nonexistent_item_exception.WAFNonexistentItemException: <p>WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. </p>
        capo_wafv2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_wafv2.types.describe_managed_rule_group_request.DescribeManagedRuleGroupRequest]",
    ) -> AsyncOperationResponse[
        "capo_wafv2.types.describe_managed_rule_group_response.DescribeManagedRuleGroupResponse"
    ]:
        import capo_wafv2._operations.awswaf_20190729.describe_managed_rule_group

        (
            output,
            http_response,
        ) = await capo_wafv2._operations.awswaf_20190729.describe_managed_rule_group.async_describe_managed_rule_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeManagedRuleGroup")
    )
    input_: capo_wafv2.types.describe_managed_rule_group_request.DescribeManagedRuleGroupRequest = {
        "vendor_name": vendor_name,
        "name": name,
        "scope": scope,
    }
    if version_name is not None:
        input_["version_name"] = version_name

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output