AWS code-library documentation change
Summary
Removed DisassociateFaces code example including implementation details and API reference
Security assessment
The change removes a code sample but shows no evidence of addressing a security vulnerability. Deletion of API examples doesn't indicate security remediation unless explicitly stated. No security advisories or vulnerability references are present in the diff.
Diff
diff --git a/code-library/latest/ug/python_3_rekognition_code_examples.md b/code-library/latest/ug/python_3_rekognition_code_examples.md index 13fba9c04..b99a590de 100644 --- a//code-library/latest/ug/python_3_rekognition_code_examples.md +++ b//code-library/latest/ug/python_3_rekognition_code_examples.md @@ -626,54 +625,0 @@ There's more on GitHub. Find the complete example and learn how to set up and ru -The following code example shows how to use `DisassociateFaces`. - -**SDK for Python (Boto3)** - - - - from botocore.exceptions import ClientError - import boto3 - import logging - - logger = logging.getLogger(__name__) - session = boto3.Session(profile_name='profile-name') - client = session.client('rekognition') - - def disassociate_faces(collection_id, user_id, face_ids): - """ - Disassociate stored faces within collection to the given user - - :param collection_id: The ID of the collection where user and faces are stored. - :param user_id: The ID of the user that we want to disassociate faces from - :param face_ids: The list of face IDs to be disassociated from the given user - - :return: response of AssociateFaces API - """ - logger.info(f'Disssociating faces from user: {user_id}, {face_ids}') - try: - response = client.disassociate_faces( - CollectionId=collection_id, - UserId=user_id, - FaceIds=face_ids - ) - print(f'- disassociated {len(response["DisassociatedFaces"])} faces') - except ClientError: - logger.exception("Failed to disassociate faces from the given user") - raise - else: - print(response) - return response - - def main(): - face_ids = ["faceId1", "faceId2"] - collection_id = "collection-id" - user_id = "user-id" - disassociate_faces(collection_id, user_id, face_ids) - - if __name__ == "__main__": - main() - - - * For API details, see [DisassociateFaces](https://docs.aws.amazon.com/goto/boto3/rekognition-2016-06-27/DisassociateFaces) in _AWS SDK for Python (Boto3) API Reference_. - - - -