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.
Idawscc.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.
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.

For more information, see AWS::Redshift::ScheduledAction.

Methods

NameResourceAccessible byRequired Params
create_resourcescheduled_actionsINSERTScheduledActionName, region
delete_resourcescheduled_actionsDELETEIdentifier, region
update_resourcescheduled_actionsUPDATEIdentifier, PatchDocument, region
list_resourcesscheduled_actions_list_onlySELECTregion
get_resourcescheduled_actionsSELECTIdentifier, region

SELECT examples

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 awscc.redshift.scheduled_actions
WHERE
region = 'us-east-1' AND
Identifier = '{{ scheduled_action_name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.redshift.scheduled_actions
SET PatchDocument = string('{{ {
"ScheduledActionDescription": scheduled_action_description,
"EndTime": end_time,
"Schedule": schedule,
"IamRole": iam_role,
"StartTime": start_time,
"Enable": enable,
"TargetAction": target_action
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ scheduled_action_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.redshift.scheduled_actions
WHERE
Identifier = '{{ scheduled_action_name }}' AND
region = 'us-east-1';

Permissions

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

redshift:DescribeScheduledActions,
redshift:DescribeTags