describeReservedInstances method
Describes the Amazon OpenSearch Service instances that you have reserved in a given Region. For more information, see Reserved Instances in Amazon OpenSearch Service.
May throw DisabledOperationException.
May throw InternalException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter maxResults :
An optional parameter that specifies the maximum number of results to
return. You can use nextToken to get the next page of
results.
Parameter nextToken :
If your initial DescribeReservedInstances operation returns a
nextToken, you can include the returned
nextToken in subsequent
DescribeReservedInstances operations, which returns results
in the next page.
Parameter reservedInstanceId :
The reserved instance identifier filter value. Use this parameter to show
only the reservation that matches the specified reserved OpenSearch
instance ID.
Implementation
Future<DescribeReservedInstancesResponse> describeReservedInstances({
int? maxResults,
String? nextToken,
String? reservedInstanceId,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (reservedInstanceId != null) 'reservationId': [reservedInstanceId],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/2021-01-01/opensearch/reservedInstances',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DescribeReservedInstancesResponse.fromJson(response);
}