public Tag withKey(String key) {
        setKey(key);
        return this;
    }
<p>
Required name of the tag. The string value can be Unicode characters and cannot be prefixed with "aws:". The
string can contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java
regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").
</p>

@param key
       Required name of the tag. The string value can be Unicode characters and cannot be prefixed with "aws:".
       The string can contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-'
       (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-directory/src/main/java/com/amazonaws/services/directory/model/Tag.java