What's the "key" of a model?

I’m reading the “Generating Code with Gii” section of the guide. I noticed that there was a “id” request param in the URL of action buttons(“view”, “update”,“delete” etc.). After some investigation, I found it might get value from the key of the “Country” model. From the document of public property $buttons in yii\grid\ActionColumn which, I thought, create the buttons and the URLs, I found this:"… and $key is the key of the model in the data provider array". My question is: As there is only a primary key “code” in country table here, it’s no doubt that “code” is the key. But if there are many keys in a table, how Yii2 decide which key should be used?

It is a primary key.