public PutRecommendationPreferencesRequest withExternalMetricsPreference(ExternalMetricsPreference externalMetricsPreference) {
        setExternalMetricsPreference(externalMetricsPreference);
        return this;
    }
<p>
The provider of the external metrics recommendation preference to create or update.
</p>
<p>
Specify a valid provider in the <code>source</code> field to activate the preference. To delete this preference,
see the <a>DeleteRecommendationPreferences</a> action.
</p>
<p>
This preference can only be set for the <code>Ec2Instance</code> resource type.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html">External metrics
ingestion</a> in the <i>Compute Optimizer User Guide</i>.
</p>

@param externalMetricsPreference
       The provider of the external metrics recommendation preference to create or update.</p>
       <p>
       Specify a valid provider in the <code>source</code> field to activate the preference. To delete this
       preference, see the <a>DeleteRecommendationPreferences</a> action.
       </p>
       <p>
       This preference can only be set for the <code>Ec2Instance</code> resource type.
       </p>
       <p>
       For more information, see <a
       href="https://docs.aws.amazon.com/compute-optimizer/latest/ug/external-metrics-ingestion.html">External
       metrics ingestion</a> in the <i>Compute Optimizer User Guide</i>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-computeoptimizer/src/main/java/com/amazonaws/services/computeoptimizer/model/PutRecommendationPreferencesRequest.java