Schedules a service software update for an Amazon OpenSearch Service domain. For more information, see Service software updates in Amazon OpenSearch Service.
Parameters:
-
domain_name
(DomainName)
–
The name of the domain that you want to update to the latest service software.
-
schedule_at
(Optional[ScheduleAt], default:
None
)
–
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 for DesiredStartTime.
-
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.
Default: NOW if you don't specify a value for DesiredStartTime, and TIMESTAMP if you do.
-
desired_start_time
(Optional[Long], default:
None
)
–
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.
Raises:
Source code in docs_src/capo_opensearch/_services/open_search.py
| def start_service_software_update(
self,
domain_name: "capo_opensearch.types.domain_name.DomainName",
*,
config_overrides: Optional[OpenSearchClientConfig] = None,
schedule_at: Optional["capo_opensearch.types.schedule_at.ScheduleAt"] = None,
desired_start_time: Optional["capo_opensearch.types.long.Long"] = None,
) -> "capo_opensearch.types.start_service_software_update_response.StartServiceSoftwareUpdateResponse":
"""<p>Schedules a service software update for an Amazon OpenSearch Service domain. For more information, see <a href="https://docs.aws.amazon.com/opensearch-service/latest/developerguide/service-software.html">Service software updates in Amazon OpenSearch Service</a>.</p>
Args:
domain_name: <p>The name of the domain that you want to update to the latest service software.</p>
schedule_at: <p>When to start the service software update.</p> <ul> <li> <p> <code>NOW</code> - Immediately schedules the update to happen in the current hour if there's capacity available.</p> </li> <li> <p> <code>TIMESTAMP</code> - Lets you specify a custom date and time to apply the update. If you specify this value, you must also provide a value for <code>DesiredStartTime</code>.</p> </li> <li> <p> <code>OFF_PEAK_WINDOW</code> - 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.</p> </li> </ul> <p>Default: <code>NOW</code> if you don't specify a value for <code>DesiredStartTime</code>, and <code>TIMESTAMP</code> if you do.</p>
desired_start_time: <p>The Epoch timestamp when you want the service software update to start. You only need to specify this parameter if you set <code>ScheduleAt</code> to <code>TIMESTAMP</code>.</p>
Raises:
capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_opensearch.types.start_service_software_update_request.StartServiceSoftwareUpdateRequest]",
) -> OperationResponse[
"capo_opensearch.types.start_service_software_update_response.StartServiceSoftwareUpdateResponse"
]:
import capo_opensearch._operations.amazon_open_search_service.start_service_software_update
output, http_response = (
capo_opensearch._operations.amazon_open_search_service.start_service_software_update.start_service_software_update(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StartServiceSoftwareUpdate")
)
input_: capo_opensearch.types.start_service_software_update_request.StartServiceSoftwareUpdateRequest = {
"domain_name": domain_name
}
if schedule_at is not None:
input_["schedule_at"] = schedule_at
if desired_start_time is not None:
input_["desired_start_time"] = desired_start_time
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|