detachFromIndex method

Future<DetachFromIndexResponse> detachFromIndex({
  1. required String directoryArn,
  2. required ObjectReference indexReference,
  3. required ObjectReference targetReference,
})

Detaches the specified object from the specified index.

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

Parameter directoryArn : The Amazon Resource Name (ARN) of the directory the index and object exist in.

Parameter indexReference : A reference to the index object.

Parameter targetReference : A reference to the object being detached from the index.

Implementation

Future<DetachFromIndexResponse> detachFromIndex({
  required String directoryArn,
  required ObjectReference indexReference,
  required ObjectReference targetReference,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(indexReference, 'indexReference');
  ArgumentError.checkNotNull(targetReference, 'targetReference');
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final $payload = <String, dynamic>{
    'IndexReference': indexReference,
    'TargetReference': targetReference,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/index/detach',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return DetachFromIndexResponse.fromJson(response);
}