updateScheduledAction method
Reschedules a planned domain configuration change for a later time. This change can be a scheduled service software update or a blue/green Auto-Tune enhancement.
May throw BaseException.
May throw ConflictException.
May throw InternalException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw SlotNotAvailableException.
May throw ValidationException.
Parameter actionID :
The unique identifier of the action to reschedule. To retrieve this ID,
send a ListScheduledActions
request.
Parameter actionType :
The type of action to reschedule. Can be one of
SERVICE_SOFTWARE_UPDATE, JVM_HEAP_SIZE_TUNING,
or JVM_YOUNG_GEN_TUNING. To retrieve this value, send a ListScheduledActions
request.
Parameter domainName :
The name of the domain to reschedule an action for.
Parameter scheduleAt :
When to schedule the action.
-
NOW- Immediately schedules the update to happen in the current hour if there's capacity available. -
TIMESTAMP- Lets you specify a custom date and time to apply the update. If you specify this value, you must also provide a value forDesiredStartTime. -
OFF_PEAK_WINDOW- Marks the action to be picked up during an upcoming off-peak window. There's no guarantee that the change will be implemented during the next immediate window. Depending on capacity, it might happen in subsequent days.
Parameter desiredStartTime :
The time to implement the change, in Coordinated Universal Time (UTC).
Only specify this parameter if you set ScheduleAt to
TIMESTAMP.
Implementation
Future<UpdateScheduledActionResponse> updateScheduledAction({
required String actionID,
required ActionType actionType,
required String domainName,
required ScheduleAt scheduleAt,
int? desiredStartTime,
}) async {
final $payload = <String, dynamic>{
'ActionID': actionID,
'ActionType': actionType.value,
'ScheduleAt': scheduleAt.value,
if (desiredStartTime != null) 'DesiredStartTime': desiredStartTime,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/2021-01-01/opensearch/domain/${Uri.encodeComponent(domainName)}/scheduledAction/update',
exceptionFnMap: _exceptionFns,
);
return UpdateScheduledActionResponse.fromJson(response);
}