Menu
AWS Greengrass
API Reference

CreateSoftwareUpdateJob

Creates an IoT Job that will trigger your Greengrass cores to update the software they are running.

URI: POST /greengrass/updates

Produces: application/json

CLI:

Copy
aws greengrass create-software-update-job \ [--update-targets-architecture <value>] \ [--update-targets <value>] \ [--software-to-update <value>] \ [--s3-url-signer-role <value>] \ [--update-agent-log-level <value>] \ [--update-targets-operating-system <value>] \ [--amzn-client-token <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

Copy
{ "UpdateTargetsArchitecture": "armv7l|x86_64|aarch64", "UpdateTargets": [ "string" ], "SoftwareToUpdate": "core|ota_agent", "S3UrlSignerRole": "string", "UpdateAgentLogLevel": "NONE|TRACE|DEBUG|VERBOSE|INFO|WARN|ERROR|FATAL", "UpdateTargetsOperatingSystem": "ubuntu|raspbian|amazon_linux", "AmznClientToken": "string" }

Parameters:

CreateSoftwareUpdateJobRequestBody

where used: body; required: true

Copy
{ "UpdateTargetsArchitecture": "armv7l|x86_64|aarch64", "UpdateTargets": [ "string" ], "SoftwareToUpdate": "core|ota_agent", "S3UrlSignerRole": "string", "UpdateAgentLogLevel": "NONE|TRACE|DEBUG|VERBOSE|INFO|WARN|ERROR|FATAL", "UpdateTargetsOperatingSystem": "ubuntu|raspbian|amazon_linux" }

schema:

CreateSoftwareUpdateJobRequest

Request for the CreateSoftwareUpdateJob API.

type: object

required: ["UpdateTargetsArchitecture", "UpdateTargets", "SoftwareToUpdate", "S3UrlSignerRole", "UpdateTargetsOperatingSystem"]

UpdateTargetsArchitecture

The architecture of the cores which are the targets of an update.

type: string

enum: ["armv7l", "x86_64", "aarch64"]

UpdateTargets

The ARNs of the target devices that this update will be applied to.

type: array

SoftwareToUpdate

The piece of software on the Greengrass core that will be updated.

type: string

enum: ["core", "ota_agent"]

S3UrlSignerRole

The IAM Role that Greengrass will use to create pre-signed URLs pointing towards the update artifact.

type: string

UpdateAgentLogLevel

The minimum level of log statements that should be logged by the OTA Agent during an update.

type: string

enum: ["NONE", "TRACE", "DEBUG", "VERBOSE", "INFO", "WARN", "ERROR", "FATAL"]

UpdateTargetsOperatingSystem

The operating system of the cores which are the targets of an update.

type: string

enum: ["ubuntu", "raspbian", "amazon_linux"]

X-Amzn-Client-Token

A client token used to make idempotent requests. Provide a unique token to help prevent duplicate updates from being created due to internal retries.

where used: header; required: false

type: string

Responses:

200

success

CreateSoftwareUpdateJobResponse

Copy
{ "IotJobId": "string", "IotJobArn": "string" }
CreateSoftwareUpdateJobResponse

type: object

IotJobId

The IoT Job Id corresponding to this update.

type: string

IotJobArn

The IoT Job ARN corresponding to this update.

type: string

400

invalid request

GeneralError

Copy
{ "Message": "string", "ErrorDetails": [ { "DetailedErrorCode": "string", "DetailedErrorMessage": "string" } ] }
GeneralError

General error information.

type: object

required: ["Message"]

Message

A message containing information about the error.

type: string

ErrorDetails

A list of error details.

type: array

items: ErrorDetail

ErrorDetail

Details about the error.

type: object

DetailedErrorCode

A detailed error code.

type: string

DetailedErrorMessage

A detailed error message.

type: string

500

server error

GeneralError

Copy
{ "Message": "string", "ErrorDetails": [ { "DetailedErrorCode": "string", "DetailedErrorMessage": "string" } ] }
GeneralError

General error information.

type: object

required: ["Message"]

Message

A message containing information about the error.

type: string

ErrorDetails

A list of error details.

type: array

items: ErrorDetail

ErrorDetail

Details about the error.

type: object

DetailedErrorCode

A detailed error code.

type: string

DetailedErrorMessage

A detailed error message.

type: string