:doc:`DirectoryServiceData <../../ds-data>` / Client / add_group_member

****************
add_group_member
****************



.. py:method:: DirectoryServiceData.Client.add_group_member(**kwargs)

  

  Adds an existing user, group, or computer as a group member.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/directory-service-data-2023-05-31/AddGroupMember>`_  


  **Request Syntax**
  ::

    response = client.add_group_member(
        ClientToken='string',
        DirectoryId='string',
        GroupName='string',
        MemberName='string',
        MemberRealm='string'
    )
    
  :type ClientToken: string
  :param ClientToken: 

    A unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.

     

    A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.

     

    If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an ``ConflictException``.

     

    .. note::

      

      This parameter is optional when using the CLI or SDK.

      

    This field is autopopulated if not provided.

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

    The identifier (ID) of the directory that's associated with the group.

    

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

    The name of the group.

    

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

    The ``SAMAccountName`` of the user, group, or computer to add as a group member.

    

  
  :type MemberRealm: string
  :param MemberRealm: 

    The domain name that's associated with the group member. This parameter is required only when adding a member outside of your Managed Microsoft AD domain to a group inside of your Managed Microsoft AD domain. This parameter defaults to the Managed Microsoft AD domain.

     

    .. note::

      

      This parameter is case insensitive.

      

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`DirectoryServiceData.Client.exceptions.ResourceNotFoundException`

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

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

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

  
  *   :py:class:`DirectoryServiceData.Client.exceptions.DirectoryUnavailableException`

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

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

  