public Association withTargets(java.util.Collection<Target> targets) {
        setTargets(targets);
        return this;
    }
<p>
The managed nodes targeted by the request to create an association. You can target all managed nodes in an Amazon
Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>.
</p>

@param targets
       The managed nodes targeted by the request to create an association. You can target all managed nodes in an
       Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>.
@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/Association.java