用户
User 是用于引用 Port 中存在的用户的输入。
💡 用户常用 Usage
例如,用户输入类型可被用来引用 Port 中 存在的任何用户:
- Owners;
- 当前值班人员
- 主要维护者;
- 等等。
在live demo 自助服务中枢页面,我们可以看到更改待命操作,其 "待命 "输入是用户输入。
应用程序接口定义
- Basic
- Array
{
"myUserInput": {
"title": "My user input",
"icon": "My icon",
"description": "My user input",
"type": "string",
"format": "user",
"default": "[email protected]"
}
}
{
"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 定义
- Basic
- Array
resource "port_action" "myAction" {
# ...action properties
user_properties = {
string_props = {
"myUserInput" = {
title = "My user input"
description = "My user input"
format = "user"
default = "[email protected]"
}
}
}
}
resource "port_action" "myAction" {
# ...action properties
user_properties = {
array_props = {
"myUserArrayInput" = {
title = "My user array input"
description = "My user array input"
format = "user"
}
}
}
}