MailManager / Client / start_archive_search
start_archive_search¶
- MailManager.Client.start_archive_search(**kwargs)¶
Initiates a search across emails in the specified archive.
See also: AWS API Documentation
Request Syntax
response = client.start_archive_search( ArchiveId='string', Filters={ 'Include': [ { 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT'|'ENVELOPE_TO'|'ENVELOPE_FROM' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] }, 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' } }, ], 'Unless': [ { 'StringExpression': { 'Evaluate': { 'Attribute': 'TO'|'FROM'|'CC'|'SUBJECT'|'ENVELOPE_TO'|'ENVELOPE_FROM' }, 'Operator': 'CONTAINS', 'Values': [ 'string', ] }, 'BooleanExpression': { 'Evaluate': { 'Attribute': 'HAS_ATTACHMENTS' }, 'Operator': 'IS_TRUE'|'IS_FALSE' } }, ] }, FromTimestamp=datetime(2015, 1, 1), ToTimestamp=datetime(2015, 1, 1), MaxResults=123 )
- Parameters:
ArchiveId (string) –
[REQUIRED]
The identifier of the archive to search emails in.
Filters (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.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
StringExpression
,BooleanExpression
.StringExpression (dict) –
A string expression to evaluate against email attributes.
Evaluate (dict) – [REQUIRED]
The attribute of the email to evaluate.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
Attribute
.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) –
BooleanExpression (dict) –
A boolean expression to evaluate against email attributes.
Evaluate (dict) – [REQUIRED]
The email attribute value to evaluate.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
Attribute
.Attribute (string) –
The name of the email attribute to evaluate.
Operator (string) – [REQUIRED]
The boolean operator to use for evaluation.
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.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
StringExpression
,BooleanExpression
.StringExpression (dict) –
A string expression to evaluate against email attributes.
Evaluate (dict) – [REQUIRED]
The attribute of the email to evaluate.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
Attribute
.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) –
BooleanExpression (dict) –
A boolean expression to evaluate against email attributes.
Evaluate (dict) – [REQUIRED]
The email attribute value to evaluate.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
Attribute
.Attribute (string) –
The name of the email attribute to evaluate.
Operator (string) – [REQUIRED]
The boolean operator to use for evaluation.
FromTimestamp (datetime) –
[REQUIRED]
The start timestamp of the range to search emails from.
ToTimestamp (datetime) –
[REQUIRED]
The end timestamp of the range to search emails from.
MaxResults (integer) –
[REQUIRED]
The maximum number of search results to return.
- Return type:
dict
- Returns:
Response Syntax
{ 'SearchId': 'string' }
Response Structure
(dict) –
The response from initiating an archive search.
SearchId (string) –
The unique identifier for the initiated search job.
Exceptions