rotations
Creates, updates, deletes, gets or lists a rotations resource.
Overview
| Name | rotations |
| Type | Resource |
| Id | aws.ssm_contacts.rotations |
Fields
The following fields are returned by SELECT queries:
- get_rotation
- list_rotations
| Name | Datatype | Description |
|---|---|---|
contact_ids | array | The Amazon Resource Names (ARNs) of the contacts assigned to the on-call rotation team. |
name | string | The name of the on-call rotation. (pattern: <code>^[a-zA-Z0-9_-\s.]*$</code>) |
recurrence | object | Specifies how long a rotation lasts before restarting at the beginning of the shift order. |
rotation_arn | string | The 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_time | string (date-time) | The specified start time for the on-call rotation. |
time_zone_id | string | The 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>) |
| Name | Datatype | Description |
|---|---|---|
contact_ids | array | The Amazon Resource Names (ARNs) of the contacts assigned to the rotation team. |
name | string | The name of the rotation. (pattern: <code>^[a-zA-Z0-9_-\s.]*$</code>) |
recurrence | object | Information about when an on-call rotation is in effect and how long the rotation period lasts. |
rotation_arn | string | The Amazon Resource Name (ARN) of the rotation. (pattern: <code>arn:(aws|aws-cn|aws-us-gov):ssm-contacts:[-\w+=/,.@]:[0-9]+:([\w+=/,.@:-]+)</code>) |
start_time | string (date-time) | The date and time the rotation becomes active. |
time_zone_id | string | The time zone the rotation’s activity is based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". (pattern: <code>^[:a-zA-Z0-9_-\s.\/]*$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_rotation | select | region | Retrieves information about an on-call rotation. | |
list_rotations | select | region | Retrieves a list of on-call rotations. | |
create_rotation | insert | region, ContactIds, TimeZoneId | Creates a rotation in an on-call schedule. | |
update_rotation | update | region, RotationId | Updates the information specified for an on-call rotation. | |
delete_rotation | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_rotation
- list_rotations
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
;
Retrieves a list of on-call rotations.
SELECT
contact_ids,
name,
recurrence,
rotation_arn,
start_time,
time_zone_id
FROM aws.ssm_contacts.rotations
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_rotation
- Manifest
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
;
# Description fields are for documentation purposes
- name: rotations
props:
- name: region
value: "{{ region }}"
description: Required parameter for the rotations resource.
- name: Name
value: "{{ Name }}"
description: |
The name of the rotation.
- name: ContactIds
value:
- "{{ ContactIds }}"
description: |
The Amazon Resource Names (ARNs) of the contacts to add to the rotation. Only the PERSONAL contact type is supported. The contact types ESCALATION and ONCALL_SCHEDULE are not supported for this operation. The order that you list the contacts in is their shift order in the rotation schedule. To change the order of the contact's shifts, use the UpdateRotation operation.
- name: StartTime
value: "{{ StartTime }}"
description: |
The date and time that the rotation goes into effect.
- name: TimeZoneId
value: "{{ TimeZoneId }}"
description: |
The time zone to base the rotation’s activity on in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website. Designators for time zones that don’t support Daylight Savings Time rules, such as Pacific Standard Time (PST), are not supported.
- name: Recurrence
description: |
Information about the rule that specifies when a shift's team members rotate.
value:
MonthlySettings:
- DayOfMonth: {{ DayOfMonth }}
HandOffTime:
HourOfDay: {{ HourOfDay }}
MinuteOfHour: {{ MinuteOfHour }}
WeeklySettings:
- DayOfWeek: "{{ DayOfWeek }}"
HandOffTime:
HourOfDay: {{ HourOfDay }}
MinuteOfHour: {{ MinuteOfHour }}
DailySettings:
- HourOfDay: {{ HourOfDay }}
MinuteOfHour: {{ MinuteOfHour }}
NumberOfOnCalls: {{ NumberOfOnCalls }}
ShiftCoverages: "{{ ShiftCoverages }}"
RecurrenceMultiplier: {{ RecurrenceMultiplier }}
- name: Tags
description: |
Optional metadata to assign to the rotation. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For more information, see Tagging Incident Manager resources in the Incident Manager User Guide.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: IdempotencyToken
value: "{{ IdempotencyToken }}"
description: |
A token that ensures that the operation is called only once with the specified details.
UPDATE examples
- update_rotation
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
- delete_rotation
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
;