detachTypedLink method

Future<void> detachTypedLink({
  1. required String directoryArn,
  2. required TypedLinkSpecifier typedLinkSpecifier,
})

Detaches a typed link from a specified source and target object. For more information, see Typed link.

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 FacetValidationException.

Parameter directoryArn : The Amazon Resource Name (ARN) of the directory where you want to detach the typed link.

Parameter typedLinkSpecifier : Used to accept a typed link specifier as input.

Implementation

Future<void> detachTypedLink({
  required String directoryArn,
  required TypedLinkSpecifier typedLinkSpecifier,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  ArgumentError.checkNotNull(typedLinkSpecifier, 'typedLinkSpecifier');
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final $payload = <String, dynamic>{
    'TypedLinkSpecifier': typedLinkSpecifier,
  };
  await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/typedlink/detach',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}