5.0.0 • Published 5 years ago

@datafire/amazonaws_iotevents v5.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@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

Output

CreateDetectorModel

amazonaws_iotevents.CreateDetectorModel({
  "detectorModelName": "",
  "detectorModelDefinition": {},
  "roleArn": ""
}, context)

Input

  • input object
    • tags array: Metadata that can be used to manage the detector model.
    • detectorModelDefinition required object: Information that defines how a detector operates.
      • initialStateName
      • states
    • 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.

Output

DeleteDetectorModel

amazonaws_iotevents.DeleteDetectorModel({
  "detectorModelName": ""
}, context)

Input

  • input object
    • detectorModelName required string

Output

Output schema unknown

DescribeDetectorModel

amazonaws_iotevents.DescribeDetectorModel({
  "detectorModelName": ""
}, context)

Input

  • input object
    • detectorModelName required string
    • version string

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
    • 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.

Output

ListDetectorModelVersions

amazonaws_iotevents.ListDetectorModelVersions({
  "detectorModelName": ""
}, context)

Input

  • input object
    • detectorModelName required string
    • nextToken string
    • maxResults integer

Output

ListInputs

amazonaws_iotevents.ListInputs({}, context)

Input

  • input object
    • nextToken string
    • maxResults integer

Output

CreateInput

amazonaws_iotevents.CreateInput({
  "inputName": "",
  "inputDefinition": {}
}, context)

Input

  • input object
    • tags array: Metadata that can be used to manage the input.
    • inputDefinition required object: The definition of the input.
    • inputDescription string: A brief description of the input.
    • inputName required string: The name you want to give to the input.

Output

Output schema unknown

DeleteInput

amazonaws_iotevents.DeleteInput({
  "inputName": ""
}, context)

Input

  • input object
    • inputName required string

Output

DescribeInput

amazonaws_iotevents.DescribeInput({
  "inputName": ""
}, context)

Input

  • input object
    • inputName required string

Output

UpdateInput

amazonaws_iotevents.UpdateInput({
  "inputName": "",
  "inputDefinition": {}
}, context)

Input

  • input object
    • inputName required string
    • inputDefinition required object: The definition of the input.
    • inputDescription string: A brief description of the input.

Output

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.

Output

Output schema unknown

ListTagsForResource

amazonaws_iotevents.ListTagsForResource({
  "resourceArn": ""
}, context)

Input

  • input object
    • resourceArn required string

Output

TagResource

amazonaws_iotevents.TagResource({
  "resourceArn": "",
  "tags": []
}, context)

Input

  • input object
    • resourceArn required string
    • tags required array: The new or modified tags for the resource.

Output

UntagResource

amazonaws_iotevents.UntagResource({
  "resourceArn": "",
  "tagKeys": []
}, context)

Input

  • input object
    • resourceArn required string
    • tagKeys required array

Output

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
    • 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
    • sqs
      • payload
        • contentExpression required
        • type required
      • queueUrl required
      • useBase64

Actions

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

ClearTimerAction

  • ClearTimerAction object: Information needed to clear the timer.
    • timerName required

Condition

  • Condition string

ContentExpression

  • ContentExpression string

CreateDetectorModelRequest

  • CreateDetectorModelRequest object
    • tags
    • detectorModelDefinition required
      • initialStateName required
      • states required
    • detectorModelDescription
    • detectorModelName required
    • evaluationMethod
    • key
    • roleArn required

CreateDetectorModelResponse

  • CreateDetectorModelResponse object
    • detectorModelConfiguration
      • creationTime
      • detectorModelArn
      • detectorModelDescription
      • detectorModelName
      • detectorModelVersion
      • evaluationMethod
      • key
      • lastUpdateTime
      • roleArn
      • status

CreateInputRequest

  • CreateInputRequest object
    • tags
    • inputDefinition required
    • inputDescription
    • inputName required

CreateInputResponse

  • CreateInputResponse object
    • inputConfiguration
      • creationTime required
      • inputArn required
      • inputDescription
      • inputName required
      • lastUpdateTime required
      • status required

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

DescribeInputRequest

  • DescribeInputRequest object

DescribeInputResponse

  • DescribeInputResponse object
    • input
      • inputConfiguration
        • creationTime required
        • inputArn required
        • inputDescription
        • inputName required
        • lastUpdateTime required
        • status required
      • inputDefinition

DescribeLoggingOptionsRequest

  • DescribeLoggingOptionsRequest object

DescribeLoggingOptionsResponse

  • DescribeLoggingOptionsResponse object
    • loggingOptions

DetectorDebugOption

  • DetectorDebugOption object: The detector model and the specific detectors (instances) for which the logging level is given.
    • detectorModelName required
    • keyValue

DetectorDebugOptions

DetectorModel

  • DetectorModel object: Information about the detector model.
    • detectorModelConfiguration
      • creationTime
      • detectorModelArn
      • detectorModelDescription
      • detectorModelName
      • detectorModelVersion
      • evaluationMethod
      • key
      • lastUpdateTime
      • roleArn
      • status
    • detectorModelDefinition
      • initialStateName required
      • states required

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

DetectorModelDescription

  • DetectorModelDescription string

DetectorModelName

  • DetectorModelName string

DetectorModelSummaries

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

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.

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
    • condition
    • eventName required

EventName

  • EventName string

Events

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

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.

InputDescription

  • InputDescription string

InputName

  • InputName string

InputStatus

  • InputStatus string (values: CREATING, UPDATING, ACTIVE, DELETING)

InputSummaries

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

ListDetectorModelsRequest

  • ListDetectorModelsRequest object

ListDetectorModelsResponse

ListInputsRequest

  • ListInputsRequest object

ListInputsResponse

  • ListInputsResponse object

ListTagsForResourceRequest

  • ListTagsForResourceRequest object

ListTagsForResourceResponse

  • ListTagsForResourceResponse object

LoggingEnabled

  • LoggingEnabled boolean

LoggingLevel

  • LoggingLevel string (values: ERROR, INFO, DEBUG)

LoggingOptions

  • LoggingOptions object: The values of the AWS IoT Events logging options.

MQTTTopic

  • MQTTTopic string

MaxResults

  • MaxResults integer

NextToken

  • NextToken string

OnEnterLifecycle

  • OnEnterLifecycle object: When entering this state, perform these actions if the condition is TRUE.

OnExitLifecycle

  • OnExitLifecycle object: When exiting this state, perform these actions if the specified condition is TRUE.

OnInputLifecycle

  • OnInputLifecycle object: Specifies the actions performed when the condition evaluates to TRUE.

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

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

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

State

  • State object: Information that defines a state of a detector.

StateName

  • StateName string

States

Tag

  • Tag object: Metadata that can be used to manage the resource.
    • key required
    • value required

TagKey

  • TagKey string

TagKeys

TagResourceRequest

  • TagResourceRequest object
    • tags required

TagResourceResponse

  • TagResourceResponse object

TagValue

  • TagValue string

Tags

  • Tags array

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
    • condition required
    • eventName required
    • nextState required

TransitionEvents

UnsupportedOperationException

UntagResourceRequest

  • UntagResourceRequest object

UntagResourceResponse

  • UntagResourceResponse object

UpdateDetectorModelRequest

  • UpdateDetectorModelRequest object
    • detectorModelDefinition required
      • initialStateName required
      • states required
    • detectorModelDescription
    • evaluationMethod
    • roleArn required

UpdateDetectorModelResponse

  • UpdateDetectorModelResponse object
    • detectorModelConfiguration
      • creationTime
      • detectorModelArn
      • detectorModelDescription
      • detectorModelName
      • detectorModelVersion
      • evaluationMethod
      • key
      • lastUpdateTime
      • roleArn
      • status

UpdateInputRequest

  • UpdateInputRequest object
    • inputDefinition required
    • inputDescription

UpdateInputResponse

  • UpdateInputResponse object
    • inputConfiguration
      • creationTime required
      • inputArn required
      • inputDescription
      • inputName required
      • lastUpdateTime required
      • status required

UseBase64

  • UseBase64 boolean

VariableName

  • VariableName string

VariableValue

  • VariableValue string