Skip to content

describe_receipt_rule async

describe_receipt_rule(
    rule_set_name: ReceiptRuleSetName,
    rule_name: ReceiptRuleName,
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> DescribeReceiptRuleResponse

Returns the details of the specified receipt rule.

For information about setting up receipt rules, see the Amazon SES Developer Guide.

You can execute this operation no more than once per second.

Parameters:

  • rule_set_name (ReceiptRuleSetName) –

    The name of the receipt rule set that the receipt rule belongs to.

  • rule_name (ReceiptRuleName) –

    The name of the receipt rule.

Raises:

Examples:

DescribeReceiptRule The following example returns the details of a receipt rule:

>>> await client.describe_receipt_rule(rule_set_name='MyRuleSet', rule_name='MyRule')
Source code in docs_src/capo_ses/_services/async_ses.py
async def describe_receipt_rule(
    self,
    rule_set_name: "capo_ses.types.receipt_rule_set_name.ReceiptRuleSetName",
    rule_name: "capo_ses.types.receipt_rule_name.ReceiptRuleName",
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> "capo_ses.types.describe_receipt_rule_response.DescribeReceiptRuleResponse":
    """<p>Returns the details of the specified receipt rule.</p> <p>For information about setting up receipt rules, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/receiving-email-receipt-rules-console-walkthrough.html">Amazon SES Developer Guide</a>.</p> <p>You can execute this operation no more than once per second.</p>

    Args:
        rule_set_name: <p>The name of the receipt rule set that the receipt rule belongs to.</p>
        rule_name: <p>The name of the receipt rule.</p>

    Raises:
        capo_ses.errors.rule_does_not_exist_exception.RuleDoesNotExistException: <p>Indicates that the provided receipt rule does not exist.</p>
        capo_ses.errors.rule_set_does_not_exist_exception.RuleSetDoesNotExistException: <p>Indicates that the provided receipt rule set does not exist.</p>
        capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        DescribeReceiptRule
        The following example returns the details of a receipt rule:

        >>> await client.describe_receipt_rule(rule_set_name='MyRuleSet', rule_name='MyRule')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ses.types.describe_receipt_rule_request.DescribeReceiptRuleRequest]",
    ) -> AsyncOperationResponse[
        "capo_ses.types.describe_receipt_rule_response.DescribeReceiptRuleResponse"
    ]:
        import capo_ses._operations.simple_email_service.describe_receipt_rule

        (
            output,
            http_response,
        ) = await capo_ses._operations.simple_email_service.describe_receipt_rule.async_describe_receipt_rule(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeReceiptRule")
    )
    input_: capo_ses.types.describe_receipt_rule_request.DescribeReceiptRuleRequest = {
        "rule_set_name": rule_set_name,
        "rule_name": rule_name,
    }

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