Skip to content

iectl iem job batch-create-device

Execute commands on device

Synopsis

This method executes commands(e.g. systemReboot, systemShutdown) on devices in IEM. Using this API, user can trigger operation on multiple devices and can schedule a future time to trigger an operation. If user does not provide a "schedule time", he can provide time interval using "delaytime" so that operation on devices will trigger with that interval.

iectl iem job batch-create-device [flags]

Options

      --body string   The DeviceInputJob object.
                      - **operation**   **required*: operation to be performed on given device, Allowed values are systemReboot, systemShutdown
                      - **metadata**:   Any extra infornmation required by device to execute given operation.
                      - **schedule**:   Epoch time (number of seconds that have elapsed since the Unix epoch, excluding leap seconds. The Unix epoch is 00:00:00 UTC on 1 January 1970.) at which operation to be schedule. e.g for date Thursday, June 23, 2022 10:19:00 AM, Epoch time is 1655979540
                      - **delayTime**:  optional value ranging between 1-60 in minutes which represents delay interval between jobs of a batch
                      - **devices**     **required*: List of device Ids on which operation to be performed.
  -d, --data string   use this flag for passing data via json or as datafile with @filename
  -h, --help          help for batch-create-device

Options inherited from parent commands

  -o, --output string   output format
  -q, --query string    query on result of object
  -v, --verbose         verbose output

Example

iectl iem job batch-create-device --body '{"operation":"systemReboot","metadata":"","schedule":"","devices":["69a5ba48b8a847748e040d498e7420e1"]}'

SEE ALSO