public CreateTrainingDatasetRequest withRoleArn(String roleArn) {
        setRoleArn(roleArn);
        return this;
    }
<p>
The ARN of the IAM role that Clean Rooms ML can assume to read the data referred to in the
<code>dataSource</code> field of each dataset.
</p>
<p>
Passing a role across AWS accounts is not allowed. If you pass a role that isn't in your account, you get an
<code>AccessDeniedException</code> error.
</p>

@param roleArn
       The ARN of the IAM role that Clean Rooms ML can assume to read the data referred to in the
       <code>dataSource</code> field of each dataset.</p>
       <p>
       Passing a role across AWS accounts is not allowed. If you pass a role that isn't in your account, you get
       an <code>AccessDeniedException</code> error.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-cleanroomsml/src/main/java/com/amazonaws/services/cleanroomsml/model/CreateTrainingDatasetRequest.java