update_receipt_rule
async
¶
update_receipt_rule(
rule_set_name: ReceiptRuleSetName,
rule: ReceiptRule,
*,
config_overrides: Optional[AsyncSESClientConfig] = None,
) -> UpdateReceiptRuleResponse
Updates a receipt rule.
For information about managing 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(ReceiptRule) –A data structure that contains the updated receipt rule information.
Raises:
-
InvalidLambdaFunctionException–Indicates that the provided Amazon Web Services Lambda function is invalid, or that Amazon SES could not execute the provided function, possibly due to permissions issues. For information about giving permissions, see the Amazon SES Developer Guide.
-
InvalidS3ConfigurationException–Indicates that the provided Amazon S3 bucket or Amazon Web Services KMS encryption key is invalid, or that Amazon SES could not publish to the bucket, possibly due to permissions issues. For information about giving permissions, see the Amazon SES Developer Guide.
-
InvalidSnsTopicException–Indicates that the provided Amazon SNS topic is invalid, or that Amazon SES could not publish to the topic, possibly due to permissions issues. For information about giving permissions, see the Amazon SES Developer Guide.
-
LimitExceededException–Indicates that a resource could not be created because of service limits. For a list of Amazon SES limits, see the Amazon SES Developer Guide.
-
RuleDoesNotExistException–Indicates that the provided receipt rule does not exist.
-
RuleSetDoesNotExistException–Indicates that the provided receipt rule set does not exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
UpdateReceiptRule The following example updates a receipt rule to use an Amazon S3 action:
>>> await client.update_receipt_rule(rule_set_name='MyRuleSet', rule={'TlsPolicy': 'Optional', 'Enabled': True, 'Name': 'MyRule', 'Actions': [{'S3Action': {'ObjectKeyPrefix': 'email', 'BucketName': 'MyBucket'}}], 'ScanEnabled': True})