public Command withTargets(java.util.Collection<Target> targets) {
        setTargets(targets);
        return this;
    }
<p>
An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is
required if you don't provide one or more managed node IDs in the call.
</p>

@param targets
       An array of search criteria that targets managed nodes using a Key,Value combination that you specify.
       Targets is required if you don't provide one or more managed node IDs in the call.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/Command.java