Skip to content

reorder_receipt_rule_set async

reorder_receipt_rule_set(
    rule_set_name: ReceiptRuleSetName,
    rule_names: ReceiptRuleNamesList,
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> ReorderReceiptRuleSetResponse

Reorders the receipt rules within a receipt rule set.

All of the rules in the rule set must be represented in this request. That is, it is error if the reorder request doesn't explicitly position all of the rules.

For information about managing receipt rule sets, see the Amazon SES Developer Guide.

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

Parameters:

Raises:

Examples:

ReorderReceiptRuleSet The following example reorders the receipt rules within a receipt rule set:

>>> await client.reorder_receipt_rule_set(rule_set_name='MyRuleSet', rule_names=['MyRule', 'MyOtherRule'])
Source code in docs_src/capo_ses/_services/async_ses.py
async def reorder_receipt_rule_set(
    self,
    rule_set_name: "capo_ses.types.receipt_rule_set_name.ReceiptRuleSetName",
    rule_names: "capo_ses.types.receipt_rule_names_list.ReceiptRuleNamesList",
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> (
    "capo_ses.types.reorder_receipt_rule_set_response.ReorderReceiptRuleSetResponse"
):
    """<p>Reorders the receipt rules within a receipt rule set.</p> <note> <p>All of the rules in the rule set must be represented in this request. That is, it is error if the reorder request doesn't explicitly position all of the rules.</p> </note> <p>For information about managing receipt rule sets, 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 to reorder.</p>
        rule_names: <p>The specified receipt rule set's receipt rules, in order.</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:
        ReorderReceiptRuleSet
        The following example reorders the receipt rules within a receipt rule set:

        >>> await client.reorder_receipt_rule_set(rule_set_name='MyRuleSet', rule_names=['MyRule', 'MyOtherRule'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ses.types.reorder_receipt_rule_set_request.ReorderReceiptRuleSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_ses.types.reorder_receipt_rule_set_response.ReorderReceiptRuleSetResponse"
    ]:
        import capo_ses._operations.simple_email_service.reorder_receipt_rule_set

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ReorderReceiptRuleSet")
    )
    input_: capo_ses.types.reorder_receipt_rule_set_request.ReorderReceiptRuleSetRequest = {
        "rule_set_name": rule_set_name,
        "rule_names": rule_names,
    }

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