deleteManagedThing method

Future<void> deleteManagedThing({
  1. required String identifier,
  2. bool? force,
})

Delete a managed thing. For direct-connected and hub-connected devices connecting with Managed integrations via a controller, all of the devices connected to it will have their status changed to PENDING. It is not possible to remove a cloud-to-cloud device.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter identifier : The id of the managed thing.

Parameter force : When set to TRUE, a forceful deteletion of the managed thing will occur. When set to FALSE, a non-forceful deletion of the managed thing will occur.

Implementation

Future<void> deleteManagedThing({
  required String identifier,
  bool? force,
}) async {
  final $query = <String, List<String>>{
    if (force != null) 'Force': [force.toString()],
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/managed-things/${Uri.encodeComponent(identifier)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}