public void setTags(java.util.Collection<Tag> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new com.amazonaws.internal.SdkInternalList<Tag>(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>

@param tags
       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