search_users
¶
search_users(
collection_id: CollectionId,
*,
config_overrides: Optional[RekognitionClientConfig] = 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.
>>> client.search_users(collection_id='MyCollection', user_id='DemoUser', max_users=2, user_match_threshold=70)
Source code in docs_src/capo_rekognition/_services/rekognition.py
4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 | |