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

*************
delete_domain
*************



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

  

  Used to delete a domain. If you onboarded with IAM mode, you will need to delete your domain to onboard again using IAM Identity Center. Use with caution. All of the members of the domain will lose access to their EFS volume, including data, notebooks, and other artifacts.

  

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


  **Request Syntax**
  ::

    response = client.delete_domain(
        DomainId='string',
        RetentionPolicy={
            'HomeEfsFileSystem': 'Retain'|'Delete'
        }
    )
    
  :type DomainId: string
  :param DomainId: **[REQUIRED]** 

    The domain ID.

    

  
  :type RetentionPolicy: dict
  :param RetentionPolicy: 

    The retention policy for this domain, which specifies whether resources will be retained after the Domain is deleted. By default, all resources are retained (not automatically deleted).

    

  
    - **HomeEfsFileSystem** *(string) --* 

      The default is ``Retain``, which specifies to keep the data stored on the Amazon EFS volume.

       

      Specify ``Delete`` to delete the data stored on the Amazon EFS volume.

      

    
  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`SageMaker.Client.exceptions.ResourceNotFound`

  
  *   :py:class:`SageMaker.Client.exceptions.ResourceInUse`

  