Connect / Client / search_email_addresses

search_email_addresses#

Connect.Client.search_email_addresses(**kwargs)#

Searches email address in an instance, with optional filtering.

See also: AWS API Documentation

Request Syntax

response = client.search_email_addresses(
    InstanceId='string',
    MaxResults=123,
    NextToken='string',
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        }
    },
    SearchFilter={
        'TagFilter': {
            'OrConditions': [
                [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ],
            ],
            'AndConditions': [
                {
                    'TagKey': 'string',
                    'TagValue': 'string'
                },
            ],
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        }
    }
)
Parameters:
  • InstanceId (string) –

    [REQUIRED]

    The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • MaxResults (integer) – The maximum number of results to return per page.

  • NextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

  • SearchCriteria (dict) –

    The search criteria to be used to return email addresses.

    • OrConditions (list) –

      A list of conditions which would be applied together with an OR condition.

      • (dict) –

        The search criteria to be used to return email addresses.

    • AndConditions (list) –

      A list of conditions which would be applied together with an AND condition.

      • (dict) –

        The search criteria to be used to return email addresses.

    • StringCondition (dict) –

      A leaf node condition which can be used to specify a string condition.

      • FieldName (string) –

        The name of the field in the string condition.

      • Value (string) –

        The value of the string.

      • ComparisonType (string) –

        The type of comparison to be made when evaluating the string condition.

  • SearchFilter (dict) –

    Filters to be applied to search results.

    • TagFilter (dict) –

      An object that can be used to specify Tag conditions inside the SearchFilter. This accepts an OR of AND (List of List) input where:

      • Top level list specifies conditions that need to be applied with OR operator

      • Inner list specifies conditions that need to be applied with AND operator.

      • OrConditions (list) –

        A list of conditions which would be applied together with an OR condition.

        • (list) –

          • (dict) –

            A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

            • TagKey (string) –

              The tag key in the tag condition.

            • TagValue (string) –

              The tag value in the tag condition.

      • AndConditions (list) –

        A list of conditions which would be applied together with an AND condition.

        • (dict) –

          A leaf node condition which can be used to specify a tag condition, for example, HAVE BPO = 123.

          • TagKey (string) –

            The tag key in the tag condition.

          • TagValue (string) –

            The tag value in the tag condition.

      • TagCondition (dict) –

        A leaf node condition which can be used to specify a tag condition.

        • TagKey (string) –

          The tag key in the tag condition.

        • TagValue (string) –

          The tag value in the tag condition.

Return type:

dict

Returns:

Response Syntax

{
    'NextToken': 'string',
    'EmailAddresses': [
        {
            'EmailAddressId': 'string',
            'EmailAddressArn': 'string',
            'EmailAddress': 'string',
            'Description': 'string',
            'DisplayName': 'string'
        },
    ],
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) –

    • NextToken (string) –

      If there are additional results, this is the token for the next set of results.

    • EmailAddresses (list) –

      List of email addresses matching SearchFilter and SearchCriteria

      • (dict) –

        Contains information about an email address for a contact center.

        • EmailAddressId (string) –

          The identifier of the email address.

        • EmailAddressArn (string) –

          The Amazon Resource Name (ARN) of the email address.

        • EmailAddress (string) –

          The email address with the instance, in [^s@]+@[^s@]+.[^s@]+ format.

        • Description (string) –

          The description of the email address.

        • DisplayName (string) –

          The display name of email address.

    • ApproximateTotalCount (integer) –

      The total number of email addresses which matched your search query.

Exceptions