deleteEntity method
Deletes an entity.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter entityId :
The ID of the entity to delete.
Parameter workspaceId :
The ID of the workspace that contains the entity to delete.
Parameter isRecursive :
A Boolean value that specifies whether the operation deletes child
entities.
Implementation
Future<DeleteEntityResponse> deleteEntity({
required String entityId,
required String workspaceId,
bool? isRecursive,
}) async {
final $query = <String, List<String>>{
if (isRecursive != null) 'isRecursive': [isRecursive.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/workspaces/${Uri.encodeComponent(workspaceId)}/entities/${Uri.encodeComponent(entityId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteEntityResponse.fromJson(response);
}