Skip to content

cancel_service_software_update

cancel_service_software_update(
    domain_name: DomainName,
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> CancelServiceSoftwareUpdateResponse

Cancels a scheduled service software update for an Amazon OpenSearch Service domain. You can only perform this operation before the AutomatedUpdateDate and when the domain's UpdateStatus is PENDING_UPDATE. For more information, see Service software updates in Amazon OpenSearch Service.

Parameters:

  • domain_name (DomainName) –

    Name of the OpenSearch Service domain that you want to cancel the service software update on.

Raises:

Source code in docs_src/capo_opensearch/_services/open_search.py
def cancel_service_software_update(
    self,
    domain_name: "capo_opensearch.types.domain_name.DomainName",
    *,
    config_overrides: Optional[OpenSearchClientConfig] = None,
) -> "capo_opensearch.types.cancel_service_software_update_response.CancelServiceSoftwareUpdateResponse":
    """<p>Cancels a scheduled service software update for an Amazon OpenSearch Service domain. You can only perform this operation before the <code>AutomatedUpdateDate</code> and when the domain's <code>UpdateStatus</code> is <code>PENDING_UPDATE</code>. 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>Name of the OpenSearch Service domain that you want to cancel the service software update on.</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.cancel_service_software_update_request.CancelServiceSoftwareUpdateRequest]",
    ) -> OperationResponse[
        "capo_opensearch.types.cancel_service_software_update_response.CancelServiceSoftwareUpdateResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.cancel_service_software_update

        output, http_response = (
            capo_opensearch._operations.amazon_open_search_service.cancel_service_software_update.cancel_service_software_update(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CancelServiceSoftwareUpdate")
    )
    input_: capo_opensearch.types.cancel_service_software_update_request.CancelServiceSoftwareUpdateRequest = {
        "domain_name": domain_name
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output