User
User is an input used to reference users that exist in Port.
๐ก Common user usageโ
The user input type can be used to reference any user that exists in Port, for example:
- The code owners
- The current on-call
- The lead maintainer
In the live demo self-service hub page, we can see the change on-call action whose On-Call
input is a user input. ๐ฌ
API definitionโ
- Basic
- Array
{
"myUserInput": {
"title": "My user input",
"icon": "My icon",
"description": "My user input",
"type": "string",
"format": "user",
"default": "me@example.com"
}
}
{
"myUserArrayInput": {
"title": "My user array input",
"icon": "My icon",
"description": "My user array input",
"type": "array",
"items": {
"type": "string",
"format": "user"
}
}
}
Check out Port's API reference to learn more.
Terraform definitionโ
- Basic
- Array
resource "port_action" "myAction" {
# ...action properties
user_properties = {
string_props = {
"myUserInput" = {
title = "My user input"
description = "My user input"
format = "user"
default = "me@example.com"
}
}
}
}
resource "port_action" "myAction" {
# ...action properties
user_properties = {
array_props = {
"myUserArrayInput" = {
title = "My user array input"
description = "My user array input"
format = "user"
}
}
}
}