AWS IoT Greengrass V2

2022/08/30 - AWS IoT Greengrass V2 - 1 updated api methods

Changes  Adds topologyFilter to ListInstalledComponentsRequest which allows filtration of components by ROOT or ALL (including root and dependency components). Adds lastStatusChangeTimestamp to ListInstalledComponents response to show the last time a component changed state on a device.

ListInstalledComponents (updated) Link ¶
Changes (request, response)
Request
{'topologyFilter': 'ALL | ROOT'}
Response
{'installedComponents': {'lastStatusChangeTimestamp': 'timestamp'}}

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 .

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

client.list_installed_components(
    coreDeviceThingName='string',
    maxResults=123,
    nextToken='string',
    topologyFilter='ALL'|'ROOT'
)
type coreDeviceThingName

string

param coreDeviceThingName

[REQUIRED]

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

type maxResults

integer

param maxResults

The maximum number of results to be returned per paginated request.

type nextToken

string

param nextToken

The token to be used for the next set of paginated results.

type topologyFilter

string

param topologyFilter

The 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

rtype

dict

returns

Response Syntax

{
    'installedComponents': [
        {
            'componentName': 'string',
            'componentVersion': 'string',
            'lifecycleState': 'NEW'|'INSTALLED'|'STARTING'|'RUNNING'|'STOPPING'|'ERRORED'|'BROKEN'|'FINISHED',
            'lifecycleStateDetails': 'string',
            'isRoot': True|False,
            'lastStatusChangeTimestamp': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • installedComponents (list) --

      A list that summarizes each component on the core device.

      Note

      Accuracy of the lastStatusChangeTimestamp response depends on Greengrass nucleus v2.7.0. It performs best on Greengrass nucleus v2.7.0 and can be inaccurate on earlier versions.

      • (dict) --

        Contains information about a component on a Greengrass core device.

        • componentName (string) --

          The name of the component.

        • componentVersion (string) --

          The version of the component.

        • lifecycleState (string) --

          The lifecycle state of the component.

        • lifecycleStateDetails (string) --

          The details about the lifecycle state of the component.

        • isRoot (boolean) --

          Whether or not the component is a root component.

        • lastStatusChangeTimestamp (datetime) --

          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.

    • nextToken (string) --

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