5.0.0 • Published 5 years ago
@datafire/amazonaws_iotevents v5.0.0
@datafire/amazonaws_iotevents
Client library for AWS IoT Events
Installation and Usage
npm install --save @datafire/amazonaws_iotevents
let amazonaws_iotevents = require('@datafire/amazonaws_iotevents').create({
accessKeyId: "",
secretAccessKey: "",
region: ""
});
.then(data => {
console.log(data);
});
Description
AWS IoT Events monitors your equipment or device fleets for failures or changes in operation, and triggers actions when such events occur. You can use AWS IoT Events API operations to create, read, update, and delete inputs and detector models, and to list their versions.
Actions
ListDetectorModels
amazonaws_iotevents.ListDetectorModels({}, context)
Input
- input
object
- nextToken
string
- maxResults
integer
- nextToken
Output
- output ListDetectorModelsResponse
CreateDetectorModel
amazonaws_iotevents.CreateDetectorModel({
"detectorModelName": "",
"detectorModelDefinition": {},
"roleArn": ""
}, context)
Input
- input
object
- tags
array
: Metadata that can be used to manage the detector model.- items Tag
- detectorModelDefinition required
object
: Information that defines how a detector operates.- initialStateName
- states
- items State
- detectorModelDescription
string
: A brief description of the detector model. - detectorModelName required
string
: The name of the detector model. - evaluationMethod
string
(values: BATCH, SERIAL): Information about the order in which events are evaluated and how actions are executed. - key
string
: The input attribute key used to identify a device or system to create a detector (an instance of the detector model) and then to route each input received to the appropriate detector (instance). This parameter uses a JSON-path expression in the message payload of each input to specify the attribute-value pair that is used to identify the device associated with the input. - roleArn required
string
: The ARN of the role that grants permission to AWS IoT Events to perform its operations.
- tags
Output
- output CreateDetectorModelResponse
DeleteDetectorModel
amazonaws_iotevents.DeleteDetectorModel({
"detectorModelName": ""
}, context)
Input
- input
object
- detectorModelName required
string
- detectorModelName required
Output
Output schema unknown
DescribeDetectorModel
amazonaws_iotevents.DescribeDetectorModel({
"detectorModelName": ""
}, context)
Input
- input
object
- detectorModelName required
string
- version
string
- detectorModelName required
Output
UpdateDetectorModel
amazonaws_iotevents.UpdateDetectorModel({
"detectorModelName": "",
"detectorModelDefinition": {},
"roleArn": ""
}, context)
Input
- input
object
- detectorModelName required
string
- detectorModelDefinition required
object
: Information that defines how a detector operates.- initialStateName
- states
- items State
- detectorModelDescription
string
: A brief description of the detector model. - evaluationMethod
string
(values: BATCH, SERIAL): Information about the order in which events are evaluated and how actions are executed. - roleArn required
string
: The ARN of the role that grants permission to AWS IoT Events to perform its operations.
- detectorModelName required
Output
- output UpdateDetectorModelResponse
ListDetectorModelVersions
amazonaws_iotevents.ListDetectorModelVersions({
"detectorModelName": ""
}, context)
Input
- input
object
- detectorModelName required
string
- nextToken
string
- maxResults
integer
- detectorModelName required
Output
ListInputs
amazonaws_iotevents.ListInputs({}, context)
Input
- input
object
- nextToken
string
- maxResults
integer
- nextToken
Output
- output ListInputsResponse
CreateInput
amazonaws_iotevents.CreateInput({
"inputName": "",
"inputDefinition": {}
}, context)
Input
- input
object
Output
Output schema unknown
DeleteInput
amazonaws_iotevents.DeleteInput({
"inputName": ""
}, context)
Input
- input
object
- inputName required
string
- inputName required
Output
- output DeleteInputResponse
DescribeInput
amazonaws_iotevents.DescribeInput({
"inputName": ""
}, context)
Input
- input
object
- inputName required
string
- inputName required
Output
- output DescribeInputResponse
UpdateInput
amazonaws_iotevents.UpdateInput({
"inputName": "",
"inputDefinition": {}
}, context)
Input
- input
object
- inputName required
string
- inputDefinition required
object
: The definition of the input.- attributes
- items Attribute
- attributes
- inputDescription
string
: A brief description of the input.
- inputName required
Output
- output UpdateInputResponse
DescribeLoggingOptions
amazonaws_iotevents.DescribeLoggingOptions({}, context)
Input
- input
object
Output
PutLoggingOptions
amazonaws_iotevents.PutLoggingOptions({
"loggingOptions": {}
}, context)
Input
- input
object
- loggingOptions required
object
: The values of the AWS IoT Events logging options.- detectorDebugOptions
- items DetectorDebugOption
- enabled
- level
- roleArn
- detectorDebugOptions
- loggingOptions required
Output
Output schema unknown
ListTagsForResource
amazonaws_iotevents.ListTagsForResource({
"resourceArn": ""
}, context)
Input
- input
object
- resourceArn required
string
- resourceArn required
Output
- output ListTagsForResourceResponse
TagResource
amazonaws_iotevents.TagResource({
"resourceArn": "",
"tags": []
}, context)
Input
- input
object
- resourceArn required
string
- tags required
array
: The new or modified tags for the resource.- items Tag
- resourceArn required
Output
- output TagResourceResponse
UntagResource
amazonaws_iotevents.UntagResource({
"resourceArn": "",
"tagKeys": []
}, context)
Input
- input
object
- resourceArn required
string
- tagKeys required
array
- resourceArn required
Output
- output UntagResourceResponse
Definitions
Action
- Action
object
: An action to be performed when the condition is TRUE.- clearTimer
- timerName required
- dynamoDB
- hashKeyField required
- hashKeyType
- hashKeyValue required
- operation
- payload Payload
- payloadField
- rangeKeyField
- rangeKeyType
- rangeKeyValue
- tableName required
- dynamoDBv2
- payload Payload
- tableName required
- firehose
- deliveryStreamName required
- payload
- contentExpression required
- type required
- separator
- iotEvents
- inputName required
- payload
- contentExpression required
- type required
- iotSiteWise
- assetId
- entryId
- propertyAlias
- propertyId
- propertyValue required
- quality
- timestamp
- offsetInNanos
- timeInSeconds required
- value required
- booleanValue
- doubleValue
- integerValue
- stringValue
- iotTopicPublish
- mqttTopic required
- payload
- contentExpression required
- type required
- lambda
- functionArn required
- payload
- contentExpression required
- type required
- resetTimer
- timerName required
- setTimer
- durationExpression
- seconds
- timerName required
- setVariable
- value required
- variableName required
- sns
- payload
- contentExpression required
- type required
- targetArn required
- payload
- sqs
- payload
- contentExpression required
- type required
- queueUrl required
- useBase64
- payload
- clearTimer
Actions
- Actions
array
- items Action
AmazonResourceName
- AmazonResourceName
string
AssetId
- AssetId
string
AssetPropertyAlias
- AssetPropertyAlias
string
AssetPropertyBooleanValue
- AssetPropertyBooleanValue
string
AssetPropertyDoubleValue
- AssetPropertyDoubleValue
string
AssetPropertyEntryId
- AssetPropertyEntryId
string
AssetPropertyId
- AssetPropertyId
string
AssetPropertyIntegerValue
- AssetPropertyIntegerValue
string
AssetPropertyOffsetInNanos
- AssetPropertyOffsetInNanos
string
AssetPropertyQuality
- AssetPropertyQuality
string
AssetPropertyStringValue
- AssetPropertyStringValue
string
AssetPropertyTimeInSeconds
- AssetPropertyTimeInSeconds
string
AssetPropertyTimestamp
- AssetPropertyTimestamp
object
: A structure that contains timestamp information. For more information, see TimeInNanos in the AWS IoT SiteWise API Reference. For parameters that are string data type, you can specify the following options: Use a string. For example, the timeInSeconds value can be '1586400675'. Use an expression. For example, the timeInSeconds value can be '${$input.TemperatureInput.sensorData.timestamp/1000}'. For more information, see Expressions in the AWS IoT Events Developer Guide.- offsetInNanos
- timeInSeconds required
AssetPropertyValue
- AssetPropertyValue
object
: A structure that contains value information. For more information, see AssetPropertyValue in the AWS IoT SiteWise API Reference. For parameters that are string data type, you can specify the following options: Use a string. For example, the quality value can be 'GOOD'. Use an expression. For example, the quality value can be $input.TemperatureInput.sensorData.quality . For more information, see Expressions in the AWS IoT Events Developer Guide.- quality
- timestamp
- offsetInNanos
- timeInSeconds required
- value required
- booleanValue
- doubleValue
- integerValue
- stringValue
AssetPropertyVariant
- AssetPropertyVariant
object
: A structure that contains an asset property value. For more information, see Variant in the AWS IoT SiteWise API Reference. You must specify one of the following value types, depending on the dataType of the specified asset property. For more information, see AssetProperty in the AWS IoT SiteWise API Reference. For parameters that are string data type, you can specify the following options: Use a string. For example, the doubleValue value can be '47.9'. Use an expression. For example, the doubleValue value can be $input.TemperatureInput.sensorData.temperature. For more information, see Expressions in the AWS IoT Events Developer Guide.- booleanValue
- doubleValue
- integerValue
- stringValue
Attribute
- Attribute
object
: The attributes from the JSON payload that are made available by the input. Inputs are derived from messages sent to the AWS IoT Events system using BatchPutMessage. Each such message contains a JSON payload. Those attributes (and their paired values) specified here are available for use in the condition expressions used by detectors.- jsonPath required
AttributeJsonPath
- AttributeJsonPath
string
Attributes
- Attributes
array
- items Attribute
ClearTimerAction
- ClearTimerAction
object
: Information needed to clear the timer.- timerName required
Condition
- Condition
string
ContentExpression
- ContentExpression
string
CreateDetectorModelRequest
- CreateDetectorModelRequest
object
CreateDetectorModelResponse
- CreateDetectorModelResponse
object
- detectorModelConfiguration
- creationTime
- detectorModelArn
- detectorModelDescription
- detectorModelName
- detectorModelVersion
- evaluationMethod
- key
- lastUpdateTime
- roleArn
- status
- detectorModelConfiguration
CreateInputRequest
- CreateInputRequest
object
CreateInputResponse
- CreateInputResponse
object
- inputConfiguration
- creationTime required
- inputArn required
- inputDescription
- inputName required
- lastUpdateTime required
- status required
- inputConfiguration
DeleteDetectorModelRequest
- DeleteDetectorModelRequest
object
DeleteDetectorModelResponse
- DeleteDetectorModelResponse
object
DeleteInputRequest
- DeleteInputRequest
object
DeleteInputResponse
- DeleteInputResponse
object
DeliveryStreamName
- DeliveryStreamName
string
DescribeDetectorModelRequest
- DescribeDetectorModelRequest
object
DescribeDetectorModelResponse
- DescribeDetectorModelResponse
object
- detectorModel
- detectorModelConfiguration
- creationTime
- detectorModelArn
- detectorModelDescription
- detectorModelName
- detectorModelVersion
- evaluationMethod
- key
- lastUpdateTime
- roleArn
- status
- detectorModelDefinition
- initialStateName required
- states required
- items State
- detectorModelConfiguration
- detectorModel
DescribeInputRequest
- DescribeInputRequest
object
DescribeInputResponse
- DescribeInputResponse
object
- input
- inputConfiguration
- creationTime required
- inputArn required
- inputDescription
- inputName required
- lastUpdateTime required
- status required
- inputDefinition
- attributes required
- items Attribute
- attributes required
- inputConfiguration
- input
DescribeLoggingOptionsRequest
- DescribeLoggingOptionsRequest
object
DescribeLoggingOptionsResponse
- DescribeLoggingOptionsResponse
object
- loggingOptions
- detectorDebugOptions
- items DetectorDebugOption
- enabled required
- level required
- roleArn required
- detectorDebugOptions
- loggingOptions
DetectorDebugOption
- DetectorDebugOption
object
: The detector model and the specific detectors (instances) for which the logging level is given.- detectorModelName required
- keyValue
DetectorDebugOptions
- DetectorDebugOptions
array
- items DetectorDebugOption
DetectorModel
- DetectorModel
object
: Information about the detector model.- detectorModelConfiguration
- creationTime
- detectorModelArn
- detectorModelDescription
- detectorModelName
- detectorModelVersion
- evaluationMethod
- key
- lastUpdateTime
- roleArn
- status
- detectorModelDefinition
- initialStateName required
- states required
- items State
- detectorModelConfiguration
DetectorModelArn
- DetectorModelArn
string
DetectorModelConfiguration
- DetectorModelConfiguration
object
: Information about how the detector model is configured.- creationTime
- detectorModelArn
- detectorModelDescription
- detectorModelName
- detectorModelVersion
- evaluationMethod
- key
- lastUpdateTime
- roleArn
- status
DetectorModelDefinition
- DetectorModelDefinition
object
: Information that defines how a detector operates.- initialStateName required
- states required
- items State
DetectorModelDescription
- DetectorModelDescription
string
DetectorModelName
- DetectorModelName
string
DetectorModelSummaries
- DetectorModelSummaries
array
- items DetectorModelSummary
DetectorModelSummary
- DetectorModelSummary
object
: Information about the detector model.- creationTime
- detectorModelDescription
- detectorModelName
DetectorModelVersion
- DetectorModelVersion
string
DetectorModelVersionStatus
- DetectorModelVersionStatus
string
(values: ACTIVE, ACTIVATING, INACTIVE, DEPRECATED, DRAFT, PAUSED, FAILED)
DetectorModelVersionSummaries
- DetectorModelVersionSummaries
array
DetectorModelVersionSummary
- DetectorModelVersionSummary
object
: Information about the detector model version.- creationTime
- detectorModelArn
- detectorModelName
- detectorModelVersion
- evaluationMethod
- lastUpdateTime
- roleArn
- status
DynamoDBAction
- DynamoDBAction
object
: Defines an action to write to the Amazon DynamoDB table that you created. The standard action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload. One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. The tableName and hashKeyField values must match the table name and the partition key of the DynamoDB table. If the DynamoDB table also has a sort key, you must specify rangeKeyField. The rangeKeyField value must match the sort key. The hashKeyValue and rangeKeyValue use substitution templates. These templates provide data at runtime. The syntax is ${sql-expression}. You can use expressions for parameters that are string data type. For more information, see Expressions in the AWS IoT Events Developer Guide. If the defined payload type is a string, DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The payloadField is <payload-field>_raw.- hashKeyField required
- hashKeyType
- hashKeyValue required
- operation
- payload Payload
- payloadField
- rangeKeyField
- rangeKeyType
- rangeKeyValue
- tableName required
DynamoDBv2Action
- DynamoDBv2Action
object
: Defines an action to write to the Amazon DynamoDB table that you created. The default action payload contains all attribute-value pairs that have the information about the detector model instance and the event that triggered the action. You can also customize the payload. A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. The type value for Payload must be JSON. You can use expressions for parameters that are strings. For more information, see Expressions in the AWS IoT Events Developer Guide.- payload Payload
- tableName required
DynamoKeyField
- DynamoKeyField
string
DynamoKeyType
- DynamoKeyType
string
DynamoKeyValue
- DynamoKeyValue
string
DynamoOperation
- DynamoOperation
string
DynamoTableName
- DynamoTableName
string
EvaluationMethod
- EvaluationMethod
string
(values: BATCH, SERIAL)
Event
- Event
object
: Specifies the actions to be performed when the condition evaluates to TRUE.- actions
- items Action
- condition
- eventName required
- actions
EventName
- EventName
string
Events
- Events
array
- items Event
FirehoseAction
- FirehoseAction
object
: Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.- deliveryStreamName required
- payload
- contentExpression required
- type required
- separator
FirehoseSeparator
- FirehoseSeparator
string
Input
- Input
object
: Information about the input.- inputConfiguration
- creationTime required
- inputArn required
- inputDescription
- inputName required
- lastUpdateTime required
- status required
- inputDefinition
- attributes required
- items Attribute
- attributes required
- inputConfiguration
InputArn
- InputArn
string
InputConfiguration
- InputConfiguration
object
: Information about the configuration of an input.- creationTime required
- inputArn required
- inputDescription
- inputName required
- lastUpdateTime required
- status required
InputDefinition
- InputDefinition
object
: The definition of the input.- attributes required
- items Attribute
- attributes required
InputDescription
- InputDescription
string
InputName
- InputName
string
InputStatus
- InputStatus
string
(values: CREATING, UPDATING, ACTIVE, DELETING)
InputSummaries
- InputSummaries
array
- items InputSummary
InputSummary
- InputSummary
object
: Information about the input.- creationTime
- inputArn
- inputDescription
- inputName
- lastUpdateTime
- status
InternalFailureException
InvalidRequestException
IotEventsAction
- IotEventsAction
object
: Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.- inputName required
- payload
- contentExpression required
- type required
IotSiteWiseAction
- IotSiteWiseAction
object
: Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise. You must specify either propertyAlias or both assetId and propertyId to identify the target asset property in AWS IoT SiteWise. For parameters that are string data type, you can specify the following options: Use a string. For example, the propertyAlias value can be '/company/windfarm/3/turbine/7/temperature'. Use an expression. For example, the propertyAlias value can be 'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/${$input.TemperatureInput.sensorData.turbineID}/temperature'. For more information, see Expressions in the AWS IoT Events Developer Guide.- assetId
- entryId
- propertyAlias
- propertyId
- propertyValue required
- quality
- timestamp
- offsetInNanos
- timeInSeconds required
- value required
- booleanValue
- doubleValue
- integerValue
- stringValue
IotTopicPublishAction
- IotTopicPublishAction
object
: Information required to publish the MQTT message through the AWS IoT message broker.- mqttTopic required
- payload
- contentExpression required
- type required
KeyValue
- KeyValue
string
LambdaAction
- LambdaAction
object
: Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.- functionArn required
- payload
- contentExpression required
- type required
LimitExceededException
ListDetectorModelVersionsRequest
- ListDetectorModelVersionsRequest
object
ListDetectorModelVersionsResponse
- ListDetectorModelVersionsResponse
object
- detectorModelVersionSummaries
- nextToken
ListDetectorModelsRequest
- ListDetectorModelsRequest
object
ListDetectorModelsResponse
- ListDetectorModelsResponse
object
- detectorModelSummaries
- items DetectorModelSummary
- nextToken
- detectorModelSummaries
ListInputsRequest
- ListInputsRequest
object
ListInputsResponse
- ListInputsResponse
object
- inputSummaries
- items InputSummary
- nextToken
- inputSummaries
ListTagsForResourceRequest
- ListTagsForResourceRequest
object
ListTagsForResourceResponse
- ListTagsForResourceResponse
object
- tags
- items Tag
- tags
LoggingEnabled
- LoggingEnabled
boolean
LoggingLevel
- LoggingLevel
string
(values: ERROR, INFO, DEBUG)
LoggingOptions
- LoggingOptions
object
: The values of the AWS IoT Events logging options.- detectorDebugOptions
- items DetectorDebugOption
- enabled required
- level required
- roleArn required
- detectorDebugOptions
MQTTTopic
- MQTTTopic
string
MaxResults
- MaxResults
integer
NextToken
- NextToken
string
OnEnterLifecycle
- OnEnterLifecycle
object
: When entering this state, perform these actions if the condition is TRUE.- events
- items Event
- events
OnExitLifecycle
- OnExitLifecycle
object
: When exiting this state, perform these actions if the specified condition is TRUE.- events
- items Event
- events
OnInputLifecycle
- OnInputLifecycle
object
: Specifies the actions performed when the condition evaluates to TRUE.- events
- items Event
- transitionEvents
- items TransitionEvent
- events
Payload
- Payload
object
: Information needed to configure the payload. By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use contentExpression.- contentExpression required
- type required
PayloadType
- PayloadType
string
(values: STRING, JSON)
PutLoggingOptionsRequest
- PutLoggingOptionsRequest
object
- loggingOptions required
- detectorDebugOptions
- items DetectorDebugOption
- enabled required
- level required
- roleArn required
- detectorDebugOptions
- loggingOptions required
QueueUrl
- QueueUrl
string
ResetTimerAction
- ResetTimerAction
object
: Information required to reset the timer. The timer is reset to the previously evaluated result of the duration. The duration expression isn't reevaluated when you reset the timer.- timerName required
ResourceAlreadyExistsException
ResourceInUseException
ResourceNotFoundException
SNSTopicPublishAction
- SNSTopicPublishAction
object
: Information required to publish the Amazon SNS message.- payload
- contentExpression required
- type required
- targetArn required
- payload
Seconds
- Seconds
integer
ServiceUnavailableException
SetTimerAction
- SetTimerAction
object
: Information needed to set the timer.- durationExpression
- seconds
- timerName required
SetVariableAction
- SetVariableAction
object
: Information about the variable and its new value.- value required
- variableName required
SqsAction
- SqsAction
object
: Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.- payload
- contentExpression required
- type required
- queueUrl required
- useBase64
- payload
State
- State
object
: Information that defines a state of a detector.- onEnter
- events
- items Event
- events
- onExit
- events
- items Event
- events
- onInput
- events
- items Event
- transitionEvents
- items TransitionEvent
- events
- stateName required
- onEnter
StateName
- StateName
string
States
- States
array
- items State
Tag
- Tag
object
: Metadata that can be used to manage the resource.- key required
- value required
TagKey
- TagKey
string
TagKeys
- TagKeys
array
- items TagKey
TagResourceRequest
- TagResourceRequest
object
- tags required
- items Tag
- tags required
TagResourceResponse
- TagResourceResponse
object
TagValue
- TagValue
string
Tags
- Tags
array
- items Tag
ThrottlingException
TimerName
- TimerName
string
Timestamp
- Timestamp
string
TransitionEvent
- TransitionEvent
object
: Specifies the actions performed and the next state entered when a condition evaluates to TRUE.- actions
- items Action
- condition required
- eventName required
- nextState required
- actions
TransitionEvents
- TransitionEvents
array
- items TransitionEvent
UnsupportedOperationException
UntagResourceRequest
- UntagResourceRequest
object
UntagResourceResponse
- UntagResourceResponse
object
UpdateDetectorModelRequest
- UpdateDetectorModelRequest
object
- detectorModelDefinition required
- initialStateName required
- states required
- items State
- detectorModelDescription
- evaluationMethod
- roleArn required
- detectorModelDefinition required
UpdateDetectorModelResponse
- UpdateDetectorModelResponse
object
- detectorModelConfiguration
- creationTime
- detectorModelArn
- detectorModelDescription
- detectorModelName
- detectorModelVersion
- evaluationMethod
- key
- lastUpdateTime
- roleArn
- status
- detectorModelConfiguration
UpdateInputRequest
- UpdateInputRequest
object
- inputDefinition required
- attributes required
- items Attribute
- attributes required
- inputDescription
- inputDefinition required
UpdateInputResponse
- UpdateInputResponse
object
- inputConfiguration
- creationTime required
- inputArn required
- inputDescription
- inputName required
- lastUpdateTime required
- status required
- inputConfiguration
UseBase64
- UseBase64
boolean
VariableName
- VariableName
string
VariableValue
- VariableValue
string
5.0.0
5 years ago