Skip to main content

User

User is a data type used to reference users that exist in Port.

💡 Common user usage

The user property type can be used to reference any user that exists in Port, for example:

  • The code owners;
  • The current on-call;
  • The lead maintainer;
  • etc.

In this live demo example, we can see the On Call user property. 🎬

note

Even though the input is the same in both email and user formats, their presentation is different:

  • email format displays the raw email string;
  • user format displays the user's name and avatar from Port's list of known users.

In addition, user format distinguishes between users by their status:

User StatusExample
ActiveActive user
InvitedInvited user
UnregisteredExternal user

API definition

{
"myUserProp": {
"title": "My user",
"icon": "My icon",
"description": "My user property",
"type": "string",
"format": "user",
"default": "me@example.com"
}
}

Check out Port's API reference to learn more.

Terraform definition

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

Pulumi definition

"""A Python Pulumi program"""

import pulumi
from port_pulumi import Blueprint,BlueprintPropertyArgs,BlueprintPropertiesArgs

blueprint = Blueprint(
"myBlueprint",
identifier="myBlueprint",
title="My Blueprint",
properties=BlueprintPropertiesArgs(
string_props={
"myUserProp": BlueprintPropertyArgs(
title="My user",
required=False,
format="user",
)
}
),
relations={}
)