The following code example shows how to use DescribeReceiptRuleSet
.
- SDK for Python (Boto3)
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. class SesReceiptHandler: """Encapsulates Amazon SES receipt handling functions.""" def __init__(self, ses_client, s3_resource): """ :param ses_client: A Boto3 Amazon SES client. :param s3_resource: A Boto3 Amazon S3 resource. """ self.ses_client = ses_client self.s3_resource = s3_resource def describe_receipt_rule_set(self, rule_set_name): """ Gets data about a rule set. :param rule_set_name: The name of the rule set to retrieve. :return: Data about the rule set. """ try: response = self.ses_client.describe_receipt_rule_set( RuleSetName=rule_set_name ) logger.info("Got data for rule set %s.", rule_set_name) except ClientError: logger.exception("Couldn't get data for rule set %s.", rule_set_name) raise else: return response
-
For API details, see DescribeReceiptRuleSet in AWS SDK for Python (Boto3) API Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using Amazon SES with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.