任务执行 - Amazon IoT Core
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 Amazon Web Services 服务入门

任务执行

"Device can complete a job execution"(“设备可以完成任务执行”)

此测试用例可帮助您验证设备是否能够使用 Amazon IoT Jobs 接收更新,并发布成功更新的状态。有关 Amazon IoT Jobs 的更多信息,请参阅任务

API 测试用例定义:

注意

EXECUTION_TIMEOUT 的默认值为 5 分钟。我们建议将超时值设置为 2 分钟。

"tests": [ { "name":"my_job_execution", "configuration": { // optional: // Test case will create a job task by using either JOB_DOCUMENT or JOB_DOCUMENT_SOURCE. // If you manage the job task on your own, leave it empty and provide the JOB_JOBID (self-managed job task). // JOB_DOCUMENT is a JSON formatted string "JOB_DOCUMENT": "{ \"operation\":\"reboot\", \"files\" : { \"fileName\" : \"install.py\", \"url\" : \"${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket-name/key}\" } }", // JOB_DOCUMENT_SOURCE is an S3 link to the job document. It will be used only if JOB_DOCUMENT is not provided. "JOB_DOCUMENT_SOURCE": "https://s3.amazonaws.com/bucket-name/key", // JOB_JOBID is mandatory, only if neither document nor document source is provided. (Test case needs to know the self-managed job task id). "JOB_JOBID": "String", // JOB_PRESIGN_ROLE_ARN is used for the presign Url, which will replace the placeholder in the JOB_DOCUMENT field "JOB_PRESIGN_ROLE_ARN": "String", // Presigned Url expiration time. It must be between 60 and 3600 seconds, with the default value being 3600. "JOB_PRESIGN_EXPIRES_IN_SEC": "Long" "EXECUTION_TIMEOUT": "300", // in seconds }, "test": { "id": "Job_Execution", "version": "0.0.0" } } ]

有关创建和使用任务文档的更多信息,请参阅任务文档