registerThing method
Provisions a thing in the device registry. RegisterThing calls other IoT control plane APIs. These calls might exceed your account level IoT Throttling Limits and cause throttle errors. Please contact Amazon Web Services Customer Support to raise your throttling limits if necessary.
Requires permission to access the RegisterThing action.
May throw ConflictingResourceUpdateException.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceRegistrationFailureException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
Parameter templateBody :
The provisioning template. See Provisioning
Devices That Have Device Certificates for more information.
Parameter parameters :
The parameters for provisioning a thing. See Provisioning
Templates for more information.
Implementation
Future<RegisterThingResponse> registerThing({
required String templateBody,
Map<String, String>? parameters,
}) async {
final $payload = <String, dynamic>{
'templateBody': templateBody,
if (parameters != null) 'parameters': parameters,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/things',
exceptionFnMap: _exceptionFns,
);
return RegisterThingResponse.fromJson(response);
}