Rekognition / Client / disassociate_faces
disassociate_faces#
- Rekognition.Client.disassociate_faces(**kwargs)#
- Removes the association between a - Facesupplied in an array of- FaceIdsand the User. If the User is not present already, then a- ResourceNotFoundexception is thrown. If successful, an array of faces that are disassociated from the User is returned. If a given face is already disassociated from the given UserID, it will be ignored and not be returned in the response. If a given face is already associated with a different User or not found in the collection it will be returned as part of- UnsuccessfulDisassociations. You can remove 1 - 100 face IDs from a user at one time.- See also: AWS API Documentation - Request Syntax- response = client.disassociate_faces( CollectionId='string', UserId='string', ClientRequestToken='string', FaceIds=[ 'string', ] ) - Parameters:
- CollectionId (string) – - [REQUIRED] - The ID of an existing collection containing the UserID. 
- UserId (string) – - [REQUIRED] - ID for the existing UserID. 
- ClientRequestToken (string) – - Idempotent token used to identify the request to - DisassociateFaces. If you use the same token with multiple- DisassociateFacesrequests, the same response is returned. Use ClientRequestToken to prevent the same request from being processed more than once.- This field is autopopulated if not provided. 
- FaceIds (list) – - [REQUIRED] - An array of face IDs to disassociate from the UserID. - (string) – 
 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'DisassociatedFaces': [ { 'FaceId': 'string' }, ], 'UnsuccessfulFaceDisassociations': [ { 'FaceId': 'string', 'UserId': 'string', 'Reasons': [ 'FACE_NOT_FOUND'|'ASSOCIATED_TO_A_DIFFERENT_USER', ] }, ], 'UserStatus': 'ACTIVE'|'UPDATING'|'CREATING'|'CREATED' } - Response Structure- (dict) – - DisassociatedFaces (list) – - An array of DissociatedFace objects containing FaceIds that are successfully disassociated with the UserID is returned. Returned if the DisassociatedFaces action is successful. - (dict) – - Provides face metadata for the faces that are disassociated from a specific UserID. - FaceId (string) – - Unique identifier assigned to the face. 
 
 
- UnsuccessfulFaceDisassociations (list) – - An array of UnsuccessfulDisassociation objects containing FaceIds that are not successfully associated, along with the reasons for the failure to associate. Returned if the DisassociateFaces action is successful. - (dict) – - Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully disassociated. - FaceId (string) – - A unique identifier assigned to the face. 
- UserId (string) – - A provided ID for the UserID. Unique within the collection. 
- Reasons (list) – - The reason why the deletion was unsuccessful. - (string) – 
 
 
 
- UserStatus (string) – - The status of an update made to a User. Reflects if the User has been updated for every requested change. 
 
 
 - Exceptions- Rekognition.Client.exceptions.InvalidParameterException
- Rekognition.Client.exceptions.AccessDeniedException
- Rekognition.Client.exceptions.InternalServerError
- Rekognition.Client.exceptions.ThrottlingException
- Rekognition.Client.exceptions.ProvisionedThroughputExceededException
- Rekognition.Client.exceptions.IdempotentParameterMismatchException
- Rekognition.Client.exceptions.ResourceNotFoundException
- Rekognition.Client.exceptions.ConflictException