Skip to main content

users

Creates, updates, deletes, gets or lists a users resource.

Overview

Nameusers
TypeResource
Idaws.rekognition.users

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
face_model_versionstringVersion number of the face detection model associated with the input CollectionId.
searched_faceobjectContains the ID of a face that was used to search for matches in a collection.
searched_userobjectContains the ID of the UserID that was used to search for matches in a collection.
user_matchesarrayAn array of UserMatch objects that matched the input face along with the confidence in the match. Array will be empty if there are no matches.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
search_usersselectregionSearches 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.
list_usersselectregionReturns metadata of the User such as UserID in the specified collection. Anonymous User (to reserve faces without any identity) is not returned as part of this request. The results are sorted by system generated primary key ID. If the response is truncated, NextToken is returned in the response that can be used in the subsequent request to retrieve the next set of identities.
create_userinsertregion, CollectionId, UserIdCreates a new User within a collection specified by CollectionId. Takes UserId as a parameter, which is a user provided ID which should be unique within the collection. The provided UserId will alias the system generated UUID to make the UserId more user friendly. Uses a ClientToken, an idempotency token that ensures a call to CreateUser completes only once. If the value is not supplied, the AWS SDK generates an idempotency token for the requests. This prevents retries after a network error results from making multiple CreateUser calls.
delete_userdeleteregionDeletes the specified UserID within the collection. Faces that are associated with the UserID are disassociated from the UserID before deleting the specified UserID. If the specified Collection or UserID is already deleted or not found, a ResourceNotFoundException will be thrown. If the action is successful with a 200 response, an empty HTTP body is returned.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
face_model_version,
searched_face,
searched_user,
user_matches
FROM aws.rekognition.users
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new User within a collection specified by CollectionId. Takes UserId as a parameter, which is a user provided ID which should be unique within the collection. The provided UserId will alias the system generated UUID to make the UserId more user friendly. Uses a ClientToken, an idempotency token that ensures a call to CreateUser completes only once. If the value is not supplied, the AWS SDK generates an idempotency token for the requests. This prevents retries after a network error results from making multiple CreateUser calls.

INSERT INTO aws.rekognition.users (
CollectionId,
UserId,
ClientRequestToken,
region
)
SELECT
'{{ CollectionId }}' /* required */,
'{{ UserId }}' /* required */,
'{{ ClientRequestToken }}',
'{{ region }}'
;

DELETE examples

Deletes the specified UserID within the collection. Faces that are associated with the UserID are disassociated from the UserID before deleting the specified UserID. If the specified Collection or UserID is already deleted or not found, a ResourceNotFoundException will be thrown. If the action is successful with a 200 response, an empty HTTP body is returned.

DELETE FROM aws.rekognition.users
WHERE region = '{{ region }}' --required
;