delete_user
async
¶
delete_user(
collection_id: CollectionId,
user_id: UserId,
*,
config_overrides: Optional[AsyncRekognitionClientConfig] = None,
client_request_token: Optional[ClientRequestToken] = None,
) -> DeleteUserResponse
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.
Parameters:
-
collection_id(CollectionId) –The ID of an existing collection from which the UserID needs to be deleted.
-
user_id(UserId) –ID for the UserID to be deleted.
-
client_request_token(Optional[ClientRequestToken], default:None) –Idempotent token used to identify the request to
DeleteUser. If you use the same token with multipleDeleteUserrequests, the same response is returned. Use ClientRequestToken to prevent the same request from being processed more than once.
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:
DeleteUser Deletes the specified UserID within the collection.
>>> await client.delete_user(collection_id='MyCollection', user_id='DemoUser', client_request_token='550e8400-e29b-41d4-a716-446655440001')
Source code in docs_src/capo_rekognition/_services/async_rekognition.py
1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 | |