listIndex method
Lists objects attached to the specified index.
May throw AccessDeniedException.
May throw DirectoryNotEnabledException.
May throw FacetValidationException.
May throw InternalServiceException.
May throw InvalidArnException.
May throw InvalidNextTokenException.
May throw LimitExceededException.
May throw NotIndexException.
May throw ResourceNotFoundException.
May throw RetryableConflictException.
May throw ValidationException.
Parameter directoryArn :
The ARN of the directory that the index exists in.
Parameter indexReference :
The reference to the index to list.
Parameter consistencyLevel :
The consistency level to execute the request at.
Parameter maxResults :
The maximum number of objects in a single page to retrieve from the index
during a request. For more information, see Amazon
Cloud Directory Limits.
Parameter nextToken :
The pagination token.
Parameter rangesOnIndexedValues :
Specifies the ranges of indexed values that you want to query.
Implementation
Future<ListIndexResponse> listIndex({
required String directoryArn,
required ObjectReference indexReference,
ConsistencyLevel? consistencyLevel,
int? maxResults,
String? nextToken,
List<ObjectAttributeRange>? rangesOnIndexedValues,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1152921504606846976,
);
final headers = <String, String>{
'x-amz-data-partition': directoryArn.toString(),
if (consistencyLevel != null)
'x-amz-consistency-level': consistencyLevel.value,
};
final $payload = <String, dynamic>{
'IndexReference': indexReference,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
if (rangesOnIndexedValues != null)
'RangesOnIndexedValues': rangesOnIndexedValues,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/amazonclouddirectory/2017-01-11/index/targets',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return ListIndexResponse.fromJson(response);
}