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 | aws.scheduler.schedules |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | FlexibleTimeWindow, ScheduleExpression, Target, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.scheduler.schedules (
FlexibleTimeWindow,
ScheduleExpression,
Target,
region
)
SELECT
'{{ FlexibleTimeWindow }}',
'{{ ScheduleExpression }}',
'{{ Target }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.scheduler.schedules (
Description,
EndDate,
FlexibleTimeWindow,
GroupName,
KmsKeyArn,
Name,
ScheduleExpression,
ScheduleExpressionTimezone,
StartDate,
State,
Target,
region
)
SELECT
'{{ Description }}',
'{{ EndDate }}',
'{{ FlexibleTimeWindow }}',
'{{ GroupName }}',
'{{ KmsKeyArn }}',
'{{ Name }}',
'{{ ScheduleExpression }}',
'{{ ScheduleExpressionTimezone }}',
'{{ StartDate }}',
'{{ 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: EndDate
value: '{{ EndDate }}'
- name: FlexibleTimeWindow
value:
Mode: '{{ Mode }}'
MaximumWindowInMinutes: null
- name: GroupName
value: '{{ GroupName }}'
- name: KmsKeyArn
value: '{{ KmsKeyArn }}'
- name: Name
value: '{{ Name }}'
- name: ScheduleExpression
value: '{{ ScheduleExpression }}'
- name: ScheduleExpressionTimezone
value: '{{ ScheduleExpressionTimezone }}'
- name: StartDate
value: '{{ StartDate }}'
- name: State
value: '{{ State }}'
- name: Target
value:
Arn: '{{ Arn }}'
RoleArn: '{{ RoleArn }}'
DeadLetterConfig:
Arn: '{{ Arn }}'
RetryPolicy:
MaximumEventAgeInSeconds: null
MaximumRetryAttempts: null
Input: '{{ Input }}'
EcsParameters:
TaskDefinitionArn: '{{ TaskDefinitionArn }}'
TaskCount: null
LaunchType: '{{ LaunchType }}'
NetworkConfiguration:
AwsvpcConfiguration:
Subnets:
- '{{ Subnets[0] }}'
SecurityGroups:
- '{{ SecurityGroups[0] }}'
AssignPublicIp: '{{ AssignPublicIp }}'
PlatformVersion: '{{ PlatformVersion }}'
Group: '{{ Group }}'
CapacityProviderStrategy:
- CapacityProvider: '{{ CapacityProvider }}'
Weight: null
Base: null
EnableECSManagedTags: '{{ EnableECSManagedTags }}'
EnableExecuteCommand: '{{ EnableExecuteCommand }}'
PlacementConstraints:
- Type: '{{ Type }}'
Expression: '{{ Expression }}'
PlacementStrategy:
- Type: '{{ Type }}'
Field: '{{ Field }}'
PropagateTags: '{{ PropagateTags }}'
ReferenceId: '{{ ReferenceId }}'
Tags:
- {}
EventBridgeParameters:
DetailType: '{{ DetailType }}'
Source: '{{ Source }}'
KinesisParameters:
PartitionKey: '{{ PartitionKey }}'
SageMakerPipelineParameters:
PipelineParameterList:
- Name: '{{ Name }}'
Value: '{{ Value }}'
SqsParameters:
MessageGroupId: '{{ MessageGroupId }}'
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