Skip to content

get_resolver_rule_policy async

get_resolver_rule_policy(
    arn: Arn, *, config_overrides: Optional[AsyncRoute53ResolverClientConfig] = None
) -> GetResolverRulePolicyResponse

Gets information about the Resolver rule policy for a specified rule. A Resolver rule policy includes the rule that you want to share with another account, the account that you want to share the rule with, and the Resolver operations that you want to allow the account to use.

Parameters:

  • arn (Arn) –

    The ID of the Resolver rule that you want to get the Resolver rule policy for.

Raises:

  • AccessDeniedException –

    The current account doesn't have the IAM permissions required to perform the specified Resolver operation.

    This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.

  • InternalServiceErrorException –

    We encountered an unknown error. Try again in a few minutes.

  • InvalidParameterException –

    One or more parameters in this request are not valid.

  • UnknownResourceException –

    The specified resource doesn't exist.

  • UnknownServiceError –

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

Source code in docs_src/capo_route53resolver/_services/async_route53_resolver.py
async def get_resolver_rule_policy(
    self,
    arn: "capo_route53resolver.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncRoute53ResolverClientConfig] = None,
) -> "capo_route53resolver.types.get_resolver_rule_policy_response.GetResolverRulePolicyResponse":
    """<p>Gets information about the Resolver rule policy for a specified rule. A Resolver rule policy includes the rule that you want to share with another account, the account that you want to share the rule with, and the Resolver operations that you want to allow the account to use. </p>

    Args:
        arn: <p>The ID of the Resolver rule that you want to get the Resolver rule policy for.</p>

    Raises:
        capo_route53resolver.errors.access_denied_exception.AccessDeniedException: <p>The current account doesn't have the IAM permissions required to perform the specified Resolver operation.</p> <p>This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.</p>
        capo_route53resolver.errors.internal_service_error_exception.InternalServiceErrorException: <p>We encountered an unknown error. Try again in a few minutes.</p>
        capo_route53resolver.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters in this request are not valid.</p>
        capo_route53resolver.errors.unknown_resource_exception.UnknownResourceException: <p>The specified resource doesn't exist.</p>
        capo_route53resolver.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route53resolver.types.get_resolver_rule_policy_request.GetResolverRulePolicyRequest]",
    ) -> AsyncOperationResponse[
        "capo_route53resolver.types.get_resolver_rule_policy_response.GetResolverRulePolicyResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.get_resolver_rule_policy

        (
            output,
            http_response,
        ) = await capo_route53resolver._operations.route53_resolver.get_resolver_rule_policy.async_get_resolver_rule_policy(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetResolverRulePolicy")
    )
    input_: capo_route53resolver.types.get_resolver_rule_policy_request.GetResolverRulePolicyRequest = {
        "arn": arn
    }

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