public CreateAssociationRequest withInstanceId(String instanceId) {
        setInstanceId(instanceId);
        return this;
    }
<p>
The managed node ID.
</p>
<note>
<p>
<code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the
<code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager
documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter
<code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>,
<code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or
<code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.
</p>
</note>

@param instanceId
       The managed node ID.</p> <note>
       <p>
       <code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the
       <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems
       Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use
       the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>,
       <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>,
       <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the
       <code>Targets</code> parameter.
       </p>
@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