Skip to main content

installed_components

Creates, updates, deletes, gets or lists an installed_components resource.

Overview

Nameinstalled_components
TypeResource
Idaws.greengrassv2.installed_components

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
component_namestringThe name of the component.
component_versionstringThe version of the component.
is_rootbooleanWhether or not the component is a root component.
last_installation_sourcestringThe most recent deployment source that brought the component to the Greengrass core device. For a thing group deployment or thing deployment, the source will be the ID of the last deployment that contained the component. For local deployments it will be LOCAL. Any deployment will attempt to reinstall currently broken components on the device, which will update the last installation source.
last_reported_timestampstring (date-time)The last time the Greengrass core device sent a message containing a component's state to the Amazon Web Services Cloud. A component does not need to see a state change for this field to update.
last_status_change_timestampstring (date-time)The status of how current the data is. This response is based off of component state changes. The status reflects component disruptions and deployments. If a component only sees a configuration update during a deployment, it might not undergo a state change and this status would not be updated.
lifecycle_statestringThe lifecycle state of the component. (NEW, INSTALLED, STARTING, RUNNING, STOPPING, ERRORED, BROKEN, FINISHED)
lifecycle_state_detailsstringA detailed response about the lifecycle state of the component that explains the reason why a component has an error or is broken.
lifecycle_status_codesarrayThe status codes that indicate the reason for failure whenever the lifecycleState has an error or is in a broken state. Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes response. This response can be inaccurate in earlier Greengrass nucleus versions.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_installed_componentsselectcore_device_thing_name, regionmaxResults, nextToken, topologyFilterRetrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. To include dependencies in the response, set the topologyFilter parameter to ALL. 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

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.
topologyFilterstringThe filter for the list of components. Choose from the following options: ALL – The list includes all components installed on the core device. ROOT – The list includes only root components, which are components that you specify in a deployment. When you choose this option, the list doesn't include components that the core device installs as dependencies of other components. Default: ROOT

SELECT examples

Retrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. To include dependencies in the response, set the topologyFilter parameter to ALL. 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
component_name,
component_version,
is_root,
last_installation_source,
last_reported_timestamp,
last_status_change_timestamp,
lifecycle_state,
lifecycle_state_details,
lifecycle_status_codes
FROM aws.greengrassv2.installed_components
WHERE core_device_thing_name = '{{ core_device_thing_name }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
AND topologyFilter = '{{ topologyFilter }}'
;