attachToIndex method
- required String directoryArn,
- required ObjectReference indexReference,
- required ObjectReference targetReference,
Attaches the specified object to 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 InvalidAttachmentException. May throw ResourceNotFoundException. May throw LinkNameAlreadyInUseException. May throw IndexedAttributeMissingException. May throw NotIndexException.
Parameter directoryArn
:
The Amazon Resource Name (ARN) of the directory where the object and index
exist.
Parameter indexReference
:
A reference to the index that you are attaching the object to.
Parameter targetReference
:
A reference to the object that you are attaching to the index.
Implementation
Future<AttachToIndexResponse> attachToIndex({
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/attach',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return AttachToIndexResponse.fromJson(response);
}