:doc:`imagebuilder <../../imagebuilder>` / Client / delete_image

************
delete_image
************



.. py:method:: imagebuilder.Client.delete_image(**kwargs)

  

  Deletes an Image Builder image resource. This does not delete any EC2 AMIs or ECR container images that are created during the image build process. You must clean those up separately, using the appropriate Amazon EC2 or Amazon ECR console actions, or API or CLI commands.

   

  
  * To deregister an EC2 Linux AMI, see `Deregister your Linux AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html>`__ in the *Amazon EC2 User Guide* .
   
  * To deregister an EC2 Windows AMI, see `Deregister your Windows AMI <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/deregister-ami.html>`__ in the *Amazon EC2 Windows Guide* .
   
  * To delete a container image from Amazon ECR, see `Deleting an image <https://docs.aws.amazon.com/AmazonECR/latest/userguide/delete_image.html>`__ in the *Amazon ECR User Guide*.
  

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/imagebuilder-2019-12-02/DeleteImage>`_  


  **Request Syntax**
  ::

    response = client.delete_image(
        imageBuildVersionArn='string'
    )
    
  :type imageBuildVersionArn: string
  :param imageBuildVersionArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the Image Builder image resource to delete.

    

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

    
    ::

      {
          'requestId': 'string',
          'imageBuildVersionArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **requestId** *(string) --* 

        The request ID that uniquely identifies this request.

        
      

      - **imageBuildVersionArn** *(string) --* 

        The Amazon Resource Name (ARN) of the Image Builder image resource that this request deleted.

        
  
  **Exceptions**
  
  *   :py:class:`imagebuilder.Client.exceptions.ServiceException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ClientException`

  
  *   :py:class:`imagebuilder.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ForbiddenException`

  
  *   :py:class:`imagebuilder.Client.exceptions.CallRateLimitExceededException`

  
  *   :py:class:`imagebuilder.Client.exceptions.ResourceDependencyException`

  