:doc:`CodeDeploy <../../codedeploy>` / Client / delete_deployment_group

***********************
delete_deployment_group
***********************



.. py:method:: CodeDeploy.Client.delete_deployment_group(**kwargs)

  

  Deletes a deployment group.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/DeleteDeploymentGroup>`_  


  **Request Syntax**
  ::

    response = client.delete_deployment_group(
        applicationName='string',
        deploymentGroupName='string'
    )
    
  :type applicationName: string
  :param applicationName: **[REQUIRED]** 

    The name of an CodeDeploy application associated with the user or Amazon Web Services account.

    

  
  :type deploymentGroupName: string
  :param deploymentGroupName: **[REQUIRED]** 

    The name of a deployment group for the specified application.

    

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

    
    ::

      {
          'hooksNotCleanedUp': [
              {
                  'name': 'string',
                  'hook': 'string',
                  'terminationHook': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of a ``DeleteDeploymentGroup`` operation.

      
      

      - **hooksNotCleanedUp** *(list) --* 

        If the output contains no data, and the corresponding deployment group contained at least one Auto Scaling group, CodeDeploy successfully removed all corresponding Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group. If the output contains data, CodeDeploy could not remove some Auto Scaling lifecycle event hooks from the Amazon EC2 instances in the Auto Scaling group.

        
        

        - *(dict) --* 

          Information about an Auto Scaling group.

          
          

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

            The Auto Scaling group name.

            
          

          - **hook** *(string) --* 

            The name of the launch hook that CodeDeploy installed into the Auto Scaling group.

             

            For more information about the launch hook, see `How Amazon EC2 Auto Scaling works with CodeDeploy <https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors>`__ in the *CodeDeploy User Guide*.

            
          

          - **terminationHook** *(string) --* 

            The name of the termination hook that CodeDeploy installed into the Auto Scaling group.

             

            For more information about the termination hook, see `Enabling termination deployments during Auto Scaling scale-in events <https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-enable>`__ in the *CodeDeploy User Guide*.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`CodeDeploy.Client.exceptions.ApplicationNameRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidApplicationNameException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.DeploymentGroupNameRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidDeploymentGroupNameException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidRoleException`

  