

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 任务管理和控制 API 以及数据类型
<a name="jobs-management-control-api"></a>

**Topics**
+ [任务管理和控制数据类型](#jobs-control-plane-data-types)
+ [任务管理和控制 API 操作](#jobs-http-api)

要确定 CLI 命令的*endpoint-url*参数，请运行此命令。

```
aws iot describe-endpoint --endpoint-type=iot:Jobs
```

此命令将返回以下输出。

```
{
"endpointAddress": "account-specific-prefix.jobs.iot.aws-region.amazonaws.com"
}
```

**注意**  
Jobs 端点不支持 ALPN `x-amzn-http-ca`。  
如果您使用的是双堆栈终端节点（IPv6 和 IPv6），请使用`iot:Data-ATS`终端节点。该`iot:Jobs`端点仅支持 IPv4。

## 任务管理和控制数据类型
<a name="jobs-control-plane-data-types"></a>

管理和控制应用程序使用以下数据类型与 AWS IoT 作业通信。

### 任务
<a name="jobs-job"></a>

`Job` 对象包含有关任务的详细信息。以下示例显示该语法：

```
{
    "jobArn": "string", 
    "jobId": "string", 
    "status": "IN_PROGRESS|CANCELED|SUCCEEDED", 
    "forceCanceled": boolean,
    "targetSelection": "CONTINUOUS|SNAPSHOT",
    "comment": "string",
    "targets": ["string"], 
    "description": "string",
    "createdAt": timestamp,
    "lastUpdatedAt": timestamp,
    "completedAt": timestamp,
    "jobProcessDetails": {
        "processingTargets": ["string"],
        "numberOfCanceledThings": long, 
        "numberOfSucceededThings": long, 
        "numberOfFailedThings": long,
        "numberOfRejectedThings": long, 
        "numberOfQueuedThings": long, 
        "numberOfInProgressThings": long, 
        "numberOfRemovedThings": long, 
        "numberOfTimedOutThings": long
    }, 
    "presignedUrlConfig": {
        "expiresInSec": number, 
        "roleArn": "string"
    }, 
    "jobExecutionsRolloutConfig": { 
        "exponentialRate": { 
           "baseRatePerMinute": integer,
           "incrementFactor": integer,
           "rateIncreaseCriteria": { 
              "numberOfNotifiedThings": integer, // Set one or the other
              "numberOfSucceededThings": integer // of these two values.
           },
           "maximumPerMinute": integer
      }
    },    
    "abortConfig": { 
       "criteriaList": [ 
          { 
             "action": "string",
             "failureType": "string",
             "minNumberOfExecutedThings": integer,
             "thresholdPercentage": integer
          }
       ]
    },
    "SchedulingConfig": { 
      "startTime": string
      "endTime": string
      "timeZone": string


      "endTimeBehavior": string

   },
    "timeoutConfig": {
        "inProgressTimeoutInMinutes": long
    }
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_Job.html](https://docs.aws.amazon.com/iot/latest/apireference/API_Job.html)或 [https://docs.aws.amazon.com/cli/latest/reference/iot/job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/job.html)。

### JobSummary
<a name="jobs-job-summary"></a>

`JobSummary` 对象包含任务摘要。以下示例显示该语法：

```
{
    "jobArn": "string", 
    "jobId": "string",
    "status": "IN_PROGRESS|CANCELED|SUCCEEDED|SCHEDULED", 
    "targetSelection": "CONTINUOUS|SNAPSHOT",
    "thingGroupId": "string",
    "createdAt": timestamp, 
    "lastUpdatedAt": timestamp, 
    "completedAt": timestamp
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_JobSummary.html](https://docs.aws.amazon.com/iot/latest/apireference/API_JobSummary.html)或 [https://docs.aws.amazon.com/cli/latest/reference/iot/job-summary.html](https://docs.aws.amazon.com/cli/latest/reference/iot/job-summary.html)。

### JobExecution
<a name="jobs-job-execution"></a>

`JobExecution` 对象表示设备上的任务执行。以下示例显示该语法：

**注意**  
当您使用控制面板 API 操作时，`JobExecution` 数据类型不包含 `JobDocument` 字段。要获取此信息，您可以使用 [https://docs.aws.amazon.com/iot/latest/apireference/API_GetJobDocument.html](https://docs.aws.amazon.com/iot/latest/apireference/API_GetJobDocument.html) API 操作或 [https://docs.aws.amazon.com/cli/latest/reference/get-job-document.html](https://docs.aws.amazon.com/cli/latest/reference/get-job-document.html) CLI 命令。

```
{
    "approximateSecondsBeforeTimedOut": 50,
    "executionNumber": 1234567890,
    "forceCanceled": true|false,
    "jobId": "string",
    "lastUpdatedAt": timestamp, 
    "queuedAt": timestamp,
    "startedAt": timestamp,
    "status": "QUEUED|IN_PROGRESS|FAILED|SUCCEEDED|CANCELED|TIMED_OUT|REJECTED|REMOVED",
    "forceCanceled": boolean,
    "statusDetails": {
        "detailsMap": { 
            "string": "string" ...
        },
        "status": "string"
    }, 
    "thingArn": "string", 
    "versionNumber": 123
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecution.html](https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecution.html)或 [https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution.html](https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution.html)。

### JobExecutionSummary
<a name="jobs-job-execution-summary"></a>

`JobExecutionSummary` 对象包含任务执行摘要信息。以下示例显示该语法：

```
{
    "executionNumber": 1234567890,
    "queuedAt": timestamp,
    "lastUpdatedAt": timestamp,
    "startedAt": timestamp,
    "status": "QUEUED|IN_PROGRESS|FAILED|SUCCEEDED|CANCELED|TIMED_OUT|REJECTED|REMOVED"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecutionSummary.html](https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecutionSummary.html)或 [https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution-summary.html](https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution-summary.html)。

### JobExecutionSummaryForJob
<a name="jobs-job-execution-summary-for-job"></a>

`JobExecutionSummaryForJob` 对象包含有关特定任务的任务执行的信息摘要。以下示例显示该语法：

```
{
    "executionSummaries": [
        {
            "thingArn": "arn:aws:iot:us-west-2:123456789012:thing/MyThing", 
            "jobExecutionSummary": {
                "status": "IN_PROGRESS", 
                "lastUpdatedAt": 1549395301.389, 
                "queuedAt": 1541526002.609, 
                "executionNumber": 1
            }
        }, 
        ...
    ]
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecutionSummaryForJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecutionSummaryForJob.html)或 [https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution-summary-for-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution-summary-for-job.html)。

### JobExecutionSummaryForThing
<a name="jobs-job-execution-summary-for-thing"></a>

该`JobExecutionSummaryForThing`对象包含有关在特定事物上执行任务的信息摘要。 FThe 以下示例显示了语法：

```
{
    "executionSummaries": [
        {
            "jobExecutionSummary": {
                "status": "IN_PROGRESS", 
                "lastUpdatedAt": 1549395301.389, 
                "queuedAt": 1541526002.609, 
                "executionNumber": 1
            }, 
            "jobId": "MyThingJob"
        },
        ...
    ]
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecutionSummaryForThing.html](https://docs.aws.amazon.com/iot/latest/apireference/API_JobExecutionSummaryForThing.html)或 [https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution-summary-for-thing.html](https://docs.aws.amazon.com/cli/latest/reference/iot/job-execution-summary-for-thing.html)。

## 任务管理和控制 API 操作
<a name="jobs-http-api"></a>

使用以下 API 操作或 CLI 命令：

### AssociateTargetsWithJob
<a name="jobs-AssociateTargetsWithJob"></a>

将组与持续任务关联。必须满足以下标准：
+ 必须已在 `targetSelection` 字段设置为 `CONTINUOUS` 的情况下创建任务。
+ 任务状态当前必须为 `IN_PROGRESS`。
+ 与任务关联的目标总数不能超过 100。

------
#### [ HTTPS request ]

```
POST /jobs/jobId/targets
 
{ 
"targets": [ "string" ],
"comment": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_AssociateTargetsWithJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_AssociateTargetsWithJob.html)。

------
#### [ CLI syntax ]

```
aws iot  associate-targets-with-job \
--targets <value> \
--job-id <value> \
[--comment <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"targets": [
"string"
],
"jobId": "string",
"comment": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/associate-targets-with-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/associate-targets-with-job.html)。

------

### CancelJob
<a name="jobs-CancelJob"></a>

取消任务。

------
#### [ HTTPS request ]

```
PUT /jobs/jobId/cancel
 
{ 
"force": boolean,
"comment": "string",
"reasonCode": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_CancelJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_CancelJob.html)。

------
#### [ CLI syntax ]

```
aws iot cancel-job \
    --job-id <value> \
    [--force <value>]  \
    [--comment <value>]  \
    [--reasonCode <value>]  \
    [--cli-input-json <value>] \
    [--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
    "jobId": "string",
    "force": boolean,
    "comment": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/cancel-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/cancel-job.html)。

------

### CancelJobExecution
<a name="jobs-CancelJobExecution"></a>

取消设备上的任务执行。

------
#### [ HTTPS request ]

```
PUT /things/thingName/jobs/jobId/cancel
 
{ 
"force": boolean,
"expectedVersion": "string",
"statusDetails": {
    "string": "string"
    ...
}
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_CancelJobExecution.html](https://docs.aws.amazon.com/iot/latest/apireference/API_CancelJobExecution.html)。

------
#### [ CLI syntax ]

```
aws iot cancel-job-execution \
--job-id <value> \
--thing-name <value> \
[--force | --no-force] \
[--expected-version <value>] \
[--status-details <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"jobId": "string",
"thingName": "string",
"force": boolean,
"expectedVersion": long,
"statusDetails": {
"string": "string"
}
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/cancel-job-execution.html](https://docs.aws.amazon.com/cli/latest/reference/iot/cancel-job-execution.html)。

------

### CreateJob
<a name="jobs-CreateJob"></a>

创建任务。您可以提供任务文档，作为指向 Amazon S3 桶（`documentSource` 参数）中或请求正文（`document` 参数）中的文件的链接。

通过将可选的 `targetSelection` 参数设置为 `CONTINUOUS`（默认为 `SNAPSHOT`），可使任务成为*连续*任务。连续任务可用于在将设备添加到组时登记或升级设备，因为它将继续运行并在新添加的事物上启动。即使在创建任务时组中的事物已完成任务，也可能发生这种情况。

作业可以有一个可选的 [TimeoutConfig](https://docs.aws.amazon.com//iot/latest/apireference/API_TimeoutConfig.html)，用于设置正在进行的计时器的值。进行中计时器无法更新，应用到该任务的全部执行。

对 `CreateJob` API 的参数执行以下验证：
+ `targets`参数必须是有效事物或事物组的列表 ARNs。所有事物和事物组都必须位于您的中 AWS 账户。
+ `documentSource` 参数必须是指向任务文档的有效 Amazon S3 URL。亚马逊 URLs S3 的格式为:`https://s3.amazonaws.com/bucketName/objectName`.
+ 存储在由 `documentSource` 参数指定的 URL 中的文档必须是 UTF-8 编码的 JSON 文档。
+ 由于 MQTT 消息大小限制（128 KB）和加密的原因，任务文档的大小限制为 32 KB。
+ 在您的中`jobId`必须是唯一的 AWS 账户。

------
#### [ HTTPS request ]

```
PUT /jobs/jobId
 
{
"targets": [ "string" ],
"document": "string",
"documentSource": "string",
"description": "string",
"jobTemplateArn": "string",
"presignedUrlConfigData": {
    "roleArn": "string", 
    "expiresInSec": "integer" 
},
"targetSelection": "CONTINUOUS|SNAPSHOT",
"jobExecutionsRolloutConfig": { 
    "exponentialRate": { 
       "baseRatePerMinute": integer,
       "incrementFactor": integer,
       "rateIncreaseCriteria": { 
          "numberOfNotifiedThings": integer, // Set one or the other
          "numberOfSucceededThings": integer // of these two values.
       },
       "maximumPerMinute": integer
  }
},
"abortConfig": { 
   "criteriaList": [ 
      { 
         "action": "string",
         "failureType": "string",
         "minNumberOfExecutedThings": integer,
         "thresholdPercentage": integer
      }
   ]
},
"SchedulingConfig": { 
    "startTime": string
    "endTime": string
    "timeZone": string


    "endTimeBehavior": string

   }
"timeoutConfig": { 
  "inProgressTimeoutInMinutes": long
}
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_CreateJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_CreateJob.html)。

------
#### [ CLI syntax ]

```
aws iot create-job \
    --job-id <value> \
    --targets <value> \
    [--document-source <value>] \
    [--document <value>] \
    [--description <value>] \
    [--job-template-arn <value>] \
    [--presigned-url-config <value>] \
    [--target-selection <value>] \
    [--job-executions-rollout-config <value>] \
    [--abort-config <value>] \
    [--timeout-config <value>] \
    [--document-parameters <value>]  \
    [--cli-input-json <value>] \
    [--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
    "jobId": "string",
    "targets": [ "string" ],
    "documentSource": "string",
    "document": "string",
    "description": "string",
    "jobTemplateArn": "string",
    "presignedUrlConfig": {
        "roleArn": "string",
        "expiresInSec": long
     },
    "targetSelection": "string",
    "jobExecutionsRolloutConfig": { 
          "exponentialRate": { 
              "baseRatePerMinute": integer,
              "incrementFactor": integer,
              "rateIncreaseCriteria": { 
                 "numberOfNotifiedThings": integer, // Set one or the other
                 "numberOfSucceededThings": integer // of these two values.
              },
      "maximumPerMinute": integer
      }
    }, 
    "abortConfig": { 
    "criteriaList": [ 
        { 
           "action": "string",
           "failureType": "string",
           "minNumberOfExecutedThings": integer,
           "thresholdPercentage": integer
         }
      ]
    },
    "timeoutConfig": { 
          "inProgressTimeoutInMinutes": long
    },
    "documentParameters": {
    "string": "string"
    }
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/create-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/create-job.html)。

------

### DeleteJob
<a name="jobs-DeleteJob"></a>

删除任务及其相关的任务执行。

删除任务可能需要一些时间，具体取决于为该任务创建的任务执行的数量以及其它各种因素。正在删除任务时，任务的状态显示为“DELETION\$1IN\$1PROGRESS”。尝试删除或取消已处于“DELETION\$1IN\$1PROGRESS”状态的任务将导致错误。

------
#### [ HTTPS request ]

```
DELETE /jobs/jobId?force=force 
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_DeleteJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_DeleteJob.html)。

------
#### [ CLI syntax ]

```
aws iot  delete-job \
--job-id <value> \
[--force | --no-force]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"jobId": "string",
"force": boolean
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/delete-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/delete-job.html)。

------

### DeleteJobExecution
<a name="jobs-DeleteJobExecution"></a>

删除任务执行。

------
#### [ HTTPS request ]

```
DELETE /things/thingName/jobs/jobId/executionNumber/executionNumber?force=force
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_DeleteJobExecution.html](https://docs.aws.amazon.com/iot/latest/apireference/API_DeleteJobExecution.html)。

------
#### [ CLI syntax ]

```
aws iot  delete-job-execution \
--job-id <value> \
--thing-name <value> \
--execution-number <value> \
[--force | --no-force]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"jobId": "string",
"thingName": "string",
"executionNumber": long,
"force": boolean
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/delete-job-execution.html](https://docs.aws.amazon.com/cli/latest/reference/iot/delete-job-execution.html)。

------

### DescribeJob
<a name="jobs-DescribeJob"></a>

获取任务执行的详细信息。

------
#### [ HTTPS request ]

```
GET /jobs/jobId
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeJob.html)。

------
#### [ CLI syntax ]

```
aws iot describe-job \
--job-id <value>  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"jobId": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/describe-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/describe-job.html)。

------

### DescribeJobExecution
<a name="jobs-DescribeJobExecution"></a>

获取任务执行的详细信息。任务的执行状态必须为 `SUCCEEDED` 或 `FAILED`。

------
#### [ HTTPS request ]

```
GET /things/thingName/jobs/jobId?executionNumber=executionNumber
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeJobExecution.html](https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeJobExecution.html)。

------
#### [ CLI syntax ]

```
aws iot  describe-job-execution \
--job-id <value> \
--thing-name <value> \
[--execution-number <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"jobId": "string",
"thingName": "string",
"executionNumber": long
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/describe-job-execution.html](https://docs.aws.amazon.com/cli/latest/reference/iot/describe-job-execution.html)。

------

### GetJobDocument
<a name="jobs-GetJobDocument"></a>

获取任务的任务文档。

**注意**  
在返回的文档 URLs 中，占位符不会替换为预签名的 Amazon S3 URLs。仅当 AWS IoT 任务服务通过 MQTT 收到请求时，才会生成预签名 URLs 。

------
#### [ HTTPS request ]

```
GET /jobs/jobId/job-document
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_GetJobDocument.html](https://docs.aws.amazon.com/iot/latest/apireference/API_GetJobDocument.html)。

------
#### [ CLI syntax ]

```
aws iot get-job-document \
--job-id <value>  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"jobId": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/get-job-document.html](https://docs.aws.amazon.com/cli/latest/reference/iot/get-job-document.html)。

------

### ListJobExecutionsForJob
<a name="jobs-listJobExecutionsForJob"></a>

获取任务的任务执行的列表。

------
#### [ HTTPS request ]

```
GET /jobs/jobId/things?status=status&maxResults=maxResults&nextToken=nextToken
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_ListJobExecutionsForJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_ListJobExecutionsForJob.html)。

------
#### [ CLI syntax ]

```
aws iot  list-job-executions-for-job \
--job-id <value> \
[--status <value>] \
[--max-results <value>] \
[--next-token <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"jobId": "string",
"status": "string",
"maxResults": "integer",
"nextToken": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/list-job-executions-for-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/list-job-executions-for-job.html)。

------

### ListJobExecutionsForThing
<a name="jobs-ListJobExecutionsForThing"></a>

获取事物的任务执行的列表。

------
#### [ HTTPS request ]

```
GET /things/thingName/jobs?status=status&maxResults=maxResults&nextToken=nextToken
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_ListJobExecutionsForThing.html](https://docs.aws.amazon.com/iot/latest/apireference/API_ListJobExecutionsForThing.html)。

------
#### [ CLI syntax ]

```
aws iot list-job-executions-for-thing \
--thing-name <value> \
[--status <value>] \
[--max-results <value>] \
[--next-token <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"thingName": "string",
"status": "string",
"maxResults": "integer",
"nextToken": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/list-job-executions-for-thing.html](https://docs.aws.amazon.com/cli/latest/reference/iot/list-job-executions-for-thing.html)。

------

### ListJobs
<a name="jobs-listJobs"></a>

获取您的职位列表 AWS 账户。

------
#### [ HTTPS request ]

```
GET /jobs?status=status&targetSelection=targetSelection&thingGroupName=thingGroupName&thingGroupId=thingGroupId&maxResults=maxResults&nextToken=nextToken
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_ListJobs.html](https://docs.aws.amazon.com/iot/latest/apireference/API_ListJobs.html)。

------
#### [ CLI syntax ]

```
aws iot list-jobs \
[--status <value>] \
[--target-selection <value>] \
[--max-results <value>] \
[--next-token <value>] \
[--thing-group-name <value>] \
[--thing-group-id <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"status": "string",
"targetSelection": "string",
"maxResults": "integer",
"nextToken": "string",
"thingGroupName": "string",
"thingGroupId": "string"
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/list-jobs.html](https://docs.aws.amazon.com/cli/latest/reference/iot/list-jobs.html)。

------

### UpdateJob
<a name="jobs-UpdateJob"></a>

更新指定任务的受支持字段。`timeoutConfig` 的更新值仅对新的正在进行的启动生效。目前，正在进行的启动将继续使用之前的超时配置启动。

------
#### [ HTTPS request ]

```
PATCH /jobs/jobId
{
"description": "string",
"presignedUrlConfig": { 
  "expiresInSec": number,
  "roleArn": "string"
},
"jobExecutionsRolloutConfig": { 
  "exponentialRate": { 
     "baseRatePerMinute": number,
     "incrementFactor": number,
     "rateIncreaseCriteria": { 
        "numberOfNotifiedThings": number,
        "numberOfSucceededThings": number
     }, 
  "maximumPerMinute": number
  },
"abortConfig": { 
  "criteriaList": [ 
     { 
        "action": "string",
        "failureType": "string",
        "minNumberOfExecutedThings": number,
        "thresholdPercentage": number
     }
  ]
},
"timeoutConfig": { 
  "inProgressTimeoutInMinutes": number
}
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/iot/latest/apireference/API_UpdateJob.html](https://docs.aws.amazon.com/iot/latest/apireference/API_UpdateJob.html)。

------
#### [ CLI syntax ]

```
aws iot  update-job \
--job-id <value> \
[--description <value>] \
[--presigned-url-config <value>] \
[--job-executions-rollout-config <value>] \
[--abort-config <value>] \
[--timeout-config <value>] \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 格式：

```
{
"description": "string",
"presignedUrlConfig": { 
  "expiresInSec": number,
  "roleArn": "string"
},
"jobExecutionsRolloutConfig": { 
  "exponentialRate": { 
     "baseRatePerMinute": number,
     "incrementFactor": number,
     "rateIncreaseCriteria": { 
        "numberOfNotifiedThings": number,
        "numberOfSucceededThings": number
     }
  },
  "maximumPerMinute": number
},
"abortConfig": { 
  "criteriaList": [ 
     { 
        "action": "string",
        "failureType": "string",
        "minNumberOfExecutedThings": number,
        "thresholdPercentage": number
     }
  ]
},
"timeoutConfig": { 
  "inProgressTimeoutInMinutes": number
}
}
```

有关更多信息，请参阅 [https://docs.aws.amazon.com/cli/latest/reference/iot/update-job.html](https://docs.aws.amazon.com/cli/latest/reference/iot/update-job.html)。

------