public PutScalingPolicyResult withAlarms(Alarm... alarms) {
        if (this.alarms == null) {
            setAlarms(new java.util.ArrayList<Alarm>(alarms.length));
        }
        for (Alarm ele : alarms) {
            this.alarms.add(ele);
        }
        return this;
    }
<p>
The CloudWatch alarms created for the target tracking scaling policy.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setAlarms(java.util.Collection)} or {@link #withAlarms(java.util.Collection)} if you want to override the
existing values.
</p>

@param alarms
       The CloudWatch alarms created for the target tracking scaling policy.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-applicationautoscaling/src/main/java/com/amazonaws/services/applicationautoscaling/model/PutScalingPolicyResult.java