GreengrassV2 / Client / list_core_devices

list_core_devices#

GreengrassV2.Client.list_core_devices(**kwargs)#

Retrieves a paginated list of Greengrass core devices.

Note

IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn’t running on the device, or if device isn’t connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated.

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

See also: AWS API Documentation

Request Syntax

response = client.list_core_devices(
    thingGroupArn='string',
    status='HEALTHY'|'UNHEALTHY',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • thingGroupArn (string) – The ARN of the IoT thing group by which to filter. If you specify this parameter, the list includes only core devices that have successfully deployed a deployment that targets the thing group. When you remove a core device from a thing group, the list continues to include that core device.

  • status (string) –

    The core device status by which to filter. If you specify this parameter, the list includes only core devices that have this status. Choose one of the following options:

    • HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.

    • UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.

  • maxResults (integer) – The maximum number of results to be returned per paginated request.

  • nextToken (string) – The token to be used for the next set of paginated results.

Return type:

dict

Returns:

Response Syntax

{
    'coreDevices': [
        {
            'coreDeviceThingName': 'string',
            'status': 'HEALTHY'|'UNHEALTHY',
            'lastStatusUpdateTimestamp': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • coreDevices (list) –

      A list that summarizes each core device.

      • (dict) –

        Contains information about a Greengrass core device, which is an IoT thing that runs the IoT Greengrass Core software.

        • coreDeviceThingName (string) –

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

        • status (string) –

          The status of the core device. Core devices can have the following statuses:

          • HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.

          • UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.

        • lastStatusUpdateTimestamp (datetime) –

          The time at which the core device’s status last updated, expressed in ISO 8601 format.

    • nextToken (string) –

      The token for the next set of results, or null if there are no additional results.

Exceptions