

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# 작업 디바이스 HTTP API
<a name="jobs-http-device-api"></a>

디바이스는 포트 443에서 HTTP 서명 버전 4를 사용하여 AWS IoT 작업과 통신할 수 있습니다. 이는 AWS SDKs 및 CLI에서 사용하는 방법입니다. 이 도구에 관한 자세한 내용은 [AWS CLI 명령 참조: iot-jobs-data](https://docs.aws.amazon.com/cli/latest/reference/iot-jobs-data/index.html) 또는 [AWS SDK 및 도구](https://aws.amazon.com/tools/#sdk)를 참조하세요.

다음 명령은 작업을 실행하는 디바이스에 사용할 수 있습니다. MQTT 프로토콜에서 API 작업을 사용하는 방법에 대한 자세한 내용은 [작업 디바이스 MQTT API 작업](jobs-mqtt-api.md) 섹션을 참조하세요.

## GetPendingJobExecutions
<a name="http-getpendingjobexecutions"></a>

지정된 사물에 대해 최종 상태가 아닌 모든 작업 목록을 가져옵니다.

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

```
GET /things/thingName/jobs
```

응답:

```
{
"inProgressJobs" : [ JobExecutionSummary ... ], 
"queuedJobs" : [ JobExecutionSummary ... ]
}
```

자세한 내용은 [https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_GetPendingJobExecutions.html](https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_GetPendingJobExecutions.html) 단원을 참조하십시오.

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

```
aws iot-jobs-data get-pending-job-executions \
--thing-name <value>  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 형식:

```
{
"thingName": "string"
}
```

자세한 내용은 [https://docs.aws.amazon.com/cli/latest/reference/iot-jobs-data/get-pending-job-executions.html](https://docs.aws.amazon.com/cli/latest/reference/iot-jobs-data/get-pending-job-executions.html) 단원을 참조하십시오.

------

## StartNextPendingJobExecution
<a name="http-startnextpendingjobexecution"></a>

사물의 다음 번 대기 중 작업 실행을 가져오고 시작합니다(`IN_PROGRESS` 또는 `QUEUED` 상태).
+ 상태가 `IN_PROGRESS`인 모든 작업 실행이 먼저 반환됩니다.
+ 작업 실행이 생성된 순서대로 반환됩니다.
+ 다음 대기 중인 작업 실행이 `QUEUED` 상태이면, 상태가 `IN_PROGRESS`로 바뀌고 작업 실행의 상태 세부 정보가 지정한 대로 설정됩니다.
+ 다음 보류 중인 작업 실행이 이미 `IN_PROGRESS` 상태이면 상태 세부 정보가 바뀌지 않습니다.
+ 보류 중인 작업 실행이 없으면 응답에 `execution` 필드가 포함되지 않습니다.
+ 선택적으로 `stepTimeoutInMinutes` 속성에 대한 값을 설정하여 단계 타이머를 생성할 수 있습니다. `UpdateJobExecution`를 실행하여 이 속성 값을 업데이트하지 않은 경우 단계 타이머가 만료할 때 작업 실행이 시간 초과됩니다.

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

다음 예제에서는 요청 구문을 보여줍니다.

```
PUT /things/thingName/jobs/$next
{
"statusDetails": { 
    "string": "string" 
    ... 
},
"stepTimeoutInMinutes": long
}
```

자세한 내용은 [https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_StartNextPendingJobExecution.html](https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_StartNextPendingJobExecution.html) 단원을 참조하십시오.

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

**시놉시스:**

```
aws iot-jobs-data  start-next-pending-job-execution \
--thing-name <value> \
{--step-timeout-in-minutes <value>] \
[--status-details <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 형식:

```
{
"thingName": "string",
"statusDetails": {
"string": "string"
},
"stepTimeoutInMinutes": long
}
```

자세한 내용은 [https://docs.aws.amazon.com/cli/latest/reference/iot-jobs-data/start-next-pending-job-execution.html](https://docs.aws.amazon.com/cli/latest/reference/iot-jobs-data/start-next-pending-job-execution.html) 단원을 참조하십시오.

------

## DescribeJobExecution
<a name="http-describejobexecution"></a>

작업 실행에 대한 세부 정보를 가져옵니다.

`jobId`를 `$next`로 설정하여 다음 대기 중인 사물의 작업 실행을 반환할 수 있습니다. 작업 실행 상태는 `QUEUED` 또는 `IN_PROGRESS`가 되어야 합니다.

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

요청:

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

응답:

```
{
"execution" : JobExecution,
}
```

자세한 내용은 [https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_DescribeJobExecution.html](https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_DescribeJobExecution.html) 단원을 참조하십시오.

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

**시놉시스:**

```
aws iot-jobs-data  describe-job-execution \
--job-id <value> \
--thing-name <value> \
[--include-job-document | --no-include-job-document] \
[--execution-number <value>]  \
[--cli-input-json <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 형식:

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

자세한 내용은 [https://docs.aws.amazon.com/cli/latest/reference/iot-data/describe-job-execution.html](https://docs.aws.amazon.com/cli/latest/reference/iot-data/describe-job-execution.html) 단원을 참조하십시오.

------

## UpdateJobExecution
<a name="http-updatejobexecution"></a>

작업 실행의 상태를 업데이트합니다. 선택적으로 `stepTimeoutInMinutes` 속성에 대한 값을 설정하여 단계 타이머를 생성할 수 있습니다. `UpdateJobExecution`를 다시 실행하여 이 속성 값을 업데이트하지 않은 경우 단계 타이머가 만료할 때 작업 실행이 시간 초과됩니다.

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

요청:

```
POST /things/thingName/jobs/jobId
{
"status": "job-execution-state",
"statusDetails": { 
    "string": "string"
    ...
},
"expectedVersion": "number",
"includeJobExecutionState": boolean,
"includeJobDocument": boolean,
"stepTimeoutInMinutes": long,
"executionNumber": long 
}
```

자세한 내용은 [https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_UpdateJobExecution.html](https://docs.aws.amazon.com/iot/latest/apireference/API_iot-jobs-data_UpdateJobExecution.html) 단원을 참조하십시오.

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

**시놉시스:**

```
aws iot-jobs-data  update-job-execution \
--job-id <value> \
--thing-name <value> \
--status <value> \
[--status-details <value>] \
[--expected-version <value>] \
[--include-job-execution-state | --no-include-job-execution-state] \
[--include-job-document | --no-include-job-document] \
[--execution-number <value>]  \
[--cli-input-json <value>] \
[--step-timeout-in-minutes <value>] \
[--generate-cli-skeleton]
```

 `cli-input-json` 형식:

```
{
"jobId": "string",
"thingName": "string",
"status": "string",
"statusDetails": {
"string": "string"
},
"stepTimeoutInMinutes": number,
"expectedVersion": long,
"includeJobExecutionState": boolean,
"includeJobDocument": boolean,
"executionNumber": long
}
```

자세한 내용은 [https://docs.aws.amazon.com/cli/latest/reference/iot-data/update-job-execution.html](https://docs.aws.amazon.com/cli/latest/reference/iot-data/update-job-execution.html) 단원을 참조하십시오.

------