{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudtrail/json-schema/amazon-cloudtrail-create-dashboard-request-schema.json",
  "title": "CreateDashboardRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudtrail-dashboard-api-openapi.yml#/components/schemas/CreateDashboardRequest",
  "type": "object",
  "properties": {
    "Name": {
      "type": "string",
      "description": "The name of the dashboard. The name must be unique to your account. To create the Highlights dashboard, the name must be AWSCloudTrail-Highlights."
    },
    "RefreshSchedule": {
      "$ref": "#/$defs/RefreshSchedule"
    },
    "TagsList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "TerminationProtectionEnabled": {
      "type": "boolean",
      "description": "Specifies whether termination protection is enabled for the dashboard. If termination protection is enabled, you cannot delete the dashboard until termination protection is disabled."
    },
    "Widgets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RequestWidget"
      },
      "description": "An array of widgets for a custom dashboard. A custom dashboard can have a maximum of ten widgets. You do not need to specify widgets for the Highlights dashboard."
    }
  },
  "required": [
    "Name"
  ],
  "$defs": {
    "RefreshSchedule": {
      "type": "object",
      "properties": {
        "Frequency": {
          "$ref": "#/$defs/RefreshScheduleFrequency"
        },
        "Status": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "Specifies whether the refresh schedule is enabled. Set the value to ENABLED to enable the refresh schedule, or to DISABLED to turn off the refresh schedule."
        },
        "TimeOfDay": {
          "type": "string",
          "description": "The time of day in UTC to run the schedule; for hourly only refer to minutes; default is 00:00."
        }
      }
    },
    "RefreshScheduleFrequency": {
      "type": "object",
      "properties": {
        "Unit": {
          "type": "string",
          "enum": [
            "HOURS",
            "DAYS"
          ],
          "description": "The unit to use for the refresh. For custom dashboards, the unit can be HOURS or DAYS. For the Highlights dashboard, the Unit must be HOURS."
        },
        "Value": {
          "type": "integer",
          "description": "The value for the refresh schedule. For custom dashboards, the following values are valid when the unit is HOURS: 1, 6, 12, 24 For custom dashboards, the only valid value when the unit is DAYS is 1. For the Highlights dashboard, the Value must be 6."
        }
      }
    },
    "RequestWidget": {
      "type": "object",
      "properties": {
        "QueryStatement": {
          "type": "string",
          "description": "The query statement for the widget. For custom dashboard widgets, you can query across multiple event data stores as long as all event data stores exist in your account. When a query uses ? with eventTime, ? must be surrounded by single quotes as follows: '?'."
        },
        "QueryParameters": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The optional query parameters. The following query parameters are valid: $StartTime$, $EndTime$, and $Period$."
        },
        "ViewProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The view properties for the widget. For more information about view properties, see View properties for widgets in the CloudTrail User Guide."
        }
      },
      "required": [
        "QueryStatement",
        "ViewProperties"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies."
        },
        "Value": {
          "type": "string",
          "description": "The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters."
        }
      },
      "required": [
        "Key"
      ]
    }
  }
}