List all supported Elasticsearch versions
Parameters:
-
max_results
(Optional[MaxResults], default:
None
)
–
Set this value to limit the number of results returned. Value provided must be greater than 10 else it wont be honored.
Raises:
-
BaseException
–
An error occurred while processing the request.
-
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/async_elasticsearch_service.py
| async def list_elasticsearch_versions(
self,
*,
config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
max_results: Optional[
"capo_elasticsearch_service.types.max_results.MaxResults"
] = None,
next_token: Optional[
"capo_elasticsearch_service.types.next_token.NextToken"
] = None,
) -> "capo_elasticsearch_service.types.list_elasticsearch_versions_response.ListElasticsearchVersionsResponse":
"""<p>List all supported Elasticsearch versions</p>
Args:
max_results: <p> Set this value to limit the number of results returned. Value provided must be greater than 10 else it wont be honored. </p>
Raises:
capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_elasticsearch_service.types.list_elasticsearch_versions_request.ListElasticsearchVersionsRequest]",
) -> AsyncOperationResponse[
"capo_elasticsearch_service.types.list_elasticsearch_versions_response.ListElasticsearchVersionsResponse"
]:
import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.list_elasticsearch_versions
(
output,
http_response,
) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.list_elasticsearch_versions.async_list_elasticsearch_versions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListElasticsearchVersions")
)
input_: capo_elasticsearch_service.types.list_elasticsearch_versions_request.ListElasticsearchVersionsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|