listAttachedIndices method

Future<ListAttachedIndicesResponse> listAttachedIndices({
  1. required String directoryArn,
  2. required ObjectReference targetReference,
  3. ConsistencyLevel? consistencyLevel,
  4. int? maxResults,
  5. String? nextToken,
})

Lists indices attached to the specified object.

May throw InternalServiceException. May throw InvalidArnException. May throw RetryableConflictException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw DirectoryNotEnabledException. May throw ResourceNotFoundException.

Parameter directoryArn : The ARN of the directory.

Parameter targetReference : A reference to the object that has indices attached.

Parameter consistencyLevel : The consistency level to use for this operation.

Parameter maxResults : The maximum number of results to retrieve.

Parameter nextToken : The pagination token.

Implementation

Future<ListAttachedIndicesResponse> listAttachedIndices({
  required String directoryArn,
  required ObjectReference targetReference,
  ConsistencyLevel? consistencyLevel,
  int? maxResults,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(targetReference, 'targetReference');
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    1152921504606846976,
  );
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
    if (consistencyLevel != null)
      'x-amz-consistency-level': consistencyLevel.toValue(),
  };
  final $payload = <String, dynamic>{
    'TargetReference': targetReference,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/amazonclouddirectory/2017-01-11/object/indices',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return ListAttachedIndicesResponse.fromJson(response);
}