public AutoRollbackConfig 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>
List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint. If any alarms
are tripped during a deployment, SageMaker rolls back the deployment.
</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
       List of CloudWatch alarms in your account that are configured to monitor metrics on an endpoint. If any
       alarms are tripped during a deployment, SageMaker rolls back the deployment.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/AutoRollbackConfig.java