startThingRegistrationTask method
Creates a bulk thing provisioning task.
Requires permission to access the StartThingRegistrationTask action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ThrottlingException.
May throw UnauthorizedException.
Parameter inputFileBucket :
The S3 bucket that contains the input file.
Parameter inputFileKey :
The name of input file within the S3 bucket. This file contains a newline
delimited JSON file. Each line contains the parameter values to provision
one device (thing).
Parameter roleArn :
The IAM role ARN that grants permission the input file.
Parameter templateBody :
The provisioning template.
Implementation
Future<StartThingRegistrationTaskResponse> startThingRegistrationTask({
required String inputFileBucket,
required String inputFileKey,
required String roleArn,
required String templateBody,
}) async {
final $payload = <String, dynamic>{
'inputFileBucket': inputFileBucket,
'inputFileKey': inputFileKey,
'roleArn': roleArn,
'templateBody': templateBody,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/thing-registration-tasks',
exceptionFnMap: _exceptionFns,
);
return StartThingRegistrationTaskResponse.fromJson(response);
}