:doc:`SageMaker <../../sagemaker>` / Client / delete_workforce

****************
delete_workforce
****************



.. py:method:: SageMaker.Client.delete_workforce(**kwargs)

  

  Use this operation to delete a workforce.

   

  If you want to create a new workforce in an Amazon Web Services Region where a workforce already exists, use this operation to delete the existing workforce and then use `CreateWorkforce <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateWorkforce.html>`__ to create a new workforce.

   

  .. warning::

     

    If a private workforce contains one or more work teams, you must use the `DeleteWorkteam <https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DeleteWorkteam.html>`__ operation to delete all work teams before you delete the workforce. If you try to delete a workforce that contains one or more work teams, you will receive a ``ResourceInUse`` error.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/DeleteWorkforce>`_  


  **Request Syntax**
  ::

    response = client.delete_workforce(
        WorkforceName='string'
    )
    
  :type WorkforceName: string
  :param WorkforceName: **[REQUIRED]** 

    The name of the workforce.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  