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

*********************************
list_group_memberships_for_member
*********************************



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

  

  For the specified member in the specified identity store, returns the list of all ``GroupMembership`` objects and returns results in paginated form.

   

  .. 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/ListGroupMembershipsForMember>`_  


  **Request Syntax**
  ::

    response = client.list_group_memberships_for_member(
        IdentityStoreId='string',
        MemberId={
            'UserId': 'string'
        },
        MaxResults=123,
        NextToken='string'
    )
    
  :type IdentityStoreId: string
  :param IdentityStoreId: **[REQUIRED]** 

    The globally unique identifier for the identity store.

    

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

    An object that contains the identifier of a group member. Setting the ``UserID`` field to the specific identifier for a user indicates that the user is a member of the group.

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

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

      An object containing the identifiers of resources that can be members.

      

    
  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to be returned per request. This parameter is used in the ``ListUsers`` and ``ListGroups`` requests to specify how many results to return in one page. The length limit is 50 characters.

    

  
  :type NextToken: string
  :param NextToken: 

    The pagination token used for the ``ListUsers``, ``ListGroups``, and ``ListGroupMemberships`` API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.

    

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

    
    ::

      {
          'GroupMemberships': [
              {
                  'IdentityStoreId': 'string',
                  'MembershipId': 'string',
                  'GroupId': 'string',
                  'MemberId': {
                      'UserId': 'string'
                  },
                  'CreatedAt': datetime(2015, 1, 1),
                  'UpdatedAt': datetime(2015, 1, 1),
                  'CreatedBy': 'string',
                  'UpdatedBy': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **GroupMemberships** *(list) --* 

        A list of ``GroupMembership`` objects in the group for a specified member.

        
        

        - *(dict) --* 

          Contains the identifiers for a group, a group member, and a ``GroupMembership`` object in the identity store.

          
          

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

            The globally unique identifier for the identity store.

            
          

          - **MembershipId** *(string) --* 

            The identifier for a ``GroupMembership`` object in an identity store.

            
          

          - **GroupId** *(string) --* 

            The identifier for a group in the identity store.

            
          

          - **MemberId** *(dict) --* 

            An object that contains the identifier of a group member. Setting the ``UserID`` field to the specific identifier for a user indicates that the user is a member of the group.

            .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``UserId``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


          
            

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

              An object containing the identifiers of resources that can be members.

              
        
          

          - **CreatedAt** *(datetime) --* 

            The date and time the group membership was created.

            
          

          - **UpdatedAt** *(datetime) --* 

            The date and time the group membership was last updated.

            
          

          - **CreatedBy** *(string) --* 

            The identifier of the user or system that created the group membership.

            
          

          - **UpdatedBy** *(string) --* 

            The identifier of the user or system that last updated the group membership.

            
      
    
      

      - **NextToken** *(string) --* 

        The pagination token used for the ``ListUsers``, ``ListGroups``, and ``ListGroupMemberships`` API operations. This value is generated by the identity store service. It is returned in the API response if the total results are more than the size of one page. This token is also returned when it is used in the API request to search for the next page.

        
  
  **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`

  