{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudtrail/json-schema/amazon-cloudtrail-update-dashboard-request-schema.json",
  "title": "UpdateDashboardRequest",
  "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/UpdateDashboardRequest",
  "type": "object",
  "properties": {
    "DashboardId": {
      "type": "string",
      "description": "The name or ARN of the dashboard."
    },
    "Widgets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RequestWidget"
      },
      "description": "An array of widgets for the dashboard. A custom dashboard can have a maximum of 10 widgets. To add new widgets, pass in an array that includes the existing widgets along with any new widgets. Run the GetDashboard operation to get the list of widgets for the dashboard. To remove widgets, pass in an array that includes the existing widgets minus the widgets you want removed."
    },
    "RefreshSchedule": {
      "$ref": "#/$defs/RefreshSchedule"
    },
    "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."
    }
  },
  "required": [
    "DashboardId"
  ],
  "$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"
      ]
    }
  }
}