deletePolicy
inline suspend fun AutoScalingClient.deletePolicy(crossinline block: DeletePolicyRequest.Builder.() -> Unit): DeletePolicyResponse
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 Deleting a scaling policy in the Amazon EC2 Auto Scaling User Guide.
Samples
fun main() {
//sampleStart
// This example deletes the specified Auto Scaling policy.
autoScalingClient.deletePolicy {
autoScalingGroupName = "my-auto-scaling-group"
policyName = "my-step-scale-out-policy"
}
//sampleEnd
}