deleteThingGroup method
Deletes a thing group.
May throw InvalidRequestException. May throw VersionConflictException. May throw ThrottlingException. May throw InternalFailureException.
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 {
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: '/thing-groups/${Uri.encodeComponent(thingGroupName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
}