deleteDynamicThingGroup method

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

Deletes a dynamic thing group.

Requires permission to access the DeleteDynamicThingGroup action.

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

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

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

Implementation

Future<void> deleteDynamicThingGroup({
  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:
        '/dynamic-thing-groups/${Uri.encodeComponent(thingGroupName)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}