deleteScalingPolicy

Deletes the specified scaling policy for an Application Auto Scaling scalable target.

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

For more information, see Delete a step scaling policy and Delete a target tracking scaling policy in the Application Auto Scaling User Guide.

Samples


fun main() { 
   //sampleStart 
   // This example deletes a scaling policy for the Amazon ECS service called web app, which is running in
// the default cluster.
val resp = applicationAutoScalingClient.deleteScalingPolicy {
    policyName = "web-app-cpu-lt-25"
    serviceNamespace = ServiceNamespace.fromValue("ecs")
    resourceId = "service/default/web-app"
    scalableDimension = ScalableDimension.fromValue("ecs:service:DesiredCount")
} 
   //sampleEnd
}