public CreateAssociationRequest withTargets(java.util.Collection<Target> targets) {
        setTargets(targets);
        return this;
    }
<p>
The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups,
all managed nodes in an Amazon Web Services account, or individual managed node IDs. 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>. For more information about choosing targets for an association, see <a href=
"https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html"
>About targets and rate controls in State Manager associations</a> in the <i>Amazon Web Services Systems Manager
User Guide</i>.
</p>

@param targets
       The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource
       groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. 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>. For more information about choosing targets for an association, see <a
       href=
       "https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html"
       >About targets and rate controls in State Manager associations</a> in the <i>Amazon Web Services Systems
       Manager User Guide</i>.
@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/CreateAssociationRequest.java