Menu
AWS IoT
Developer Guide

CancelJob

CancelJob

Cancels a job.

https

Request syntax:

PUT /jobs/jobId/cancel Content-type: application/json { "comment": "string" }

URI Request Parameters:

Name

Type

Req?

Description

jobId

JobId

yes

The unique identifier you assigned to this job when it was created.

Request Body Parameters:

Name

Type

Req?

Description

comment

Comment

no

An optional comment string describing why the job was canceled.

Response syntax:

Content-type: application/json { "jobArn": "string", "jobId": "string", "description": "string" }

Response Body Parameters:

Name

Type

Req?

Description

jobArn

JobArn

no

The job ARN.

jobId

JobId

no

The unique identifier you assigned to this job when it was created.

description

JobDescription

no

A short text description of the job.

Errors:

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ResourceNotFoundException

The specified resource does not exist.

HTTP response code: 404

ThrottlingException

The rate exceeds the limit.

HTTP response code: 429

ServiceUnavailableException

The service is temporarily unavailable.

HTTP response code: 503

cli

Synopsis:

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

cli-input-json format:

{ "jobId": "string", "comment": "string" }

cli-input-json fields:

Name

Type

Description

jobId

string

length- max:64 min:1

pattern: [a-zA-Z0-9_-]+

The unique identifier you assigned to this job when it was created.

comment

string

length- max:2028

pattern: [^\\p{C}]+

An optional comment string describing why the job was canceled.

Output:

{ "jobArn": "string", "jobId": "string", "description": "string" }

cli output fields:

Name

Type

Description

jobArn

string

The job ARN.

jobId

string

length- max:64 min:1

pattern: [a-zA-Z0-9_-]+

The unique identifier you assigned to this job when it was created.

description

string

length- max:2028

pattern: [^\\p{C}]+

A short text description of the job.

Errors:

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

ResourceNotFoundException

The specified resource does not exist.

ThrottlingException

The rate exceeds the limit.

ServiceUnavailableException

The service is temporarily unavailable.