Skip to main content

schedules

Creates, updates, deletes or gets a schedule resource or lists schedules in a region

Overview

Nameschedules
TypeResource
DescriptionDefinition of AWS::Scheduler::Schedule Resource Type
Idawscc.scheduler.schedules

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the schedule.
descriptionstringThe description of the schedule.
end_datestringThe date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify.
flexible_time_windowobjectFlexible time window allows configuration of a window within which a schedule can be invoked
group_namestringThe name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.
kms_key_arnstringThe ARN for a KMS Key that will be used to encrypt customer data.
namestring
schedule_expressionstringThe scheduling expression.
schedule_expression_timezonestringThe timezone in which the scheduling expression is evaluated.
start_datestringThe date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify.
statestringSpecifies whether the schedule is enabled or disabled.
targetobjectThe schedule target.
regionstringAWS region.

For more information, see AWS::Scheduler::Schedule.

Methods

NameResourceAccessible byRequired Params
create_resourceschedulesINSERTFlexibleTimeWindow, ScheduleExpression, Target, region
delete_resourceschedulesDELETEIdentifier, region
update_resourceschedulesUPDATEIdentifier, PatchDocument, region
list_resourcesschedules_list_onlySELECTregion
get_resourceschedulesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual schedule.

SELECT
region,
arn,
description,
end_date,
flexible_time_window,
group_name,
kms_key_arn,
name,
schedule_expression,
schedule_expression_timezone,
start_date,
state,
target
FROM awscc.scheduler.schedules
WHERE
region = 'us-east-1' AND
Identifier = '{{ name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.scheduler.schedules (
FlexibleTimeWindow,
ScheduleExpression,
Target,
region
)
SELECT
'{{ flexible_time_window }}',
'{{ schedule_expression }}',
'{{ target }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.scheduler.schedules
SET PatchDocument = string('{{ {
"Description": description,
"EndDate": end_date,
"FlexibleTimeWindow": flexible_time_window,
"GroupName": group_name,
"KmsKeyArn": kms_key_arn,
"ScheduleExpression": schedule_expression,
"ScheduleExpressionTimezone": schedule_expression_timezone,
"StartDate": start_date,
"State": state,
"Target": target
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.scheduler.schedules
WHERE
Identifier = '{{ name }}' AND
region = 'us-east-1';

Permissions

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

scheduler:CreateSchedule,
scheduler:GetSchedule,
iam:PassRole