Amazon Connect Service

2025/09/19 - Amazon Connect Service - 4 updated api methods

Changes  This release adds a persistent connection field to UserPhoneConfig that maintains agent's softphone media connection for faster call connections.

CreateUser (updated) Link ¶
Changes (request)
{'PhoneConfig': {'PersistentConnection': 'boolean'}}

Creates a user account for the specified Amazon Connect instance.

For information about how to create users using the Amazon Connect admin website, see Add Users in the Amazon Connect Administrator Guide.

See also: AWS API Documentation

Request Syntax

client.create_user(
    Username='string',
    Password='string',
    IdentityInfo={
        'FirstName': 'string',
        'LastName': 'string',
        'Email': 'string',
        'SecondaryEmail': 'string',
        'Mobile': 'string'
    },
    PhoneConfig={
        'PhoneType': 'SOFT_PHONE'|'DESK_PHONE',
        'AutoAccept': True|False,
        'AfterContactWorkTimeLimit': 123,
        'DeskPhoneNumber': 'string',
        'PersistentConnection': True|False
    },
    DirectoryUserId='string',
    SecurityProfileIds=[
        'string',
    ],
    RoutingProfileId='string',
    HierarchyGroupId='string',
    InstanceId='string',
    Tags={
        'string': 'string'
    }
)
type Username:

string

param Username:

[REQUIRED]

The user name for the account. For instances not using SAML for identity management, the user name can include up to 20 characters. If you are using SAML for identity management, the user name can include up to 64 characters from [a-zA-Z0-9_-.@]+.

Username can include @ only if used in an email format. For example:

type Password:

string

param Password:

The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password.

type IdentityInfo:

dict

param IdentityInfo:

The information about the identity of the user.

  • FirstName (string) --

    The first name. This is required if you are using Amazon Connect or SAML for identity management. Inputs must be in Unicode Normalization Form C (NFC). Text containing characters in a non-NFC form (for example, decomposed characters or combining marks) are not accepted.

  • LastName (string) --

    The last name. This is required if you are using Amazon Connect or SAML for identity management. Inputs must be in Unicode Normalization Form C (NFC). Text containing characters in a non-NFC form (for example, decomposed characters or combining marks) are not accepted.

  • Email (string) --

    The email address. If you are using SAML for identity management and include this parameter, an error is returned.

  • SecondaryEmail (string) --

    The user's secondary email address. If you provide a secondary email, the user receives email notifications - other than password reset notifications - to this email address instead of to their primary email address.

    Pattern: (?=^.{0,265}$)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}

  • Mobile (string) --

    The user's mobile number.

type PhoneConfig:

dict

param PhoneConfig:

[REQUIRED]

The phone settings for the user.

  • PhoneType (string) -- [REQUIRED]

    The phone type.

  • AutoAccept (boolean) --

    The Auto accept setting.

  • AfterContactWorkTimeLimit (integer) --

    The After Call Work (ACW) timeout setting, in seconds. This parameter has a minimum value of 0 and a maximum value of 2,000,000 seconds (24 days). Enter 0 if you don't want to allocate a specific amount of ACW time. It essentially means an indefinite amount of time. When the conversation ends, ACW starts; the agent must choose Close contact to end ACW.

  • DeskPhoneNumber (string) --

    The phone number for the user's desk phone.

  • PersistentConnection (boolean) --

    The persistent connection setting for the user.

type DirectoryUserId:

string

param DirectoryUserId:

The identifier of the user account in the directory used for identity management. If Amazon Connect cannot access the directory, you can specify this identifier to authenticate users. If you include the identifier, we assume that Amazon Connect cannot access the directory. Otherwise, the identity information is used to authenticate users from your directory.

This parameter is required if you are using an existing directory for identity management in Amazon Connect when Amazon Connect cannot access your directory to authenticate users. If you are using SAML for identity management and include this parameter, an error is returned.

type SecurityProfileIds:

list

param SecurityProfileIds:

[REQUIRED]

The identifier of the security profile for the user.

  • (string) --

type RoutingProfileId:

string

param RoutingProfileId:

[REQUIRED]

The identifier of the routing profile for the user.

type HierarchyGroupId:

string

param HierarchyGroupId:

The identifier of the hierarchy group for the user.

type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type Tags:

dict

param Tags:

The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

  • (string) --

    • (string) --

rtype:

dict

returns:

Response Syntax

{
    'UserId': 'string',
    'UserArn': 'string'
}

Response Structure

  • (dict) --

    • UserId (string) --

      The identifier of the user account.

    • UserArn (string) --

      The Amazon Resource Name (ARN) of the user account.

DescribeUser (updated) Link ¶
Changes (response)
{'User': {'PhoneConfig': {'PersistentConnection': 'boolean'}}}

Describes the specified user. You can find the instance ID in the Amazon Connect console (it’s the final part of the ARN). The console does not display the user IDs. Instead, list the users and note the IDs provided in the output.

See also: AWS API Documentation

Request Syntax

client.describe_user(
    UserId='string',
    InstanceId='string'
)
type UserId:

string

param UserId:

[REQUIRED]

The identifier of the user account.

type InstanceId:

string

param InstanceId:

[REQUIRED]

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

rtype:

dict

returns:

Response Syntax

{
    'User': {
        'Id': 'string',
        'Arn': 'string',
        'Username': 'string',
        'IdentityInfo': {
            'FirstName': 'string',
            'LastName': 'string',
            'Email': 'string',
            'SecondaryEmail': 'string',
            'Mobile': 'string'
        },
        'PhoneConfig': {
            'PhoneType': 'SOFT_PHONE'|'DESK_PHONE',
            'AutoAccept': True|False,
            'AfterContactWorkTimeLimit': 123,
            'DeskPhoneNumber': 'string',
            'PersistentConnection': True|False
        },
        'DirectoryUserId': 'string',
        'SecurityProfileIds': [
            'string',
        ],
        'RoutingProfileId': 'string',
        'HierarchyGroupId': 'string',
        'Tags': {
            'string': 'string'
        },
        'LastModifiedTime': datetime(2015, 1, 1),
        'LastModifiedRegion': 'string'
    }
}

Response Structure

  • (dict) --

    • User (dict) --

      Information about the user account and configuration settings.

      • Id (string) --

        The identifier of the user account.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the user account.

      • Username (string) --

        The user name assigned to the user account.

      • IdentityInfo (dict) --

        Information about the user identity.

        • FirstName (string) --

          The first name. This is required if you are using Amazon Connect or SAML for identity management. Inputs must be in Unicode Normalization Form C (NFC). Text containing characters in a non-NFC form (for example, decomposed characters or combining marks) are not accepted.

        • LastName (string) --

          The last name. This is required if you are using Amazon Connect or SAML for identity management. Inputs must be in Unicode Normalization Form C (NFC). Text containing characters in a non-NFC form (for example, decomposed characters or combining marks) are not accepted.

        • Email (string) --

          The email address. If you are using SAML for identity management and include this parameter, an error is returned.

        • SecondaryEmail (string) --

          The user's secondary email address. If you provide a secondary email, the user receives email notifications - other than password reset notifications - to this email address instead of to their primary email address.

          Pattern: (?=^.{0,265}$)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}

        • Mobile (string) --

          The user's mobile number.

      • PhoneConfig (dict) --

        Information about the phone configuration for the user.

        • PhoneType (string) --

          The phone type.

        • AutoAccept (boolean) --

          The Auto accept setting.

        • AfterContactWorkTimeLimit (integer) --

          The After Call Work (ACW) timeout setting, in seconds. This parameter has a minimum value of 0 and a maximum value of 2,000,000 seconds (24 days). Enter 0 if you don't want to allocate a specific amount of ACW time. It essentially means an indefinite amount of time. When the conversation ends, ACW starts; the agent must choose Close contact to end ACW.

        • DeskPhoneNumber (string) --

          The phone number for the user's desk phone.

        • PersistentConnection (boolean) --

          The persistent connection setting for the user.

      • DirectoryUserId (string) --

        The identifier of the user account in the directory used for identity management.

      • SecurityProfileIds (list) --

        The identifiers of the security profiles for the user.

        • (string) --

      • RoutingProfileId (string) --

        The identifier of the routing profile for the user.

      • HierarchyGroupId (string) --

        The identifier of the hierarchy group for the user.

      • Tags (dict) --

        The tags.

        • (string) --

          • (string) --

      • LastModifiedTime (datetime) --

        The timestamp when this resource was last modified.

      • LastModifiedRegion (string) --

        The Amazon Web Services Region where this resource was last modified.

SearchUsers (updated) Link ¶
Changes (response)
{'Users': {'PhoneConfig': {'PersistentConnection': 'boolean'}}}

Searches users in an Amazon Connect instance, with optional filtering.

See also: AWS API Documentation

Request Syntax

client.search_users(
    InstanceId='string',
    NextToken='string',
    MaxResults=123,
    SearchFilter={
        'TagFilter': {
            'OrConditions': [
                [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ],
            ],
            'AndConditions': [
                {
                    'TagKey': 'string',
                    'TagValue': 'string'
                },
            ],
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            }
        },
        'UserAttributeFilter': {
            'OrConditions': [
                {
                    'TagConditions': [
                        {
                            'TagKey': 'string',
                            'TagValue': 'string'
                        },
                    ],
                    'HierarchyGroupCondition': {
                        'Value': 'string',
                        'HierarchyGroupMatchType': 'EXACT'|'WITH_CHILD_GROUPS'
                    }
                },
            ],
            'AndCondition': {
                'TagConditions': [
                    {
                        'TagKey': 'string',
                        'TagValue': 'string'
                    },
                ],
                'HierarchyGroupCondition': {
                    'Value': 'string',
                    'HierarchyGroupMatchType': 'EXACT'|'WITH_CHILD_GROUPS'
                }
            },
            'TagCondition': {
                'TagKey': 'string',
                'TagValue': 'string'
            },
            'HierarchyGroupCondition': {
                'Value': 'string',
                'HierarchyGroupMatchType': 'EXACT'|'WITH_CHILD_GROUPS'
            }
        }
    },
    SearchCriteria={
        'OrConditions': [
            {'... recursive ...'},
        ],
        'AndConditions': [
            {'... recursive ...'},
        ],
        'StringCondition': {
            'FieldName': 'string',
            'Value': 'string',
            'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
        },
        'ListCondition': {
            'TargetListType': 'PROFICIENCIES',
            'Conditions': [
                {
                    'StringCondition': {
                        'FieldName': 'string',
                        'Value': 'string',
                        'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT'
                    },
                    'NumberCondition': {
                        'FieldName': 'string',
                        'MinValue': 123,
                        'MaxValue': 123,
                        'ComparisonType': 'GREATER_OR_EQUAL'|'GREATER'|'LESSER_OR_EQUAL'|'LESSER'|'EQUAL'|'NOT_EQUAL'|'RANGE'
                    }
                },
            ]
        },
        'HierarchyGroupCondition': {
            'Value': 'string',
            'HierarchyGroupMatchType': 'EXACT'|'WITH_CHILD_GROUPS'
        }
    }
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

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

type NextToken:

string

param NextToken:

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.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return per page.

type SearchFilter:

dict

param SearchFilter:

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.

  • UserAttributeFilter (dict) --

    An object that can be used to specify Tag conditions or Hierarchy Group conditions inside the SearchFilter.

    This accepts an OR of AND (List of List) input where:

    • The top level list specifies conditions that need to be applied with OR operator.

    • The 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.

      • (dict) --

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

        • TagConditions (list) --

          A leaf node condition which can be used to specify a tag 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.

        • HierarchyGroupCondition (dict) --

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

          • Value (string) --

            The value in the hierarchy group condition.

          • HierarchyGroupMatchType (string) --

            The type of hierarchy group match.

    • AndCondition (dict) --

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

      • TagConditions (list) --

        A leaf node condition which can be used to specify a tag 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.

      • HierarchyGroupCondition (dict) --

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

        • Value (string) --

          The value in the hierarchy group condition.

        • HierarchyGroupMatchType (string) --

          The type of hierarchy group match.

    • TagCondition (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.

    • HierarchyGroupCondition (dict) --

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

      • Value (string) --

        The value in the hierarchy group condition.

      • HierarchyGroupMatchType (string) --

        The type of hierarchy group match.

type SearchCriteria:

dict

param SearchCriteria:

The search criteria to be used to return users.

  • OrConditions (list) --

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

    • (dict) --

      The search criteria to be used to return users.

  • AndConditions (list) --

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

    • (dict) --

      The search criteria to be used to return users.

  • StringCondition (dict) --

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

    The currently supported values for FieldName are Username, FirstName, LastName, RoutingProfileId, SecurityProfileId, ResourceId.

    • 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.

  • ListCondition (dict) --

    A leaf node condition which can be used to specify a List condition to search users with attributes included in Lists like Proficiencies.

    • TargetListType (string) --

      The type of target list that will be used to filter the users.

    • Conditions (list) --

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

      • (dict) --

        A leaf node condition which can be used to specify a ProficiencyName, ProficiencyValue and ProficiencyLimit.

        • StringCondition (dict) --

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

value.

  • 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.

  • NumberCondition (dict) --

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

    • FieldName (string) --

      The name of the field in the number condition.

    • MinValue (integer) --

      The minValue to be used while evaluating the number condition.

    • MaxValue (integer) --

      The maxValue to be used while evaluating the number condition.

    • ComparisonType (string) --

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

  • HierarchyGroupCondition (dict) --

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

    • Value (string) --

      The value in the hierarchy group condition.

    • HierarchyGroupMatchType (string) --

      The type of hierarchy group match.

rtype:

dict

returns:

Response Syntax

{
    'Users': [
        {
            'Arn': 'string',
            'DirectoryUserId': 'string',
            'HierarchyGroupId': 'string',
            'Id': 'string',
            'IdentityInfo': {
                'FirstName': 'string',
                'LastName': 'string'
            },
            'PhoneConfig': {
                'PhoneType': 'SOFT_PHONE'|'DESK_PHONE',
                'AutoAccept': True|False,
                'AfterContactWorkTimeLimit': 123,
                'DeskPhoneNumber': 'string',
                'PersistentConnection': True|False
            },
            'RoutingProfileId': 'string',
            'SecurityProfileIds': [
                'string',
            ],
            'Tags': {
                'string': 'string'
            },
            'Username': 'string'
        },
    ],
    'NextToken': 'string',
    'ApproximateTotalCount': 123
}

Response Structure

  • (dict) --

    • Users (list) --

      Information about the users.

      • (dict) --

        Information about the returned users.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the user.

        • DirectoryUserId (string) --

          The directory identifier of the user.

        • HierarchyGroupId (string) --

          The identifier of the user's hierarchy group.

        • Id (string) --

          The identifier of the user's summary.

        • IdentityInfo (dict) --

          The user's first name and last name.

          • FirstName (string) --

            The user's first name.

          • LastName (string) --

            The user's last name.

        • PhoneConfig (dict) --

          Contains information about the phone configuration settings for a user.

          • PhoneType (string) --

            The phone type.

          • AutoAccept (boolean) --

            The Auto accept setting.

          • AfterContactWorkTimeLimit (integer) --

            The After Call Work (ACW) timeout setting, in seconds. This parameter has a minimum value of 0 and a maximum value of 2,000,000 seconds (24 days). Enter 0 if you don't want to allocate a specific amount of ACW time. It essentially means an indefinite amount of time. When the conversation ends, ACW starts; the agent must choose Close contact to end ACW.

          • DeskPhoneNumber (string) --

            The phone number for the user's desk phone.

          • PersistentConnection (boolean) --

            The persistent connection setting for the user.

        • RoutingProfileId (string) --

          The identifier of the user's routing profile.

        • SecurityProfileIds (list) --

          The identifiers of the user's security profiles.

          • (string) --

        • Tags (dict) --

          The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

          • (string) --

            • (string) --

        • Username (string) --

          The name of the user.

    • NextToken (string) --

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

    • ApproximateTotalCount (integer) --

      The total number of users who matched your search query.

UpdateUserPhoneConfig (updated) Link ¶
Changes (request)
{'PhoneConfig': {'PersistentConnection': 'boolean'}}

Updates the phone configuration settings for the specified user.

See also: AWS API Documentation

Request Syntax

client.update_user_phone_config(
    PhoneConfig={
        'PhoneType': 'SOFT_PHONE'|'DESK_PHONE',
        'AutoAccept': True|False,
        'AfterContactWorkTimeLimit': 123,
        'DeskPhoneNumber': 'string',
        'PersistentConnection': True|False
    },
    UserId='string',
    InstanceId='string'
)
type PhoneConfig:

dict

param PhoneConfig:

[REQUIRED]

Information about phone configuration settings for the user.

  • PhoneType (string) -- [REQUIRED]

    The phone type.

  • AutoAccept (boolean) --

    The Auto accept setting.

  • AfterContactWorkTimeLimit (integer) --

    The After Call Work (ACW) timeout setting, in seconds. This parameter has a minimum value of 0 and a maximum value of 2,000,000 seconds (24 days). Enter 0 if you don't want to allocate a specific amount of ACW time. It essentially means an indefinite amount of time. When the conversation ends, ACW starts; the agent must choose Close contact to end ACW.

  • DeskPhoneNumber (string) --

    The phone number for the user's desk phone.

  • PersistentConnection (boolean) --

    The persistent connection setting for the user.

type UserId:

string

param UserId:

[REQUIRED]

The identifier of the user account.

type InstanceId:

string

param InstanceId:

[REQUIRED]

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

returns:

None