public CloudWatchAlarmConfiguration withDimensions(Dimension... dimensions) {
        if (this.dimensions == null) {
            setDimensions(new com.amazonaws.internal.SdkInternalList<Dimension>(dimensions.length));
        }
        for (Dimension ele : dimensions) {
            this.dimensions.add(ele);
        }
        return this;
    }
<p>
For the metric that the CloudWatch alarm is associated with, a complex type that contains information about the
dimensions for the metric. For information, see <a
href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html">Amazon
CloudWatch Namespaces, Dimensions, and Metrics Reference</a> in the <i>Amazon CloudWatch User Guide</i>.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setDimensions(java.util.Collection)} or {@link #withDimensions(java.util.Collection)} if you want to
override the existing values.
</p>

@param dimensions
       For the metric that the CloudWatch alarm is associated with, a complex type that contains information
       about the dimensions for the metric. For information, see <a
       href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html">Amazon
       CloudWatch Namespaces, Dimensions, and Metrics Reference</a> in the <i>Amazon CloudWatch User Guide</i>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/CloudWatchAlarmConfiguration.java