Skip to main content

Check out Port for yourselfย 

Datetime

Datetime is a data type used to reference a date and time.

๐Ÿ’ก Common datetime usageโ€‹

The datetime property type can be used to store any date and time, for example:

  • Deployment time
  • Release time
  • Last incident date
  • Creation timestamp

In this live demo example, we can see the Last Update datetime property. ๐ŸŽฌ

API definitionโ€‹

{
"myDatetimeProp": {
"title": "My datetime",
"icon": "My icon",
"description": "My datetime property",
"type": "string",
"format": "date-time",
"default": "2022-04-18T11:44:15.345Z"
}
}

Check out Port's API reference to learn more.

Terraform definitionโ€‹

resource "port_blueprint" "myBlueprint" {
# ...blueprint properties
properties = {
string_props = {
"myDatetimeProp" = {
title = "My datetime"
icon = "My icon"
description = "My datetime property"
format = "date-time"
default = "2022-04-18T11:44:15.345Z"
}
}
}
}

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={
"myDatetimeProp": BlueprintPropertiesStringPropsArgs(
title="My email",
format="date-time",
Required=True,
)
}
),
relations={},
)