describeDevice method
Describes the device.
May throw ResourceNotFound.
Parameter deviceFleetName :
The name of the fleet the devices belong to.
Parameter deviceName :
The unique ID of the device.
Parameter nextToken :
Next token of device description.
Implementation
Future<DescribeDeviceResponse> describeDevice({
required String deviceFleetName,
required String deviceName,
String? nextToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.DescribeDevice'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DeviceFleetName': deviceFleetName,
'DeviceName': deviceName,
if (nextToken != null) 'NextToken': nextToken,
},
);
return DescribeDeviceResponse.fromJson(jsonResponse.body);
}