Skip to main content

schedule_groups

Creates, updates, deletes, gets or lists a schedule_groups resource.

Overview

Nameschedule_groups
TypeResource
Idaws.scheduler.schedule_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the schedule group. (pattern: <code>^arn:aws(-[a-z]+)?:scheduler:[a-z0-9-]+:\d{12}:schedule-group/[0-9a-zA-Z-_.]+$</code>)
creation_datestring (date-time)The time at which the schedule group was created.
last_modification_datestring (date-time)The time at which the schedule group was last modified.
namestringThe name of the schedule group. (pattern: <code>^[0-9a-zA-Z-_.]+$</code>)
statestringSpecifies the state of the schedule group. (ACTIVE, DELETING)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_schedule_groupselectname, regionRetrieves the specified schedule group.
list_schedule_groupsselectregionMaxResults, NamePrefix, NextTokenReturns a paginated list of your schedule groups.
create_schedule_groupinsertname, regionCreates the specified schedule group.
delete_schedule_groupdeletename, regionclientTokenDeletes the specified schedule group. Deleting a schedule group results in EventBridge Scheduler deleting all schedules associated with the group. When you delete a group, it remains in a DELETING state until all of its associated schedules are deleted. Schedules associated with the group that are set to run while the schedule group is in the process of being deleted might continue to invoke their targets until the schedule group and its associated schedules are deleted. This operation is eventually consistent.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of the schedule group to delete.
regionstringAWS region (default: us-east-1)
MaxResultsintegerIf specified, limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
NamePrefixstringThe name prefix that you can use to return a filtered list of your schedule groups.
NextTokenstringThe token returned by a previous call to retrieve the next set of results.
clientTokenstringUnique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.

SELECT examples

Retrieves the specified schedule group.

SELECT
arn,
creation_date,
last_modification_date,
name,
state
FROM aws.scheduler.schedule_groups
WHERE name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates the specified schedule group.

INSERT INTO aws.scheduler.schedule_groups (
ClientToken,
Tags,
name,
region
)
SELECT
'{{ ClientToken }}',
'{{ Tags }}',
'{{ name }}',
'{{ region }}'
RETURNING
schedule_group_arn
;

DELETE examples

Deletes the specified schedule group. Deleting a schedule group results in EventBridge Scheduler deleting all schedules associated with the group. When you delete a group, it remains in a DELETING state until all of its associated schedules are deleted. Schedules associated with the group that are set to run while the schedule group is in the process of being deleted might continue to invoke their targets until the schedule group and its associated schedules are deleted. This operation is eventually consistent.

DELETE FROM aws.scheduler.schedule_groups
WHERE name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;