Datetime
Datetime is an input used to reference a date and time.
๐ก Common datetime usageโ
The datetime input type can be used to store any date and time, for example:
- Deployment time
 - Release time
 - Creation timestamp
 
API definitionโ
- Basic
 - Array
 
{
  "myDatetimeInput": {
    "title": "My datetime input",
    "icon": "My icon",
    "description": "My datetime input",
    "type": "string",
    "format": "date-time",
    "default": "2022-04-18T11:44:15.345Z"
  }
}
{
  "myDatetimeArrayInput": {
    "title": "My datetime array",
    "icon": "My icon",
    "description": "My datetime array",
    "type": "array",
    "items": {
      "type": "string",
      "format": "date-time"
    }
  }
}
Check out Port's API reference to learn more.
Terraform definitionโ
- Basic
 - Array
 
resource "port_action" "myAction" {
  # ...action properties
  user_properties = {
    string_props = {
      myDatetimeProp = {
        title    = "My datetime"
        format   = "date-time"
      }
    }
  }
}
resource "port_action" "myAction" {
  # ...action properties
  user_properties = {
    array_props = {
      myArrayDatetimeProp = {
        title    = "My array datetime"
        string_items = {
          format = "date-time"
        }
      }
    }
  }
}