describeIndexFields method

Future<DescribeIndexFieldsResponse> describeIndexFields({
  1. required String domainName,
  2. List<String>? fieldNames,
})

Gets information about the index fields configured for the search domain. Can be limited to specific fields by name. Shows all fields by default.

May throw BaseException. May throw InternalException. May throw ResourceNotFoundException.

Parameter fieldNames : Limits the DescribeIndexFields response to the specified fields.

Implementation

Future<DescribeIndexFieldsResponse> describeIndexFields({
  required String domainName,
  List<String>? fieldNames,
}) async {
  ArgumentError.checkNotNull(domainName, 'domainName');
  _s.validateStringLength(
    'domainName',
    domainName,
    3,
    28,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['DomainName'] = domainName;
  fieldNames?.also((arg) => $request['FieldNames'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeIndexFields',
    version: '2011-02-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeIndexFieldsRequest'],
    shapes: shapes,
    resultWrapper: 'DescribeIndexFieldsResult',
  );
  return DescribeIndexFieldsResponse.fromXml($result);
}