Skip to content

put_resolver_query_log_config_policy async

put_resolver_query_log_config_policy(
    arn: Arn,
    resolver_query_log_config_policy: ResolverQueryLogConfigPolicy,
    *,
    config_overrides: Optional[AsyncRoute53ResolverClientConfig] = None,
) -> PutResolverQueryLogConfigPolicyResponse

Specifies an Amazon Web Services account that you want to share a query logging configuration with, the query logging configuration that you want to share, and the operations that you want the account to be able to perform on the configuration.

Parameters:

  • arn (Arn) –

    The Amazon Resource Name (ARN) of the account that you want to share rules with.

  • resolver_query_log_config_policy (ResolverQueryLogConfigPolicy) –

    An Identity and Access Management policy statement that lists the query logging configurations that you want to share with another Amazon Web Services account and the operations that you want the account to be able to perform. You can specify the following operations in the Actions section of the statement:

    • route53resolver:AssociateResolverQueryLogConfig

    • route53resolver:DisassociateResolverQueryLogConfig

    • route53resolver:ListResolverQueryLogConfigs

    In the Resource section of the statement, you specify the ARNs for the query logging configurations that you want to share with the account that you specified in Arn.

Raises:

Source code in docs_src/capo_route53resolver/_services/async_route53_resolver.py
async def put_resolver_query_log_config_policy(
    self,
    arn: "capo_route53resolver.types.arn.Arn",
    resolver_query_log_config_policy: "capo_route53resolver.types.resolver_query_log_config_policy.ResolverQueryLogConfigPolicy",
    *,
    config_overrides: Optional[AsyncRoute53ResolverClientConfig] = None,
) -> "capo_route53resolver.types.put_resolver_query_log_config_policy_response.PutResolverQueryLogConfigPolicyResponse":
    """<p>Specifies an Amazon Web Services account that you want to share a query logging configuration with, the query logging configuration that you want to share, and the operations that you want the account to be able to perform on the configuration.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the account that you want to share rules with.</p>
        resolver_query_log_config_policy: <p>An Identity and Access Management policy statement that lists the query logging configurations that you want to share with another Amazon Web Services account and the operations that you want the account to be able to perform. You can specify the following operations in the <code>Actions</code> section of the statement:</p> <ul> <li> <p> <code>route53resolver:AssociateResolverQueryLogConfig</code> </p> </li> <li> <p> <code>route53resolver:DisassociateResolverQueryLogConfig</code> </p> </li> <li> <p> <code>route53resolver:ListResolverQueryLogConfigs</code> </p> </li> </ul> <p>In the <code>Resource</code> section of the statement, you specify the ARNs for the query logging configurations that you want to share with the account that you specified in <code>Arn</code>. </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.invalid_policy_document.InvalidPolicyDocument: <p>The specified Resolver rule policy is invalid.</p>
        capo_route53resolver.errors.invalid_request_exception.InvalidRequestException: <p>The request is invalid.</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.put_resolver_query_log_config_policy_request.PutResolverQueryLogConfigPolicyRequest]",
    ) -> AsyncOperationResponse[
        "capo_route53resolver.types.put_resolver_query_log_config_policy_response.PutResolverQueryLogConfigPolicyResponse"
    ]:
        import capo_route53resolver._operations.route53_resolver.put_resolver_query_log_config_policy

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutResolverQueryLogConfigPolicy")
    )
    input_: capo_route53resolver.types.put_resolver_query_log_config_policy_request.PutResolverQueryLogConfigPolicyRequest = {
        "arn": arn,
        "resolver_query_log_config_policy": resolver_query_log_config_policy,
    }

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