SSMContacts / Client / list_preview_rotation_shifts
list_preview_rotation_shifts#
- SSMContacts.Client.list_preview_rotation_shifts(**kwargs)#
Returns a list of shifts based on rotation configuration parameters.
Note
The Incident Manager primarily uses this operation to populate the Preview calendar. It is not typically run by end users.
See also: AWS API Documentation
Request Syntax
response = client.list_preview_rotation_shifts( RotationStartTime=datetime(2015, 1, 1), StartTime=datetime(2015, 1, 1), EndTime=datetime(2015, 1, 1), Members=[ 'string', ], TimeZoneId='string', Recurrence={ 'MonthlySettings': [ { 'DayOfMonth': 123, 'HandOffTime': { 'HourOfDay': 123, 'MinuteOfHour': 123 } }, ], 'WeeklySettings': [ { 'DayOfWeek': 'MON'|'TUE'|'WED'|'THU'|'FRI'|'SAT'|'SUN', 'HandOffTime': { 'HourOfDay': 123, 'MinuteOfHour': 123 } }, ], 'DailySettings': [ { 'HourOfDay': 123, 'MinuteOfHour': 123 }, ], 'NumberOfOnCalls': 123, 'ShiftCoverages': { 'string': [ { 'Start': { 'HourOfDay': 123, 'MinuteOfHour': 123 }, 'End': { 'HourOfDay': 123, 'MinuteOfHour': 123 } }, ] }, 'RecurrenceMultiplier': 123 }, Overrides=[ { 'NewMembers': [ 'string', ], 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1) }, ], NextToken='string', MaxResults=123 )
- Parameters:
RotationStartTime (datetime) – The date and time a rotation would begin. The first shift is calculated from this date and time.
StartTime (datetime) – Used to filter the range of calculated shifts before sending the response back to the user.
EndTime (datetime) –
[REQUIRED]
The date and time a rotation shift would end.
Members (list) –
[REQUIRED]
The contacts that would be assigned to a rotation.
(string) –
TimeZoneId (string) –
[REQUIRED]
The time zone the rotation’s activity would be based on, in Internet Assigned Numbers Authority (IANA) format. For example: “America/Los_Angeles”, “UTC”, or “Asia/Seoul”.
Recurrence (dict) –
[REQUIRED]
Information about how long a rotation would last before restarting at the beginning of the shift order.
MonthlySettings (list) –
Information about on-call rotations that recur monthly.
(dict) –
Information about on-call rotations that recur monthly.
DayOfMonth (integer) – [REQUIRED]
The day of the month when monthly recurring on-call rotations begin.
HandOffTime (dict) – [REQUIRED]
The time of day when a monthly recurring on-call shift rotation begins.
HourOfDay (integer) – [REQUIRED]
The hour when an on-call rotation shift begins or ends.
MinuteOfHour (integer) – [REQUIRED]
The minute when an on-call rotation shift begins or ends.
WeeklySettings (list) –
Information about on-call rotations that recur weekly.
(dict) –
Information about rotations that recur weekly.
DayOfWeek (string) – [REQUIRED]
The day of the week when weekly recurring on-call shift rotations begins.
HandOffTime (dict) – [REQUIRED]
The time of day when a weekly recurring on-call shift rotation begins.
HourOfDay (integer) – [REQUIRED]
The hour when an on-call rotation shift begins or ends.
MinuteOfHour (integer) – [REQUIRED]
The minute when an on-call rotation shift begins or ends.
DailySettings (list) –
Information about on-call rotations that recur daily.
(dict) –
Details about when an on-call rotation shift begins or ends.
HourOfDay (integer) – [REQUIRED]
The hour when an on-call rotation shift begins or ends.
MinuteOfHour (integer) – [REQUIRED]
The minute when an on-call rotation shift begins or ends.
NumberOfOnCalls (integer) – [REQUIRED]
The number of contacts, or shift team members designated to be on call concurrently during a shift. For example, in an on-call schedule containing ten contacts, a value of
2
designates that two of them are on call at any given time.ShiftCoverages (dict) –
Information about the days of the week included in on-call rotation coverage.
(string) –
(list) –
(dict) –
Information about when an on-call shift begins and ends.
Start (dict) –
Information about when the on-call rotation shift begins.
HourOfDay (integer) – [REQUIRED]
The hour when an on-call rotation shift begins or ends.
MinuteOfHour (integer) – [REQUIRED]
The minute when an on-call rotation shift begins or ends.
End (dict) –
Information about when the on-call rotation shift ends.
HourOfDay (integer) – [REQUIRED]
The hour when an on-call rotation shift begins or ends.
MinuteOfHour (integer) – [REQUIRED]
The minute when an on-call rotation shift begins or ends.
RecurrenceMultiplier (integer) – [REQUIRED]
The number of days, weeks, or months a single rotation lasts.
Overrides (list) –
Information about changes that would be made in a rotation override.
(dict) –
Information about contacts and times that an on-call override replaces.
NewMembers (list) –
Information about contacts to add to an on-call rotation override.
(string) –
StartTime (datetime) –
Information about the time a rotation override would begin.
EndTime (datetime) –
Information about the time a rotation override would end.
NextToken (string) – A token to start the list. This token is used to get the next set of results.
MaxResults (integer) – The maximum number of items to return for this call. The call also returns a token that can be specified in a subsequent call to get the next set of results.
- Return type:
dict
- Returns:
Response Syntax
{ 'RotationShifts': [ { 'ContactIds': [ 'string', ], 'StartTime': datetime(2015, 1, 1), 'EndTime': datetime(2015, 1, 1), 'Type': 'REGULAR'|'OVERRIDDEN', 'ShiftDetails': { 'OverriddenContactIds': [ 'string', ] } }, ], 'NextToken': 'string' }
Response Structure
(dict) –
RotationShifts (list) –
Details about a rotation shift, including times, types, and contacts.
(dict) –
Information about a shift that belongs to an on-call rotation.
ContactIds (list) –
The Amazon Resource Names (ARNs) of the contacts who are part of the shift rotation.
(string) –
StartTime (datetime) –
The time a shift rotation begins.
EndTime (datetime) –
The time a shift rotation ends.
Type (string) –
The type of shift rotation.
ShiftDetails (dict) –
Additional information about an on-call rotation shift.
OverriddenContactIds (list) –
The Amazon Resources Names (ARNs) of the contacts who were replaced in a shift when an override was created. If the override is deleted, these contacts are restored to the shift.
(string) –
NextToken (string) –
The token for the next set of items to return. This token is used to get the next set of results.
Exceptions