Table of Contents
GreengrassV2.
Client
¶A low-level client representing AWS IoT Greengrass V2 (GreengrassV2)
IoT Greengrass brings local compute, messaging, data management, sync, and ML inference capabilities to edge devices. This enables devices to collect and analyze data closer to the source of information, react autonomously to local events, and communicate securely with each other on local networks. Local devices can also communicate securely with Amazon Web Services IoT Core and export IoT data to the Amazon Web Services Cloud. IoT Greengrass developers can use Lambda functions and components to create and deploy applications to fleets of edge devices for local operation.
IoT Greengrass Version 2 provides a new major version of the IoT Greengrass Core software, new APIs, and a new console. Use this API reference to learn how to use the IoT Greengrass V2 API operations to manage components, manage deployments, and core devices.
For more information, see What is IoT Greengrass? in the IoT Greengrass V2 Developer Guide .
import boto3
client = boto3.client('greengrassv2')
These are the available methods:
associate_service_role_to_account()
batch_associate_client_device_with_core_device()
batch_disassociate_client_device_from_core_device()
can_paginate()
cancel_deployment()
close()
create_component_version()
create_deployment()
delete_component()
delete_core_device()
delete_deployment()
describe_component()
disassociate_service_role_from_account()
get_component()
get_component_version_artifact()
get_connectivity_info()
get_core_device()
get_deployment()
get_paginator()
get_service_role_for_account()
get_waiter()
list_client_devices_associated_with_core_device()
list_component_versions()
list_components()
list_core_devices()
list_deployments()
list_effective_deployments()
list_installed_components()
list_tags_for_resource()
resolve_component_candidates()
tag_resource()
untag_resource()
update_connectivity_info()
associate_service_role_to_account
(**kwargs)¶Associates a Greengrass service role with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. The role must include the AWSGreengrassResourceAccessRolePolicy managed policy or a custom policy that defines equivalent permissions for the IoT Greengrass features that you use. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.associate_service_role_to_account(
roleArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the service role to associate with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
{
'associatedAt': 'string'
}
Response Structure
The time when the service role was associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.InternalServerException
batch_associate_client_device_with_core_device
(**kwargs)¶Associates a list of client devices with a core device. Use this API operation to specify which client devices can discover a core device through cloud discovery. With cloud discovery, client devices connect to IoT Greengrass to retrieve associated core devices' connectivity information and certificates. For more information, see Configure cloud discovery in the IoT Greengrass V2 Developer Guide .
Note
Client devices are local IoT devices that connect to and communicate with an IoT Greengrass core device over MQTT. You can connect client devices to a core device to sync MQTT messages and data to Amazon Web Services IoT Core and interact with client devices in Greengrass components. For more information, see Interact with local IoT devices in the IoT Greengrass V2 Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.batch_associate_client_device_with_core_device(
entries=[
{
'thingName': 'string'
},
],
coreDeviceThingName='string'
)
The list of client devices to associate.
Contains a request to associate a client device with a core device. The BatchAssociateClientDeviceWithCoreDevice operation consumes a list of these requests.
The name of the IoT thing that represents the client device to associate.
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
dict
Response Syntax
{
'errorEntries': [
{
'thingName': 'string',
'code': 'string',
'message': 'string'
},
]
}
Response Structure
(dict) --
errorEntries (list) --
The list of any errors for the entries in the request. Each error entry contains the name of the IoT thing that failed to associate.
(dict) --
Contains an error that occurs from a request to associate a client device with a core device. The BatchAssociateClientDeviceWithCoreDevice operation returns a list of these errors.
thingName (string) --
The name of the IoT thing whose associate request failed.
code (string) --
The error code for the request.
message (string) --
A message that provides additional information about the error.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
batch_disassociate_client_device_from_core_device
(**kwargs)¶Disassociates a list of client devices from a core device. After you disassociate a client device from a core device, the client device won't be able to use cloud discovery to retrieve the core device's connectivity information and certificates.
See also: AWS API Documentation
Request Syntax
response = client.batch_disassociate_client_device_from_core_device(
entries=[
{
'thingName': 'string'
},
],
coreDeviceThingName='string'
)
The list of client devices to disassociate.
Contains a request to disassociate a client device from a core device. The BatchDisassociateClientDeviceWithCoreDevice operation consumes a list of these requests.
The name of the IoT thing that represents the client device to disassociate.
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
dict
Response Syntax
{
'errorEntries': [
{
'thingName': 'string',
'code': 'string',
'message': 'string'
},
]
}
Response Structure
(dict) --
errorEntries (list) --
The list of any errors for the entries in the request. Each error entry contains the name of the IoT thing that failed to disassociate.
(dict) --
Contains an error that occurs from a request to disassociate a client device from a core device. The BatchDisassociateClientDeviceWithCoreDevice operation returns a list of these errors.
thingName (string) --
The name of the IoT thing whose disassociate request failed.
code (string) --
The error code for the request.
message (string) --
A message that provides additional information about the error.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.cancel_deployment
(**kwargs)¶Cancels a deployment. This operation cancels the deployment for devices that haven't yet received it. If a device already received the deployment, this operation doesn't change anything for that device.
See also: AWS API Documentation
Request Syntax
response = client.cancel_deployment(
deploymentId='string'
)
[REQUIRED]
The ID of the deployment.
{
'message': 'string'
}
Response Structure
A message that communicates if the cancel was successful.
Exceptions
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ConflictException
GreengrassV2.Client.exceptions.ThrottlingException
close
()¶Closes underlying endpoint connections.
create_component_version
(**kwargs)¶Creates a component. Components are software that run on Greengrass core devices. After you develop and test a component on your core device, you can use this operation to upload your component to IoT Greengrass. Then, you can deploy the component to other core devices.
You can use this operation to do the following:
inlineRecipe
when you call this operation.python2.7
python3.7
python3.8
python3.9
java8
java11
nodejs10.x
nodejs12.x
nodejs14.x
To create a component from a Lambda function, specify lambdaFunction
when you call this operation.
Note
IoT Greengrass currently supports Lambda functions on only Linux core devices.
See also: AWS API Documentation
Request Syntax
response = client.create_component_version(
inlineRecipe=b'bytes',
lambdaFunction={
'lambdaArn': 'string',
'componentName': 'string',
'componentVersion': 'string',
'componentPlatforms': [
{
'name': 'string',
'attributes': {
'string': 'string'
}
},
],
'componentDependencies': {
'string': {
'versionRequirement': 'string',
'dependencyType': 'HARD'|'SOFT'
}
},
'componentLambdaParameters': {
'eventSources': [
{
'topic': 'string',
'type': 'PUB_SUB'|'IOT_CORE'
},
],
'maxQueueSize': 123,
'maxInstancesCount': 123,
'maxIdleTimeInSeconds': 123,
'timeoutInSeconds': 123,
'statusTimeoutInSeconds': 123,
'pinned': True|False,
'inputPayloadEncodingType': 'json'|'binary',
'execArgs': [
'string',
],
'environmentVariables': {
'string': 'string'
},
'linuxProcessParams': {
'isolationMode': 'GreengrassContainer'|'NoContainer',
'containerParams': {
'memorySizeInKB': 123,
'mountROSysfs': True|False,
'volumes': [
{
'sourcePath': 'string',
'destinationPath': 'string',
'permission': 'ro'|'rw',
'addGroupOwner': True|False
},
],
'devices': [
{
'path': 'string',
'permission': 'ro'|'rw',
'addGroupOwner': True|False
},
]
}
}
}
},
tags={
'string': 'string'
},
clientToken='string'
)
The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.
You must specify either inlineRecipe
or lambdaFunction
.
The parameters to create a component from a Lambda function.
You must specify either inlineRecipe
or lambdaFunction
.
The ARN of the Lambda function. The ARN must include the version of the function to import. You can't use version aliases like $LATEST
.
The name of the component.
Defaults to the name of the Lambda function.
The version of the component.
Defaults to the version of the Lambda function as a semantic version. For example, if your function version is 3
, the component version becomes 3.0.0
.
The platforms that the component version supports.
Contains information about a platform that a component supports.
The friendly name of the platform. This name helps you identify the platform.
If you omit this parameter, IoT Greengrass creates a friendly name from the os
and architecture
of the platform.
A dictionary of attributes for the platform. The IoT Greengrass Core software defines the os
and architecture
by default. You can specify additional platform attributes for a core device when you deploy the Greengrass nucleus component. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide .
The component versions on which this Lambda function component depends.
Contains information about a component dependency for a Lambda function component.
The component version requirement for the component dependency.
IoT Greengrass V2 uses semantic version constraints. For more information, see Semantic Versioning .
The type of this dependency. Choose from the following options:
SOFT
– The component doesn't restart if the dependency changes state.HARD
– The component restarts if the dependency changes state.Default: HARD
The system and runtime parameters for the Lambda function as it runs on the Greengrass core device.
The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and Amazon Web Services IoT Core MQTT messages.
Contains information about an event source for an Lambda function. The event source defines the topics on which this Lambda function subscribes to receive messages that run the function.
The topic to which to subscribe to receive event messages.
The type of event source. Choose from the following options:
PUB_SUB
– Subscribe to local publish/subscribe messages. This event source type doesn't support MQTT wildcards (+
and #
) in the event source topic.IOT_CORE
– Subscribe to Amazon Web Services IoT Core MQTT messages. This event source type supports MQTT wildcards (+
and #
) in the event source topic.The maximum size of the message queue for the Lambda function component. The IoT Greengrass core stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.
The maximum number of instances that a non-pinned Lambda function can run at the same time.
The maximum amount of time in seconds that a non-pinned Lambda function can idle before the IoT Greengrass Core software stops its process.
The maximum amount of time in seconds that the Lambda function can process a work item.
The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
Whether or not the Lambda function is pinned, or long-lived.
maxIdleTimeInSeconds
. If the function has multiple work items, the IoT Greengrass Core software creates multiple instances of the function.Default: true
The encoding type that the Lambda function supports.
Default: json
The list of arguments to pass to the Lambda function when it runs.
The map of environment variables that are available to the Lambda function when it runs.
The parameters for the Linux process that contains the Lambda function.
The isolation mode for the process that contains the Lambda function. The process can run in an isolated runtime environment inside the IoT Greengrass container, or as a regular process outside any container.
Default: GreengrassContainer
The parameters for the container in which the Lambda function runs.
The memory size of the container, expressed in kilobytes.
Default: 16384
(16 MB)
Whether or not the container can read information from the device's /sys
folder.
Default: false
The list of volumes that the container can access.
Contains information about a volume that Linux processes in a container can access. When you define a volume, the IoT Greengrass Core software mounts the source files to the destination inside the container.
The path to the physical volume in the file system.
The path to the logical volume in the file system.
The permission to access the volume: read/only (ro
) or read/write (rw
).
Default: ro
Whether or not to add the IoT Greengrass user group as an owner of the volume.
Default: false
The list of system devices that the container can access.
Contains information about a device that Linux processes in a container can access.
The mount path for the device in the file system.
The permission to access the device: read/only (ro
) or read/write (rw
).
Default: ro
Whether or not to add the component's system user as an owner of the device.
Default: false
A 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 .
A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent. Idempotency means that the request is successfully processed only once, even if you send the request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.
This field is autopopulated if not provided.
dict
Response Syntax
{
'arn': 'string',
'componentName': 'string',
'componentVersion': 'string',
'creationTimestamp': datetime(2015, 1, 1),
'status': {
'componentState': 'REQUESTED'|'INITIATED'|'DEPLOYABLE'|'FAILED'|'DEPRECATED',
'message': 'string',
'errors': {
'string': 'string'
},
'vendorGuidance': 'ACTIVE'|'DISCONTINUED'|'DELETED',
'vendorGuidanceMessage': 'string'
}
}
Response Structure
(dict) --
arn (string) --
The ARN of the component version.
componentName (string) --
The name of the component.
componentVersion (string) --
The version of the component.
creationTimestamp (datetime) --
The time at which the component was created, expressed in ISO 8601 format.
status (dict) --
The status of the component version in IoT Greengrass V2. This status is different from the status of the component on a core device.
componentState (string) --
The state of the component version.
message (string) --
A message that communicates details, such as errors, about the status of the component version.
errors (dict) --
A dictionary of errors that communicate why the component version is in an error state. For example, if IoT Greengrass can't access an artifact for the component version, then errors
contains the artifact's URI as a key, and the error message as the value for that key.
vendorGuidance (string) --
The vendor guidance state for the component version. This state indicates whether the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:
ACTIVE
– This component version is available and recommended for use.DISCONTINUED
– This component version has been discontinued by its publisher. You can deploy this component version, but we recommend that you use a different version of this component.DELETED
– This component version has been deleted by its publisher, so you can't deploy it. If you have any existing deployments that specify this component version, those deployments will fail.vendorGuidanceMessage (string) --
A message that communicates details about the vendor guidance state of the component version. This message communicates why a component version is discontinued or deleted.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ServiceQuotaExceededException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ConflictException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.RequestAlreadyInProgressException
create_deployment
(**kwargs)¶Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices. When you add a new core device to a group of core devices that has a deployment, IoT Greengrass deploys that group's deployment to the new device.
You can define one deployment for each target. When you create a new deployment for a target that has an existing deployment, you replace the previous deployment. IoT Greengrass applies the new deployment to the target devices.
Every deployment has a revision number that indicates how many deployment revisions you define for a target. Use this operation to create a new revision of an existing deployment.
For more information, see the Create deployments in the IoT Greengrass V2 Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.create_deployment(
targetArn='string',
deploymentName='string',
components={
'string': {
'componentVersion': 'string',
'configurationUpdate': {
'merge': 'string',
'reset': [
'string',
]
},
'runWith': {
'posixUser': 'string',
'systemResourceLimits': {
'memory': 123,
'cpus': 123.0
},
'windowsUser': 'string'
}
}
},
iotJobConfiguration={
'jobExecutionsRolloutConfig': {
'exponentialRate': {
'baseRatePerMinute': 123,
'incrementFactor': 123.0,
'rateIncreaseCriteria': {
'numberOfNotifiedThings': 123,
'numberOfSucceededThings': 123
}
},
'maximumPerMinute': 123
},
'abortConfig': {
'criteriaList': [
{
'failureType': 'FAILED'|'REJECTED'|'TIMED_OUT'|'ALL',
'action': 'CANCEL',
'thresholdPercentage': 123.0,
'minNumberOfExecutedThings': 123
},
]
},
'timeoutConfig': {
'inProgressTimeoutInMinutes': 123
}
},
deploymentPolicies={
'failureHandlingPolicy': 'ROLLBACK'|'DO_NOTHING',
'componentUpdatePolicy': {
'timeoutInSeconds': 123,
'action': 'NOTIFY_COMPONENTS'|'SKIP_NOTIFY_COMPONENTS'
},
'configurationValidationPolicy': {
'timeoutInSeconds': 123
}
},
tags={
'string': 'string'
},
clientToken='string'
)
[REQUIRED]
The ARN of the target IoT thing or thing group.
The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
Contains information about a component to deploy.
The version of the component.
The configuration updates to deploy for the component. You can define reset updates and merge updates. A reset updates the keys that you specify to the default configuration for the component. A merge updates the core device's component configuration with the keys and values that you specify. The IoT Greengrass Core software applies reset updates before it applies merge updates. For more information, see Update component configurations in the IoT Greengrass V2 Developer Guide .
A serialized JSON string that contains the configuration object to merge to target devices. The core device merges this configuration with the component's existing configuration. If this is the first time a component deploys on a device, the core device merges this configuration with the component's default configuration. This means that the core device keeps it's existing configuration for keys and values that you don't specify in this object. For more information, see Merge configuration updates in the IoT Greengrass V2 Developer Guide .
The list of configuration nodes to reset to default values on target devices. Use JSON pointers to specify each node to reset. JSON pointers start with a forward slash (/
) and use forward slashes to separate the key for each level in the object. For more information, see the JSON pointer specification and Reset configuration updates in the IoT Greengrass V2 Developer Guide .
The system user and group that the IoT Greengrass Core software uses to run component processes on the core device. If you omit this parameter, the IoT Greengrass Core software uses the system user and group that you configure for the core device. For more information, see Configure the user and group that run components in the IoT Greengrass V2 Developer Guide .
The POSIX system user and, optionally, group to use to run this component on Linux core devices. The user, and group if specified, must exist on each Linux core device. Specify the user and group separated by a colon (:
) in the following format: user:group
. The group is optional. If you don't specify a group, the IoT Greengrass Core software uses the primary user for the group.
If you omit this parameter, the IoT Greengrass Core software uses the default system user and group that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run components .
The system resource limits to apply to this component's process on the core device. IoT Greengrass currently supports this feature on only Linux core devices.
If you omit this parameter, the IoT Greengrass Core software uses the default system resource limits that you configure on the Greengrass nucleus component. For more information, see Configure system resource limits for components .
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2
to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25
to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.
The Windows user to use to run this component on Windows core devices. The user must exist on each Windows core device, and its name and password must be in the LocalSystem account's Credentials Manager instance.
If you omit this parameter, the IoT Greengrass Core software uses the default Windows user that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run components .
The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
The rollout configuration for the job. This configuration defines the rate at which the job rolls out to the fleet of target devices.
The exponential rate to increase the job rollout rate.
The minimum number of devices that receive a pending job notification, per minute, when the job starts. This parameter defines the initial rollout rate of the job.
The exponential factor to increase the rollout rate for the job.
This parameter supports up to one digit after the decimal (for example, you can specify 1.5
, but not 1.55
).
The criteria to increase the rollout rate for the job.
The number of devices to receive the job notification before the rollout rate increases.
The number of devices to successfully run the configuration job before the rollout rate increases.
The maximum number of devices that receive a pending job notification, per minute.
The stop configuration for the job. This configuration defines when and how to stop a job rollout.
The list of criteria that define when and how to cancel the configuration deployment.
Contains criteria that define when and how to cancel a job.
The deployment stops if the following conditions are true:
minNumberOfExecutedThings
.failureType
exceeds the thresholdPercentage
.The type of job deployment failure that can cancel a job.
The action to perform when the criteria are met.
The minimum percentage of failureType
failures that occur before the job can cancel.
This parameter supports up to two digits after the decimal (for example, you can specify 10.9
or 10.99
, but not 10.999
).
The minimum number of things that receive the configuration before the job can cancel.
The timeout configuration for the job. This configuration defines the amount of time each device has to complete the job.
The amount of time, in minutes, that devices have to complete the job. The timer starts when the job status is set to IN_PROGRESS
. If the job status doesn't change to a terminal state before the time expires, then the job status is set to TIMED_OUT
.
The timeout interval must be between 1 minute and 7 days (10080 minutes).
The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
The failure handling policy for the configuration deployment. This policy defines what to do if the deployment fails.
Default: ROLLBACK
The component update policy for the configuration deployment. This policy defines when it's safe to deploy the configuration to devices.
The amount of time in seconds that each component on a device has to report that it's safe to update. If the component waits for longer than this timeout, then the deployment proceeds on the device.
Default: 60
Whether or not to notify components and wait for components to become safe to update. Choose from the following options:
NOTIFY_COMPONENTS
– The deployment notifies each component before it stops and updates that component. Components can use the SubscribeToComponentUpdates IPC operation to receive these notifications. Then, components can respond with the DeferComponentUpdate IPC operation. For more information, see Create deployments in the IoT Greengrass V2 Developer Guide .SKIP_NOTIFY_COMPONENTS
– The deployment doesn't notify components or wait for them to be safe to update.Default: NOTIFY_COMPONENTS
The configuration validation policy for the configuration deployment. This policy defines how long each component has to validate its configure updates.
The amount of time in seconds that a component can validate its configuration updates. If the validation time exceeds this timeout, then the deployment proceeds for the device.
Default: 30
A 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 .
A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent. Idempotency means that the request is successfully processed only once, even if you send the request multiple times. When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for idempotent requests for up to 8 hours.
This field is autopopulated if not provided.
dict
Response Syntax
{
'deploymentId': 'string',
'iotJobId': 'string',
'iotJobArn': 'string'
}
Response Structure
(dict) --
deploymentId (string) --
The ID 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.
Exceptions
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ConflictException
GreengrassV2.Client.exceptions.RequestAlreadyInProgressException
delete_component
(**kwargs)¶Deletes a version of a component from IoT Greengrass.
Note
This operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.
See also: AWS API Documentation
Request Syntax
response = client.delete_component(
arn='string'
)
[REQUIRED]
The ARN of the component version.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ConflictException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
delete_core_device
(**kwargs)¶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 .
See also: AWS API Documentation
Request Syntax
response = client.delete_core_device(
coreDeviceThingName='string'
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.ConflictException
delete_deployment
(**kwargs)¶Deletes a deployment. To delete an active deployment, you must first cancel it. For more information, see CancelDeployment .
Deleting a deployment doesn't affect core devices that run that deployment, because core devices store the deployment's configuration on the device. Additionally, core devices can roll back to a previous deployment that has been deleted.
See also: AWS API Documentation
Request Syntax
response = client.delete_deployment(
deploymentId='string'
)
[REQUIRED]
The ID of the deployment.
Exceptions
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ConflictException
GreengrassV2.Client.exceptions.ThrottlingException
describe_component
(**kwargs)¶Retrieves metadata for a version of a component.
See also: AWS API Documentation
Request Syntax
response = client.describe_component(
arn='string'
)
[REQUIRED]
The ARN of the component version.
{
'arn': 'string',
'componentName': 'string',
'componentVersion': 'string',
'creationTimestamp': datetime(2015, 1, 1),
'publisher': 'string',
'description': 'string',
'status': {
'componentState': 'REQUESTED'|'INITIATED'|'DEPLOYABLE'|'FAILED'|'DEPRECATED',
'message': 'string',
'errors': {
'string': 'string'
},
'vendorGuidance': 'ACTIVE'|'DISCONTINUED'|'DELETED',
'vendorGuidanceMessage': 'string'
},
'platforms': [
{
'name': 'string',
'attributes': {
'string': 'string'
}
},
],
'tags': {
'string': 'string'
}
}
Response Structure
The ARN of the component version.
The name of the component.
The version of the component.
The time at which the component was created, expressed in ISO 8601 format.
The publisher of the component version.
The description of the component version.
The status of the component version in IoT Greengrass V2. This status is different from the status of the component on a core device.
The state of the component version.
A message that communicates details, such as errors, about the status of the component version.
A dictionary of errors that communicate why the component version is in an error state. For example, if IoT Greengrass can't access an artifact for the component version, then errors
contains the artifact's URI as a key, and the error message as the value for that key.
The vendor guidance state for the component version. This state indicates whether the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:
ACTIVE
– This component version is available and recommended for use.DISCONTINUED
– This component version has been discontinued by its publisher. You can deploy this component version, but we recommend that you use a different version of this component.DELETED
– This component version has been deleted by its publisher, so you can't deploy it. If you have any existing deployments that specify this component version, those deployments will fail.A message that communicates details about the vendor guidance state of the component version. This message communicates why a component version is discontinued or deleted.
The platforms that the component version supports.
Contains information about a platform that a component supports.
The friendly name of the platform. This name helps you identify the platform.
If you omit this parameter, IoT Greengrass creates a friendly name from the os
and architecture
of the platform.
A dictionary of attributes for the platform. The IoT Greengrass Core software defines the os
and architecture
by default. You can specify additional platform attributes for a core device when you deploy the Greengrass nucleus component. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide .
A 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 .
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
disassociate_service_role_from_account
()¶Disassociates the Greengrass service role from IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. Without a service role, IoT Greengrass can't verify the identity of client devices or manage core device connectivity information. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.disassociate_service_role_from_account()
{
'disassociatedAt': 'string'
}
Response Structure
The time when the service role was disassociated from IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
Exceptions
GreengrassV2.Client.exceptions.InternalServerException
get_component
(**kwargs)¶Gets the recipe for a version of a component.
See also: AWS API Documentation
Request Syntax
response = client.get_component(
recipeOutputFormat='JSON'|'YAML',
arn='string'
)
[REQUIRED]
The ARN of the component version.
dict
Response Syntax
{
'recipeOutputFormat': 'JSON'|'YAML',
'recipe': b'bytes',
'tags': {
'string': 'string'
}
}
Response Structure
(dict) --
recipeOutputFormat (string) --
The format of the recipe.
recipe (bytes) --
The recipe of the component version.
tags (dict) --
A 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 .
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
get_component_version_artifact
(**kwargs)¶Gets the pre-signed URL to download a public or a Lambda component artifact. Core devices call this operation to identify the URL that they can use to download an artifact to install.
See also: AWS API Documentation
Request Syntax
response = client.get_component_version_artifact(
arn='string',
artifactName='string'
)
[REQUIRED]
The ARN of the component version. Specify the ARN of a public or a Lambda component version.
[REQUIRED]
The name of the artifact.
You can use the GetComponent operation to download the component recipe, which includes the URI of the artifact. The artifact name is the section of the URI after the scheme. For example, in the artifact URI greengrass:SomeArtifact.zip
, the artifact name is SomeArtifact.zip
.
dict
Response Syntax
{
'preSignedUrl': 'string'
}
Response Structure
(dict) --
preSignedUrl (string) --
The URL of the artifact.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
get_connectivity_info
(**kwargs)¶Retrieves connectivity information for a Greengrass core device.
Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the IoT Greengrass discovery API , IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the IoT Greengrass Version 2 Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.get_connectivity_info(
thingName='string'
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
{
'connectivityInfo': [
{
'id': 'string',
'hostAddress': 'string',
'portNumber': 123,
'metadata': 'string'
},
],
'message': 'string'
}
Response Structure
The connectivity information for the core device.
Contains information about an endpoint and port where client devices can connect to an MQTT broker on a Greengrass core device.
An ID for the connectivity information.
The IP address or DNS address where client devices can connect to an MQTT broker on the Greengrass core device.
The port where the MQTT broker operates on the core device. This port is typically 8883, which is the default port for the MQTT broker component that runs on core devices.
Additional metadata to provide to client devices that connect to this core device.
A message about the connectivity information request.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.InternalServerException
get_core_device
(**kwargs)¶Retrieves metadata for a Greengrass core device.
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:
BROKEN
See also: AWS API Documentation
Request Syntax
response = client.get_core_device(
coreDeviceThingName='string'
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
{
'coreDeviceThingName': 'string',
'coreVersion': 'string',
'platform': 'string',
'architecture': 'string',
'status': 'HEALTHY'|'UNHEALTHY',
'lastStatusUpdateTimestamp': datetime(2015, 1, 1),
'tags': {
'string': 'string'
}
}
Response Structure
The name of the core device. This is also the name of the IoT thing.
The 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 .
The operating system platform that the core device runs.
The computer architecture of the core device.
The 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.The time at which the core device's status last updated, expressed in ISO 8601 format.
A 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 .
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
get_deployment
(**kwargs)¶Gets a deployment. Deployments define the components that run on Greengrass core devices.
See also: AWS API Documentation
Request Syntax
response = client.get_deployment(
deploymentId='string'
)
[REQUIRED]
The ID of the deployment.
{
'targetArn': 'string',
'revisionId': 'string',
'deploymentId': 'string',
'deploymentName': 'string',
'deploymentStatus': 'ACTIVE'|'COMPLETED'|'CANCELED'|'FAILED'|'INACTIVE',
'iotJobId': 'string',
'iotJobArn': 'string',
'components': {
'string': {
'componentVersion': 'string',
'configurationUpdate': {
'merge': 'string',
'reset': [
'string',
]
},
'runWith': {
'posixUser': 'string',
'systemResourceLimits': {
'memory': 123,
'cpus': 123.0
},
'windowsUser': 'string'
}
}
},
'deploymentPolicies': {
'failureHandlingPolicy': 'ROLLBACK'|'DO_NOTHING',
'componentUpdatePolicy': {
'timeoutInSeconds': 123,
'action': 'NOTIFY_COMPONENTS'|'SKIP_NOTIFY_COMPONENTS'
},
'configurationValidationPolicy': {
'timeoutInSeconds': 123
}
},
'iotJobConfiguration': {
'jobExecutionsRolloutConfig': {
'exponentialRate': {
'baseRatePerMinute': 123,
'incrementFactor': 123.0,
'rateIncreaseCriteria': {
'numberOfNotifiedThings': 123,
'numberOfSucceededThings': 123
}
},
'maximumPerMinute': 123
},
'abortConfig': {
'criteriaList': [
{
'failureType': 'FAILED'|'REJECTED'|'TIMED_OUT'|'ALL',
'action': 'CANCEL',
'thresholdPercentage': 123.0,
'minNumberOfExecutedThings': 123
},
]
},
'timeoutConfig': {
'inProgressTimeoutInMinutes': 123
}
},
'creationTimestamp': datetime(2015, 1, 1),
'isLatestForTarget': True|False,
'tags': {
'string': 'string'
}
}
Response Structure
The ARN of the target IoT thing or thing group.
The revision number of the deployment.
The ID of the deployment.
The name of the deployment.
The status of the deployment.
The ID of the IoT job that applies the deployment to target devices.
The ARN of the IoT job that applies the deployment to target devices.
The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
Contains information about a component to deploy.
The version of the component.
The configuration updates to deploy for the component. You can define reset updates and merge updates. A reset updates the keys that you specify to the default configuration for the component. A merge updates the core device's component configuration with the keys and values that you specify. The IoT Greengrass Core software applies reset updates before it applies merge updates. For more information, see Update component configurations in the IoT Greengrass V2 Developer Guide .
A serialized JSON string that contains the configuration object to merge to target devices. The core device merges this configuration with the component's existing configuration. If this is the first time a component deploys on a device, the core device merges this configuration with the component's default configuration. This means that the core device keeps it's existing configuration for keys and values that you don't specify in this object. For more information, see Merge configuration updates in the IoT Greengrass V2 Developer Guide .
The list of configuration nodes to reset to default values on target devices. Use JSON pointers to specify each node to reset. JSON pointers start with a forward slash (/
) and use forward slashes to separate the key for each level in the object. For more information, see the JSON pointer specification and Reset configuration updates in the IoT Greengrass V2 Developer Guide .
The system user and group that the IoT Greengrass Core software uses to run component processes on the core device. If you omit this parameter, the IoT Greengrass Core software uses the system user and group that you configure for the core device. For more information, see Configure the user and group that run components in the IoT Greengrass V2 Developer Guide .
The POSIX system user and, optionally, group to use to run this component on Linux core devices. The user, and group if specified, must exist on each Linux core device. Specify the user and group separated by a colon (:
) in the following format: user:group
. The group is optional. If you don't specify a group, the IoT Greengrass Core software uses the primary user for the group.
If you omit this parameter, the IoT Greengrass Core software uses the default system user and group that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run components .
The system resource limits to apply to this component's process on the core device. IoT Greengrass currently supports this feature on only Linux core devices.
If you omit this parameter, the IoT Greengrass Core software uses the default system resource limits that you configure on the Greengrass nucleus component. For more information, see Configure system resource limits for components .
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2
to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25
to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.
The Windows user to use to run this component on Windows core devices. The user must exist on each Windows core device, and its name and password must be in the LocalSystem account's Credentials Manager instance.
If you omit this parameter, the IoT Greengrass Core software uses the default Windows user that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run components .
The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
The failure handling policy for the configuration deployment. This policy defines what to do if the deployment fails.
Default: ROLLBACK
The component update policy for the configuration deployment. This policy defines when it's safe to deploy the configuration to devices.
The amount of time in seconds that each component on a device has to report that it's safe to update. If the component waits for longer than this timeout, then the deployment proceeds on the device.
Default: 60
Whether or not to notify components and wait for components to become safe to update. Choose from the following options:
NOTIFY_COMPONENTS
– The deployment notifies each component before it stops and updates that component. Components can use the SubscribeToComponentUpdates IPC operation to receive these notifications. Then, components can respond with the DeferComponentUpdate IPC operation. For more information, see Create deployments in the IoT Greengrass V2 Developer Guide .SKIP_NOTIFY_COMPONENTS
– The deployment doesn't notify components or wait for them to be safe to update.Default: NOTIFY_COMPONENTS
The configuration validation policy for the configuration deployment. This policy defines how long each component has to validate its configure updates.
The amount of time in seconds that a component can validate its configuration updates. If the validation time exceeds this timeout, then the deployment proceeds for the device.
Default: 30
The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
The rollout configuration for the job. This configuration defines the rate at which the job rolls out to the fleet of target devices.
The exponential rate to increase the job rollout rate.
The minimum number of devices that receive a pending job notification, per minute, when the job starts. This parameter defines the initial rollout rate of the job.
The exponential factor to increase the rollout rate for the job.
This parameter supports up to one digit after the decimal (for example, you can specify 1.5
, but not 1.55
).
The criteria to increase the rollout rate for the job.
The number of devices to receive the job notification before the rollout rate increases.
The number of devices to successfully run the configuration job before the rollout rate increases.
The maximum number of devices that receive a pending job notification, per minute.
The stop configuration for the job. This configuration defines when and how to stop a job rollout.
The list of criteria that define when and how to cancel the configuration deployment.
Contains criteria that define when and how to cancel a job.
The deployment stops if the following conditions are true:
minNumberOfExecutedThings
.failureType
exceeds the thresholdPercentage
.The type of job deployment failure that can cancel a job.
The action to perform when the criteria are met.
The minimum percentage of failureType
failures that occur before the job can cancel.
This parameter supports up to two digits after the decimal (for example, you can specify 10.9
or 10.99
, but not 10.999
).
The minimum number of things that receive the configuration before the job can cancel.
The timeout configuration for the job. This configuration defines the amount of time each device has to complete the job.
The amount of time, in minutes, that devices have to complete the job. The timer starts when the job status is set to IN_PROGRESS
. If the job status doesn't change to a terminal state before the time expires, then the job status is set to TIMED_OUT
.
The timeout interval must be between 1 minute and 7 days (10080 minutes).
The time at which the deployment was created, expressed in ISO 8601 format.
Whether or not the deployment is the latest revision for its target.
A 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 .
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_service_role_for_account
()¶Gets the service role associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.get_service_role_for_account()
{
'associatedAt': 'string',
'roleArn': 'string'
}
Response Structure
The time when the service role was associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
The ARN of the service role that is associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
Exceptions
GreengrassV2.Client.exceptions.InternalServerException
get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_client_devices_associated_with_core_device
(**kwargs)¶Retrieves a paginated list of client devices that are associated with a core device.
See also: AWS API Documentation
Request Syntax
response = client.list_client_devices_associated_with_core_device(
coreDeviceThingName='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
dict
Response Syntax
{
'associatedClientDevices': [
{
'thingName': 'string',
'associationTimestamp': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
associatedClientDevices (list) --
A list that describes the client devices that are associated with the core device.
(dict) --
Contains information about a client device that is associated to a core device for cloud discovery.
thingName (string) --
The name of the IoT thing that represents the associated client device.
associationTimestamp (datetime) --
The time that the client device was associated, expressed in ISO 8601 format.
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
list_component_versions
(**kwargs)¶Retrieves a paginated list of all versions for a component. Greater versions are listed first.
See also: AWS API Documentation
Request Syntax
response = client.list_component_versions(
arn='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
The ARN of the component.
dict
Response Syntax
{
'componentVersions': [
{
'componentName': 'string',
'componentVersion': 'string',
'arn': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
componentVersions (list) --
A list of versions that exist for the component.
(dict) --
Contains information about a component version in a list.
componentName (string) --
The name of the component.
componentVersion (string) --
The version of the component.
arn (string) --
The ARN of the component version.
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
list_components
(**kwargs)¶Retrieves a paginated list of component summaries. This list includes components that you have permission to view.
See also: AWS API Documentation
Request Syntax
response = client.list_components(
scope='PRIVATE'|'PUBLIC',
maxResults=123,
nextToken='string'
)
The scope of the components to list.
Default: PRIVATE
dict
Response Syntax
{
'components': [
{
'arn': 'string',
'componentName': 'string',
'latestVersion': {
'arn': 'string',
'componentVersion': 'string',
'creationTimestamp': datetime(2015, 1, 1),
'description': 'string',
'publisher': 'string',
'platforms': [
{
'name': 'string',
'attributes': {
'string': 'string'
}
},
]
}
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
components (list) --
A list that summarizes each component.
(dict) --
Contains information about a component.
arn (string) --
The ARN of the component version.
componentName (string) --
The name of the component.
latestVersion (dict) --
The latest version of the component and its details.
arn (string) --
The ARN of the component version.
componentVersion (string) --
The version of the component.
creationTimestamp (datetime) --
The time at which the component was created, expressed in ISO 8601 format.
description (string) --
The description of the component version.
publisher (string) --
The publisher of the component version.
platforms (list) --
The platforms that the component version supports.
(dict) --
Contains information about a platform that a component supports.
name (string) --
The friendly name of the platform. This name helps you identify the platform.
If you omit this parameter, IoT Greengrass creates a friendly name from the os
and architecture
of the platform.
attributes (dict) --
A dictionary of attributes for the platform. The IoT Greengrass Core software defines the os
and architecture
by default. You can specify additional platform attributes for a core device when you deploy the Greengrass nucleus component. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide .
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
list_core_devices
(**kwargs)¶Retrieves a paginated list of Greengrass core devices.
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:
BROKEN
See also: AWS API Documentation
Request Syntax
response = client.list_core_devices(
thingGroupArn='string',
status='HEALTHY'|'UNHEALTHY',
maxResults=123,
nextToken='string'
)
The 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.dict
Response Syntax
{
'coreDevices': [
{
'coreDeviceThingName': 'string',
'status': 'HEALTHY'|'UNHEALTHY',
'lastStatusUpdateTimestamp': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
coreDevices (list) --
A list that summarizes each core device.
(dict) --
Contains information about a Greengrass core device, which is an IoT thing that runs the IoT Greengrass Core software.
coreDeviceThingName (string) --
The name of the core device. This is also the name of the IoT thing.
status (string) --
The status of the core device. Core devices can have the following statuses:
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.lastStatusUpdateTimestamp (datetime) --
The time at which the core device's status last updated, expressed in ISO 8601 format.
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
list_deployments
(**kwargs)¶Retrieves a paginated list of deployments.
See also: AWS API Documentation
Request Syntax
response = client.list_deployments(
targetArn='string',
historyFilter='ALL'|'LATEST_ONLY',
maxResults=123,
nextToken='string'
)
The filter for the list of deployments. Choose one of the following options:
ALL
– The list includes all deployments.LATEST_ONLY
– The list includes only the latest revision of each deployment.Default: LATEST_ONLY
dict
Response Syntax
{
'deployments': [
{
'targetArn': 'string',
'revisionId': 'string',
'deploymentId': 'string',
'deploymentName': 'string',
'creationTimestamp': datetime(2015, 1, 1),
'deploymentStatus': 'ACTIVE'|'COMPLETED'|'CANCELED'|'FAILED'|'INACTIVE',
'isLatestForTarget': True|False
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
deployments (list) --
A list that summarizes each deployment.
(dict) --
Contains information about a deployment.
targetArn (string) --
The ARN of the target IoT thing or thing group.
revisionId (string) --
The revision number of the deployment.
deploymentId (string) --
The ID of the deployment.
deploymentName (string) --
The name of the deployment.
creationTimestamp (datetime) --
The time at which the deployment was created, expressed in ISO 8601 format.
deploymentStatus (string) --
The status of the deployment.
isLatestForTarget (boolean) --
Whether or not the deployment is the latest revision for its target.
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
list_effective_deployments
(**kwargs)¶Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.
See also: AWS API Documentation
Request Syntax
response = client.list_effective_deployments(
coreDeviceThingName='string',
maxResults=123,
nextToken='string'
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
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.
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.
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
list_installed_components
(**kwargs)¶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:
BROKEN
See also: AWS API Documentation
Request Syntax
response = client.list_installed_components(
coreDeviceThingName='string',
maxResults=123,
nextToken='string',
topologyFilter='ALL'|'ROOT'
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
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.
Note
Greengrass nucleus v2.7.0 or later is required to get an accurate lastStatusChangeTimestamp
response. This response can be inaccurate in earlier Greengrass nucleus versions.
Note
Greengrass nucleus v2.8.0 or later is required to get an accurate lastInstallationSource
and lastReportedTimestamp
response. This response can be inaccurate or null in earlier Greengrass nucleus 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) --
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.
Note
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.
nextToken (string) --
The token for the next set of results, or null if there are no additional results.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ThrottlingException
Retrieves the list of tags for an IoT Greengrass resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
resourceArn='string'
)
[REQUIRED]
The ARN of the resource.
{
'tags': {
'string': 'string'
}
}
Response Structure
A 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 .
Exceptions
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
resolve_component_candidates
(**kwargs)¶Retrieves a list of components that meet the component, version, and platform requirements of a deployment. Greengrass core devices call this operation when they receive a deployment to identify the components to install.
This operation identifies components that meet all dependency requirements for a deployment. If the requirements conflict, then this operation returns an error and the deployment fails. For example, this occurs if component A
requires version >2.0.0
and component B
requires version <2.0.0
of a component dependency.
When you specify the component candidates to resolve, IoT Greengrass compares each component's digest from the core device with the component's digest in the Amazon Web Services Cloud. If the digests don't match, then IoT Greengrass specifies to use the version from the Amazon Web Services Cloud.
Warning
To use this operation, you must use the data plane API endpoint and authenticate with an IoT device certificate. For more information, see IoT Greengrass endpoints and quotas .
See also: AWS API Documentation
Request Syntax
response = client.resolve_component_candidates(
platform={
'name': 'string',
'attributes': {
'string': 'string'
}
},
componentCandidates=[
{
'componentName': 'string',
'componentVersion': 'string',
'versionRequirements': {
'string': 'string'
}
},
]
)
The platform to use to resolve compatible components.
The friendly name of the platform. This name helps you identify the platform.
If you omit this parameter, IoT Greengrass creates a friendly name from the os
and architecture
of the platform.
A dictionary of attributes for the platform. The IoT Greengrass Core software defines the os
and architecture
by default. You can specify additional platform attributes for a core device when you deploy the Greengrass nucleus component. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide .
The list of components to resolve.
Contains information about a component that is a candidate to deploy to a Greengrass core device.
The name of the component.
The version of the component.
The version requirements for the component's dependencies. Greengrass core devices get the version requirements from component recipes.
IoT Greengrass V2 uses semantic version constraints. For more information, see Semantic Versioning .
dict
Response Syntax
{
'resolvedComponentVersions': [
{
'arn': 'string',
'componentName': 'string',
'componentVersion': 'string',
'recipe': b'bytes',
'vendorGuidance': 'ACTIVE'|'DISCONTINUED'|'DELETED',
'message': 'string'
},
]
}
Response Structure
(dict) --
resolvedComponentVersions (list) --
A list of components that meet the requirements that you specify in the request. This list includes each component's recipe that you can use to install the component.
(dict) --
Contains information about a component version that is compatible to run on a Greengrass core device.
arn (string) --
The ARN of the component version.
componentName (string) --
The name of the component.
componentVersion (string) --
The version of the component.
recipe (bytes) --
The recipe of the component version.
vendorGuidance (string) --
The vendor guidance state for the component version. This state indicates whether the component version has any issues that you should consider before you deploy it. The vendor guidance state can be:
ACTIVE
– This component version is available and recommended for use.DISCONTINUED
– This component version has been discontinued by its publisher. You can deploy this component version, but we recommend that you use a different version of this component.DELETED
– This component version has been deleted by its publisher, so you can't deploy it. If you have any existing deployments that specify this component version, those deployments will fail.message (string) --
A message that communicates details about the vendor guidance state of the component version. This message communicates why a component version is discontinued or deleted.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.AccessDeniedException
GreengrassV2.Client.exceptions.ResourceNotFoundException
GreengrassV2.Client.exceptions.ConflictException
GreengrassV2.Client.exceptions.ThrottlingException
GreengrassV2.Client.exceptions.InternalServerException
tag_resource
(**kwargs)¶Adds tags to an IoT Greengrass resource. If a tag already exists for the resource, this operation updates the tag's value.
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
resourceArn='string',
tags={
'string': 'string'
}
)
[REQUIRED]
The ARN of the resource to tag.
[REQUIRED]
A 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 .
dict
Response Syntax
{}
Response Structure
Exceptions
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
untag_resource
(**kwargs)¶Removes a tag from an IoT Greengrass resource.
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
resourceArn='string',
tagKeys=[
'string',
]
)
[REQUIRED]
The ARN of the resource to untag.
[REQUIRED]
A list of keys for tags to remove from the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
GreengrassV2.Client.exceptions.InternalServerException
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.ResourceNotFoundException
update_connectivity_info
(**kwargs)¶Updates connectivity information for a Greengrass core device.
Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the IoT Greengrass discovery API , IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the IoT Greengrass Version 2 Developer Guide .
See also: AWS API Documentation
Request Syntax
response = client.update_connectivity_info(
thingName='string',
connectivityInfo=[
{
'id': 'string',
'hostAddress': 'string',
'portNumber': 123,
'metadata': 'string'
},
]
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
[REQUIRED]
The connectivity information for the core device.
Contains information about an endpoint and port where client devices can connect to an MQTT broker on a Greengrass core device.
An ID for the connectivity information.
The IP address or DNS address where client devices can connect to an MQTT broker on the Greengrass core device.
The port where the MQTT broker operates on the core device. This port is typically 8883, which is the default port for the MQTT broker component that runs on core devices.
Additional metadata to provide to client devices that connect to this core device.
dict
Response Syntax
{
'version': 'string',
'message': 'string'
}
Response Structure
(dict) --
version (string) --
The new version of the connectivity information for the core device.
message (string) --
A message about the connectivity information update request.
Exceptions
GreengrassV2.Client.exceptions.ValidationException
GreengrassV2.Client.exceptions.InternalServerException
The available paginators are:
GreengrassV2.Paginator.ListClientDevicesAssociatedWithCoreDevice
GreengrassV2.Paginator.ListComponentVersions
GreengrassV2.Paginator.ListComponents
GreengrassV2.Paginator.ListCoreDevices
GreengrassV2.Paginator.ListDeployments
GreengrassV2.Paginator.ListEffectiveDeployments
GreengrassV2.Paginator.ListInstalledComponents
GreengrassV2.Paginator.
ListClientDevicesAssociatedWithCoreDevice
¶paginator = client.get_paginator('list_client_devices_associated_with_core_device')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from GreengrassV2.Client.list_client_devices_associated_with_core_device()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
coreDeviceThingName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'associatedClientDevices': [
{
'thingName': 'string',
'associationTimestamp': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
associatedClientDevices (list) --
A list that describes the client devices that are associated with the core device.
(dict) --
Contains information about a client device that is associated to a core device for cloud discovery.
thingName (string) --
The name of the IoT thing that represents the associated client device.
associationTimestamp (datetime) --
The time that the client device was associated, expressed in ISO 8601 format.
NextToken (string) --
A token to resume pagination.
GreengrassV2.Paginator.
ListComponentVersions
¶paginator = client.get_paginator('list_component_versions')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from GreengrassV2.Client.list_component_versions()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
arn='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The ARN of the component.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'componentVersions': [
{
'componentName': 'string',
'componentVersion': 'string',
'arn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
componentVersions (list) --
A list of versions that exist for the component.
(dict) --
Contains information about a component version in a list.
componentName (string) --
The name of the component.
componentVersion (string) --
The version of the component.
arn (string) --
The ARN of the component version.
NextToken (string) --
A token to resume pagination.
GreengrassV2.Paginator.
ListComponents
¶paginator = client.get_paginator('list_components')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from GreengrassV2.Client.list_components()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
scope='PRIVATE'|'PUBLIC',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The scope of the components to list.
Default: PRIVATE
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'components': [
{
'arn': 'string',
'componentName': 'string',
'latestVersion': {
'arn': 'string',
'componentVersion': 'string',
'creationTimestamp': datetime(2015, 1, 1),
'description': 'string',
'publisher': 'string',
'platforms': [
{
'name': 'string',
'attributes': {
'string': 'string'
}
},
]
}
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
components (list) --
A list that summarizes each component.
(dict) --
Contains information about a component.
arn (string) --
The ARN of the component version.
componentName (string) --
The name of the component.
latestVersion (dict) --
The latest version of the component and its details.
arn (string) --
The ARN of the component version.
componentVersion (string) --
The version of the component.
creationTimestamp (datetime) --
The time at which the component was created, expressed in ISO 8601 format.
description (string) --
The description of the component version.
publisher (string) --
The publisher of the component version.
platforms (list) --
The platforms that the component version supports.
(dict) --
Contains information about a platform that a component supports.
name (string) --
The friendly name of the platform. This name helps you identify the platform.
If you omit this parameter, IoT Greengrass creates a friendly name from the os
and architecture
of the platform.
attributes (dict) --
A dictionary of attributes for the platform. The IoT Greengrass Core software defines the os
and architecture
by default. You can specify additional platform attributes for a core device when you deploy the Greengrass nucleus component. For more information, see the Greengrass nucleus component in the IoT Greengrass V2 Developer Guide .
NextToken (string) --
A token to resume pagination.
GreengrassV2.Paginator.
ListCoreDevices
¶paginator = client.get_paginator('list_core_devices')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from GreengrassV2.Client.list_core_devices()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
thingGroupArn='string',
status='HEALTHY'|'UNHEALTHY',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The 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.A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'coreDevices': [
{
'coreDeviceThingName': 'string',
'status': 'HEALTHY'|'UNHEALTHY',
'lastStatusUpdateTimestamp': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
coreDevices (list) --
A list that summarizes each core device.
(dict) --
Contains information about a Greengrass core device, which is an IoT thing that runs the IoT Greengrass Core software.
coreDeviceThingName (string) --
The name of the core device. This is also the name of the IoT thing.
status (string) --
The status of the core device. Core devices can have the following statuses:
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.lastStatusUpdateTimestamp (datetime) --
The time at which the core device's status last updated, expressed in ISO 8601 format.
NextToken (string) --
A token to resume pagination.
GreengrassV2.Paginator.
ListDeployments
¶paginator = client.get_paginator('list_deployments')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from GreengrassV2.Client.list_deployments()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
targetArn='string',
historyFilter='ALL'|'LATEST_ONLY',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
The filter for the list of deployments. Choose one of the following options:
ALL
– The list includes all deployments.LATEST_ONLY
– The list includes only the latest revision of each deployment.Default: LATEST_ONLY
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
dict
Response Syntax
{
'deployments': [
{
'targetArn': 'string',
'revisionId': 'string',
'deploymentId': 'string',
'deploymentName': 'string',
'creationTimestamp': datetime(2015, 1, 1),
'deploymentStatus': 'ACTIVE'|'COMPLETED'|'CANCELED'|'FAILED'|'INACTIVE',
'isLatestForTarget': True|False
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
deployments (list) --
A list that summarizes each deployment.
(dict) --
Contains information about a deployment.
targetArn (string) --
The ARN of the target IoT thing or thing group.
revisionId (string) --
The revision number of the deployment.
deploymentId (string) --
The ID of the deployment.
deploymentName (string) --
The name of the deployment.
creationTimestamp (datetime) --
The time at which the deployment was created, expressed in ISO 8601 format.
deploymentStatus (string) --
The status of the deployment.
isLatestForTarget (boolean) --
Whether or not the deployment is the latest revision for its target.
NextToken (string) --
A token to resume pagination.
GreengrassV2.Paginator.
ListEffectiveDeployments
¶paginator = client.get_paginator('list_effective_deployments')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from GreengrassV2.Client.list_effective_deployments()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
coreDeviceThingName='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
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.
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.
NextToken (string) --
A token to resume pagination.
GreengrassV2.Paginator.
ListInstalledComponents
¶paginator = client.get_paginator('list_installed_components')
paginate
(**kwargs)¶Creates an iterator that will paginate through responses from GreengrassV2.Client.list_installed_components()
.
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
coreDeviceThingName='string',
topologyFilter='ALL'|'ROOT',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
[REQUIRED]
The name of the core device. This is also the name of the IoT thing.
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
A dictionary that provides parameters to control pagination.
The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken
will be provided in the output that you can use to resume pagination.
The size of each page.
A token to specify where to start paginating. This is the NextToken
from a previous response.
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.
Note
Greengrass nucleus v2.7.0 or later is required to get an accurate lastStatusChangeTimestamp
response. This response can be inaccurate in earlier Greengrass nucleus versions.
Note
Greengrass nucleus v2.8.0 or later is required to get an accurate lastInstallationSource
and lastReportedTimestamp
response. This response can be inaccurate or null in earlier Greengrass nucleus 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) --
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.
Note
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.
NextToken (string) --
A token to resume pagination.