public PlacementConstraint withExpression(String expression) {
        setExpression(expression);
        return this;
    }
<p>
A cluster query language expression to apply to the constraint. You cannot specify an expression if the
constraint type is <code>distinctInstance</code>. To learn more, see <a
href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster Query
Language</a> in the Amazon Elastic Container Service Developer Guide.
</p>

@param expression
       A cluster query language expression to apply to the constraint. You cannot specify an expression if the
       constraint type is <code>distinctInstance</code>. To learn more, see <a
       href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html">Cluster
       Query Language</a> in the Amazon Elastic Container Service Developer Guide.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-events/src/main/java/com/amazonaws/services/cloudwatchevents/model/PlacementConstraint.java