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.

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.

      • (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.