[ 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 | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <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 | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those 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. This may not be specified along with --cli-input-yaml.

--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. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

--cli-auto-prompt (boolean) Automatically prompt for CLI input parameters.

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