{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-redshift/json-schema/amazon-redshift-create-scheduled-action-request-schema.json",
  "title": "CreateScheduledActionRequest",
  "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/CreateScheduledActionRequest",
  "type": "object",
  "properties": {
    "scheduledActionName": {
      "type": "string",
      "description": "The name of the scheduled action."
    },
    "targetAction": {
      "$ref": "#/$defs/TargetAction"
    },
    "schedule": {
      "$ref": "#/$defs/Schedule"
    },
    "roleArn": {
      "type": "string",
      "description": "The ARN of the IAM role to assume to run the scheduled action. This IAM role must have permission to run the Amazon Redshift Serverless API operation in the scheduled action. This IAM role must allow the Amazon Redshift scheduler to schedule creating snapshots. (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 Management Guide"
    },
    "namespaceName": {
      "type": "string",
      "description": "The name of the namespace for which to create a scheduled action."
    },
    "enabled": {
      "type": "boolean",
      "description": "Indicates whether the schedule is enabled. If false, the scheduled action does not trigger. For more information about state of the scheduled action, see ScheduledAction."
    },
    "scheduledActionDescription": {
      "type": "string",
      "description": "The description of the scheduled action."
    },
    "startTime": {
      "type": "string",
      "description": "The start time in UTC when the schedule is active. Before this time, the scheduled action does not trigger."
    },
    "endTime": {
      "type": "string",
      "description": "The end time in UTC when the schedule is no longer active. After this time, the scheduled action does not trigger."
    }
  },
  "required": [
    "scheduledActionName",
    "targetAction",
    "schedule",
    "roleArn",
    "namespaceName"
  ],
  "$defs": {
    "CreateSnapshotScheduleActionParameters": {
      "type": "object",
      "properties": {
        "namespaceName": {
          "type": "string",
          "description": "The name of the namespace for which you want to configure a scheduled action to create a snapshot."
        },
        "snapshotNamePrefix": {
          "type": "string",
          "description": "A string prefix that is attached to the name of the snapshot created by the scheduled action. The final name of the snapshot is the string prefix appended by the date and time of when the snapshot was created."
        },
        "retentionPeriod": {
          "type": "integer",
          "description": "The retention period of the snapshot created by the scheduled action."
        },
        "tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RedshiftServerlessTag"
          },
          "description": "An array of Tag objects to associate with the snapshot."
        }
      },
      "required": [
        "namespaceName",
        "snapshotNamePrefix"
      ]
    },
    "RedshiftServerlessTag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The key to use in the tag."
        },
        "value": {
          "type": "string",
          "description": "The value of the tag."
        }
      },
      "required": [
        "key",
        "value"
      ]
    },
    "Schedule": {
      "type": "object",
      "properties": {
        "at": {
          "type": "string",
          "description": "The timestamp of when Amazon Redshift Serverless should run the scheduled action. Timestamp is in UTC. Format of at expression is yyyy-mm-ddThh:mm:ss. For example, 2016-03-04T17:27:00."
        },
        "cron": {
          "type": "string",
          "description": "The cron expression to use to schedule a recurring scheduled action. Schedule invocations must be separated by at least one hour. Times are in UTC. Format of cron expressions is (Minutes Hours Day-of-month Month Day-of-week Year). For example, \"(0 10 ? * MON *)\". For more information, see Cron Expressions in the Amazon CloudWatch Events User Guide."
        }
      },
      "description": "Exactly one member is set."
    },
    "TargetAction": {
      "type": "object",
      "properties": {
        "createSnapshot": {
          "$ref": "#/$defs/CreateSnapshotScheduleActionParameters"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}