public RoleInfo withRoleSessionName(String roleSessionName) {
        setRoleSessionName(roleSessionName);
        return this;
    }
<p>
An identifier for the assumed role session.
</p>
<p>
Use the role session name to uniquely identify a session when the same
role is assumed by different principals or for different reasons. In
cross-account scenarios, the role session name is visible to, and can be
logged by the account that owns the role. The role session name is also
used in the ARN of the assumed role principal. This means that subsequent
cross-account API requests using the temporary security credentials will
expose the role session name to the external account in their CloudTrail
logs.
</p>

@param roleSessionName
       An identifier for the assumed role session. </p>
       <p>
       Use the role session name to uniquely identify a session when the
       same role is assumed by different principals or for different
       reasons. In cross-account scenarios, the role session name is
       visible to, and can be logged by the account that owns the role.
       The role session name is also used in the ARN of the assumed role
       principal. This means that subsequent cross-account API requests
       using the temporary security credentials will expose the role
       session name to the external account in their CloudTrail logs.
@return Returns a reference to this object so that method calls can be
        chained together.
aws-java-sdk-core/src/main/java/com/amazonaws/auth/profile/internal/securitytoken/RoleInfo.java