startSingleWirelessDeviceImportTask method
Start import task for a single wireless device.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter destinationName :
The name of the Sidewalk destination that describes the IoT rule to route
messages from the device in the import task that will be onboarded to AWS
IoT Wireless.
Parameter sidewalk :
The Sidewalk-related parameters for importing a single wireless device.
Parameter deviceName :
The name of the wireless device for which an import task is being started.
Parameter positioning :
The integration status of the Device Location feature for Sidewalk
devices.
Implementation
Future<StartSingleWirelessDeviceImportTaskResponse>
startSingleWirelessDeviceImportTask({
required String destinationName,
required SidewalkSingleStartImportInfo sidewalk,
String? clientRequestToken,
String? deviceName,
PositioningConfigStatus? positioning,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'DestinationName': destinationName,
'Sidewalk': sidewalk,
'ClientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (deviceName != null) 'DeviceName': deviceName,
if (positioning != null) 'Positioning': positioning.value,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/wireless_single_device_import_task',
exceptionFnMap: _exceptionFns,
);
return StartSingleWirelessDeviceImportTaskResponse.fromJson(response);
}