Skip to main content

core_devices

Creates, updates, deletes, gets or lists a core_devices resource.

Overview

Namecore_devices
TypeResource
Idaws.greengrassv2.core_devices

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
architecturestringThe computer architecture of the core device.
core_device_thing_namestringThe name of the core device. This is also the name of the IoT thing.
core_versionstringThe version of the IoT Greengrass Core software that the core device runs. This version is equivalent to the version of the Greengrass nucleus component that runs on the core device. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide.
last_status_update_timestampstring (date-time)The time at which the core device's status last updated, expressed in ISO 8601 format.
platformstringThe operating system platform that the core device runs.
runtimestringThe runtime for the core device. The runtime can be: aws_nucleus_classic aws_nucleus_lite
statusstringThe status of the core device. The core device status can be: 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. (HEALTHY, UNHEALTHY)
tagsobjectA list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_core_deviceselectcore_device_thing_name, regionRetrieves metadata for a Greengrass core device. 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
list_core_devicesselectregionthingGroupArn, status, maxResults, nextToken, runtimeRetrieves a paginated list of Greengrass core devices. 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 For Greengrass nucleus 2.12.2 and earlier, the core device sends status updates when the status of any component on the core device becomes ERRORED or BROKEN. For Greengrass nucleus 2.12.3 and later, the core device sends status updates when the status of any component on the core device becomes ERRORED, BROKEN, RUNNING, or FINISHED. 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
delete_core_devicedeletecore_device_thing_name, regionDeletes a Greengrass core device, which is an IoT thing. This operation removes the core device from the list of core devices. This operation doesn't delete the IoT thing. For more information about how to delete the IoT thing, see DeleteThing in the IoT API Reference.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
core_device_thing_namestringThe name of the core device. This is also the name of the IoT thing.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results to be returned per paginated request.
nextTokenstringThe token to be used for the next set of paginated results.
runtimestringThe runtime to be used by the core device. The runtime can be: aws_nucleus_classic aws_nucleus_lite
statusstringThe 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.
thingGroupArnstringThe 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.

SELECT examples

Retrieves metadata for a Greengrass core device. 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

SELECT
architecture,
core_device_thing_name,
core_version,
last_status_update_timestamp,
platform,
runtime,
status,
tags
FROM aws.greengrassv2.core_devices
WHERE core_device_thing_name = '{{ core_device_thing_name }}' -- required
AND region = '{{ region }}' -- required
;

DELETE examples

Deletes a Greengrass core device, which is an IoT thing. This operation removes the core device from the list of core devices. This operation doesn't delete the IoT thing. For more information about how to delete the IoT thing, see DeleteThing in the IoT API Reference.

DELETE FROM aws.greengrassv2.core_devices
WHERE core_device_thing_name = '{{ core_device_thing_name }}' --required
AND region = '{{ region }}' --required
;