2024/05/21 - MailManager - 47 new api methods
Changes This release includes a new Amazon SES feature called Mail Manager, which is a set of email gateway capabilities designed to help customers strengthen their organization's email infrastructure, simplify email workflow management, and streamline email compliance control.
Fetch attributes of a traffic policy resource.
See also: AWS API Documentation
Request Syntax
client.get_traffic_policy( TrafficPolicyId='string' )
string
[REQUIRED]
The identifier of the traffic policy resource.
dict
Response Syntax
{ 'CreatedTimestamp': datetime(2015, 1, 1), 'DefaultAction': 'ALLOW'|'DENY', 'LastUpdatedTimestamp': datetime(2015, 1, 1), 'MaxMessageSizeBytes': 123, 'PolicyStatements': [ { 'Action': 'ALLOW'|'DENY', 'Conditions': [ { 'BooleanExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' } }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SENDER_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'StringExpression': { 'Evaluate': { 'Attribute': 'RECIPIENT' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'TlsExpression': { 'Evaluate': { 'Attribute': 'TLS_PROTOCOL' }, 'Operator': 'MINIMUM_TLS_VERSION'|'IS', 'Value': 'TLS1_2'|'TLS1_3' } }, ] }, ], 'TrafficPolicyArn': 'string', 'TrafficPolicyId': 'string', 'TrafficPolicyName': 'string' }
Response Structure
(dict) --
CreatedTimestamp (datetime) --
The timestamp of when the traffic policy was created.
DefaultAction (string) --
The default action of the traffic policy.
LastUpdatedTimestamp (datetime) --
The timestamp of when the traffic policy was last updated.
MaxMessageSizeBytes (integer) --
The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
PolicyStatements (list) --
The list of conditions which are in the traffic policy resource.
(dict) --
The structure containing traffic policy conditions and actions.
Action (string) --
The action that informs a traffic policy resource to either allow or block the email if it matches a condition in the policy statement.
Conditions (list) --
The list of conditions to apply to incoming messages for filtering email traffic.
(dict) --
The email traffic filtering conditions which are contained in a traffic policy resource.
BooleanExpression (dict) --
This represents a boolean type condition matching on the incoming mail. It performs the boolean operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) --
The operand on which to perform a boolean condition operation.
Analysis (dict) --
The structure type for a boolean condition stating the Add On ARN and its returned value.
Analyzer (string) --
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) --
The returned value from an Add On.
Operator (string) --
The matching operator for a boolean condition expression.
IpExpression (dict) --
This represents an IP based condition matching on the incoming mail. It performs the operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) --
The left hand side argument of an IP condition expression.
Attribute (string) --
An enum type representing the allowed attribute types for an IP condition.
Operator (string) --
The matching operator for an IP condition expression.
Values (list) --
The right hand side argument of an IP condition expression.
(string) --
StringExpression (dict) --
This represents a string based condition matching on the incoming mail. It performs the string operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) --
The left hand side argument of a string condition expression.
Attribute (string) --
The enum type representing the allowed attribute types for a string condition.
Operator (string) --
The matching operator for a string condition expression.
Values (list) --
The right hand side argument of a string condition expression.
(string) --
TlsExpression (dict) --
This represents a TLS based condition matching on the incoming mail. It performs the operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) --
The left hand side argument of a TLS condition expression.
Attribute (string) --
The enum type representing the allowed attribute types for the TLS condition.
Operator (string) --
The matching operator for a TLS condition expression.
Value (string) --
The right hand side argument of a TLS condition expression.
TrafficPolicyArn (string) --
The Amazon Resource Name (ARN) of the traffic policy resource.
TrafficPolicyId (string) --
The identifier of the traffic policy resource.
TrafficPolicyName (string) --
A user-friendly name for the traffic policy resource.
Stops an in-progress export of emails from an archive.
See also: AWS API Documentation
Request Syntax
client.stop_archive_export( ExportId='string' )
string
[REQUIRED]
The identifier of the export job to stop.
dict
Response Syntax
{}
Response Structure
(dict) --
The response indicating if the request to stop the export job succeeded.
On success, returns an HTTP 200 status code. On failure, returns an error message.
Delete a rule set.
See also: AWS API Documentation
Request Syntax
client.delete_rule_set( RuleSetId='string' )
string
[REQUIRED]
The identifier of an existing rule set resource to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Lists all Add On instances in your account.
See also: AWS API Documentation
Request Syntax
client.list_addon_instances( NextToken='string', PageSize=123 )
string
If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.
integer
The maximum number of ingress endpoint resources that are returned per call. You can use NextToken to obtain further ingress endpoints.
dict
Response Syntax
{ 'AddonInstances': [ { 'AddonInstanceArn': 'string', 'AddonInstanceId': 'string', 'AddonName': 'string', 'AddonSubscriptionId': 'string', 'CreatedTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
AddonInstances (list) --
The list of ingress endpoints.
(dict) --
An Add On instance represents a specific configuration of an Add On.
AddonInstanceArn (string) --
The Amazon Resource Name (ARN) of the Add On instance.
AddonInstanceId (string) --
The unique ID of the Add On instance.
AddonName (string) --
The name of the Add On for the instance.
AddonSubscriptionId (string) --
The subscription ID for the instance.
CreatedTimestamp (datetime) --
The timestamp of when the Add On instance was created.
NextToken (string) --
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
Stops an in-progress archive search job.
See also: AWS API Documentation
Request Syntax
client.stop_archive_search( SearchId='string' )
string
[REQUIRED]
The identifier of the search job to stop.
dict
Response Syntax
{}
Response Structure
(dict) --
The response indicating if the request to stop the search job succeeded.
On success, returns an HTTP 200 status code. On failure, returns an error message.
Returns the results of a completed email archive search job.
See also: AWS API Documentation
Request Syntax
client.get_archive_search_results( SearchId='string' )
string
[REQUIRED]
The identifier of the completed search job.
dict
Response Syntax
{ 'Rows': [ { 'ArchivedMessageId': 'string', 'Cc': 'string', 'Date': 'string', 'From': 'string', 'HasAttachments': True|False, 'InReplyTo': 'string', 'MessageId': 'string', 'ReceivedHeaders': [ 'string', ], 'ReceivedTimestamp': datetime(2015, 1, 1), 'Subject': 'string', 'To': 'string', 'XMailer': 'string', 'XOriginalMailer': 'string', 'XPriority': 'string' }, ] }
Response Structure
(dict) --
The response containing search results from a completed archive search.
Rows (list) --
The list of email result objects matching the search criteria.
(dict) --
A result row containing metadata for an archived email message.
ArchivedMessageId (string) --
The unique identifier of the archived message.
Cc (string) --
The email addresses in the CC header.
Date (string) --
The date the email was sent.
From (string) --
The email address of the sender.
HasAttachments (boolean) --
A flag indicating if the email has attachments.
InReplyTo (string) --
The email message ID this is a reply to.
MessageId (string) --
The unique message ID of the email.
ReceivedHeaders (list) --
The received headers from the email delivery path.
(string) --
ReceivedTimestamp (datetime) --
The timestamp of when the email was received.
Subject (string) --
The subject header value of the email.
To (string) --
The email addresses in the To header.
XMailer (string) --
The user agent that sent the email.
XOriginalMailer (string) --
The original user agent that sent the email.
XPriority (string) --
The priority level of the email.
Retrieves the details and current status of a specific email archive export job.
See also: AWS API Documentation
Request Syntax
client.get_archive_export( ExportId='string' )
string
[REQUIRED]
The identifier of the export job to get details for.
dict
Response Syntax
{ 'ArchiveId': 'string', 'ExportDestinationConfiguration': { 'S3': { 'S3Location': 'string' } }, 'Filters': { 'Include': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ], 'Unless': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ] }, 'FromTimestamp': datetime(2015, 1, 1), 'MaxResults': 123, 'Status': { 'CompletionTimestamp': datetime(2015, 1, 1), 'ErrorMessage': 'string', 'State': 'QUEUED'|'PREPROCESSING'|'PROCESSING'|'COMPLETED'|'FAILED'|'CANCELLED', 'SubmissionTimestamp': datetime(2015, 1, 1) }, 'ToTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
The response containing details of the specified archive export job.
ArchiveId (string) --
The identifier of the archive the email export was performed from.
ExportDestinationConfiguration (dict) --
Where the exported emails are being delivered.
S3 (dict) --
Configuration for delivering to an Amazon S3 bucket.
S3Location (string) --
The S3 location to deliver the exported email data.
Filters (dict) --
The criteria used to filter emails included in the export.
Include (list) --
The filter conditions for emails to include.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) --
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) --
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The operator to use when evaluating the string values.
Values (list) --
The list of string values to evaluate the email attribute against.
(string) --
Unless (list) --
The filter conditions for emails to exclude.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) --
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) --
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The operator to use when evaluating the string values.
Values (list) --
The list of string values to evaluate the email attribute against.
(string) --
FromTimestamp (datetime) --
The start of the timestamp range the exported emails cover.
MaxResults (integer) --
The maximum number of email items included in the export.
Status (dict) --
The current status of the export job.
CompletionTimestamp (datetime) --
The timestamp of when the export job completed (if finished).
ErrorMessage (string) --
An error message if the export job failed.
State (string) --
The current state of the export job.
SubmissionTimestamp (datetime) --
The timestamp of when the export job was submitted.
ToTimestamp (datetime) --
The end of the date range the exported emails cover.
Fetch the relay resource and it's attributes.
See also: AWS API Documentation
Request Syntax
client.get_relay( RelayId='string' )
string
[REQUIRED]
A unique relay identifier.
dict
Response Syntax
{ 'Authentication': { 'NoAuthentication': {}, 'SecretArn': 'string' }, 'CreatedTimestamp': datetime(2015, 1, 1), 'LastModifiedTimestamp': datetime(2015, 1, 1), 'RelayArn': 'string', 'RelayId': 'string', 'RelayName': 'string', 'ServerName': 'string', 'ServerPort': 123 }
Response Structure
(dict) --
Authentication (dict) --
The authentication attribute—contains the secret ARN where the customer relay server credentials are stored.
NoAuthentication (dict) --
Keep an empty structure if the relay destination server does not require SMTP credential authentication.
SecretArn (string) --
The ARN of the secret created in secrets manager where the relay server's SMTP credentials are stored.
CreatedTimestamp (datetime) --
The timestamp of when the relay was created.
LastModifiedTimestamp (datetime) --
The timestamp of when relay was last updated.
RelayArn (string) --
The Amazon Resource Name (ARN) of the relay.
RelayId (string) --
The unique relay identifier.
RelayName (string) --
The unique name of the relay.
ServerName (string) --
The destination relay server address.
ServerPort (integer) --
The destination relay server port.
Updates the attributes of an existing relay resource.
See also: AWS API Documentation
Request Syntax
client.update_relay( Authentication={ 'NoAuthentication': {} , 'SecretArn': 'string' }, RelayId='string', RelayName='string', ServerName='string', ServerPort=123 )
dict
Authentication for the relay destination server—specify the secretARN where the SMTP credentials are stored.
NoAuthentication (dict) --
Keep an empty structure if the relay destination server does not require SMTP credential authentication.
SecretArn (string) --
The ARN of the secret created in secrets manager where the relay server's SMTP credentials are stored.
string
[REQUIRED]
The unique relay identifier.
string
The name of the relay resource.
string
The destination relay server address.
integer
The destination relay server port.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes an Add On instance.
See also: AWS API Documentation
Request Syntax
client.delete_addon_instance( AddonInstanceId='string' )
string
[REQUIRED]
The Add On instance ID to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates a subscription for an Add On representing the acceptance of its terms of use and additional pricing. The subscription can then be used to create an instance for use in rule sets or traffic policies.
See also: AWS API Documentation
Request Syntax
client.create_addon_subscription( AddonName='string', ClientToken='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The name of the Add On to subscribe to. You can only have one subscription for each Add On name.
string
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
This field is autopopulated if not provided.
list
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
dict
Response Syntax
{ 'AddonSubscriptionId': 'string' }
Response Structure
(dict) --
AddonSubscriptionId (string) --
The unique ID of the Add On subscription created by this API.
Lists all Add On subscriptions in your account.
See also: AWS API Documentation
Request Syntax
client.list_addon_subscriptions( NextToken='string', PageSize=123 )
string
If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.
integer
The maximum number of ingress endpoint resources that are returned per call. You can use NextToken to obtain further ingress endpoints.
dict
Response Syntax
{ 'AddonSubscriptions': [ { 'AddonName': 'string', 'AddonSubscriptionArn': 'string', 'AddonSubscriptionId': 'string', 'CreatedTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
AddonSubscriptions (list) --
The list of ingress endpoints.
(dict) --
A subscription for an Add On representing the acceptance of its terms of use and additional pricing.
AddonName (string) --
The name of the Add On.
AddonSubscriptionArn (string) --
The Amazon Resource Name (ARN) of the Add On subscription.
AddonSubscriptionId (string) --
The unique ID of the Add On subscription.
CreatedTimestamp (datetime) --
The timestamp of when the Add On subscription was created.
NextToken (string) --
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
Returns the textual content of a specific email message stored in the archive. Attachments are not included.
See also: AWS API Documentation
Request Syntax
client.get_archive_message_content( ArchivedMessageId='string' )
string
[REQUIRED]
The unique identifier of the archived email message.
dict
Response Syntax
{ 'Body': { 'Html': 'string', 'MessageMalformed': True|False, 'Text': 'string' } }
Response Structure
(dict) --
The response containing the textual content of the requested archived email message.
Body (dict) --
The textual body content of the email message.
Html (string) --
The HTML body content of the message.
MessageMalformed (boolean) --
A flag indicating if the email was malformed.
Text (string) --
The plain text body content of the message.
Creates a relay resource which can be used in rules to relay incoming emails to defined relay destinations.
See also: AWS API Documentation
Request Syntax
client.create_relay( Authentication={ 'NoAuthentication': {} , 'SecretArn': 'string' }, ClientToken='string', RelayName='string', ServerName='string', ServerPort=123, Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
dict
[REQUIRED]
Authentication for the relay destination server—specify the secretARN where the SMTP credentials are stored.
NoAuthentication (dict) --
Keep an empty structure if the relay destination server does not require SMTP credential authentication.
SecretArn (string) --
The ARN of the secret created in secrets manager where the relay server's SMTP credentials are stored.
string
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
This field is autopopulated if not provided.
string
[REQUIRED]
The unique name of the relay resource.
string
[REQUIRED]
The destination relay server address.
integer
[REQUIRED]
The destination relay server port.
list
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
dict
Response Syntax
{ 'RelayId': 'string' }
Response Structure
(dict) --
RelayId (string) --
A unique identifier of the created relay resource.
Delete a traffic policy resource.
See also: AWS API Documentation
Request Syntax
client.delete_traffic_policy( TrafficPolicyId='string' )
string
[REQUIRED]
The identifier of the traffic policy that you want to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Provision a new traffic policy resource.
See also: AWS API Documentation
Request Syntax
client.create_traffic_policy( ClientToken='string', DefaultAction='ALLOW'|'DENY', MaxMessageSizeBytes=123, PolicyStatements=[ { 'Action': 'ALLOW'|'DENY', 'Conditions': [ { 'BooleanExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' } }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SENDER_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'StringExpression': { 'Evaluate': { 'Attribute': 'RECIPIENT' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'TlsExpression': { 'Evaluate': { 'Attribute': 'TLS_PROTOCOL' }, 'Operator': 'MINIMUM_TLS_VERSION'|'IS', 'Value': 'TLS1_2'|'TLS1_3' } }, ] }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ], TrafficPolicyName='string' )
string
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
This field is autopopulated if not provided.
string
[REQUIRED]
Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
integer
The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
list
[REQUIRED]
Conditional statements for filtering email traffic.
(dict) --
The structure containing traffic policy conditions and actions.
Action (string) -- [REQUIRED]
The action that informs a traffic policy resource to either allow or block the email if it matches a condition in the policy statement.
Conditions (list) -- [REQUIRED]
The list of conditions to apply to incoming messages for filtering email traffic.
(dict) --
The email traffic filtering conditions which are contained in a traffic policy resource.
BooleanExpression (dict) --
This represents a boolean type condition matching on the incoming mail. It performs the boolean operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The operand on which to perform a boolean condition operation.
Analysis (dict) --
The structure type for a boolean condition stating the Add On ARN and its returned value.
Analyzer (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) -- [REQUIRED]
The returned value from an Add On.
Operator (string) -- [REQUIRED]
The matching operator for a boolean condition expression.
IpExpression (dict) --
This represents an IP based condition matching on the incoming mail. It performs the operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The left hand side argument of an IP condition expression.
Attribute (string) --
An enum type representing the allowed attribute types for an IP condition.
Operator (string) -- [REQUIRED]
The matching operator for an IP condition expression.
Values (list) -- [REQUIRED]
The right hand side argument of an IP condition expression.
(string) --
StringExpression (dict) --
This represents a string based condition matching on the incoming mail. It performs the string operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The left hand side argument of a string condition expression.
Attribute (string) --
The enum type representing the allowed attribute types for a string condition.
Operator (string) -- [REQUIRED]
The matching operator for a string condition expression.
Values (list) -- [REQUIRED]
The right hand side argument of a string condition expression.
(string) --
TlsExpression (dict) --
This represents a TLS based condition matching on the incoming mail. It performs the operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The left hand side argument of a TLS condition expression.
Attribute (string) --
The enum type representing the allowed attribute types for the TLS condition.
Operator (string) -- [REQUIRED]
The matching operator for a TLS condition expression.
Value (string) -- [REQUIRED]
The right hand side argument of a TLS condition expression.
list
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
string
[REQUIRED]
A user-friendly name for the traffic policy resource.
dict
Response Syntax
{ 'TrafficPolicyId': 'string' }
Response Structure
(dict) --
TrafficPolicyId (string) --
The identifier of the traffic policy resource.
Initiates deletion of an email archive. This changes the archive state to pending deletion. In this state, no new emails can be added, and existing archived emails become inaccessible (search, export, download). The archive and all of its contents will be permanently deleted 30 days after entering the pending deletion state, regardless of the configured retention period.
See also: AWS API Documentation
Request Syntax
client.delete_archive( ArchiveId='string' )
string
[REQUIRED]
The identifier of the archive to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
The response indicating if the archive deletion was successfully initiated.
On success, returns an HTTP 200 status code. On failure, returns an error message.
Returns a pre-signed URL that provides temporary download access to the specific email message stored in the archive.
See also: AWS API Documentation
Request Syntax
client.get_archive_message( ArchivedMessageId='string' )
string
[REQUIRED]
The unique identifier of the archived email message.
dict
Response Syntax
{ 'MessageDownloadLink': 'string' }
Response Structure
(dict) --
The response containing details about the requested archived email message.
MessageDownloadLink (string) --
A pre-signed URL to temporarily download the full message content.
List all ingress endpoint resources.
See also: AWS API Documentation
Request Syntax
client.list_ingress_points( NextToken='string', PageSize=123 )
string
If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.
integer
The maximum number of ingress endpoint resources that are returned per call. You can use NextToken to obtain further ingress endpoints.
dict
Response Syntax
{ 'IngressPoints': [ { 'ARecord': 'string', 'IngressPointId': 'string', 'IngressPointName': 'string', 'Status': 'PROVISIONING'|'DEPROVISIONING'|'UPDATING'|'ACTIVE'|'CLOSED'|'FAILED', 'Type': 'OPEN'|'AUTH' }, ], 'NextToken': 'string' }
Response Structure
(dict) --
IngressPoints (list) --
The list of ingress endpoints.
(dict) --
The structure of an ingress endpoint resource.
ARecord (string) --
The DNS A Record that identifies your ingress endpoint. Configure your DNS Mail Exchange (MX) record with this value to route emails to Mail Manager.
IngressPointId (string) --
The identifier of the ingress endpoint resource.
IngressPointName (string) --
A user friendly name for the ingress endpoint resource.
Status (string) --
The status of the ingress endpoint resource.
Type (string) --
The type of ingress endpoint resource.
NextToken (string) --
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
Initiates a search across emails in the specified archive.
See also: AWS API Documentation
Request Syntax
client.start_archive_search( ArchiveId='string', Filters={ 'Include': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ], 'Unless': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ] }, FromTimestamp=datetime(2015, 1, 1), MaxResults=123, ToTimestamp=datetime(2015, 1, 1) )
string
[REQUIRED]
The identifier of the archive to search emails in.
dict
Criteria to filter which emails are included in the search results.
Include (list) --
The filter conditions for emails to include.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The operator to use when evaluating the string values.
Values (list) -- [REQUIRED]
The list of string values to evaluate the email attribute against.
(string) --
Unless (list) --
The filter conditions for emails to exclude.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The operator to use when evaluating the string values.
Values (list) -- [REQUIRED]
The list of string values to evaluate the email attribute against.
(string) --
datetime
[REQUIRED]
The start timestamp of the range to search emails from.
integer
[REQUIRED]
The maximum number of search results to return.
datetime
[REQUIRED]
The end timestamp of the range to search emails from.
dict
Response Syntax
{ 'SearchId': 'string' }
Response Structure
(dict) --
The response from initiating an archive search.
SearchId (string) --
The unique identifier for the initiated search job.
Creates an Add On instance for the subscription indicated in the request. The resulting Amazon Resource Name (ARN) can be used in a conditional statement for a rule set or traffic policy.
See also: AWS API Documentation
Request Syntax
client.create_addon_instance( AddonSubscriptionId='string', ClientToken='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The unique ID of a previously created subscription that an Add On instance is created for. You can only have one instance per subscription.
string
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
This field is autopopulated if not provided.
list
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
dict
Response Syntax
{ 'AddonInstanceId': 'string' }
Response Structure
(dict) --
AddonInstanceId (string) --
The unique ID of the Add On instance created by this API.
Creates a new email archive resource for storing and retaining emails.
See also: AWS API Documentation
Request Syntax
client.create_archive( ArchiveName='string', ClientToken='string', KmsKeyArn='string', Retention={ 'RetentionPeriod': 'THREE_MONTHS'|'SIX_MONTHS'|'NINE_MONTHS'|'ONE_YEAR'|'EIGHTEEN_MONTHS'|'TWO_YEARS'|'THIRTY_MONTHS'|'THREE_YEARS'|'FOUR_YEARS'|'FIVE_YEARS'|'SIX_YEARS'|'SEVEN_YEARS'|'EIGHT_YEARS'|'NINE_YEARS'|'TEN_YEARS'|'PERMANENT' }, Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
A unique name for the new archive.
string
A unique token Amazon SES uses to recognize retries of this request.
This field is autopopulated if not provided.
string
The Amazon Resource Name (ARN) of the KMS key for encrypting emails in the archive.
dict
The period for retaining emails in the archive before automatic deletion.
RetentionPeriod (string) --
The enum value sets the period for retaining emails in an archive.
list
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
dict
Response Syntax
{ 'ArchiveId': 'string' }
Response Structure
(dict) --
The response from creating a new email archive.
ArchiveId (string) --
The unique identifier for the newly created archive.
Delete an ingress endpoint resource.
See also: AWS API Documentation
Request Syntax
client.delete_ingress_point( IngressPointId='string' )
string
[REQUIRED]
The identifier of the ingress endpoint resource that you want to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Provision a new rule set.
See also: AWS API Documentation
Request Syntax
client.create_rule_set( ClientToken='string', RuleSetName='string', Rules=[ { 'Actions': [ { 'AddHeader': { 'HeaderName': 'string', 'HeaderValue': 'string' }, 'Archive': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'TargetArchive': 'string' }, 'DeliverToMailbox': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'MailboxArn': 'string', 'RoleArn': 'string' }, 'Drop': {} , 'Relay': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'MailFrom': 'REPLACE'|'PRESERVE', 'Relay': 'string' }, 'ReplaceRecipient': { 'ReplaceWith': [ 'string', ] }, 'Send': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'RoleArn': 'string' }, 'WriteToS3': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'RoleArn': 'string', 'S3Bucket': 'string', 'S3Prefix': 'string', 'S3SseKmsKeyId': 'string' } }, ], 'Conditions': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'READ_RECEIPT_REQUESTED'|'TLS'|'TLS_WRAPPED' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'DmarcExpression': { 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'NONE'|'QUARANTINE'|'REJECT', ] }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SOURCE_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'NumberExpression': { 'Evaluate': { 'Attribute': 'MESSAGE_SIZE' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'LESS_THAN'|'GREATER_THAN'|'LESS_THAN_OR_EQUAL'|'GREATER_THAN_OR_EQUAL', 'Value': 123.0 }, 'StringExpression': { 'Evaluate': { 'Attribute': 'MAIL_FROM'|'HELO'|'RECIPIENT'|'SENDER'|'FROM'|'SUBJECT'|'TO'|'CC' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'VerdictExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' }, 'Attribute': 'SPF'|'DKIM' }, 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'PASS'|'FAIL'|'GRAY'|'PROCESSING_FAILED', ] } }, ], 'Name': 'string', 'Unless': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'READ_RECEIPT_REQUESTED'|'TLS'|'TLS_WRAPPED' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'DmarcExpression': { 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'NONE'|'QUARANTINE'|'REJECT', ] }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SOURCE_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'NumberExpression': { 'Evaluate': { 'Attribute': 'MESSAGE_SIZE' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'LESS_THAN'|'GREATER_THAN'|'LESS_THAN_OR_EQUAL'|'GREATER_THAN_OR_EQUAL', 'Value': 123.0 }, 'StringExpression': { 'Evaluate': { 'Attribute': 'MAIL_FROM'|'HELO'|'RECIPIENT'|'SENDER'|'FROM'|'SUBJECT'|'TO'|'CC' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'VerdictExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' }, 'Attribute': 'SPF'|'DKIM' }, 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'PASS'|'FAIL'|'GRAY'|'PROCESSING_FAILED', ] } }, ] }, ], Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
This field is autopopulated if not provided.
string
[REQUIRED]
A user-friendly name for the rule set.
list
[REQUIRED]
Conditional rules that are evaluated for determining actions on email.
(dict) --
A rule contains conditions, "unless conditions" and actions. For each envelope recipient of an email, if all conditions match and none of the "unless conditions" match, then all of the actions are executed sequentially. If no conditions are provided, the rule always applies and the actions are implicitly executed. If only "unless conditions" are provided, the rule applies if the email does not match the evaluation of the "unless conditions".
Actions (list) -- [REQUIRED]
The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
(dict) --
The action for a rule to take. Only one of the contained actions can be set.
AddHeader (dict) --
This action adds a header. This can be used to add arbitrary email headers.
HeaderName (string) -- [REQUIRED]
The name of the header to add to an email. The header must be prefixed with "X-". Headers are added regardless of whether the header name pre-existed in the email.
HeaderValue (string) -- [REQUIRED]
The value of the header to add to the email.
Archive (dict) --
This action archives the email. This can be used to deliver an email to an archive.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified archive has been deleted.
TargetArchive (string) -- [REQUIRED]
The identifier of the archive to send the email to.
DeliverToMailbox (dict) --
This action delivers an email to a WorkMail mailbox.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the mailbox ARN is no longer valid.
MailboxArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of a WorkMail organization to deliver the email to.
RoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an IAM role to use to execute this action. The role must have access to the workmail:DeliverToMailbox API.
Drop (dict) --
This action terminates the evaluation of rules in the rule set.
Relay (dict) --
This action relays the email to another SMTP server.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified relay has been deleted.
MailFrom (string) --
This action specifies whether to preserve or replace original mail from address while relaying received emails to a destination server.
Relay (string) -- [REQUIRED]
The identifier of the relay resource to be used when relaying an email.
ReplaceRecipient (dict) --
The action replaces certain or all recipients with a different set of recipients.
ReplaceWith (list) --
This action specifies the replacement recipient email addresses to insert.
(string) --
Send (dict) --
This action sends the email to the internet.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the caller does not have the permissions to call the sendRawEmail API.
RoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the role to use for this action. This role must have access to the ses:SendRawEmail API.
WriteToS3 (dict) --
This action writes the MIME content of the email to an S3 bucket.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified the bucket has been deleted.
RoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket.
S3Bucket (string) -- [REQUIRED]
The bucket name of the S3 bucket to write to.
S3Prefix (string) --
The S3 prefix to use for the write to the s3 bucket.
S3SseKmsKeyId (string) --
The KMS Key ID to use to encrypt the message in S3.
Conditions (list) --
The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
(dict) --
The conditional expression used to evaluate an email for determining if a rule action should be taken.
BooleanExpression (dict) --
The condition applies to a boolean expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The operand on which to perform a boolean condition operation.
Attribute (string) --
The boolean type representing the allowed attribute types for an email.
Operator (string) -- [REQUIRED]
The matching operator for a boolean condition expression.
DmarcExpression (dict) --
The condition applies to a DMARC policy expression passed in this field.
Operator (string) -- [REQUIRED]
The operator to apply to the DMARC policy of the incoming email.
Values (list) -- [REQUIRED]
The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.
(string) --
IpExpression (dict) --
The condition applies to an IP address expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The IP address to evaluate in this condition.
Attribute (string) --
The attribute of the email to evaluate.
Operator (string) -- [REQUIRED]
The operator to evaluate the IP address.
Values (list) -- [REQUIRED]
The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.
(string) --
NumberExpression (dict) --
The condition applies to a number expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The number to evaluate in a numeric condition expression.
Attribute (string) --
An email attribute that is used as the number to evaluate.
Operator (string) -- [REQUIRED]
The operator for a numeric condition expression.
Value (float) -- [REQUIRED]
The value to evaluate in a numeric condition expression.
StringExpression (dict) --
The condition applies to a string expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The string to evaluate in a string condition expression.
Attribute (string) --
The email attribute to evaluate in a string condition expression.
Operator (string) -- [REQUIRED]
The matching operator for a string condition expression.
Values (list) -- [REQUIRED]
The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.
(string) --
VerdictExpression (dict) --
The condition applies to a verdict expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The verdict to evaluate in a verdict condition expression.
Analysis (dict) --
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) -- [REQUIRED]
The returned value from an Add On.
Attribute (string) --
The email verdict attribute to evaluate in a string verdict expression.
Operator (string) -- [REQUIRED]
The matching operator for a verdict condition expression.
Values (list) -- [REQUIRED]
The values to match with the email's verdict using the given operator. For the EQUALS operator, if multiple values are given, the condition is deemed to match if any of the given verdicts match that of the email. For the NOT_EQUALS operator, if multiple values are given, the condition is deemed to match of none of the given verdicts match the verdict of the email.
(string) --
Name (string) --
The user-friendly name of the rule.
Unless (list) --
The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.
(dict) --
The conditional expression used to evaluate an email for determining if a rule action should be taken.
BooleanExpression (dict) --
The condition applies to a boolean expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The operand on which to perform a boolean condition operation.
Attribute (string) --
The boolean type representing the allowed attribute types for an email.
Operator (string) -- [REQUIRED]
The matching operator for a boolean condition expression.
DmarcExpression (dict) --
The condition applies to a DMARC policy expression passed in this field.
Operator (string) -- [REQUIRED]
The operator to apply to the DMARC policy of the incoming email.
Values (list) -- [REQUIRED]
The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.
(string) --
IpExpression (dict) --
The condition applies to an IP address expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The IP address to evaluate in this condition.
Attribute (string) --
The attribute of the email to evaluate.
Operator (string) -- [REQUIRED]
The operator to evaluate the IP address.
Values (list) -- [REQUIRED]
The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.
(string) --
NumberExpression (dict) --
The condition applies to a number expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The number to evaluate in a numeric condition expression.
Attribute (string) --
An email attribute that is used as the number to evaluate.
Operator (string) -- [REQUIRED]
The operator for a numeric condition expression.
Value (float) -- [REQUIRED]
The value to evaluate in a numeric condition expression.
StringExpression (dict) --
The condition applies to a string expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The string to evaluate in a string condition expression.
Attribute (string) --
The email attribute to evaluate in a string condition expression.
Operator (string) -- [REQUIRED]
The matching operator for a string condition expression.
Values (list) -- [REQUIRED]
The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.
(string) --
VerdictExpression (dict) --
The condition applies to a verdict expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The verdict to evaluate in a verdict condition expression.
Analysis (dict) --
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) -- [REQUIRED]
The returned value from an Add On.
Attribute (string) --
The email verdict attribute to evaluate in a string verdict expression.
Operator (string) -- [REQUIRED]
The matching operator for a verdict condition expression.
Values (list) -- [REQUIRED]
The values to match with the email's verdict using the given operator. For the EQUALS operator, if multiple values are given, the condition is deemed to match if any of the given verdicts match that of the email. For the NOT_EQUALS operator, if multiple values are given, the condition is deemed to match of none of the given verdicts match the verdict of the email.
(string) --
list
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
dict
Response Syntax
{ 'RuleSetId': 'string' }
Response Structure
(dict) --
RuleSetId (string) --
The identifier of the created rule set.
Lists all the existing relay resources.
See also: AWS API Documentation
Request Syntax
client.list_relays( NextToken='string', PageSize=123 )
string
If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.
integer
The number of relays to be returned in one request.
dict
Response Syntax
{ 'NextToken': 'string', 'Relays': [ { 'LastModifiedTimestamp': datetime(2015, 1, 1), 'RelayId': 'string', 'RelayName': 'string' }, ] }
Response Structure
(dict) --
NextToken (string) --
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
Relays (list) --
The list of returned relays.
(dict) --
The relay resource that can be used as a rule to relay receiving emails to the destination relay server.
LastModifiedTimestamp (datetime) --
The timestamp of when the relay was last modified.
RelayId (string) --
The unique relay identifier.
RelayName (string) --
The unique relay name.
Retrieves the details and current status of a specific email archive search job.
See also: AWS API Documentation
Request Syntax
client.get_archive_search( SearchId='string' )
string
[REQUIRED]
The identifier of the search job to get details for.
dict
Response Syntax
{ 'ArchiveId': 'string', 'Filters': { 'Include': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ], 'Unless': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ] }, 'FromTimestamp': datetime(2015, 1, 1), 'MaxResults': 123, 'Status': { 'CompletionTimestamp': datetime(2015, 1, 1), 'ErrorMessage': 'string', 'State': 'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED', 'SubmissionTimestamp': datetime(2015, 1, 1) }, 'ToTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
The response containing details of the specified archive search job.
ArchiveId (string) --
The identifier of the archive the email search was performed in.
Filters (dict) --
The criteria used to filter emails included in the search.
Include (list) --
The filter conditions for emails to include.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) --
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) --
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The operator to use when evaluating the string values.
Values (list) --
The list of string values to evaluate the email attribute against.
(string) --
Unless (list) --
The filter conditions for emails to exclude.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) --
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) --
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) --
The operator to use when evaluating the string values.
Values (list) --
The list of string values to evaluate the email attribute against.
(string) --
FromTimestamp (datetime) --
The start timestamp of the range the searched emails cover.
MaxResults (integer) --
The maximum number of search results to return.
Status (dict) --
The current status of the search job.
CompletionTimestamp (datetime) --
The timestamp of when the search completed (if finished).
ErrorMessage (string) --
An error message if the search failed.
State (string) --
The current state of the search job.
SubmissionTimestamp (datetime) --
The timestamp of when the search was submitted.
ToTimestamp (datetime) --
The end timestamp of the range the searched emails cover.
Update attributes of a provisioned ingress endpoint resource.
See also: AWS API Documentation
Request Syntax
client.update_ingress_point( IngressPointConfiguration={ 'SecretArn': 'string', 'SmtpPassword': 'string' }, IngressPointId='string', IngressPointName='string', RuleSetId='string', StatusToUpdate='ACTIVE'|'CLOSED', TrafficPolicyId='string' )
dict
If you choose an Authenticated ingress endpoint, you must configure either an SMTP password or a secret ARN.
SecretArn (string) --
The SecretsManager::Secret ARN of the ingress endpoint resource.
SmtpPassword (string) --
The password of the ingress endpoint resource.
string
[REQUIRED]
The identifier for the ingress endpoint you want to update.
string
A user friendly name for the ingress endpoint resource.
string
The identifier of an existing rule set that you attach to an ingress endpoint resource.
string
The update status of an ingress endpoint.
string
The identifier of an existing traffic policy that you attach to an ingress endpoint resource.
dict
Response Syntax
{}
Response Structure
(dict) --
>Update attributes of an already provisioned rule set.
See also: AWS API Documentation
Request Syntax
client.update_rule_set( RuleSetId='string', RuleSetName='string', Rules=[ { 'Actions': [ { 'AddHeader': { 'HeaderName': 'string', 'HeaderValue': 'string' }, 'Archive': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'TargetArchive': 'string' }, 'DeliverToMailbox': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'MailboxArn': 'string', 'RoleArn': 'string' }, 'Drop': {} , 'Relay': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'MailFrom': 'REPLACE'|'PRESERVE', 'Relay': 'string' }, 'ReplaceRecipient': { 'ReplaceWith': [ 'string', ] }, 'Send': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'RoleArn': 'string' }, 'WriteToS3': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'RoleArn': 'string', 'S3Bucket': 'string', 'S3Prefix': 'string', 'S3SseKmsKeyId': 'string' } }, ], 'Conditions': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'READ_RECEIPT_REQUESTED'|'TLS'|'TLS_WRAPPED' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'DmarcExpression': { 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'NONE'|'QUARANTINE'|'REJECT', ] }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SOURCE_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'NumberExpression': { 'Evaluate': { 'Attribute': 'MESSAGE_SIZE' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'LESS_THAN'|'GREATER_THAN'|'LESS_THAN_OR_EQUAL'|'GREATER_THAN_OR_EQUAL', 'Value': 123.0 }, 'StringExpression': { 'Evaluate': { 'Attribute': 'MAIL_FROM'|'HELO'|'RECIPIENT'|'SENDER'|'FROM'|'SUBJECT'|'TO'|'CC' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'VerdictExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' }, 'Attribute': 'SPF'|'DKIM' }, 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'PASS'|'FAIL'|'GRAY'|'PROCESSING_FAILED', ] } }, ], 'Name': 'string', 'Unless': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'READ_RECEIPT_REQUESTED'|'TLS'|'TLS_WRAPPED' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'DmarcExpression': { 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'NONE'|'QUARANTINE'|'REJECT', ] }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SOURCE_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'NumberExpression': { 'Evaluate': { 'Attribute': 'MESSAGE_SIZE' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'LESS_THAN'|'GREATER_THAN'|'LESS_THAN_OR_EQUAL'|'GREATER_THAN_OR_EQUAL', 'Value': 123.0 }, 'StringExpression': { 'Evaluate': { 'Attribute': 'MAIL_FROM'|'HELO'|'RECIPIENT'|'SENDER'|'FROM'|'SUBJECT'|'TO'|'CC' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'VerdictExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' }, 'Attribute': 'SPF'|'DKIM' }, 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'PASS'|'FAIL'|'GRAY'|'PROCESSING_FAILED', ] } }, ] }, ] )
string
[REQUIRED]
The identifier of a rule set you want to update.
string
A user-friendly name for the rule set resource.
list
A new set of rules to replace the current rules of the rule set—these rules will override all the rules of the rule set.
(dict) --
A rule contains conditions, "unless conditions" and actions. For each envelope recipient of an email, if all conditions match and none of the "unless conditions" match, then all of the actions are executed sequentially. If no conditions are provided, the rule always applies and the actions are implicitly executed. If only "unless conditions" are provided, the rule applies if the email does not match the evaluation of the "unless conditions".
Actions (list) -- [REQUIRED]
The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
(dict) --
The action for a rule to take. Only one of the contained actions can be set.
AddHeader (dict) --
This action adds a header. This can be used to add arbitrary email headers.
HeaderName (string) -- [REQUIRED]
The name of the header to add to an email. The header must be prefixed with "X-". Headers are added regardless of whether the header name pre-existed in the email.
HeaderValue (string) -- [REQUIRED]
The value of the header to add to the email.
Archive (dict) --
This action archives the email. This can be used to deliver an email to an archive.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified archive has been deleted.
TargetArchive (string) -- [REQUIRED]
The identifier of the archive to send the email to.
DeliverToMailbox (dict) --
This action delivers an email to a WorkMail mailbox.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the mailbox ARN is no longer valid.
MailboxArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of a WorkMail organization to deliver the email to.
RoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an IAM role to use to execute this action. The role must have access to the workmail:DeliverToMailbox API.
Drop (dict) --
This action terminates the evaluation of rules in the rule set.
Relay (dict) --
This action relays the email to another SMTP server.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified relay has been deleted.
MailFrom (string) --
This action specifies whether to preserve or replace original mail from address while relaying received emails to a destination server.
Relay (string) -- [REQUIRED]
The identifier of the relay resource to be used when relaying an email.
ReplaceRecipient (dict) --
The action replaces certain or all recipients with a different set of recipients.
ReplaceWith (list) --
This action specifies the replacement recipient email addresses to insert.
(string) --
Send (dict) --
This action sends the email to the internet.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the caller does not have the permissions to call the sendRawEmail API.
RoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the role to use for this action. This role must have access to the ses:SendRawEmail API.
WriteToS3 (dict) --
This action writes the MIME content of the email to an S3 bucket.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified the bucket has been deleted.
RoleArn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket.
S3Bucket (string) -- [REQUIRED]
The bucket name of the S3 bucket to write to.
S3Prefix (string) --
The S3 prefix to use for the write to the s3 bucket.
S3SseKmsKeyId (string) --
The KMS Key ID to use to encrypt the message in S3.
Conditions (list) --
The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
(dict) --
The conditional expression used to evaluate an email for determining if a rule action should be taken.
BooleanExpression (dict) --
The condition applies to a boolean expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The operand on which to perform a boolean condition operation.
Attribute (string) --
The boolean type representing the allowed attribute types for an email.
Operator (string) -- [REQUIRED]
The matching operator for a boolean condition expression.
DmarcExpression (dict) --
The condition applies to a DMARC policy expression passed in this field.
Operator (string) -- [REQUIRED]
The operator to apply to the DMARC policy of the incoming email.
Values (list) -- [REQUIRED]
The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.
(string) --
IpExpression (dict) --
The condition applies to an IP address expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The IP address to evaluate in this condition.
Attribute (string) --
The attribute of the email to evaluate.
Operator (string) -- [REQUIRED]
The operator to evaluate the IP address.
Values (list) -- [REQUIRED]
The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.
(string) --
NumberExpression (dict) --
The condition applies to a number expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The number to evaluate in a numeric condition expression.
Attribute (string) --
An email attribute that is used as the number to evaluate.
Operator (string) -- [REQUIRED]
The operator for a numeric condition expression.
Value (float) -- [REQUIRED]
The value to evaluate in a numeric condition expression.
StringExpression (dict) --
The condition applies to a string expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The string to evaluate in a string condition expression.
Attribute (string) --
The email attribute to evaluate in a string condition expression.
Operator (string) -- [REQUIRED]
The matching operator for a string condition expression.
Values (list) -- [REQUIRED]
The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.
(string) --
VerdictExpression (dict) --
The condition applies to a verdict expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The verdict to evaluate in a verdict condition expression.
Analysis (dict) --
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) -- [REQUIRED]
The returned value from an Add On.
Attribute (string) --
The email verdict attribute to evaluate in a string verdict expression.
Operator (string) -- [REQUIRED]
The matching operator for a verdict condition expression.
Values (list) -- [REQUIRED]
The values to match with the email's verdict using the given operator. For the EQUALS operator, if multiple values are given, the condition is deemed to match if any of the given verdicts match that of the email. For the NOT_EQUALS operator, if multiple values are given, the condition is deemed to match of none of the given verdicts match the verdict of the email.
(string) --
Name (string) --
The user-friendly name of the rule.
Unless (list) --
The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.
(dict) --
The conditional expression used to evaluate an email for determining if a rule action should be taken.
BooleanExpression (dict) --
The condition applies to a boolean expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The operand on which to perform a boolean condition operation.
Attribute (string) --
The boolean type representing the allowed attribute types for an email.
Operator (string) -- [REQUIRED]
The matching operator for a boolean condition expression.
DmarcExpression (dict) --
The condition applies to a DMARC policy expression passed in this field.
Operator (string) -- [REQUIRED]
The operator to apply to the DMARC policy of the incoming email.
Values (list) -- [REQUIRED]
The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.
(string) --
IpExpression (dict) --
The condition applies to an IP address expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The IP address to evaluate in this condition.
Attribute (string) --
The attribute of the email to evaluate.
Operator (string) -- [REQUIRED]
The operator to evaluate the IP address.
Values (list) -- [REQUIRED]
The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.
(string) --
NumberExpression (dict) --
The condition applies to a number expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The number to evaluate in a numeric condition expression.
Attribute (string) --
An email attribute that is used as the number to evaluate.
Operator (string) -- [REQUIRED]
The operator for a numeric condition expression.
Value (float) -- [REQUIRED]
The value to evaluate in a numeric condition expression.
StringExpression (dict) --
The condition applies to a string expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The string to evaluate in a string condition expression.
Attribute (string) --
The email attribute to evaluate in a string condition expression.
Operator (string) -- [REQUIRED]
The matching operator for a string condition expression.
Values (list) -- [REQUIRED]
The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.
(string) --
VerdictExpression (dict) --
The condition applies to a verdict expression passed in this field.
Evaluate (dict) -- [REQUIRED]
The verdict to evaluate in a verdict condition expression.
Analysis (dict) --
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) -- [REQUIRED]
The returned value from an Add On.
Attribute (string) --
The email verdict attribute to evaluate in a string verdict expression.
Operator (string) -- [REQUIRED]
The matching operator for a verdict condition expression.
Values (list) -- [REQUIRED]
The values to match with the email's verdict using the given operator. For the EQUALS operator, if multiple values are given, the condition is deemed to match if any of the given verdicts match that of the email. For the NOT_EQUALS operator, if multiple values are given, the condition is deemed to match of none of the given verdicts match the verdict of the email.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Adds one or more tags (keys and values) to a specified resource.
See also: AWS API Documentation
Request Syntax
client.tag_resource( ResourceArn='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to tag.
list
[REQUIRED]
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes an existing relay resource.
See also: AWS API Documentation
Request Syntax
client.delete_relay( RelayId='string' )
string
[REQUIRED]
The unique relay identifier.
dict
Response Syntax
{}
Response Structure
(dict) --
Returns a list of email archive export jobs.
See also: AWS API Documentation
Request Syntax
client.list_archive_exports( ArchiveId='string', NextToken='string', PageSize=123 )
string
[REQUIRED]
The identifier of the archive.
string
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
integer
The maximum number of archive export jobs that are returned per call. You can use NextToken to obtain further pages of archives.
dict
Response Syntax
{ 'Exports': [ { 'ExportId': 'string', 'Status': { 'CompletionTimestamp': datetime(2015, 1, 1), 'ErrorMessage': 'string', 'State': 'QUEUED'|'PREPROCESSING'|'PROCESSING'|'COMPLETED'|'FAILED'|'CANCELLED', 'SubmissionTimestamp': datetime(2015, 1, 1) } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
The response containing a list of archive export jobs and their statuses.
Exports (list) --
The list of export job identifiers and statuses.
(dict) --
Summary statuses of an archive export job.
ExportId (string) --
The unique identifier of the export job.
Status (dict) --
The current status of the export job.
CompletionTimestamp (datetime) --
The timestamp of when the export job completed (if finished).
ErrorMessage (string) --
An error message if the export job failed.
State (string) --
The current state of the export job.
SubmissionTimestamp (datetime) --
The timestamp of when the export job was submitted.
NextToken (string) --
If present, use to retrieve the next page of results.
Gets detailed information about an Add On subscription.
See also: AWS API Documentation
Request Syntax
client.get_addon_subscription( AddonSubscriptionId='string' )
string
[REQUIRED]
The Add On subscription ID to retrieve information for.
dict
Response Syntax
{ 'AddonName': 'string', 'AddonSubscriptionArn': 'string', 'CreatedTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
AddonName (string) --
The name of the Add On for the subscription.
AddonSubscriptionArn (string) --
Amazon Resource Name (ARN) for the subscription.
CreatedTimestamp (datetime) --
The timestamp of when the Add On subscription was created.
Returns a list of email archive search jobs.
See also: AWS API Documentation
Request Syntax
client.list_archive_searches( ArchiveId='string', NextToken='string', PageSize=123 )
string
[REQUIRED]
The identifier of the archive.
string
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
integer
The maximum number of archive search jobs that are returned per call. You can use NextToken to obtain further pages of archives.
dict
Response Syntax
{ 'NextToken': 'string', 'Searches': [ { 'SearchId': 'string', 'Status': { 'CompletionTimestamp': datetime(2015, 1, 1), 'ErrorMessage': 'string', 'State': 'QUEUED'|'RUNNING'|'COMPLETED'|'FAILED'|'CANCELLED', 'SubmissionTimestamp': datetime(2015, 1, 1) } }, ] }
Response Structure
(dict) --
The response containing a list of archive search jobs and their statuses.
NextToken (string) --
If present, use to retrieve the next page of results.
Searches (list) --
The list of search job identifiers and statuses.
(dict) --
Summary details of an archive search job.
SearchId (string) --
The unique identifier of the search job.
Status (dict) --
The current status of the search job.
CompletionTimestamp (datetime) --
The timestamp of when the search completed (if finished).
ErrorMessage (string) --
An error message if the search failed.
State (string) --
The current state of the search job.
SubmissionTimestamp (datetime) --
The timestamp of when the search was submitted.
Provision a new ingress endpoint resource.
See also: AWS API Documentation
Request Syntax
client.create_ingress_point( ClientToken='string', IngressPointConfiguration={ 'SecretArn': 'string', 'SmtpPassword': 'string' }, IngressPointName='string', RuleSetId='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], TrafficPolicyId='string', Type='OPEN'|'AUTH' )
string
A unique token that Amazon SES uses to recognize subsequent retries of the same request.
This field is autopopulated if not provided.
dict
If you choose an Authenticated ingress endpoint, you must configure either an SMTP password or a secret ARN.
SecretArn (string) --
The SecretsManager::Secret ARN of the ingress endpoint resource.
SmtpPassword (string) --
The password of the ingress endpoint resource.
string
[REQUIRED]
A user friendly name for an ingress endpoint resource.
string
[REQUIRED]
The identifier of an existing rule set that you attach to an ingress endpoint resource.
list
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) -- [REQUIRED]
The key of the key-value tag.
Value (string) -- [REQUIRED]
The value of the key-value tag.
string
[REQUIRED]
The identifier of an existing traffic policy that you attach to an ingress endpoint resource.
string
[REQUIRED]
The type of the ingress endpoint to create.
dict
Response Syntax
{ 'IngressPointId': 'string' }
Response Structure
(dict) --
IngressPointId (string) --
The unique identifier for a previously created ingress endpoint.
Retrieves the list of tags (keys and values) assigned to the resource.
See also: AWS API Documentation
Request Syntax
client.list_tags_for_resource( ResourceArn='string' )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the resource to retrieve tags from.
dict
Response Syntax
{ 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] }
Response Structure
(dict) --
Tags (list) --
The tags used to organize, track, or control access for the resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.
(dict) --
A key-value pair (the value is optional), that you can define and assign to Amazon Web Services resources.
Key (string) --
The key of the key-value tag.
Value (string) --
The value of the key-value tag.
Updates the attributes of an existing email archive.
See also: AWS API Documentation
Request Syntax
client.update_archive( ArchiveId='string', ArchiveName='string', Retention={ 'RetentionPeriod': 'THREE_MONTHS'|'SIX_MONTHS'|'NINE_MONTHS'|'ONE_YEAR'|'EIGHTEEN_MONTHS'|'TWO_YEARS'|'THIRTY_MONTHS'|'THREE_YEARS'|'FOUR_YEARS'|'FIVE_YEARS'|'SIX_YEARS'|'SEVEN_YEARS'|'EIGHT_YEARS'|'NINE_YEARS'|'TEN_YEARS'|'PERMANENT' } )
string
[REQUIRED]
The identifier of the archive to update.
string
A new, unique name for the archive.
dict
A new retention period for emails in the archive.
RetentionPeriod (string) --
The enum value sets the period for retaining emails in an archive.
dict
Response Syntax
{}
Response Structure
(dict) --
The response indicating if the archive update succeeded or failed.
On success, returns an HTTP 200 status code. On failure, returns an error message.
Retrieves the full details and current state of a specified email archive.
See also: AWS API Documentation
Request Syntax
client.get_archive( ArchiveId='string' )
string
[REQUIRED]
The identifier of the archive to retrieve.
dict
Response Syntax
{ 'ArchiveArn': 'string', 'ArchiveId': 'string', 'ArchiveName': 'string', 'ArchiveState': 'ACTIVE'|'PENDING_DELETION', 'CreatedTimestamp': datetime(2015, 1, 1), 'KmsKeyArn': 'string', 'LastUpdatedTimestamp': datetime(2015, 1, 1), 'Retention': { 'RetentionPeriod': 'THREE_MONTHS'|'SIX_MONTHS'|'NINE_MONTHS'|'ONE_YEAR'|'EIGHTEEN_MONTHS'|'TWO_YEARS'|'THIRTY_MONTHS'|'THREE_YEARS'|'FOUR_YEARS'|'FIVE_YEARS'|'SIX_YEARS'|'SEVEN_YEARS'|'EIGHT_YEARS'|'NINE_YEARS'|'TEN_YEARS'|'PERMANENT' } }
Response Structure
(dict) --
The response containing details of the requested archive.
ArchiveArn (string) --
The Amazon Resource Name (ARN) of the archive.
ArchiveId (string) --
The unique identifier of the archive.
ArchiveName (string) --
The unique name assigned to the archive.
ArchiveState (string) --
The current state of the archive:
ACTIVE – The archive is ready and available for use.
PENDING_DELETION – The archive has been marked for deletion and will be permanently deleted in 30 days. No further modifications can be made in this state.
CreatedTimestamp (datetime) --
The timestamp of when the archive was created.
KmsKeyArn (string) --
The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
LastUpdatedTimestamp (datetime) --
The timestamp of when the archive was modified.
Retention (dict) --
The retention period for emails in this archive.
RetentionPeriod (string) --
The enum value sets the period for retaining emails in an archive.
List traffic policy resources.
See also: AWS API Documentation
Request Syntax
client.list_traffic_policies( NextToken='string', PageSize=123 )
string
If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.
integer
The maximum number of traffic policy resources that are returned per call. You can use NextToken to obtain further traffic policies.
dict
Response Syntax
{ 'NextToken': 'string', 'TrafficPolicies': [ { 'DefaultAction': 'ALLOW'|'DENY', 'TrafficPolicyId': 'string', 'TrafficPolicyName': 'string' }, ] }
Response Structure
(dict) --
NextToken (string) --
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
TrafficPolicies (list) --
The list of traffic policies.
(dict) --
The structure of a traffic policy resource which is a container for policy statements.
DefaultAction (string) --
Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
TrafficPolicyId (string) --
The identifier of the traffic policy resource.
TrafficPolicyName (string) --
A user-friendly name of the traffic policy resource.
Initiates an export of emails from the specified archive.
See also: AWS API Documentation
Request Syntax
client.start_archive_export( ArchiveId='string', ExportDestinationConfiguration={ 'S3': { 'S3Location': 'string' } }, Filters={ 'Include': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ], 'Unless': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] } }, ] }, FromTimestamp=datetime(2015, 1, 1), MaxResults=123, ToTimestamp=datetime(2015, 1, 1) )
string
[REQUIRED]
The identifier of the archive to export emails from.
dict
[REQUIRED]
Details on where to deliver the exported email data.
S3 (dict) --
Configuration for delivering to an Amazon S3 bucket.
S3Location (string) --
The S3 location to deliver the exported email data.
dict
Criteria to filter which emails are included in the export.
Include (list) --
The filter conditions for emails to include.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The operator to use when evaluating the string values.
Values (list) -- [REQUIRED]
The list of string values to evaluate the email attribute against.
(string) --
Unless (list) --
The filter conditions for emails to exclude.
(dict) --
A filter condition used to include or exclude emails when exporting from or searching an archive.
BooleanExpression (dict) --
A boolean expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The email attribute value to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The boolean operator to use for evaluation.
StringExpression (dict) --
A string expression to evaluate against email attributes.
Evaluate (dict) -- [REQUIRED]
The attribute of the email to evaluate.
Attribute (string) --
The name of the email attribute to evaluate.
Operator (string) -- [REQUIRED]
The operator to use when evaluating the string values.
Values (list) -- [REQUIRED]
The list of string values to evaluate the email attribute against.
(string) --
datetime
[REQUIRED]
The start of the timestamp range to include emails from.
integer
The maximum number of email items to include in the export.
datetime
[REQUIRED]
The end of the timestamp range to include emails from.
dict
Response Syntax
{ 'ExportId': 'string' }
Response Structure
(dict) --
The response from initiating an archive export.
ExportId (string) --
The unique identifier for the initiated export job.
Update attributes of an already provisioned traffic policy resource.
See also: AWS API Documentation
Request Syntax
client.update_traffic_policy( DefaultAction='ALLOW'|'DENY', MaxMessageSizeBytes=123, PolicyStatements=[ { 'Action': 'ALLOW'|'DENY', 'Conditions': [ { 'BooleanExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' } }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SENDER_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'StringExpression': { 'Evaluate': { 'Attribute': 'RECIPIENT' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'TlsExpression': { 'Evaluate': { 'Attribute': 'TLS_PROTOCOL' }, 'Operator': 'MINIMUM_TLS_VERSION'|'IS', 'Value': 'TLS1_2'|'TLS1_3' } }, ] }, ], TrafficPolicyId='string', TrafficPolicyName='string' )
string
Default action instructs the traffic policy to either Allow or Deny (block) messages that fall outside of (or not addressed by) the conditions of your policy statements
integer
The maximum message size in bytes of email which is allowed in by this traffic policy—anything larger will be blocked.
list
The list of conditions to be updated for filtering email traffic.
(dict) --
The structure containing traffic policy conditions and actions.
Action (string) -- [REQUIRED]
The action that informs a traffic policy resource to either allow or block the email if it matches a condition in the policy statement.
Conditions (list) -- [REQUIRED]
The list of conditions to apply to incoming messages for filtering email traffic.
(dict) --
The email traffic filtering conditions which are contained in a traffic policy resource.
BooleanExpression (dict) --
This represents a boolean type condition matching on the incoming mail. It performs the boolean operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The operand on which to perform a boolean condition operation.
Analysis (dict) --
The structure type for a boolean condition stating the Add On ARN and its returned value.
Analyzer (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) -- [REQUIRED]
The returned value from an Add On.
Operator (string) -- [REQUIRED]
The matching operator for a boolean condition expression.
IpExpression (dict) --
This represents an IP based condition matching on the incoming mail. It performs the operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The left hand side argument of an IP condition expression.
Attribute (string) --
An enum type representing the allowed attribute types for an IP condition.
Operator (string) -- [REQUIRED]
The matching operator for an IP condition expression.
Values (list) -- [REQUIRED]
The right hand side argument of an IP condition expression.
(string) --
StringExpression (dict) --
This represents a string based condition matching on the incoming mail. It performs the string operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The left hand side argument of a string condition expression.
Attribute (string) --
The enum type representing the allowed attribute types for a string condition.
Operator (string) -- [REQUIRED]
The matching operator for a string condition expression.
Values (list) -- [REQUIRED]
The right hand side argument of a string condition expression.
(string) --
TlsExpression (dict) --
This represents a TLS based condition matching on the incoming mail. It performs the operation configured in 'Operator' and evaluates the 'Protocol' object against the 'Value'.
Evaluate (dict) -- [REQUIRED]
The left hand side argument of a TLS condition expression.
Attribute (string) --
The enum type representing the allowed attribute types for the TLS condition.
Operator (string) -- [REQUIRED]
The matching operator for a TLS condition expression.
Value (string) -- [REQUIRED]
The right hand side argument of a TLS condition expression.
string
[REQUIRED]
The identifier of the traffic policy that you want to update.
string
A user-friendly name for the traffic policy resource.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes an Add On subscription.
See also: AWS API Documentation
Request Syntax
client.delete_addon_subscription( AddonSubscriptionId='string' )
string
[REQUIRED]
The Add On subscription ID to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Fetch attributes of a rule set.
See also: AWS API Documentation
Request Syntax
client.get_rule_set( RuleSetId='string' )
string
[REQUIRED]
The identifier of an existing rule set to be retrieved.
dict
Response Syntax
{ 'CreatedDate': datetime(2015, 1, 1), 'LastModificationDate': datetime(2015, 1, 1), 'RuleSetArn': 'string', 'RuleSetId': 'string', 'RuleSetName': 'string', 'Rules': [ { 'Actions': [ { 'AddHeader': { 'HeaderName': 'string', 'HeaderValue': 'string' }, 'Archive': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'TargetArchive': 'string' }, 'DeliverToMailbox': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'MailboxArn': 'string', 'RoleArn': 'string' }, 'Drop': {}, 'Relay': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'MailFrom': 'REPLACE'|'PRESERVE', 'Relay': 'string' }, 'ReplaceRecipient': { 'ReplaceWith': [ 'string', ] }, 'Send': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'RoleArn': 'string' }, 'WriteToS3': { 'ActionFailurePolicy': 'CONTINUE'|'DROP', 'RoleArn': 'string', 'S3Bucket': 'string', 'S3Prefix': 'string', 'S3SseKmsKeyId': 'string' } }, ], 'Conditions': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'READ_RECEIPT_REQUESTED'|'TLS'|'TLS_WRAPPED' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'DmarcExpression': { 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'NONE'|'QUARANTINE'|'REJECT', ] }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SOURCE_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'NumberExpression': { 'Evaluate': { 'Attribute': 'MESSAGE_SIZE' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'LESS_THAN'|'GREATER_THAN'|'LESS_THAN_OR_EQUAL'|'GREATER_THAN_OR_EQUAL', 'Value': 123.0 }, 'StringExpression': { 'Evaluate': { 'Attribute': 'MAIL_FROM'|'HELO'|'RECIPIENT'|'SENDER'|'FROM'|'SUBJECT'|'TO'|'CC' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'VerdictExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' }, 'Attribute': 'SPF'|'DKIM' }, 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'PASS'|'FAIL'|'GRAY'|'PROCESSING_FAILED', ] } }, ], 'Name': 'string', 'Unless': [ { 'BooleanExpression': { 'Evaluate': { 'Attribute': 'READ_RECEIPT_REQUESTED'|'TLS'|'TLS_WRAPPED' }, 'Operator': 'IS_TRUE'|'IS_FALSE' }, 'DmarcExpression': { 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'NONE'|'QUARANTINE'|'REJECT', ] }, 'IpExpression': { 'Evaluate': { 'Attribute': 'SOURCE_IP' }, 'Operator': 'CIDR_MATCHES'|'NOT_CIDR_MATCHES', 'Values': [ 'string', ] }, 'NumberExpression': { 'Evaluate': { 'Attribute': 'MESSAGE_SIZE' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'LESS_THAN'|'GREATER_THAN'|'LESS_THAN_OR_EQUAL'|'GREATER_THAN_OR_EQUAL', 'Value': 123.0 }, 'StringExpression': { 'Evaluate': { 'Attribute': 'MAIL_FROM'|'HELO'|'RECIPIENT'|'SENDER'|'FROM'|'SUBJECT'|'TO'|'CC' }, 'Operator': 'EQUALS'|'NOT_EQUALS'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS', 'Values': [ 'string', ] }, 'VerdictExpression': { 'Evaluate': { 'Analysis': { 'Analyzer': 'string', 'ResultField': 'string' }, 'Attribute': 'SPF'|'DKIM' }, 'Operator': 'EQUALS'|'NOT_EQUALS', 'Values': [ 'PASS'|'FAIL'|'GRAY'|'PROCESSING_FAILED', ] } }, ] }, ] }
Response Structure
(dict) --
CreatedDate (datetime) --
The date of when then rule set was created.
LastModificationDate (datetime) --
The date of when the rule set was last modified.
RuleSetArn (string) --
The Amazon Resource Name (ARN) of the rule set resource.
RuleSetId (string) --
The identifier of the rule set resource.
RuleSetName (string) --
A user-friendly name for the rule set resource.
Rules (list) --
The rules contained in the rule set.
(dict) --
A rule contains conditions, "unless conditions" and actions. For each envelope recipient of an email, if all conditions match and none of the "unless conditions" match, then all of the actions are executed sequentially. If no conditions are provided, the rule always applies and the actions are implicitly executed. If only "unless conditions" are provided, the rule applies if the email does not match the evaluation of the "unless conditions".
Actions (list) --
The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
(dict) --
The action for a rule to take. Only one of the contained actions can be set.
AddHeader (dict) --
This action adds a header. This can be used to add arbitrary email headers.
HeaderName (string) --
The name of the header to add to an email. The header must be prefixed with "X-". Headers are added regardless of whether the header name pre-existed in the email.
HeaderValue (string) --
The value of the header to add to the email.
Archive (dict) --
This action archives the email. This can be used to deliver an email to an archive.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified archive has been deleted.
TargetArchive (string) --
The identifier of the archive to send the email to.
DeliverToMailbox (dict) --
This action delivers an email to a WorkMail mailbox.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the mailbox ARN is no longer valid.
MailboxArn (string) --
The Amazon Resource Name (ARN) of a WorkMail organization to deliver the email to.
RoleArn (string) --
The Amazon Resource Name (ARN) of an IAM role to use to execute this action. The role must have access to the workmail:DeliverToMailbox API.
Drop (dict) --
This action terminates the evaluation of rules in the rule set.
Relay (dict) --
This action relays the email to another SMTP server.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified relay has been deleted.
MailFrom (string) --
This action specifies whether to preserve or replace original mail from address while relaying received emails to a destination server.
Relay (string) --
The identifier of the relay resource to be used when relaying an email.
ReplaceRecipient (dict) --
The action replaces certain or all recipients with a different set of recipients.
ReplaceWith (list) --
This action specifies the replacement recipient email addresses to insert.
(string) --
Send (dict) --
This action sends the email to the internet.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the caller does not have the permissions to call the sendRawEmail API.
RoleArn (string) --
The Amazon Resource Name (ARN) of the role to use for this action. This role must have access to the ses:SendRawEmail API.
WriteToS3 (dict) --
This action writes the MIME content of the email to an S3 bucket.
ActionFailurePolicy (string) --
A policy that states what to do in the case of failure. The action will fail if there are configuration errors. For example, the specified the bucket has been deleted.
RoleArn (string) --
The Amazon Resource Name (ARN) of the IAM Role to use while writing to S3. This role must have access to the s3:PutObject, kms:Encrypt, and kms:GenerateDataKey APIs for the given bucket.
S3Bucket (string) --
The bucket name of the S3 bucket to write to.
S3Prefix (string) --
The S3 prefix to use for the write to the s3 bucket.
S3SseKmsKeyId (string) --
The KMS Key ID to use to encrypt the message in S3.
Conditions (list) --
The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
(dict) --
The conditional expression used to evaluate an email for determining if a rule action should be taken.
BooleanExpression (dict) --
The condition applies to a boolean expression passed in this field.
Evaluate (dict) --
The operand on which to perform a boolean condition operation.
Attribute (string) --
The boolean type representing the allowed attribute types for an email.
Operator (string) --
The matching operator for a boolean condition expression.
DmarcExpression (dict) --
The condition applies to a DMARC policy expression passed in this field.
Operator (string) --
The operator to apply to the DMARC policy of the incoming email.
Values (list) --
The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.
(string) --
IpExpression (dict) --
The condition applies to an IP address expression passed in this field.
Evaluate (dict) --
The IP address to evaluate in this condition.
Attribute (string) --
The attribute of the email to evaluate.
Operator (string) --
The operator to evaluate the IP address.
Values (list) --
The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.
(string) --
NumberExpression (dict) --
The condition applies to a number expression passed in this field.
Evaluate (dict) --
The number to evaluate in a numeric condition expression.
Attribute (string) --
An email attribute that is used as the number to evaluate.
Operator (string) --
The operator for a numeric condition expression.
Value (float) --
The value to evaluate in a numeric condition expression.
StringExpression (dict) --
The condition applies to a string expression passed in this field.
Evaluate (dict) --
The string to evaluate in a string condition expression.
Attribute (string) --
The email attribute to evaluate in a string condition expression.
Operator (string) --
The matching operator for a string condition expression.
Values (list) --
The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.
(string) --
VerdictExpression (dict) --
The condition applies to a verdict expression passed in this field.
Evaluate (dict) --
The verdict to evaluate in a verdict condition expression.
Analysis (dict) --
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer (string) --
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) --
The returned value from an Add On.
Attribute (string) --
The email verdict attribute to evaluate in a string verdict expression.
Operator (string) --
The matching operator for a verdict condition expression.
Values (list) --
The values to match with the email's verdict using the given operator. For the EQUALS operator, if multiple values are given, the condition is deemed to match if any of the given verdicts match that of the email. For the NOT_EQUALS operator, if multiple values are given, the condition is deemed to match of none of the given verdicts match the verdict of the email.
(string) --
Name (string) --
The user-friendly name of the rule.
Unless (list) --
The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.
(dict) --
The conditional expression used to evaluate an email for determining if a rule action should be taken.
BooleanExpression (dict) --
The condition applies to a boolean expression passed in this field.
Evaluate (dict) --
The operand on which to perform a boolean condition operation.
Attribute (string) --
The boolean type representing the allowed attribute types for an email.
Operator (string) --
The matching operator for a boolean condition expression.
DmarcExpression (dict) --
The condition applies to a DMARC policy expression passed in this field.
Operator (string) --
The operator to apply to the DMARC policy of the incoming email.
Values (list) --
The values to use for the given DMARC policy operator. For the operator EQUALS, if multiple values are given, they are evaluated as an OR. That is, if any of the given values match, the condition is deemed to match. For the operator NOT_EQUALS, if multiple values are given, they are evaluated as an AND. That is, only if the email's DMARC policy is not equal to any of the given values, then the condition is deemed to match.
(string) --
IpExpression (dict) --
The condition applies to an IP address expression passed in this field.
Evaluate (dict) --
The IP address to evaluate in this condition.
Attribute (string) --
The attribute of the email to evaluate.
Operator (string) --
The operator to evaluate the IP address.
Values (list) --
The IP CIDR blocks in format "x.y.z.w/n" (eg 10.0.0.0/8) to match with the email's IP address. For the operator CIDR_MATCHES, if multiple values are given, they are evaluated as an OR. That is, if the IP address is contained within any of the given CIDR ranges, the condition is deemed to match. For NOT_CIDR_MATCHES, if multiple CIDR ranges are given, the condition is deemed to match if the IP address is not contained in any of the given CIDR ranges.
(string) --
NumberExpression (dict) --
The condition applies to a number expression passed in this field.
Evaluate (dict) --
The number to evaluate in a numeric condition expression.
Attribute (string) --
An email attribute that is used as the number to evaluate.
Operator (string) --
The operator for a numeric condition expression.
Value (float) --
The value to evaluate in a numeric condition expression.
StringExpression (dict) --
The condition applies to a string expression passed in this field.
Evaluate (dict) --
The string to evaluate in a string condition expression.
Attribute (string) --
The email attribute to evaluate in a string condition expression.
Operator (string) --
The matching operator for a string condition expression.
Values (list) --
The string(s) to be evaluated in a string condition expression. For all operators, except for NOT_EQUALS, if multiple values are given, the values are processed as an OR. That is, if any of the values match the email's string using the given operator, the condition is deemed to match. However, for NOT_EQUALS, the condition is only deemed to match if none of the given strings match the email's string.
(string) --
VerdictExpression (dict) --
The condition applies to a verdict expression passed in this field.
Evaluate (dict) --
The verdict to evaluate in a verdict condition expression.
Analysis (dict) --
The Add On ARN and its returned value to evaluate in a verdict condition expression.
Analyzer (string) --
The Amazon Resource Name (ARN) of an Add On.
ResultField (string) --
The returned value from an Add On.
Attribute (string) --
The email verdict attribute to evaluate in a string verdict expression.
Operator (string) --
The matching operator for a verdict condition expression.
Values (list) --
The values to match with the email's verdict using the given operator. For the EQUALS operator, if multiple values are given, the condition is deemed to match if any of the given verdicts match that of the email. For the NOT_EQUALS operator, if multiple values are given, the condition is deemed to match of none of the given verdicts match the verdict of the email.
(string) --
Gets detailed information about an Add On instance.
See also: AWS API Documentation
Request Syntax
client.get_addon_instance( AddonInstanceId='string' )
string
[REQUIRED]
The Add On instance ID to retrieve information for.
dict
Response Syntax
{ 'AddonInstanceArn': 'string', 'AddonName': 'string', 'AddonSubscriptionId': 'string', 'CreatedTimestamp': datetime(2015, 1, 1) }
Response Structure
(dict) --
AddonInstanceArn (string) --
The Amazon Resource Name (ARN) of the Add On instance.
AddonName (string) --
The name of the Add On provider associated to the subscription of the instance.
AddonSubscriptionId (string) --
The subscription ID associated to the instance.
CreatedTimestamp (datetime) --
The timestamp of when the Add On instance was created.
Remove one or more tags (keys and values) from a specified resource.
See also: AWS API Documentation
Request Syntax
client.untag_resource( ResourceArn='string', TagKeys=[ 'string', ] )
string
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to untag.
list
[REQUIRED]
The keys of the key-value pairs for the tag or tags you want to remove from the specified resource.
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
Fetch ingress endpoint resource attributes.
See also: AWS API Documentation
Request Syntax
client.get_ingress_point( IngressPointId='string' )
string
[REQUIRED]
The identifier of an ingress endpoint.
dict
Response Syntax
{ 'ARecord': 'string', 'CreatedTimestamp': datetime(2015, 1, 1), 'IngressPointArn': 'string', 'IngressPointAuthConfiguration': { 'IngressPointPasswordConfiguration': { 'PreviousSmtpPasswordExpiryTimestamp': datetime(2015, 1, 1), 'PreviousSmtpPasswordVersion': 'string', 'SmtpPasswordVersion': 'string' }, 'SecretArn': 'string' }, 'IngressPointId': 'string', 'IngressPointName': 'string', 'LastUpdatedTimestamp': datetime(2015, 1, 1), 'RuleSetId': 'string', 'Status': 'PROVISIONING'|'DEPROVISIONING'|'UPDATING'|'ACTIVE'|'CLOSED'|'FAILED', 'TrafficPolicyId': 'string', 'Type': 'OPEN'|'AUTH' }
Response Structure
(dict) --
ARecord (string) --
The DNS A Record that identifies your ingress endpoint. Configure your DNS Mail Exchange (MX) record with this value to route emails to Mail Manager.
CreatedTimestamp (datetime) --
The timestamp of when the ingress endpoint was created.
IngressPointArn (string) --
The Amazon Resource Name (ARN) of the ingress endpoint resource.
IngressPointAuthConfiguration (dict) --
The authentication configuration of the ingress endpoint resource.
IngressPointPasswordConfiguration (dict) --
The ingress endpoint password configuration for the ingress endpoint resource.
PreviousSmtpPasswordExpiryTimestamp (datetime) --
The previous password expiry timestamp of the ingress endpoint resource.
PreviousSmtpPasswordVersion (string) --
The previous password version of the ingress endpoint resource.
SmtpPasswordVersion (string) --
The current password expiry timestamp of the ingress endpoint resource.
SecretArn (string) --
The ingress endpoint SecretsManager::Secret ARN configuration for the ingress endpoint resource.
IngressPointId (string) --
The identifier of an ingress endpoint resource.
IngressPointName (string) --
A user friendly name for the ingress endpoint.
LastUpdatedTimestamp (datetime) --
The timestamp of when the ingress endpoint was last updated.
RuleSetId (string) --
The identifier of a rule set resource associated with the ingress endpoint.
Status (string) --
The status of the ingress endpoint resource.
TrafficPolicyId (string) --
The identifier of the traffic policy resource associated with the ingress endpoint.
Type (string) --
The type of ingress endpoint.
List rule sets for this account.
See also: AWS API Documentation
Request Syntax
client.list_rule_sets( NextToken='string', PageSize=123 )
string
If you received a pagination token from a previous call to this API, you can provide it here to continue paginating through the next page of results.
integer
The maximum number of rule set resources that are returned per call. You can use NextToken to obtain further rule sets.
dict
Response Syntax
{ 'NextToken': 'string', 'RuleSets': [ { 'LastModificationDate': datetime(2015, 1, 1), 'RuleSetId': 'string', 'RuleSetName': 'string' }, ] }
Response Structure
(dict) --
NextToken (string) --
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
RuleSets (list) --
The list of rule sets.
(dict) --
A rule set contains a list of rules that are evaluated in order. Each rule is evaluated sequentially for each email.
LastModificationDate (datetime) --
The last modification date of the rule set.
RuleSetId (string) --
The identifier of the rule set.
RuleSetName (string) --
A user-friendly name for the rule set.
Returns a list of all email archives in your account.
See also: AWS API Documentation
Request Syntax
client.list_archives( NextToken='string', PageSize=123 )
string
If NextToken is returned, there are more results available. The value of NextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
integer
The maximum number of archives that are returned per call. You can use NextToken to obtain further pages of archives.
dict
Response Syntax
{ 'Archives': [ { 'ArchiveId': 'string', 'ArchiveName': 'string', 'ArchiveState': 'ACTIVE'|'PENDING_DELETION', 'LastUpdatedTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
The response containing a list of your email archives.
Archives (list) --
The list of archive details.
(dict) --
An archive resource for storing and retaining emails.
ArchiveId (string) --
The unique identifier of the archive.
ArchiveName (string) --
The unique name assigned to the archive.
ArchiveState (string) --
The current state of the archive:
ACTIVE – The archive is ready and available for use.
PENDING_DELETION – The archive has been marked for deletion and will be permanently deleted in 30 days. No further modifications can be made in this state.
LastUpdatedTimestamp (datetime) --
The timestamp of when the archive was last updated.
NextToken (string) --
If present, use to retrieve the next page of results.