{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-redshift/json-schema/amazon-redshift-scheduled-action-schema.json",
  "title": "ScheduledAction",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-redshift-scheduled-action-api-openapi.yml#/components/schemas/ScheduledAction",
  "type": "object",
  "properties": {
    "ScheduledActionName": {
      "type": "string",
      "description": "The name of the scheduled action."
    },
    "TargetAction": {
      "$ref": "#/$defs/ScheduledActionType"
    },
    "Schedule": {
      "type": "string",
      "description": "The schedule for a one-time (at format) or recurring (cron format) scheduled action. Schedule invocations must be separated by at least one hour. Format of at expressions is \"at(yyyy-mm-ddThh:mm:ss)\". For example, \"at(2016-03-04T17:27:00)\". Format of cron expressions is \"cron(Minutes Hours Day-of-month Month Day-of-week Year)\". For example, \"cron(0 10 ? * MON *)\". For more information, see Cron Expressions in the Amazon CloudWatch Events User Guide."
    },
    "IamRole": {
      "type": "string",
      "description": "The IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler (Principal scheduler.redshift.amazonaws.com) to assume permissions on your behalf. For more information about the IAM role to use with the Amazon Redshift scheduler, see Using Identity-Based Policies for Amazon Redshift in the Amazon Redshift Cluster Management Guide."
    },
    "ScheduledActionDescription": {
      "type": "string",
      "description": "The description of the scheduled action."
    },
    "State": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "DISABLED"
      ],
      "description": "The state of the scheduled action. For example, DISABLED."
    },
    "NextInvocations": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "date-time"
      },
      "description": "List of times when the scheduled action will run."
    },
    "StartTime": {
      "type": "string",
      "format": "date-time",
      "description": "The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger."
    },
    "EndTime": {
      "type": "string",
      "format": "date-time",
      "description": "The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not trigger."
    }
  },
  "$defs": {
    "PauseClusterMessage": {
      "type": "object",
      "properties": {
        "ClusterIdentifier": {
          "type": "string",
          "description": "The identifier of the cluster to be paused."
        }
      },
      "required": [
        "ClusterIdentifier"
      ]
    },
    "ResizeClusterMessage": {
      "type": "object",
      "properties": {
        "ClusterIdentifier": {
          "type": "string",
          "description": "The unique identifier for the cluster to resize."
        },
        "ClusterType": {
          "type": "string",
          "description": "The new cluster type for the specified cluster."
        },
        "NodeType": {
          "type": "string",
          "description": "The new node type for the nodes you are adding. If not specified, the cluster's current node type is used."
        },
        "NumberOfNodes": {
          "type": "integer",
          "description": "The new number of nodes for the cluster. If not specified, the cluster's current number of nodes is used."
        },
        "Classic": {
          "type": "boolean",
          "description": "A boolean value indicating whether the resize operation is using the classic resize process. If you don't provide this parameter or set the value to false, the resize type is elastic."
        },
        "ReservedNodeId": {
          "type": "string",
          "description": "The identifier of the reserved node."
        },
        "TargetReservedNodeOfferingId": {
          "type": "string",
          "description": "The identifier of the target reserved node offering."
        }
      },
      "required": [
        "ClusterIdentifier"
      ]
    },
    "ResumeClusterMessage": {
      "type": "object",
      "properties": {
        "ClusterIdentifier": {
          "type": "string",
          "description": "The identifier of the cluster to be resumed."
        }
      },
      "required": [
        "ClusterIdentifier"
      ]
    },
    "ScheduledActionType": {
      "type": "object",
      "properties": {
        "ResizeCluster": {
          "$ref": "#/$defs/ResizeClusterMessage"
        },
        "PauseCluster": {
          "$ref": "#/$defs/PauseClusterMessage"
        },
        "ResumeCluster": {
          "$ref": "#/$defs/ResumeClusterMessage"
        }
      }
    }
  }
}