public CreateAccountRequest withTags(Tag... tags) {
        if (this.tags == null) {
            setTags(new java.util.ArrayList<Tag>(tags.length));
        }
        for (Tag ele : tags) {
            this.tags.add(ele);
        }
        return this;
    }
<p>
A list of tags that you want to attach to the newly created account. For each tag in the list, you must specify
both a tag key and a value. You can set the value to an empty string, but you can't set it to <code>null</code>.
For more information about tagging, see <a
href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html">Tagging Organizations
resources</a> in the Organizations User Guide.
</p>
<note>
<p>
If any one of the tags is not valid or if you exceed the maximum allowed number of tags for an account, then the
entire request fails and the account is not created.
</p>
</note>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
existing values.
</p>

@param tags
       A list of tags that you want to attach to the newly created account. For each tag in the list, you must
       specify both a tag key and a value. You can set the value to an empty string, but you can't set it to
       <code>null</code>. For more information about tagging, see <a
       href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html">Tagging Organizations
       resources</a> in the Organizations User Guide.</p> <note>
       <p>
       If any one of the tags is not valid or if you exceed the maximum allowed number of tags for an account,
       then the entire request fails and the account is not created.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-organizations/src/main/java/com/amazonaws/services/organizations/model/CreateAccountRequest.java