getManagedThingState method

Future<GetManagedThingStateResponse> getManagedThingState({
  1. required String managedThingId,
})

Returns the managed thing state for the given device Id.

May throw AccessDeniedException. May throw InternalFailureException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw UnauthorizedException. May throw ValidationException.

Parameter managedThingId : The id of the device.

Implementation

Future<GetManagedThingStateResponse> getManagedThingState({
  required String managedThingId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/managed-thing-states/${Uri.encodeComponent(managedThingId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetManagedThingStateResponse.fromJson(response);
}