updateRotation method
Updates the information specified for an on-call rotation.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter recurrence :
Information about how long the updated rotation lasts before restarting at
the beginning of the shift order.
Parameter rotationId :
The Amazon Resource Name (ARN) of the rotation to update.
Parameter contactIds :
The Amazon Resource Names (ARNs) of the contacts to include in the updated
rotation.
The order in which you list the contacts is their shift order in the
rotation schedule.
Parameter startTime :
The date and time the rotation goes into effect.
Parameter timeZoneId :
The time zone to base the updated 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.
Implementation
Future<void> updateRotation({
required RecurrenceSettings recurrence,
required String rotationId,
List<String>? contactIds,
DateTime? startTime,
String? timeZoneId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SSMContacts.UpdateRotation'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Recurrence': recurrence,
'RotationId': rotationId,
if (contactIds != null) 'ContactIds': contactIds,
if (startTime != null) 'StartTime': unixTimestampToJson(startTime),
if (timeZoneId != null) 'TimeZoneId': timeZoneId,
},
);
}