:doc:`AutoScaling <../../autoscaling>` / Client / delete_policy

*************
delete_policy
*************



.. py:method:: AutoScaling.Client.delete_policy(**kwargs)

  

  Deletes the specified scaling policy.

   

  Deleting either a step scaling policy or a simple scaling policy deletes the underlying alarm action, but does not delete the alarm, even if it no longer has an associated action.

   

  For more information, see `Delete a scaling policy <https://docs.aws.amazon.com/autoscaling/ec2/userguide/deleting-scaling-policy.html>`__ in the *Amazon EC2 Auto Scaling User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeletePolicy>`_  


  **Request Syntax**
  ::

    response = client.delete_policy(
        AutoScalingGroupName='string',
        PolicyName='string'
    )
    
  :type AutoScalingGroupName: string
  :param AutoScalingGroupName: 

    The name of the Auto Scaling group.

    

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

    The name or Amazon Resource Name (ARN) of the policy.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`AutoScaling.Client.exceptions.ResourceContentionFault`

  
  *   :py:class:`AutoScaling.Client.exceptions.ServiceLinkedRoleFailure`

  

  **Examples**

  This example deletes the specified Auto Scaling policy.
  ::

    response = client.delete_policy(
        AutoScalingGroupName='my-auto-scaling-group',
        PolicyName='my-step-scale-out-policy',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  