Returns a map of OpenSearch or Elasticsearch versions and the versions you can upgrade them to.
Parameters:
-
domain_name
(Optional[DomainName], default:
None
)
–
The name of an existing domain. Provide this parameter to limit the results to a single domain.
Raises:
Source code in docs_src/capo_opensearch/_services/open_search.py
| def get_compatible_versions(
self,
*,
config_overrides: Optional[OpenSearchClientConfig] = None,
domain_name: Optional["capo_opensearch.types.domain_name.DomainName"] = None,
) -> "capo_opensearch.types.get_compatible_versions_response.GetCompatibleVersionsResponse":
"""<p>Returns a map of OpenSearch or Elasticsearch versions and the versions you can upgrade them to.</p>
Args:
domain_name: <p>The name of an existing domain. Provide this parameter to limit the results to a single domain.</p>
Raises:
capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</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.get_compatible_versions_request.GetCompatibleVersionsRequest]",
) -> OperationResponse[
"capo_opensearch.types.get_compatible_versions_response.GetCompatibleVersionsResponse"
]:
import capo_opensearch._operations.amazon_open_search_service.get_compatible_versions
output, http_response = (
capo_opensearch._operations.amazon_open_search_service.get_compatible_versions.get_compatible_versions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetCompatibleVersions")
)
input_: capo_opensearch.types.get_compatible_versions_request.GetCompatibleVersionsRequest = {}
if domain_name is not None:
input_["domain_name"] = domain_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|