public RunInstancesRequest withUserData(String userData) {
        setUserData(userData);
        return this;
    }
<p>
The user data to make available to the instance. User data must be base64-encoded. Depending on the tool or SDK
that you're using, the base64-encoding might be performed for you. For more information, see <a
href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html">Work with instance
user data</a>.
</p>

@param userData
       The user data to make available to the instance. User data must be base64-encoded. Depending on the tool
       or SDK that you're using, the base64-encoding might be performed for you. For more information, see <a
       href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-add-user-data.html">Work with
       instance user data</a>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/RunInstancesRequest.java