团队
团队是一个输入项,被用来引用存在于 Port 中的团队。
💡 团队常用 Usage
例如,团队输入类型可被用来 引用任何存在于 Port 中的团队:
- 服务拥有团队;
- 当前待命人员
- 主要维护者;
- 等等。
在live demo 自助中心页面,我们可以看到新服务脚手架操作,其 "Owning Team "输入是用户输入。
应用程序接口定义
- Basic
- Array
{
"myTeamInput": {
"title": "My team input",
"icon": "My icon",
"description": "My team input",
"type": "string",
"format": "team",
"default": "my-team"
}
}
{
"myTeamArrayInput": {
"title": "My team array input",
"icon": "My icon",
"description": "My team array input",
"type": "array",
"items": {
"type": "string",
"format": "team"
}
}
}
Check out Port's API reference to learn more.
Terraform 定义
- Basic
- Array
resource "port_action" "myAction" {
# ...action properties
user_properties = {
string_props = {
myTeamInput = {
title = "My team input"
description = "My team input"
format = "team"
default = "my-team"
}
}
}
}
resource "port_action" "myAction" {
# ...action properties
user_properties = {
array_props = {
myTeamArrayInput = {
title = "My team array input"
description = "My team array input"
format = "team"
}
}
}
}