2024/07/18 - Amazon Connect Service - 2 new1 updated api methods
Changes Amazon Connect expands search API coverage for additional resources. Search for hierarchy groups by name, ID, tag, or other criteria (new endpoint). Search for agent statuses by name, ID, tag, or other criteria (new endpoint). Search for users by their assigned proficiencies (enhanced endpoint)
Searches AgentStatuses in an Amazon Connect instance, with optional filtering.
See also: AWS API Documentation
Request Syntax
client.search_agent_statuses( InstanceId='string', NextToken='string', MaxResults=123, SearchFilter={ 'AttributeFilter': { 'OrConditions': [ { 'TagConditions': [ { 'TagKey': 'string', 'TagValue': 'string' }, ] }, ], 'AndCondition': { 'TagConditions': [ { 'TagKey': 'string', 'TagValue': 'string' }, ] }, 'TagCondition': { 'TagKey': 'string', 'TagValue': 'string' } } }, SearchCriteria={ 'OrConditions': [ {'... recursive ...'}, ], 'AndConditions': [ {'... recursive ...'}, ], 'StringCondition': { 'FieldName': 'string', 'Value': 'string', 'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT' } } )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
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.
integer
The maximum number of results to return per page.
dict
Filters to be applied to search results.
AttributeFilter (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:
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.
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.
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.
dict
The search criteria to be used to return agent statuses.
OrConditions (list) --
A list of conditions which would be applied together with an OR condition.
(dict) --
The search criteria to be used to return agent statuses.
AndConditions (list) --
A leaf node condition which can be used to specify a string condition.
description, state, type, displayOrder, and resourceID.
(dict) --
The search criteria to be used to return agent statuses.
StringCondition (dict) --
A leaf node condition which can be used to specify a string condition.
description, state, type, displayOrder, and 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.
dict
Response Syntax
{ 'AgentStatuses': [ { 'AgentStatusARN': 'string', 'AgentStatusId': 'string', 'Name': 'string', 'Description': 'string', 'Type': 'ROUTABLE'|'CUSTOM'|'OFFLINE', 'DisplayOrder': 123, 'State': 'ENABLED'|'DISABLED', 'Tags': { 'string': 'string' }, 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' }, ], 'NextToken': 'string', 'ApproximateTotalCount': 123 }
Response Structure
(dict) --
AgentStatuses (list) --
The search criteria to be used to return agent statuses.
(dict) --
Contains information about an agent status.
AgentStatusARN (string) --
The Amazon Resource Name (ARN) of the agent status.
AgentStatusId (string) --
The identifier of the agent status.
Name (string) --
The name of the agent status.
Description (string) --
The description of the agent status.
Type (string) --
The type of agent status.
DisplayOrder (integer) --
The display order of the agent status.
State (string) --
The state of the agent status.
Tags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
(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.
NextToken (string) --
If there are additional results, this is the token for the next set of results.
ApproximateTotalCount (integer) --
The total number of agent statuses which matched your search query.
Searches UserHierarchyGroups in an Amazon Connect instance, with optional filtering.
See also: AWS API Documentation
Request Syntax
client.search_user_hierarchy_groups( InstanceId='string', NextToken='string', MaxResults=123, SearchFilter={ 'AttributeFilter': { 'OrConditions': [ { 'TagConditions': [ { 'TagKey': 'string', 'TagValue': 'string' }, ] }, ], 'AndCondition': { 'TagConditions': [ { 'TagKey': 'string', 'TagValue': 'string' }, ] }, 'TagCondition': { 'TagKey': 'string', 'TagValue': 'string' } } }, SearchCriteria={ 'OrConditions': [ {'... recursive ...'}, ], 'AndConditions': [ {'... recursive ...'}, ], 'StringCondition': { 'FieldName': 'string', 'Value': 'string', 'ComparisonType': 'STARTS_WITH'|'CONTAINS'|'EXACT' } } )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
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.
integer
The maximum number of results to return per page.
dict
Filters to be applied to search results.
AttributeFilter (dict) --
An object that can be used to specify Tag conditions inside the SearchFilter. This accepts an OR or 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.
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.
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.
dict
The search criteria to be used to return UserHierarchyGroups.
OrConditions (list) --
A list of conditions which would be applied together with an OR condition.
(dict) --
The search criteria to be used to return userHierarchyGroup.
AndConditions (list) --
A list of conditions which would be applied together with an AND condition.
(dict) --
The search criteria to be used to return userHierarchyGroup.
StringCondition (dict) --
A leaf node condition which can be used to specify a string condition.
parentId, levelId, and 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.
dict
Response Syntax
{ 'UserHierarchyGroups': [ { 'Id': 'string', 'Arn': 'string', 'Name': 'string', 'LevelId': 'string', 'HierarchyPath': { 'LevelOne': { 'Id': 'string', 'Arn': 'string', 'Name': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' }, 'LevelTwo': { 'Id': 'string', 'Arn': 'string', 'Name': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' }, 'LevelThree': { 'Id': 'string', 'Arn': 'string', 'Name': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' }, 'LevelFour': { 'Id': 'string', 'Arn': 'string', 'Name': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' }, 'LevelFive': { 'Id': 'string', 'Arn': 'string', 'Name': 'string', 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' } }, 'Tags': { 'string': 'string' }, 'LastModifiedTime': datetime(2015, 1, 1), 'LastModifiedRegion': 'string' }, ], 'NextToken': 'string', 'ApproximateTotalCount': 123 }
Response Structure
(dict) --
UserHierarchyGroups (list) --
Information about the userHierarchyGroups.
(dict) --
Contains information about a hierarchy group.
Id (string) --
The identifier of the hierarchy group.
Arn (string) --
The Amazon Resource Name (ARN) of the hierarchy group.
Name (string) --
The name of the hierarchy group.
LevelId (string) --
The identifier of the level in the hierarchy group.
HierarchyPath (dict) --
Information about the levels in the hierarchy group.
LevelOne (dict) --
Information about level one.
Id (string) --
The identifier of the hierarchy group.
Arn (string) --
The Amazon Resource Name (ARN) of the hierarchy group.
Name (string) --
The name of the hierarchy group.
LastModifiedTime (datetime) --
The timestamp when this resource was last modified.
LastModifiedRegion (string) --
The Amazon Web Services Region where this resource was last modified.
LevelTwo (dict) --
Information about level two.
Id (string) --
The identifier of the hierarchy group.
Arn (string) --
The Amazon Resource Name (ARN) of the hierarchy group.
Name (string) --
The name of the hierarchy group.
LastModifiedTime (datetime) --
The timestamp when this resource was last modified.
LastModifiedRegion (string) --
The Amazon Web Services Region where this resource was last modified.
LevelThree (dict) --
Information about level three.
Id (string) --
The identifier of the hierarchy group.
Arn (string) --
The Amazon Resource Name (ARN) of the hierarchy group.
Name (string) --
The name of the hierarchy group.
LastModifiedTime (datetime) --
The timestamp when this resource was last modified.
LastModifiedRegion (string) --
The Amazon Web Services Region where this resource was last modified.
LevelFour (dict) --
Information about level four.
Id (string) --
The identifier of the hierarchy group.
Arn (string) --
The Amazon Resource Name (ARN) of the hierarchy group.
Name (string) --
The name of the hierarchy group.
LastModifiedTime (datetime) --
The timestamp when this resource was last modified.
LastModifiedRegion (string) --
The Amazon Web Services Region where this resource was last modified.
LevelFive (dict) --
Information about level five.
Id (string) --
The identifier of the hierarchy group.
Arn (string) --
The Amazon Resource Name (ARN) of the hierarchy group.
Name (string) --
The name of the hierarchy group.
LastModifiedTime (datetime) --
The timestamp when this resource was last modified.
LastModifiedRegion (string) --
The Amazon Web Services Region where this resource was last modified.
Tags (dict) --
The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.
(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.
NextToken (string) --
If there are additional results, this is the token for the next set of results.
ApproximateTotalCount (integer) --
The total number of userHierarchyGroups which matched your search query.
{'SearchCriteria': {'ListCondition': {'Conditions': [{'NumberCondition': {'ComparisonType': 'GREATER_OR_EQUAL ' '| ' 'GREATER ' '| ' 'LESSER_OR_EQUAL ' '| ' 'LESSER ' '| ' 'EQUAL ' '| ' 'NOT_EQUAL ' '| ' 'RANGE', 'FieldName': 'string', 'MaxValue': 'integer', 'MinValue': 'integer'}, 'StringCondition': {'ComparisonType': 'STARTS_WITH ' '| ' 'CONTAINS ' '| ' 'EXACT', 'FieldName': 'string', 'Value': 'string'}}], 'TargetListType': 'PROFICIENCIES'}}}
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' } } )
string
[REQUIRED]
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
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.
integer
The maximum number of results to return per page.
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.
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.
dict
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.
dict
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' }, '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.
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.