:doc:`Rekognition <../../rekognition>` / Client / create_user

***********
create_user
***********



.. py:method:: Rekognition.Client.create_user(**kwargs)

  

  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.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/rekognition-2016-06-27/CreateUser>`_  


  **Request Syntax**
  ::

    response = client.create_user(
        CollectionId='string',
        UserId='string',
        ClientRequestToken='string'
    )
    
  :type CollectionId: string
  :param CollectionId: **[REQUIRED]** 

    The ID of an existing collection to which the new UserID needs to be created.

    

  
  :type UserId: string
  :param UserId: **[REQUIRED]** 

    ID for the UserID to be created. This ID needs to be unique within the collection.

    

  
  :type ClientRequestToken: string
  :param ClientRequestToken: 

    Idempotent token used to identify the request to ``CreateUser``. If you use the same token with multiple ``CreateUser`` requests, 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.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Rekognition.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Rekognition.Client.exceptions.ConflictException`

  
  *   :py:class:`Rekognition.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Rekognition.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`Rekognition.Client.exceptions.ProvisionedThroughputExceededException`

  
  *   :py:class:`Rekognition.Client.exceptions.IdempotentParameterMismatchException`

  
  *   :py:class:`Rekognition.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Rekognition.Client.exceptions.InternalServerError`

  
  *   :py:class:`Rekognition.Client.exceptions.ThrottlingException`

  