AWS IoT Jobs Data Plane

2024/11/22 - AWS IoT Jobs Data Plane - 1 new api methods

Changes  General Availability (GA) release of AWS IoT Device Management - Commands, to trigger light-weight remote actions on targeted devices

StartCommandExecution (new) Link ΒΆ

Using the command created with the CreateCommand API, start a command execution on a specific device.

See also: AWS API Documentation

Request Syntax

client.start_command_execution(
    targetArn='string',
    commandArn='string',
    parameters={
        'string': {
            'S': 'string',
            'B': True|False,
            'I': 123,
            'L': 123,
            'D': 123.0,
            'BIN': b'bytes',
            'UL': 'string'
        }
    },
    executionTimeoutSeconds=123,
    clientToken='string'
)
type targetArn:

string

param targetArn:

[REQUIRED]

The Amazon Resource Number (ARN) of the device where the command execution is occurring.

type commandArn:

string

param commandArn:

[REQUIRED]

The Amazon Resource Number (ARN) of the command. For example, arn:aws:iot:<region>:<accountid>:command/<commandName>

type parameters:

dict

param parameters:

A list of parameters that are required by the StartCommandExecution API when performing the command on a device.

  • (string) --

    • (dict) --

      The list of values used to describe a specific command parameter.

      • S (string) --

        An attribute of type String. For example:

        "S": "Hello"

      • B (boolean) --

        An attribute of type Boolean. For example:

        "BOOL": true

      • I (integer) --

        An attribute of type Integer (Thirty-Two Bits).

      • L (integer) --

        An attribute of type Long.

      • D (float) --

        An attribute of type Double (Sixty-Four Bits).

      • BIN (bytes) --

        An attribute of type Binary.

      • UL (string) --

        An attribute of type Unsigned Long.

type executionTimeoutSeconds:

integer

param executionTimeoutSeconds:

Specifies the amount of time in second the device has to finish the command execution. A timer is started as soon as the command execution is created. If the command execution status is not set to another terminal state before the timer expires, it will automatically update to TIMED_OUT.

type clientToken:

string

param clientToken:

The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you retry the request using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, Amazon Web Services SDKs will automatically generate a unique client request.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'executionId': 'string'
}

Response Structure

  • (dict) --

    • executionId (string) --

      A unique identifier for the command execution.