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

Methods

NameAccessible byRequired Params
create_resourceINSERTFlexibleTimeWindow, ScheduleExpression, Target, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all schedules in a region.

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 aws.scheduler.schedules
WHERE region = 'us-east-1';

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 aws.scheduler.schedules
WHERE region = 'us-east-1' AND data__Identifier = '<Name>';

INSERT example

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

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

DELETE example

/*+ delete */
DELETE FROM aws.scheduler.schedules
WHERE data__Identifier = '<Name>'
AND region = 'us-east-1';

Permissions

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

Create

scheduler:CreateSchedule,
scheduler:GetSchedule,
iam:PassRole

Read

scheduler:GetSchedule

Update

scheduler:UpdateSchedule,
scheduler:GetSchedule,
iam:PassRole

Delete

scheduler:DeleteSchedule,
scheduler:GetSchedule

List

scheduler:ListSchedules