Skip to main content

团队

团队是一种数据类型,用于引用存在于 Port 中的团队。

💡 团队常用 Usage

例如,团队属性类型可被用来引用任何存在于 Port 中的团队:

  • 服务拥有团队;
  • 当前待命人员
  • 主要维护者;
  • 等等。

live demo 这个例子中,我们可以看到 Team 团队属性。

应用程序接口定义

{
"myTeamProp": {
"title": "My team",
"icon": "My icon",
"description": "My team property",
"type": "string",
"format": "team",
"default": "my-team"
}
}

Check out Port's API reference to learn more.

Terraform 定义

resource "port_blueprint" "myBlueprint" {
# ...blueprint properties
properties = {
string_props = {
myTeamProp = {
title = "My team"
required = false
format = "team"
}
}
}
}

Pulumi 的定义

"""A Python Pulumi program"""

import pulumi
from port_pulumi import Blueprint,BlueprintPropertiesArgs,BlueprintPropertiesStringPropsArgs

blueprint = Blueprint(
"myBlueprint",
identifier="myBlueprint",
title="My Blueprint",
properties=BlueprintPropertiesArgs(
string_props={
"myTeamProp": BlueprintPropertiesStringPropsArgs(
title="My team",
required=False,
format="team",
)
}
),
relations={}
)