deleteThingGroup method

Future<void> deleteThingGroup({
  1. required String thingGroupName,
  2. int? expectedVersion,
})

Deletes a thing group.

Requires permission to access the DeleteThingGroup action.

May throw InternalFailureException. May throw InvalidRequestException. May throw ThrottlingException. May throw VersionConflictException.

Parameter thingGroupName : The name of the thing group to delete.

Parameter expectedVersion : The expected version of the thing group to delete.

Implementation

Future<void> deleteThingGroup({
  required String thingGroupName,
  int? expectedVersion,
}) async {
  final $query = <String, List<String>>{
    if (expectedVersion != null)
      'expectedVersion': [expectedVersion.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/thing-groups/${Uri.encodeComponent(thingGroupName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}