:doc:`GuardDuty <../../guardduty>` / Client / delete_members

**************
delete_members
**************



.. py:method:: GuardDuty.Client.delete_members(**kwargs)

  

  Deletes GuardDuty member accounts (to the current GuardDuty administrator account) specified by the account IDs.

   

  With ``autoEnableOrganizationMembers`` configuration for your organization set to ``ALL``, you'll receive an error if you attempt to disable GuardDuty for a member account in your organization.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/DeleteMembers>`_  


  **Request Syntax**
  ::

    response = client.delete_members(
        DetectorId='string',
        AccountIds=[
            'string',
        ]
    )
    
  :type DetectorId: string
  :param DetectorId: **[REQUIRED]** 

    The unique ID of the detector of the GuardDuty account whose members you want to delete.

     

    To find the ``detectorId`` in the current Region, see the Settings page in the GuardDuty console, or run the `ListDetectors <https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html>`__ API.

    

  
  :type AccountIds: list
  :param AccountIds: **[REQUIRED]** 

    A list of account IDs of the GuardDuty member accounts that you want to delete.

    

  
    - *(string) --* 

    

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

    
    ::

      {
          'UnprocessedAccounts': [
              {
                  'AccountId': 'string',
                  'Result': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **UnprocessedAccounts** *(list) --* 

        The accounts that could not be processed.

        
        

        - *(dict) --* 

          Contains information about the accounts that weren't processed.

          
          

          - **AccountId** *(string) --* 

            The Amazon Web Services account ID.

            
          

          - **Result** *(string) --* 

            A reason why the account hasn't been processed.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`GuardDuty.Client.exceptions.BadRequestException`

  
  *   :py:class:`GuardDuty.Client.exceptions.InternalServerErrorException`

  