startServiceSoftwareUpdate method
Schedules a service software update for an Amazon OpenSearch Service domain. For more information, see Service software updates in Amazon OpenSearch Service.
May throw BaseException.
May throw InternalException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter domainName :
The name of the domain that you want to update to the latest service
software.
Parameter desiredStartTime :
The Epoch timestamp when you want the service software update to start.
You only need to specify this parameter if you set ScheduleAt
to TIMESTAMP.
Parameter scheduleAt :
When to start the service software update.
-
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 update to be picked up during an upcoming off-peak window. There's no guarantee that the update will happen during the next immediate window. Depending on capacity, it might happen in subsequent days.
NOW if you don't specify a value for
DesiredStartTime, and TIMESTAMP if you do.
Implementation
Future<StartServiceSoftwareUpdateResponse> startServiceSoftwareUpdate({
required String domainName,
int? desiredStartTime,
ScheduleAt? scheduleAt,
}) async {
final $payload = <String, dynamic>{
'DomainName': domainName,
if (desiredStartTime != null) 'DesiredStartTime': desiredStartTime,
if (scheduleAt != null) 'ScheduleAt': scheduleAt.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/2021-01-01/opensearch/serviceSoftwareUpdate/start',
exceptionFnMap: _exceptionFns,
);
return StartServiceSoftwareUpdateResponse.fromJson(response);
}