2022/10/07 - AWS IoT Greengrass V2 - 2 updated api methods
Changes This release adds error status details for deployments and components that failed on a device and adds features to improve visibility into component installation.
{'effectiveDeployments': {'statusDetails': {'errorStack': ['string'], 'errorTypes': ['string']}}}
Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.
See also: AWS API Documentation
Request Syntax
client.list_effective_deployments( coreDeviceThingName='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
integer
The maximum number of results to be returned per paginated request.
string
The token to be used for the next set of paginated results.
dict
Response Syntax
{ 'effectiveDeployments': [ { 'deploymentId': 'string', 'deploymentName': 'string', 'iotJobId': 'string', 'iotJobArn': 'string', 'description': 'string', 'targetArn': 'string', 'coreDeviceExecutionStatus': 'IN_PROGRESS'|'QUEUED'|'FAILED'|'COMPLETED'|'TIMED_OUT'|'CANCELED'|'REJECTED', 'reason': 'string', 'creationTimestamp': datetime(2015, 1, 1), 'modifiedTimestamp': datetime(2015, 1, 1), 'statusDetails': { 'errorStack': [ 'string', ], 'errorTypes': [ 'string', ] } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
effectiveDeployments (list) --
A list that summarizes each deployment on the core device.
(dict) --
Contains information about a deployment job that IoT Greengrass sends to a Greengrass core device.
deploymentId (string) --
The ID of the deployment.
deploymentName (string) --
The name of the deployment.
iotJobId (string) --
The ID of the IoT job that applies the deployment to target devices.
iotJobArn (string) --
The ARN of the IoT job that applies the deployment to target devices.
description (string) --
The description of the deployment job.
targetArn (string) --
The ARN of the target IoT thing or thing group.
coreDeviceExecutionStatus (string) --
The status of the deployment job on the Greengrass core device.
reason (string) --
The reason code for the update, if the job was updated.
creationTimestamp (datetime) --
The time at which the deployment was created, expressed in ISO 8601 format.
modifiedTimestamp (datetime) --
The time at which the deployment job was last modified, expressed in ISO 8601 format.
statusDetails (dict) --
The status details that explain why a deployment has an error. This response will be null if the deployment is in a success state.
errorStack (list) --
Contains an ordered list of short error codes that range from the most generic error to the most specific one. The error codes describe the reason for failure whenever the coreDeviceExecutionStatus is in a failed state. The response will be an empty list if there is no error.
(string) --
errorTypes (list) --
Contains tags which describe the error. You can use the error types to classify errors to assist with remediating the failure. The response will be an empty list if there is no error.
(string) --
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
{'installedComponents': {'lastInstallationSource': 'string', 'lastReportedTimestamp': 'timestamp', 'lifecycleStatusCodes': ['string']}}
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' )
string
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
integer
The maximum number of results to be returned per paginated request.
string
The token to be used for the next set of paginated results.
string
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
dict
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), 'lastReportedTimestamp': datetime(2015, 1, 1), 'lastInstallationSource': 'string', 'lifecycleStatusCodes': [ 'string', ] }, ], '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) --
A detailed response about the lifecycle state of the component that explains the reason why a component has an error or is broken.
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.
lastReportedTimestamp (datetime) --
The last time the Greengrass core device sent a message containing a certain component to the Amazon Web Services Cloud.
A component does not need to see a state change for this field to update.
lastInstallationSource (string) --
The 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 The ID of the deployment. and for local deployments it will be LOCAL.
lifecycleStatusCodes (list) --
The status codes that indicate the reason for failure whenever the lifecycleState has an error or is in a broken state.
(string) --
nextToken (string) --
The token for the next set of results, or null if there are no additional results.