AWS IoT Events Data 2018-10-23
- Client: Aws\IoTEventsData\IoTEventsDataClient
- Service ID: iotevents-data
- Version: 2018-10-23
This page describes the parameters and results for the operations of the AWS IoT Events Data (2018-10-23), and shows how to use the Aws\IoTEventsData\IoTEventsDataClient object to call the described operations. This documentation is specific to the 2018-10-23 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- BatchPutMessage ( array $params = [] )
Sends a set of messages to the AWS IoT Events system.
- BatchUpdateDetector ( array $params = [] )
Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.
- DescribeDetector ( array $params = [] )
Returns information about the specified detector (instance).
- ListDetectors ( array $params = [] )
Lists detectors (the instances of a detector model).
Operations
BatchPutMessage
$result = $client->batchPutMessage
([/* ... */]); $promise = $client->batchPutMessageAsync
([/* ... */]);
Sends a set of messages to the AWS IoT Events system. Each message payload is transformed into the input you specify ("inputName"
) and ingested into any detectors that monitor that input. If multiple messages are sent, the order in which the messages are processed isn't guaranteed. To guarantee ordering, you must send messages one at a time and wait for a successful response.
Parameter Syntax
$result = $client->batchPutMessage([ 'messages' => [ // REQUIRED [ 'inputName' => '<string>', // REQUIRED 'messageId' => '<string>', // REQUIRED 'payload' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED ], // ... ], ]);
Parameter Details
Members
- messages
-
- Required: Yes
- Type: Array of Message structures
The list of messages to send. Each message has the following format:
'{ "messageId": "string", "inputName": "string", "payload": "string"}'
Result Syntax
[ 'BatchPutMessageErrorEntries' => [ [ 'errorCode' => 'ResourceNotFoundException|InvalidRequestException|InternalFailureException|ServiceUnavailableException|ThrottlingException', 'errorMessage' => '<string>', 'messageId' => '<string>', ], // ... ], ]
Result Details
Members
- BatchPutMessageErrorEntries
-
- Type: Array of BatchPutMessageErrorEntry structures
A list of any errors encountered when sending the messages.
Errors
-
The request was invalid.
-
An internal failure occured.
-
The service is currently unavailable.
-
The request could not be completed due to throttling.
BatchUpdateDetector
$result = $client->batchUpdateDetector
([/* ... */]); $promise = $client->batchUpdateDetectorAsync
([/* ... */]);
Updates the state, variable values, and timer settings of one or more detectors (instances) of a specified detector model.
Parameter Syntax
$result = $client->batchUpdateDetector([ 'detectors' => [ // REQUIRED [ 'detectorModelName' => '<string>', // REQUIRED 'keyValue' => '<string>', 'messageId' => '<string>', // REQUIRED 'state' => [ // REQUIRED 'stateName' => '<string>', // REQUIRED 'timers' => [ // REQUIRED [ 'name' => '<string>', // REQUIRED 'seconds' => <integer>, // REQUIRED ], // ... ], 'variables' => [ // REQUIRED [ 'name' => '<string>', // REQUIRED 'value' => '<string>', // REQUIRED ], // ... ], ], ], // ... ], ]);
Parameter Details
Members
- detectors
-
- Required: Yes
- Type: Array of UpdateDetectorRequest structures
The list of detectors (instances) to update, along with the values to update.
Result Syntax
[ 'batchUpdateDetectorErrorEntries' => [ [ 'errorCode' => 'ResourceNotFoundException|InvalidRequestException|InternalFailureException|ServiceUnavailableException|ThrottlingException', 'errorMessage' => '<string>', 'messageId' => '<string>', ], // ... ], ]
Result Details
Members
- batchUpdateDetectorErrorEntries
-
- Type: Array of BatchUpdateDetectorErrorEntry structures
A list of those detector updates that resulted in errors. (If an error is listed here, the specific update did not occur.)
Errors
-
The request was invalid.
-
An internal failure occured.
-
The service is currently unavailable.
-
The request could not be completed due to throttling.
DescribeDetector
$result = $client->describeDetector
([/* ... */]); $promise = $client->describeDetectorAsync
([/* ... */]);
Returns information about the specified detector (instance).
Parameter Syntax
$result = $client->describeDetector([ 'detectorModelName' => '<string>', // REQUIRED 'keyValue' => '<string>', ]);
Parameter Details
Members
Result Syntax
[ 'detector' => [ 'creationTime' => <DateTime>, 'detectorModelName' => '<string>', 'detectorModelVersion' => '<string>', 'keyValue' => '<string>', 'lastUpdateTime' => <DateTime>, 'state' => [ 'stateName' => '<string>', 'timers' => [ [ 'name' => '<string>', 'timestamp' => <DateTime>, ], // ... ], 'variables' => [ [ 'name' => '<string>', 'value' => '<string>', ], // ... ], ], ], ]
Result Details
Members
- detector
-
- Type: Detector structure
Information about the detector (instance).
Errors
-
The request was invalid.
-
The resource was not found.
-
The request could not be completed due to throttling.
-
An internal failure occured.
-
The service is currently unavailable.
ListDetectors
$result = $client->listDetectors
([/* ... */]); $promise = $client->listDetectorsAsync
([/* ... */]);
Lists detectors (the instances of a detector model).
Parameter Syntax
$result = $client->listDetectors([ 'detectorModelName' => '<string>', // REQUIRED 'maxResults' => <integer>, 'nextToken' => '<string>', 'stateName' => '<string>', ]);
Parameter Details
Members
- detectorModelName
-
- Required: Yes
- Type: string
The name of the detector model whose detectors (instances) are listed.
- maxResults
-
- Type: int
The maximum number of results to return at one time.
- nextToken
-
- Type: string
The token for the next set of results.
- stateName
-
- Type: string
A filter that limits results to those detectors (instances) in the given state.
Result Syntax
[ 'detectorSummaries' => [ [ 'creationTime' => <DateTime>, 'detectorModelName' => '<string>', 'detectorModelVersion' => '<string>', 'keyValue' => '<string>', 'lastUpdateTime' => <DateTime>, 'state' => [ 'stateName' => '<string>', ], ], // ... ], 'nextToken' => '<string>', ]
Result Details
Members
- detectorSummaries
-
- Type: Array of DetectorSummary structures
A list of summary information about the detectors (instances).
- nextToken
-
- Type: string
A token to retrieve the next set of results, or
null
if there are no additional results.
Errors
-
The request was invalid.
-
The resource was not found.
-
The request could not be completed due to throttling.
-
An internal failure occured.
-
The service is currently unavailable.
Shapes
BatchPutMessageErrorEntry
Description
Contains information about the errors encountered.
Members
BatchUpdateDetectorErrorEntry
Description
Information about the error that occured when attempting to update a detector.
Members
Detector
Description
Information about the detector (instance).
Members
- creationTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the detector (instance) was created.
- detectorModelName
-
- Type: string
The name of the detector model that created this detector (instance).
- detectorModelVersion
-
- Type: string
The version of the detector model that created this detector (instance).
- keyValue
-
- Type: string
The value of the key (identifying the device or system) that caused the creation of this detector (instance).
- lastUpdateTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the detector (instance) was last updated.
- state
-
- Type: DetectorState structure
The current state of the detector (instance).
DetectorState
Description
Information about the current state of the detector instance.
Members
DetectorStateDefinition
Description
The new state, variable values, and timer settings of the detector (instance).
Members
- stateName
-
- Required: Yes
- Type: string
The name of the new state of the detector (instance).
- timers
-
- Required: Yes
- Type: Array of TimerDefinition structures
The new values of the detector's timers. Any timer whose value isn't specified is cleared, and its timeout event won't occur.
- variables
-
- Required: Yes
- Type: Array of VariableDefinition structures
The new values of the detector's variables. Any variable whose value isn't specified is cleared.
DetectorStateSummary
Description
Information about the detector state.
Members
DetectorSummary
Description
Information about the detector (instance).
Members
- creationTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the detector (instance) was created.
- detectorModelName
-
- Type: string
The name of the detector model that created this detector (instance).
- detectorModelVersion
-
- Type: string
The version of the detector model that created this detector (instance).
- keyValue
-
- Type: string
The value of the key (identifying the device or system) that caused the creation of this detector (instance).
- lastUpdateTime
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time the detector (instance) was last updated.
- state
-
- Type: DetectorStateSummary structure
The current state of the detector (instance).
InternalFailureException
Description
An internal failure occured.
Members
InvalidRequestException
Message
Description
Information about a message.
Members
- inputName
-
- Required: Yes
- Type: string
The name of the input into which the message payload is transformed.
- messageId
-
- Required: Yes
- Type: string
The ID to assign to the message. Within each batch sent, each
"messageId"
must be unique. - payload
-
- Required: Yes
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
The payload of the message. This can be a JSON string or a Base-64-encoded string representing binary data (in which case you must decode it).
ResourceNotFoundException
ServiceUnavailableException
Description
The service is currently unavailable.
Members
ThrottlingException
Description
The request could not be completed due to throttling.
Members
Timer
Description
The current state of a timer.
Members
TimerDefinition
Description
The new setting of a timer.
Members
UpdateDetectorRequest
Description
Information used to update the detector (instance).
Members
- detectorModelName
-
- Required: Yes
- Type: string
The name of the detector model that created the detectors (instances).
- keyValue
-
- Type: string
The value of the input key attribute (identifying the device or system) that caused the creation of this detector (instance).
- messageId
-
- Required: Yes
- Type: string
The ID to assign to the detector update
"message"
. Each"messageId"
must be unique within each batch sent. - state
-
- Required: Yes
- Type: DetectorStateDefinition structure
The new state, variable values, and timer settings of the detector (instance).
Variable
Description
The current state of the variable.