Lists available reserved Elasticsearch instance offerings.
Parameters:
-
reserved_elasticsearch_instance_offering_id
(Optional[GUID], default:
None
)
–
The offering identifier filter value. Use this parameter to show only the available offering that matches the specified reservation identifier.
-
max_results
(Optional[MaxResults], default:
None
)
–
Set this value to limit the number of results returned. If not specified, defaults to 100.
-
next_token
(Optional[NextToken], default:
None
)
–
NextToken should be sent in case if earlier API call produced result containing NextToken. It is used for pagination.
Raises:
-
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 describe_reserved_elasticsearch_instance_offerings(
self,
*,
config_overrides: Optional[ElasticsearchServiceClientConfig] = None,
reserved_elasticsearch_instance_offering_id: Optional[
"capo_elasticsearch_service.types.guid.GUID"
] = 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.describe_reserved_elasticsearch_instance_offerings_response.DescribeReservedElasticsearchInstanceOfferingsResponse":
"""<p>Lists available reserved Elasticsearch instance offerings.</p>
Args:
reserved_elasticsearch_instance_offering_id: <p>The offering identifier filter value. Use this parameter to show only the available offering that matches the specified reservation identifier.</p>
max_results: <p>Set this value to limit the number of results returned. If not specified, defaults to 100.</p>
next_token: <p>NextToken should be sent in case if earlier API call produced result containing NextToken. It is used for pagination.</p>
Raises:
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.describe_reserved_elasticsearch_instance_offerings_request.DescribeReservedElasticsearchInstanceOfferingsRequest]",
) -> OperationResponse[
"capo_elasticsearch_service.types.describe_reserved_elasticsearch_instance_offerings_response.DescribeReservedElasticsearchInstanceOfferingsResponse"
]:
import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.describe_reserved_elasticsearch_instance_offerings
output, http_response = (
capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.describe_reserved_elasticsearch_instance_offerings.describe_reserved_elasticsearch_instance_offerings(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("DescribeReservedElasticsearchInstanceOfferings"),
)
input_: capo_elasticsearch_service.types.describe_reserved_elasticsearch_instance_offerings_request.DescribeReservedElasticsearchInstanceOfferingsRequest = {}
if reserved_elasticsearch_instance_offering_id is not None:
input_["reserved_elasticsearch_instance_offering_id"] = (
reserved_elasticsearch_instance_offering_id
)
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|