Use DescribeReceiptRuleSet with an AWS SDK
The following code examples show how to use DescribeReceiptRuleSet.
- Python
-
- 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.
-
- SAP ABAP
-
- SDK for SAP ABAP
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. TRY. oo_result = lo_ses->describereceiptruleset( iv_rulesetname = iv_rule_set_name ). MESSAGE 'Receipt rule set described successfully' TYPE 'I'. CATCH /aws1/cx_sesrulesetdoesnotexex INTO DATA(lo_ex1). DATA(lv_error) = |Rule set does not exist: { lo_ex1->get_text( ) }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_ex1. CATCH /aws1/cx_rt_generic INTO DATA(lo_ex_generic). lv_error = |An error occurred: { lo_ex_generic->get_text( ) }|. MESSAGE lv_error TYPE 'I'. RAISE EXCEPTION lo_ex_generic. ENDTRY.-
For API details, see DescribeReceiptRuleSet in AWS SDK for SAP ABAP 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.