Returns a list of upgrade compatible Elastisearch versions. You can optionally pass a DomainName to get all upgrade compatible Elasticsearch versions for that specific domain.
Raises:
-
BaseException
–
An error occurred while processing the request.
-
DisabledOperationException
–
An error occured because the client wanted to access a not supported operation. Gives http status code of 409.
-
InternalException
–
The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.
-
ResourceNotFoundException
–
An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.
-
ValidationException
–
An exception for missing / invalid input fields. Gives http status code of 400.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_elasticsearch_service/_services/elasticsearch_service.py
| def get_compatible_elasticsearch_versions(
self,
*,
config_overrides: Optional[ElasticsearchServiceClientConfig] = None,
domain_name: Optional[
"capo_elasticsearch_service.types.domain_name.DomainName"
] = None,
) -> "capo_elasticsearch_service.types.get_compatible_elasticsearch_versions_response.GetCompatibleElasticsearchVersionsResponse":
"""<p> Returns a list of upgrade compatible Elastisearch versions. You can optionally pass a <code> <a>DomainName</a> </code> to get all upgrade compatible Elasticsearch versions for that specific domain. </p>
Raises:
capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_elasticsearch_service.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access a not supported operation. Gives http status code of 409.</p>
capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
capo_elasticsearch_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.validation_exception.ValidationException: <p>An exception for missing / invalid input fields. Gives http status code of 400.</p>
capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_elasticsearch_service.types.get_compatible_elasticsearch_versions_request.GetCompatibleElasticsearchVersionsRequest]",
) -> OperationResponse[
"capo_elasticsearch_service.types.get_compatible_elasticsearch_versions_response.GetCompatibleElasticsearchVersionsResponse"
]:
import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.get_compatible_elasticsearch_versions
output, http_response = (
capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.get_compatible_elasticsearch_versions.get_compatible_elasticsearch_versions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetCompatibleElasticsearchVersions")
)
input_: capo_elasticsearch_service.types.get_compatible_elasticsearch_versions_request.GetCompatibleElasticsearchVersionsRequest = {}
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
|