:doc:`IdentityStore <../../identitystore>` / Client / get_user_id

***********
get_user_id
***********



.. py:method:: IdentityStore.Client.get_user_id(**kwargs)

  

  Retrieves the ``UserId`` in an identity store.

   

  .. note::

    

    If you have access to a member account, you can use this API operation from the member account. For more information, see `Limiting access to the identity store from member accounts <https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts>`__ in the *IAM Identity Center User Guide*.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/identitystore-2020-06-15/GetUserId>`_  


  **Request Syntax**
  ::

    response = client.get_user_id(
        IdentityStoreId='string',
        AlternateIdentifier={
            'ExternalId': {
                'Issuer': 'string',
                'Id': 'string'
            },
            'UniqueAttribute': {
                'AttributePath': 'string',
                'AttributeValue': {...}|[...]|123|123.4|'string'|True|None
            }
        }
    )
    
  :type IdentityStoreId: string
  :param IdentityStoreId: **[REQUIRED]** 

    The globally unique identifier for the identity store.

    

  
  :type AlternateIdentifier: dict
  :param AlternateIdentifier: **[REQUIRED]** 

    A unique identifier for a user or group that is not the primary identifier. This value can be an identifier from an external identity provider (IdP) that is associated with the user, the group, or a unique attribute. For the unique attribute, the only valid paths are ``userName`` and ``emails.value``.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``ExternalId``, ``UniqueAttribute``. 

  
    - **ExternalId** *(dict) --* 

      The identifier issued to this resource by an external identity provider.

      

    
      - **Issuer** *(string) --* **[REQUIRED]** 

        The issuer for an external identifier.

        

      
      - **Id** *(string) --* **[REQUIRED]** 

        The identifier issued to this resource by an external identity provider.

        

      
    
    - **UniqueAttribute** *(dict) --* 

      An entity attribute that's unique to a specific entity.

      

    
      - **AttributePath** *(string) --* **[REQUIRED]** 

        A string representation of the path to a given attribute or sub-attribute. Supports JMESPath.

        

      
      - **AttributeValue** (:ref:`document<document>`) -- **[REQUIRED]** 

        The value of the attribute. This is a ``Document`` type. This type is not supported by Java V1, Go V1, and older versions of the CLI.

        

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

    
    ::

      {
          'IdentityStoreId': 'string',
          'UserId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **IdentityStoreId** *(string) --* 

        The globally unique identifier for the identity store.

        
      

      - **UserId** *(string) --* 

        The identifier for a user in the identity store.

        
  
  **Exceptions**
  
  *   :py:class:`IdentityStore.Client.exceptions.ResourceNotFoundException`

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

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

  
  *   :py:class:`IdentityStore.Client.exceptions.InternalServerException`

  
  *   :py:class:`IdentityStore.Client.exceptions.ValidationException`

  