describeDevice method

Future<DescribeDeviceResponse> describeDevice({
  1. required String deviceId,
  2. required String fleetArn,
})

Provides information about a user's device.

May throw UnauthorizedException. May throw InternalServerErrorException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw TooManyRequestsException.

Parameter deviceId : A unique identifier for a registered user's device.

Parameter fleetArn : The ARN of the fleet.

Implementation

Future<DescribeDeviceResponse> describeDevice({
  required String deviceId,
  required String fleetArn,
}) async {
  ArgumentError.checkNotNull(deviceId, 'deviceId');
  _s.validateStringLength(
    'deviceId',
    deviceId,
    1,
    256,
    isRequired: true,
  );
  ArgumentError.checkNotNull(fleetArn, 'fleetArn');
  _s.validateStringLength(
    'fleetArn',
    fleetArn,
    20,
    2048,
    isRequired: true,
  );
  final $payload = <String, dynamic>{
    'DeviceId': deviceId,
    'FleetArn': fleetArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/describeDevice',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeDeviceResponse.fromJson(response);
}