search_users
async
¶
search_users(
collection_id: CollectionId,
*,
config_overrides: Optional[AsyncRekognitionClientConfig] = None,
user_id: Optional[UserId] = None,
face_id: Optional[FaceId] = None,
user_match_threshold: Optional[Percent] = None,
max_users: Optional[MaxUserResults] = None,
) -> SearchUsersResponse
Searches for UserIDs within a collection based on a FaceId or UserId. This API can be used to find the closest UserID (with a highest similarity) to associate a face. The request must be provided with either FaceId or UserId. The operation returns an array of UserID that match the FaceId or UserId, ordered by similarity score with the highest similarity first.
Parameters:
-
collection_id(CollectionId) –The ID of an existing collection containing the UserID, used with a UserId or FaceId. If a FaceId is provided, UserId isn’t required to be present in the Collection.
-
user_id(Optional[UserId], default:None) –ID for the existing User.
-
face_id(Optional[FaceId], default:None) –ID for the existing face.
-
user_match_threshold(Optional[Percent], default:None) –Optional value that specifies the minimum confidence in the matched UserID to return. Default value of 80.
-
max_users(Optional[MaxUserResults], default:None) –Maximum number of identities to return.
Raises:
-
AccessDeniedException–You are not authorized to perform the action.
-
InternalServerError–Amazon Rekognition experienced a service issue. Try your call again.
-
InvalidParameterException–Input parameter violated a constraint. Validate your parameter before calling the API operation again.
-
ProvisionedThroughputExceededException–The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.
-
ResourceNotFoundException–The resource specified in the request cannot be found.
-
ThrottlingException–Amazon Rekognition is temporarily unable to process the request. Try your call again.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
SearchUsers Searches for UserIDs within a collection based on a FaceId or UserId.
>>> await client.search_users(collection_id='MyCollection', user_id='DemoUser', max_users=2, user_match_threshold=70)
Source code in docs_src/capo_rekognition/_services/async_rekognition.py
4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 | |