Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . iot ]

delete-job-execution

Description

Deletes a job execution.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

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

Options

--job-id (string)

The ID of the job whose execution on a particular device will be deleted.

--thing-name (string)

The name of the thing whose job execution will be deleted.

--execution-number (long)

The ID of the job execution to be deleted. The executionNumber refers to the execution of a particular job on a particular device.

Note that once a job execution is deleted, the executionNumber may be reused by IoT, so be sure you get and use the correct value here.

--force | --no-force (boolean)

(Optional) When true, you can delete a job execution which is "IN_PROGRESS". Otherwise, you can only delete a job execution which is in a terminal state ("SUCCEEDED", "FAILED", "REJECTED", "REMOVED" or "CANCELED") or an exception will occur. The default is false.

Note

Deleting a job execution which is "IN_PROGRESS", will cause the device to be unable to access job information or update the job execution status. Use caution and ensure that the device is able to recover to a valid state.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To delete a job execution

The following delete-job-execution example deletes the job execution of the specified job on a device. Use describe-job-execution to get the execution number.

aws iot delete-job-execution
    --job-id "example-job-02"
    --thing-name "MyRaspberryPi"
    --execution-number 1

This command produces no output.

For more information, see Creating and Managing Jobs (CLI) in the AWS IoT Developer Guide.

Output

None