deleteObject method

Future<void> deleteObject({
  1. required String directoryArn,
  2. required ObjectReference objectReference,
})

Deletes an object and its associated attributes. Only objects with no children and no parents can be deleted. The maximum number of attributes that can be deleted during an object deletion is 30. For more information, see Amazon Cloud Directory Limits.

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

Parameter directoryArn : The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.

Parameter objectReference : A reference that identifies the object.

Implementation

Future<void> deleteObject({
  required String directoryArn,
  required ObjectReference objectReference,
}) async {
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final $payload = <String, dynamic>{
    'ObjectReference': objectReference,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/object/delete',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}