Skip to main content

rotations

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

Overview

Namerotations
TypeResource
Idaws.ssm_contacts.rotations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
contact_idsarrayThe Amazon Resource Names (ARNs) of the contacts assigned to the on-call rotation team.
namestringThe name of the on-call rotation. (pattern: <code>^[a-zA-Z0-9_-\s.]*$</code>)
recurrenceobjectSpecifies how long a rotation lasts before restarting at the beginning of the shift order.
rotation_arnstringThe Amazon Resource Name (ARN) of the on-call rotation. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>)
start_timestring (date-time)The specified start time for the on-call rotation.
time_zone_idstringThe time zone that the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. (pattern: <code>^[:a-zA-Z0-9_-\s.\/]*$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_rotationselectregionRetrieves information about an on-call rotation.
list_rotationsselectregionRetrieves a list of on-call rotations.
create_rotationinsertregion, ContactIds, TimeZoneIdCreates a rotation in an on-call schedule.
update_rotationupdateregion, RotationIdUpdates the information specified for an on-call rotation.
delete_rotationdeleteregionDeletes a rotation from the system. If a rotation belongs to more than one on-call schedule, this operation deletes it from all of them.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Retrieves information about an on-call rotation.

SELECT
contact_ids,
name,
recurrence,
rotation_arn,
start_time,
time_zone_id
FROM aws.ssm_contacts.rotations
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a rotation in an on-call schedule.

INSERT INTO aws.ssm_contacts.rotations (
Name,
ContactIds,
StartTime,
TimeZoneId,
Recurrence,
Tags,
IdempotencyToken,
region
)
SELECT
'{{ Name }}',
'{{ ContactIds }}' /* required */,
'{{ StartTime }}',
'{{ TimeZoneId }}' /* required */,
'{{ Recurrence }}',
'{{ Tags }}',
'{{ IdempotencyToken }}',
'{{ region }}'
RETURNING
rotation_arn
;

UPDATE examples

Updates the information specified for an on-call rotation.

UPDATE aws.ssm_contacts.rotations
SET
RotationId = '{{ RotationId }}',
ContactIds = '{{ ContactIds }}',
StartTime = '{{ StartTime }}',
TimeZoneId = '{{ TimeZoneId }}',
Recurrence = '{{ Recurrence }}'
WHERE
region = '{{ region }}' --required
AND RotationId = '{{ RotationId }}' --required;

DELETE examples

Deletes a rotation from the system. If a rotation belongs to more than one on-call schedule, this operation deletes it from all of them.

DELETE FROM aws.ssm_contacts.rotations
WHERE region = '{{ region }}' --required
;