deleteThingType method

Future<void> deleteThingType({
  1. required String thingTypeName,
})

Deletes the specified thing type. You cannot delete a thing type if it has things associated with it. To delete a thing type, first mark it as deprecated by calling DeprecateThingType, then remove any associated things by calling UpdateThing to change the thing type on any associated thing, and finally use DeleteThingType to delete the thing type.

May throw ResourceNotFoundException. May throw InvalidRequestException. May throw ThrottlingException. May throw UnauthorizedException. May throw ServiceUnavailableException. May throw InternalFailureException.

Parameter thingTypeName : The name of the thing type.

Implementation

Future<void> deleteThingType({
  required String thingTypeName,
}) async {
  ArgumentError.checkNotNull(thingTypeName, 'thingTypeName');
  _s.validateStringLength(
    'thingTypeName',
    thingTypeName,
    1,
    128,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri: '/thing-types/${Uri.encodeComponent(thingTypeName)}',
    exceptionFnMap: _exceptionFns,
  );
}