batchGetCollectionGroup method

Future<BatchGetCollectionGroupResponse> batchGetCollectionGroup({
  1. List<String>? ids,
  2. List<String>? names,
})

Returns attributes for one or more collection groups, including capacity limits and the number of collections in each group. For more information, see Creating and managing Amazon OpenSearch Serverless collections.

May throw InternalServerException. May throw ValidationException.

Parameter ids : A list of collection group IDs. You can't provide names and IDs in the same request.

Parameter names : A list of collection group names. You can't provide names and IDs in the same request.

Implementation

Future<BatchGetCollectionGroupResponse> batchGetCollectionGroup({
  List<String>? ids,
  List<String>? names,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'OpenSearchServerless.BatchGetCollectionGroup'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (ids != null) 'ids': ids,
      if (names != null) 'names': names,
    },
  );

  return BatchGetCollectionGroupResponse.fromJson(jsonResponse.body);
}