public java.util.List<Tag> getTags() {
        if (tags == null) {
            tags = new com.amazonaws.internal.SdkInternalList<Tag>();
        }
        return tags;
    }
<p>
A list of tags that you want to attach to the new role. Each tag consists of a key name and an associated value.
For more information about tagging, see <a
href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User
Guide</i>.
</p>
<note>
<p>
If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request
fails and the resource is not created.
</p>
</note>

@return A list of tags that you want to attach to the new role. Each tag consists of a key name and an associated
        value. For more information about tagging, see <a
        href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the
        <i>IAM User Guide</i>.</p> <note>
        <p>
        If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire
        request fails and the resource is not created.
        </p>
aws-java-sdk-iam/src/main/java/com/amazonaws/services/identitymanagement/model/CreateRoleRequest.java