How to know "keys" for Entity::create() The document says Entity::create() takes 


  "$values (optional) An array of values to set, keyed by property name"


as an arguement.

I also found snippets like  

$term = Term::create([
    'name' =&gt; $term_name,
    'vid' =&gt; $vocabulary_name,
  ]);


and they worked.

But how exactly do you know what kind of values can be set in the array?
In the case above, where did people take the keys 'name' and 'vid' from?
If you look at the of baseFieldDefinitions method in class Term:

Here is a list of fields you can set in create Term:


tid : Term ID
uuid : The term UUID.
vid: The vocabulary to which the term is assigned.
langcode : The term language code.
name : Name of term.
description : description of term
weight : weight of term.
parent : Term parent.


Example: 

$term = Term::create([
    'name' =&gt; 'term name',
    'vid' =&gt; 'tags',
    'status' =&gt; 1,
    'tid' =&gt; 13,
    'uuid' =&gt; 1,
    'langcode' =&gt; 'en',
    'description' =&gt; 'tags description',
    'weight' =&gt; -12,
    //'parent' =&gt; parent tid
  ]);
  $term-&gt;save();