:doc:`VPCLattice <../../vpc-lattice>` / Client / delete_target_group

*******************
delete_target_group
*******************



.. py:method:: VPCLattice.Client.delete_target_group(**kwargs)

  

  Deletes a target group. You can't delete a target group if it is used in a listener rule or if the target group creation is in progress.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/vpc-lattice-2022-11-30/DeleteTargetGroup>`_  


  **Request Syntax**
  ::

    response = client.delete_target_group(
        targetGroupIdentifier='string'
    )
    
  :type targetGroupIdentifier: string
  :param targetGroupIdentifier: **[REQUIRED]** 

    The ID or ARN of the target group.

    

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

    
    ::

      {
          'id': 'string',
          'arn': 'string',
          'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **id** *(string) --* 

        The ID of the target group.

        
      

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

        The Amazon Resource Name (ARN) of the target group.

        
      

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

        The status. You can retry the operation if the status is ``DELETE_FAILED``. However, if you retry it while the status is ``DELETE_IN_PROGRESS``, the status doesn't change.

        
  
  **Exceptions**
  
  *   :py:class:`VPCLattice.Client.exceptions.ValidationException`

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

  
  *   :py:class:`VPCLattice.Client.exceptions.ResourceNotFoundException`

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

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

  