Skip to main content

scheduled_actions

Creates, updates, deletes or gets a scheduled_action resource or lists scheduled_actions in a region

Overview

Namescheduled_actions
TypeResource
DescriptionThe `AWS::Redshift::ScheduledAction` resource creates an Amazon Redshift Scheduled Action.
Idaws.redshift.scheduled_actions

Fields

NameDatatypeDescription
scheduled_action_descriptionstringThe description of the scheduled action.
scheduled_action_namestringThe name of the scheduled action. The name must be unique within an account.
end_timestringThe end time in UTC of the scheduled action. After this time, the scheduled action does not trigger.
statestringThe state of the scheduled action.
schedulestringThe schedule in `at( )` or `cron( )` format.
iam_rolestringThe IAM role to assume to run the target action.
start_timestringThe start time in UTC of the scheduled action. Before this time, the scheduled action does not trigger.
enablebooleanIf true, the schedule is enabled. If false, the scheduled action does not trigger.
target_actionobjectA JSON format string of the Amazon Redshift API operation with input parameters.
next_invocationsarrayList of times when the scheduled action will run.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTScheduledActionName, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all scheduled_actions in a region.

SELECT
region,
scheduled_action_description,
scheduled_action_name,
end_time,
state,
schedule,
iam_role,
start_time,
enable,
target_action,
next_invocations
FROM aws.redshift.scheduled_actions
WHERE region = 'us-east-1';

Gets all properties from an individual scheduled_action.

SELECT
region,
scheduled_action_description,
scheduled_action_name,
end_time,
state,
schedule,
iam_role,
start_time,
enable,
target_action,
next_invocations
FROM aws.redshift.scheduled_actions
WHERE region = 'us-east-1' AND data__Identifier = '<ScheduledActionName>';

INSERT example

Use the following StackQL query and manifest file to create a new scheduled_action resource, using stack-deploy.

/*+ create */
INSERT INTO aws.redshift.scheduled_actions (
ScheduledActionName,
region
)
SELECT
'{{ ScheduledActionName }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.redshift.scheduled_actions
WHERE data__Identifier = '<ScheduledActionName>'
AND region = 'us-east-1';

Permissions

To operate on the scheduled_actions resource, the following permissions are required:

Read

redshift:DescribeScheduledActions,
redshift:DescribeTags

Create

redshift:CreateScheduledAction,
redshift:DescribeScheduledActions,
redshift:DescribeTags,
redshift:PauseCluster,
redshift:ResumeCluster,
redshift:ResizeCluster,
iam:PassRole

Update

redshift:DescribeScheduledActions,
redshift:ModifyScheduledAction,
redshift:PauseCluster,
redshift:ResumeCluster,
redshift:ResizeCluster,
redshift:DescribeTags,
iam:PassRole

List

redshift:DescribeTags,
redshift:DescribeScheduledActions

Delete

redshift:DescribeTags,
redshift:DescribeScheduledActions,
redshift:DeleteScheduledAction