public TargetTrackingMetric withDimensions(java.util.Collection<TargetTrackingMetricDimension> dimensions) {
        setDimensions(dimensions);
        return this;
    }
<p>
The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services documentation
available from the table in <a
href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html">Amazon
Web Services services that publish CloudWatch metrics </a> in the <i>Amazon CloudWatch User Guide</i>.
</p>
<p>
Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling
policy.
</p>

@param dimensions
       The dimensions for the metric. For the list of available dimensions, see the Amazon Web Services
       documentation available from the table in <a href=
       "https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html"
       >Amazon Web Services services that publish CloudWatch metrics </a> in the <i>Amazon CloudWatch User
       Guide</i>. </p>
       <p>
       Conditional: If you published your metric with dimensions, you must specify the same dimensions in your
       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/TargetTrackingMetric.java