{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-billing-and-cost-management/json-schema/amazon-billing-and-cost-management-create-scheduled-report-request-schema.json",
  "title": "CreateScheduledReportRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-scheduled-report-api-openapi.yml#/components/schemas/CreateScheduledReportRequest",
  "type": "object",
  "properties": {
    "scheduledReport": {
      "$ref": "#/$defs/ScheduledReportInput"
    },
    "resourceTags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BcmDashboardsResourceTag"
      },
      "description": "The tags to apply to the scheduled report resource for organization and management."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request."
    }
  },
  "required": [
    "scheduledReport"
  ],
  "$defs": {
    "BcmDashboardsResourceTag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key of the tag to be attached to the dashboard resource."
        },
        "value": {
          "type": "string",
          "description": "The value of the tag to be attached to the dashboard resource."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "DateTimeRange": {
      "type": "object",
      "properties": {
        "startTime": {
          "$ref": "#/$defs/DateTimeValue"
        },
        "endTime": {
          "$ref": "#/$defs/DateTimeValue"
        }
      },
      "required": [
        "startTime",
        "endTime"
      ]
    },
    "DateTimeValue": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ABSOLUTE",
            "RELATIVE"
          ],
          "description": "The type of date/time value: ABSOLUTE for specific dates or RELATIVE for dynamic time periods."
        },
        "value": {
          "type": "string",
          "description": "The actual date/time value."
        }
      },
      "required": [
        "type",
        "value"
      ]
    },
    "ScheduleConfig": {
      "type": "object",
      "properties": {
        "scheduleExpression": {
          "type": "string",
          "description": "The schedule expression that specifies when to trigger the scheduled report run. This value must be a cron expression consisting of six fields separated by white spaces: cron(minutes hours day_of_month month day_of_week year)."
        },
        "scheduleExpressionTimeZone": {
          "type": "string",
          "description": "The time zone for the schedule expression, for example, UTC."
        },
        "schedulePeriod": {
          "$ref": "#/$defs/SchedulePeriod"
        },
        "state": {
          "type": "string",
          "enum": [
            "ENABLED",
            "DISABLED"
          ],
          "description": "The state of the schedule. ENABLED means the scheduled report runs according to its schedule expression. DISABLED means the scheduled report is paused and will not run until re-enabled."
        }
      }
    },
    "SchedulePeriod": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "string",
          "format": "date-time",
          "description": "The start time of the schedule period. If not specified, defaults to the time of the create or update request. The start time cannot be more than 5 minutes before the time of the request."
        },
        "endTime": {
          "type": "string",
          "format": "date-time",
          "description": "The end time of the schedule period. If not specified, defaults to 3 years from the time of the create or update request. The maximum allowed value is 3 years from the current time. Setting an end time beyond this limit returns a ValidationException."
        }
      }
    },
    "ScheduledReportInput": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the scheduled report."
        },
        "dashboardArn": {
          "type": "string",
          "description": "The ARN of the dashboard to generate the scheduled report from."
        },
        "scheduledReportExecutionRoleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that the scheduled report uses to execute. Amazon Web Services Billing and Cost Management Dashboards will assume this IAM role while executing the scheduled report."
        },
        "scheduleConfig": {
          "$ref": "#/$defs/ScheduleConfig"
        },
        "description": {
          "type": "string",
          "description": "A description of the scheduled report's purpose or contents."
        },
        "widgetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of widget identifiers to include in the scheduled report. If not specified, all widgets in the dashboard are included."
        },
        "widgetDateRangeOverride": {
          "$ref": "#/$defs/DateTimeRange"
        }
      },
      "required": [
        "name",
        "dashboardArn",
        "scheduledReportExecutionRoleArn",
        "scheduleConfig"
      ]
    }
  }
}