From e40bedd559da1c0a95086261c60ab804f7f95f5c Mon Sep 17 00:00:00 2001 From: Greg Breen Date: Wed, 11 Oct 2023 11:51:45 +0800 Subject: [PATCH] Documentation updates --- README.md | 6 +++--- create_ota_update.py | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 12ecf15..e692c4d 100644 --- a/README.md +++ b/README.md @@ -44,12 +44,12 @@ usage: create_ota_update.py [-h] binary bucket signingProfile otaRole thingGroup Create and execute AWS IoT OTA update directly using jobs positional arguments: - binary Name of the binary file (oject key) in the S3 bucket + binary Name of the binary file (object key) in the S3 bucket bucket Name of the bucket signingProfile Name of the signing profile otaRole Name of the IAM role that grants IoT access to S3, IoT jobs and code signing thingGroup Name of the target Thing group - jobId ID of the job to be created + jobId ID of the job to be created ('AFR_OTA-' will be prepended) optional arguments: -h, --help show this help message and exit @@ -96,7 +96,7 @@ The following scenario is demonstrated: 5. Number of [retries](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateJob.html#iot-CreateJob-request-jobExecutionsRetryConfig) set to 3. 6. A [scheduled job](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateJob.html#iot-CreateJob-request-schedulingConfig) that starts one hour in the future and ends an hour later. -The example can of course be adjusted to cater for different options and to use additional advanced job configuration such as [recurring maintenace windows](https://docs.aws.amazon.com/iot/latest/apireference/API_SchedulingConfig.html#iot-Type-SchedulingConfig-maintenanceWindows), [software catalog package versions](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateJob.html#iot-CreateJob-request-destinationPackageVersions) and [namespaces](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateJob.html#iot-CreateJob-request-namespaceId). +The example can of course be adjusted to cater for different options and to use additional advanced job configuration such as [recurring maintenance windows](https://docs.aws.amazon.com/iot/latest/apireference/API_SchedulingConfig.html#iot-Type-SchedulingConfig-maintenanceWindows) and [software catalog package versions](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateJob.html#iot-CreateJob-request-destinationPackageVersions). # Deviations diff --git a/create_ota_update.py b/create_ota_update.py index 96737f9..a3b138e 100644 --- a/create_ota_update.py +++ b/create_ota_update.py @@ -7,8 +7,8 @@ makes numerous other API calls, finishing with CreateJob. This example makes those APIs calls to construct a job and job document that is equivalent to an OTA Update. This approach allows you to perform an OTA Update that uses -advanced job configuration options such as retries, scheduling and destination -package versions. These options are not supported by CreateOTAUpdate, but are +advanced job configuration options such as retries, scheduling and Software +Package Catalog. These options are not supported by CreateOTAUpdate, but are supported by CreateJob. This example creates the OTA Update job with the following paraemters and scenario: @@ -192,7 +192,7 @@ def create_job(): # ], 'startTime': (now + timedelta(hours=1)).strftime('%Y-%m-%dT%H:%M') } -# You may optionally define package version ARNs here +# You may optionally define Software Package Catalog package version ARNs here # destinationPackageVersions=[ # 'string', # ] @@ -201,13 +201,15 @@ def create_job(): parser = argparse.ArgumentParser(description='Create and execute AWS IoT OTA update using jobs') -parser.add_argument('binary', help='Name of the binary file (oject key) in the S3 bucket') +parser.add_argument('binary', help='Name of the binary file (object key)\ + in the S3 bucket') parser.add_argument('bucket', help='Name of the bucket') parser.add_argument('signingProfile', help='Name of the signing profile') parser.add_argument('otaRole', help='Name of the IAM role that grants IoT access\ to S3, IoT jobs and code signing') parser.add_argument('thingGroup', help='Name of the target Thing group') -parser.add_argument('jobId', help='ID of the job to be created') +parser.add_argument('jobId', help='ID of the job to be created (\'AFR_OTA-\' will\ + be prepended)') args = parser.parse_args() iot = boto3.client('iot')