Skip to main content

Check out Port for yourselfย 

URL

URL is a data type used to save links to websites.

Common url usageโ€‹

The URL property type can be used to store a link to any web resource, for example:

  • Link to Datadog dashboard
  • Link to Sentry tracing
  • Link to pull request

API definitionโ€‹

Limit fieldโ€‹

When creating a blueprint property of type URL in the UI, use the limit field to define how many values users can select for that property.

In the property creation form, the limit field dropdown provides two options:

  • 1 value: Only one value can be selected.
  • List of values: Multiple values can be selected.

Selecting the list of values option will set the property's type to array in the JSON definition.

Limit field restriction

The limit field setting, whether it's 1 value or a list of values, is permanent and cannot be changed after the property is created. If you create a property with a single value limit, you wonโ€™t be able to change it later to allow multiple values.

To change the limit configuration after creation, you have two options:

{
"myUrlProp": {
"title": "My url",
"icon": "My icon",
"description": "My url property",
"type": "string",
"format": "url",
"default": "https://example.com"
}
}

Check out Port's API reference to learn more.

Terraform definitionโ€‹

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

Pulumi definitionโ€‹

"""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={
"myUrlProp": BlueprintPropertiesStringPropsArgs(
title="My url", required=False, format="url"
),
}
),
relations={}
)