:doc:`CodeArtifact <../../codeartifact>` / Client / delete_domain

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



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

  

  Deletes a domain. You cannot delete a domain that contains repositories. If you want to delete a domain with repositories, first delete its repositories.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/DeleteDomain>`_  


  **Request Syntax**
  ::

    response = client.delete_domain(
        domain='string',
        domainOwner='string'
    )
    
  :type domain: string
  :param domain: **[REQUIRED]** 

    The name of the domain to delete.

    

  
  :type domainOwner: string
  :param domainOwner: 

    The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

    

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

    
    ::

      {
          'domain': {
              'name': 'string',
              'owner': 'string',
              'arn': 'string',
              'status': 'Active'|'Deleted',
              'createdTime': datetime(2015, 1, 1),
              'encryptionKey': 'string',
              'repositoryCount': 123,
              'assetSizeBytes': 123,
              's3BucketArn': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **domain** *(dict) --* 

        Contains information about the deleted domain after processing the request.

        
        

        - **name** *(string) --* 

          The name of the domain.

          
        

        - **owner** *(string) --* 

          The Amazon Web Services account ID that owns the domain.

          
        

        - **arn** *(string) --* 

          The Amazon Resource Name (ARN) of the domain.

          
        

        - **status** *(string) --* 

          The current status of a domain.

          
        

        - **createdTime** *(datetime) --* 

          A timestamp that represents the date and time the domain was created.

          
        

        - **encryptionKey** *(string) --* 

          The ARN of an Key Management Service (KMS) key associated with a domain.

          
        

        - **repositoryCount** *(integer) --* 

          The number of repositories in the domain.

          
        

        - **assetSizeBytes** *(integer) --* 

          The total size of all assets in the domain.

          
        

        - **s3BucketArn** *(string) --* 

          The Amazon Resource Name (ARN) of the Amazon S3 bucket that is used to store package assets in the domain.

          
    
  
  **Exceptions**
  
  *   :py:class:`CodeArtifact.Client.exceptions.AccessDeniedException`

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

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

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

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

  