public void setThresholdMetricId(String thresholdMetricId) {
        this.thresholdMetricId = thresholdMetricId;
    }
<p>
If this is an alarm based on an anomaly detection model, make this value match the ID of the
<code>ANOMALY_DETECTION_BAND</code> function.
</p>
<p>
For an example of how to use this parameter, see the <b>Anomaly Detection Model Alarm</b> example on this page.
</p>
<p>
If your alarm uses this parameter, it cannot have Auto Scaling actions.
</p>

@param thresholdMetricId
       If this is an alarm based on an anomaly detection model, make this value match the ID of the
       <code>ANOMALY_DETECTION_BAND</code> function.</p>
       <p>
       For an example of how to use this parameter, see the <b>Anomaly Detection Model Alarm</b> example on this
       page.
       </p>
       <p>
       If your alarm uses this parameter, it cannot have Auto Scaling actions.
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/model/PutMetricAlarmRequest.java