batch_update_detector

IoTEventsData.Client.batch_update_detector(**kwargs)

Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.

See also: AWS API Documentation

Request Syntax

response = client.batch_update_detector(
    detectors=[
        {
            'messageId': 'string',
            'detectorModelName': 'string',
            'keyValue': 'string',
            'state': {
                'stateName': 'string',
                'variables': [
                    {
                        'name': 'string',
                        'value': 'string'
                    },
                ],
                'timers': [
                    {
                        'name': 'string',
                        'seconds': 123
                    },
                ]
            }
        },
    ]
)
Parameters
detectors (list) --

[REQUIRED]

The list of detectors (instances) to update, along with the values to update.

  • (dict) --

    Information used to update the detector (instance).

    • messageId (string) -- [REQUIRED]

      The ID to assign to the detector update "message" . Each "messageId" must be unique within each batch sent.

    • detectorModelName (string) -- [REQUIRED]

      The name of the detector model that created the detectors (instances).

    • keyValue (string) --

      The value of the input key attribute (identifying the device or system) that caused the creation of this detector (instance).

    • state (dict) -- [REQUIRED]

      The new state, variable values, and timer settings of the detector (instance).

      • stateName (string) -- [REQUIRED]

        The name of the new state of the detector (instance).

      • variables (list) -- [REQUIRED]

        The new values of the detector's variables. Any variable whose value isn't specified is cleared.

        • (dict) --

          The new value of the variable.

          • name (string) -- [REQUIRED]

            The name of the variable.

          • value (string) -- [REQUIRED]

            The new value of the variable.

      • timers (list) -- [REQUIRED]

        The new values of the detector's timers. Any timer whose value isn't specified is cleared, and its timeout event won't occur.

        • (dict) --

          The new setting of a timer.

          • name (string) -- [REQUIRED]

            The name of the timer.

          • seconds (integer) -- [REQUIRED]

            The new setting of the timer (the number of seconds before the timer elapses).

Return type
dict
Returns
Response Syntax
{
    'batchUpdateDetectorErrorEntries': [
        {
            'messageId': 'string',
            'errorCode': 'ResourceNotFoundException'|'InvalidRequestException'|'InternalFailureException'|'ServiceUnavailableException'|'ThrottlingException',
            'errorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • batchUpdateDetectorErrorEntries (list) --

      A list of those detector updates that resulted in errors. (If an error is listed here, the specific update did not occur.)

      • (dict) --

        Information about the error that occurred when attempting to update a detector.

        • messageId (string) --

          The "messageId" of the update request that caused the error. (The value of the "messageId" in the update request "Detector" object.)

        • errorCode (string) --

          The error code.

        • errorMessage (string) --

          A message that describes the error.

Exceptions

  • IoTEventsData.Client.exceptions.InvalidRequestException
  • IoTEventsData.Client.exceptions.InternalFailureException
  • IoTEventsData.Client.exceptions.ServiceUnavailableException
  • IoTEventsData.Client.exceptions.ThrottlingException