schedules
Creates, updates, deletes or gets a schedule resource or lists schedules in a region
Overview
| Name | schedules |
| Type | Resource |
| Description | Definition of AWS::Scheduler::Schedule Resource Type |
| Id | awscc.scheduler.schedules |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the schedule. |
description | string | The description of the schedule. |
end_date | string | The 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_window | object | Flexible time window allows configuration of a window within which a schedule can be invoked |
group_name | string | The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used. |
kms_key_arn | string | The ARN for a KMS Key that will be used to encrypt customer data. |
name | string | |
schedule_expression | string | The scheduling expression. |
schedule_expression_timezone | string | The timezone in which the scheduling expression is evaluated. |
start_date | string | The 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. |
state | string | Specifies whether the schedule is enabled or disabled. |
target | object | The schedule target. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
name | string | |
region | string | AWS region. |
For more information, see AWS::Scheduler::Schedule.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | schedules | INSERT | FlexibleTimeWindow, ScheduleExpression, Target, region |
delete_resource | schedules | DELETE | Identifier, region |
update_resource | schedules | UPDATE | Identifier, PatchDocument, region |
list_resources | schedules_list_only | SELECT | region |
get_resource | schedules | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 }}';
Lists all schedules in a region.
SELECT
region,
name
FROM awscc.scheduler.schedules_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new schedule resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.scheduler.schedules (
FlexibleTimeWindow,
ScheduleExpression,
Target,
region
)
SELECT
'{{ flexible_time_window }}',
'{{ schedule_expression }}',
'{{ target }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.scheduler.schedules (
Description,
EndDate,
FlexibleTimeWindow,
GroupName,
KmsKeyArn,
Name,
ScheduleExpression,
ScheduleExpressionTimezone,
StartDate,
State,
Target,
region
)
SELECT
'{{ description }}',
'{{ end_date }}',
'{{ flexible_time_window }}',
'{{ group_name }}',
'{{ kms_key_arn }}',
'{{ name }}',
'{{ schedule_expression }}',
'{{ schedule_expression_timezone }}',
'{{ start_date }}',
'{{ state }}',
'{{ target }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: schedule
props:
- name: description
value: '{{ description }}'
- name: end_date
value: '{{ end_date }}'
- name: flexible_time_window
value:
mode: '{{ mode }}'
maximum_window_in_minutes: null
- name: group_name
value: '{{ group_name }}'
- name: kms_key_arn
value: '{{ kms_key_arn }}'
- name: name
value: '{{ name }}'
- name: schedule_expression
value: '{{ schedule_expression }}'
- name: schedule_expression_timezone
value: '{{ schedule_expression_timezone }}'
- name: start_date
value: '{{ start_date }}'
- name: state
value: '{{ state }}'
- name: target
value:
arn: '{{ arn }}'
role_arn: '{{ role_arn }}'
dead_letter_config:
arn: '{{ arn }}'
retry_policy:
maximum_event_age_in_seconds: null
maximum_retry_attempts: null
input: '{{ input }}'
ecs_parameters:
task_definition_arn: '{{ task_definition_arn }}'
task_count: null
launch_type: '{{ launch_type }}'
network_configuration:
awsvpc_configuration:
subnets:
- '{{ subnets[0] }}'
security_groups:
- '{{ security_groups[0] }}'
assign_public_ip: '{{ assign_public_ip }}'
platform_version: '{{ platform_version }}'
group: '{{ group }}'
capacity_provider_strategy:
- capacity_provider: '{{ capacity_provider }}'
weight: null
base: null
enable_ecs_managed_tags: '{{ enable_ecs_managed_tags }}'
enable_execute_command: '{{ enable_execute_command }}'
placement_constraints:
- type: '{{ type }}'
expression: '{{ expression }}'
placement_strategy:
- type: '{{ type }}'
field: '{{ field }}'
propagate_tags: '{{ propagate_tags }}'
reference_id: '{{ reference_id }}'
tags:
- {}
event_bridge_parameters:
detail_type: '{{ detail_type }}'
source: '{{ source }}'
kinesis_parameters:
partition_key: '{{ partition_key }}'
sage_maker_pipeline_parameters:
pipeline_parameter_list:
- name: '{{ name }}'
value: '{{ value }}'
sqs_parameters:
message_group_id: '{{ message_group_id }}'
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:
- Create
- Read
- Update
- Delete
- List
scheduler:CreateSchedule,
scheduler:GetSchedule,
iam:PassRole
scheduler:GetSchedule
scheduler:UpdateSchedule,
scheduler:GetSchedule,
iam:PassRole
scheduler:DeleteSchedule,
scheduler:GetSchedule
scheduler:ListSchedules