日期时间
Datetime 是用于引用日期和时间的输入法。
💡 常用日期时间 Usage
例如,datetime 输入类型可被用来存储任何日期和时间:
- 部署时间;
- 发布时间
- 创建时间戳;
- 等等。
应用程序接口定义
- 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 定义
- 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"
}
}
}
}
}