deleteDynamicThingGroup method

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

Deletes a dynamic thing group.

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

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 {
  ArgumentError.checkNotNull(thingGroupName, 'thingGroupName');
  _s.validateStringLength(
    'thingGroupName',
    thingGroupName,
    1,
    128,
    isRequired: true,
  );
  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,
  );
}