getCoreDevice method

Future<GetCoreDeviceResponse> getCoreDevice({
  1. required String coreDeviceThingName,
})

Retrieves metadata for a Greengrass core device.

Core devices send status updates at the following times:

  • When the IoT Greengrass Core software starts
  • When the core device receives a deployment from the Amazon Web Services Cloud
  • When the status of any component on the core device becomes BROKEN
  • At a regular interval that you can configure, which defaults to 24 hours
  • For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter coreDeviceThingName : The name of the core device. This is also the name of the IoT thing.

Implementation

Future<GetCoreDeviceResponse> getCoreDevice({
  required String coreDeviceThingName,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/greengrass/v2/coreDevices/${Uri.encodeComponent(coreDeviceThingName)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetCoreDeviceResponse.fromJson(response);
}