Table Of Contents

Feedback

User Guide

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

[ aws . iot ]

update-job

Description

Updates supported fields of the specified job.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  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 <value>]

Options

--job-id (string)

The ID of the job to be updated.

--description (string)

A short text description of the job.

--presigned-url-config (structure)

Configuration information for pre-signed S3 URLs.

Shorthand Syntax:

roleArn=string,expiresInSec=long

JSON Syntax:

{
  "roleArn": "string",
  "expiresInSec": long
}

--job-executions-rollout-config (structure)

Allows you to create a staged rollout of the job.

Shorthand Syntax:

maximumPerMinute=integer,exponentialRate={baseRatePerMinute=integer,incrementFactor=double,rateIncreaseCriteria={numberOfNotifiedThings=integer,numberOfSucceededThings=integer}}

JSON Syntax:

{
  "maximumPerMinute": integer,
  "exponentialRate": {
    "baseRatePerMinute": integer,
    "incrementFactor": double,
    "rateIncreaseCriteria": {
      "numberOfNotifiedThings": integer,
      "numberOfSucceededThings": integer
    }
  }
}

--abort-config (structure)

Allows you to create criteria to abort a job.

Shorthand Syntax:

criteriaList=[{failureType=string,action=string,thresholdPercentage=double,minNumberOfExecutedThings=integer},{failureType=string,action=string,thresholdPercentage=double,minNumberOfExecutedThings=integer}]

JSON Syntax:

{
  "criteriaList": [
    {
      "failureType": "FAILED"|"REJECTED"|"TIMED_OUT"|"ALL",
      "action": "CANCEL",
      "thresholdPercentage": double,
      "minNumberOfExecutedThings": integer
    }
    ...
  ]
}

--timeout-config (structure)

Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to IN_PROGRESS . If the job execution status is not set to another terminal state before the time expires, it will be automatically set to TIMED_OUT .

Shorthand Syntax:

inProgressTimeoutInMinutes=long

JSON Syntax:

{
  "inProgressTimeoutInMinutes": long
}

--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 get detailed status for a job

The following update-job example gets detailed status for the job whose ID is example-job-01.

aws iot describe-job \
    --job-id "example-job-01"

Output:

{
    "job": {
        "jobArn": "arn:aws:iot:us-west-2:123456789012:job/example-job-01",
        "jobId": "example-job-01",
        "targetSelection": "SNAPSHOT",
        "status": "IN_PROGRESS",
        "targets": [
            "arn:aws:iot:us-west-2:123456789012:thing/MyRaspberryPi"
        ],
        "description": "example job test",
        "presignedUrlConfig": {},
        "jobExecutionsRolloutConfig": {},
        "createdAt": 1560787022.733,
        "lastUpdatedAt": 1560787026.294,
        "jobProcessDetails": {
            "numberOfCanceledThings": 0,
            "numberOfSucceededThings": 0,
            "numberOfFailedThings": 0,
            "numberOfRejectedThings": 0,
            "numberOfQueuedThings": 1,
            "numberOfInProgressThings": 0,
            "numberOfRemovedThings": 0,
            "numberOfTimedOutThings": 0
        },
        "timeoutConfig": {}
    }
}

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

Output

None