disassociate_faces
async
¶
disassociate_faces(
collection_id: CollectionId,
user_id: UserId,
face_ids: UserFaceIdList,
*,
config_overrides: Optional[AsyncRekognitionClientConfig] = None,
client_request_token: Optional[ClientRequestToken] = None,
) -> DisassociateFacesResponse
Removes the association between a Face supplied in an array of FaceIds and the User. If the User is not present already, then a ResourceNotFound exception 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.
Parameters:
-
collection_id(CollectionId) –The ID of an existing collection containing the UserID.
-
user_id(UserId) –ID for the existing UserID.
-
client_request_token(Optional[ClientRequestToken], default:None) –Idempotent token used to identify the request to
DisassociateFaces. If you use the same token with multipleDisassociateFacesrequests, the same response is returned. Use ClientRequestToken to prevent the same request from being processed more than once. -
face_ids(UserFaceIdList) –An array of face IDs to disassociate from the UserID.
Raises:
-
AccessDeniedException–You are not authorized to perform the action.
-
ConflictException–A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
-
IdempotentParameterMismatchException–A
ClientRequestTokeninput parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. -
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:
DisassociateFaces Removes the association between a Face supplied in an array of FaceIds and the User.
>>> await client.disassociate_faces(collection_id='MyCollection', user_id='DemoUser', face_ids=['f5817d37-94f6-4335-bfee-6cf79a3d806e', 'c92265d4-5f9c-43af-a58e-12be0ce02bc3'], client_request_token='550e8400-e29b-41d4-a716-446655440003')
Source code in docs_src/capo_rekognition/_services/async_rekognition.py
2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 | |