describeDatastore method

Future<DescribeDatastoreResponse> describeDatastore({
  1. required String datastoreName,
  2. bool? includeStatistics,
})

Retrieves information about a data store.

May throw InvalidRequestException. May throw ResourceNotFoundException. May throw InternalFailureException. May throw ServiceUnavailableException. May throw ThrottlingException.

Parameter datastoreName : The name of the data store

Parameter includeStatistics : If true, additional statistical information about the data store is included in the response. This feature cannot be used with a data store whose S3 storage is customer-managed.

Implementation

Future<DescribeDatastoreResponse> describeDatastore({
  required String datastoreName,
  bool? includeStatistics,
}) async {
  ArgumentError.checkNotNull(datastoreName, 'datastoreName');
  _s.validateStringLength(
    'datastoreName',
    datastoreName,
    1,
    128,
    isRequired: true,
  );
  final $query = <String, List<String>>{
    if (includeStatistics != null)
      'includeStatistics': [includeStatistics.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/datastores/${Uri.encodeComponent(datastoreName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeDatastoreResponse.fromJson(response);
}