awsiotevents

package
v1.146.0-devpreview Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CfnDetectorModel_CFN_RESOURCE_TYPE_NAME

func CfnDetectorModel_CFN_RESOURCE_TYPE_NAME() *string

func CfnDetectorModel_IsCfnElement

func CfnDetectorModel_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnDetectorModel_IsCfnResource

func CfnDetectorModel_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnDetectorModel_IsConstruct

func CfnDetectorModel_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func CfnInput_CFN_RESOURCE_TYPE_NAME

func CfnInput_CFN_RESOURCE_TYPE_NAME() *string

func CfnInput_IsCfnElement

func CfnInput_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element. Experimental.

func CfnInput_IsCfnResource

func CfnInput_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource. Experimental.

func CfnInput_IsConstruct

func CfnInput_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func DetectorModel_IsConstruct

func DetectorModel_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func DetectorModel_IsResource

func DetectorModel_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func Input_IsConstruct

func Input_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct. Experimental.

func Input_IsResource

func Input_IsResource(construct awscdk.IConstruct) *bool

Check whether the given construct is a Resource. Experimental.

func NewCfnDetectorModel_Override

func NewCfnDetectorModel_Override(c CfnDetectorModel, scope awscdk.Construct, id *string, props *CfnDetectorModelProps)

Create a new `AWS::IoTEvents::DetectorModel`.

func NewCfnInput_Override

func NewCfnInput_Override(c CfnInput, scope awscdk.Construct, id *string, props *CfnInputProps)

Create a new `AWS::IoTEvents::Input`.

func NewDetectorModel_Override

func NewDetectorModel_Override(d DetectorModel, scope constructs.Construct, id *string, props *DetectorModelProps)

Experimental.

func NewExpression_Override

func NewExpression_Override(e Expression)

Experimental.

func NewInput_Override

func NewInput_Override(i Input, scope constructs.Construct, id *string, props *InputProps)

Experimental.

func NewState_Override

func NewState_Override(s State, props *StateProps)

Experimental.

Types

type CfnDetectorModel

type CfnDetectorModel interface {
	awscdk.CfnResource
	awscdk.IInspectable
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	DetectorModelDefinition() interface{}
	SetDetectorModelDefinition(val interface{})
	DetectorModelDescription() *string
	SetDetectorModelDescription(val *string)
	DetectorModelName() *string
	SetDetectorModelName(val *string)
	EvaluationMethod() *string
	SetEvaluationMethod(val *string)
	Key() *string
	SetKey(val *string)
	LogicalId() *string
	Node() awscdk.ConstructNode
	Ref() *string
	RoleArn() *string
	SetRoleArn(val *string)
	Stack() awscdk.Stack
	Tags() awscdk.TagManager
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target awscdk.CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	GetAtt(attributeName *string) awscdk.Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector awscdk.TreeInspector)
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	OverrideLogicalId(newLogicalId *string)
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::IoTEvents::DetectorModel`.

The AWS::IoTEvents::DetectorModel resource creates a detector model. You create a *detector model* (a model of your equipment or process) using *states* . For each state, you define conditional (Boolean) logic that evaluates the incoming inputs to detect significant events. When an event is detected, it can change the state or trigger custom-built or predefined actions using other AWS services. You can define additional events that trigger actions when entering or exiting a state and, optionally, when a condition is met. For more information, see [How to Use AWS IoT Events](https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html) in the *AWS IoT Events Developer Guide* .

> When you successfully update a detector model (using the AWS IoT Events console, AWS IoT Events API or CLI commands, or AWS CloudFormation ) all detector instances created by the model are reset to their initial states. (The detector's `state` , and the values of any variables and timers are reset.) > > When you successfully update a detector model (using the AWS IoT Events console, AWS IoT Events API or CLI commands, or AWS CloudFormation ) the version number of the detector model is incremented. (A detector model with version number 1 before the update has version number 2 after the update succeeds.) > > If you attempt to update a detector model using AWS CloudFormation and the update does not succeed, the system may, in some cases, restore the original detector model. When this occurs, the detector model's version is incremented twice (for example, from version 1 to version 3) and the detector instances are reset. > > Also, be aware that if you attempt to update several detector models at once using AWS CloudFormation , some updates may succeed and others fail. In this case, the effects on each detector model's detector instances and version number depend on whether the update succeeded or failed, with the results as stated.

TODO: EXAMPLE

func NewCfnDetectorModel

func NewCfnDetectorModel(scope awscdk.Construct, id *string, props *CfnDetectorModelProps) CfnDetectorModel

Create a new `AWS::IoTEvents::DetectorModel`.

type CfnDetectorModelProps

type CfnDetectorModelProps struct {
	// Information that defines how a detector operates.
	DetectorModelDefinition interface{} `json:"detectorModelDefinition" yaml:"detectorModelDefinition"`
	// The ARN of the role that grants permission to AWS IoT Events to perform its operations.
	RoleArn *string `json:"roleArn" yaml:"roleArn"`
	// A brief description of the detector model.
	DetectorModelDescription *string `json:"detectorModelDescription" yaml:"detectorModelDescription"`
	// The name of the detector model.
	DetectorModelName *string `json:"detectorModelName" yaml:"detectorModelName"`
	// Information about the order in which events are evaluated and how actions are executed.
	EvaluationMethod *string `json:"evaluationMethod" yaml:"evaluationMethod"`
	// The value used to identify a detector instance.
	//
	// When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.
	//
	// This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.
	Key *string `json:"key" yaml:"key"`
	// An array of key-value pairs to apply to this resource.
	//
	// For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
	Tags *[]*awscdk.CfnTag `json:"tags" yaml:"tags"`
}

Properties for defining a `CfnDetectorModel`.

TODO: EXAMPLE

type CfnDetectorModel_ActionProperty

type CfnDetectorModel_ActionProperty struct {
	// Information needed to clear the timer.
	ClearTimer interface{} `json:"clearTimer" yaml:"clearTimer"`
	// Writes to the 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 customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify. For more information, see [Actions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-event-actions.html) in *AWS IoT Events Developer Guide* .
	DynamoDb interface{} `json:"dynamoDb" yaml:"dynamoDb"`
	// Writes to the 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 customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify. For more information, see [Actions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-event-actions.html) in *AWS IoT Events Developer Guide* .
	DynamoDBv2 interface{} `json:"dynamoDBv2" yaml:"dynamoDBv2"`
	// Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
	Firehose interface{} `json:"firehose" yaml:"firehose"`
	// Sends AWS IoT Events input, which passes information about the detector model instance and the event that triggered the action.
	IotEvents interface{} `json:"iotEvents" yaml:"iotEvents"`
	// Sends information about the detector model instance and the event that triggered the action to an asset property in AWS IoT SiteWise .
	IotSiteWise interface{} `json:"iotSiteWise" yaml:"iotSiteWise"`
	// Publishes an MQTT message with the given topic to the AWS IoT message broker.
	IotTopicPublish interface{} `json:"iotTopicPublish" yaml:"iotTopicPublish"`
	// Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
	Lambda interface{} `json:"lambda" yaml:"lambda"`
	// Information needed to reset the timer.
	ResetTimer interface{} `json:"resetTimer" yaml:"resetTimer"`
	// Information needed to set the timer.
	SetTimer interface{} `json:"setTimer" yaml:"setTimer"`
	// Sets a variable to a specified value.
	SetVariable interface{} `json:"setVariable" yaml:"setVariable"`
	// Sends an Amazon SNS message.
	Sns interface{} `json:"sns" yaml:"sns"`
	// Sends an Amazon SNS message.
	Sqs interface{} `json:"sqs" yaml:"sqs"`
}

An action to be performed when the `condition` is TRUE.

TODO: EXAMPLE

type CfnDetectorModel_AssetPropertyTimestampProperty

type CfnDetectorModel_AssetPropertyTimestampProperty struct {
	// The timestamp, in seconds, in the Unix epoch format.
	//
	// The valid range is between 1-31556889864403199.
	TimeInSeconds *string `json:"timeInSeconds" yaml:"timeInSeconds"`
	// The nanosecond offset converted from `timeInSeconds` .
	//
	// The valid range is between 0-999999999.
	OffsetInNanos *string `json:"offsetInNanos" yaml:"offsetInNanos"`
}

A structure that contains timestamp information. For more information, see [TimeInNanos](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_TimeInNanos.html) in the *AWS IoT SiteWise API Reference* .

You must use expressions for all parameters in `AssetPropertyTimestamp` . The expressions accept literals, operators, functions, references, and substitution templates.

**Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `timeInSeconds` parameter can be `'1586400675'` . - For references, you must specify either variables or input values. For example, the value for the `offsetInNanos` parameter can be `$variable.time` . - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the `timeInSeconds` parameter uses a substitution template.

`'${$input.TemperatureInput.sensorData.timestamp / 1000}'`

For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .

TODO: EXAMPLE

type CfnDetectorModel_AssetPropertyValueProperty

type CfnDetectorModel_AssetPropertyValueProperty struct {
	// The value to send to an asset property.
	Value interface{} `json:"value" yaml:"value"`
	// The quality of the asset property value.
	//
	// The value must be `'GOOD'` , `'BAD'` , or `'UNCERTAIN'` .
	Quality *string `json:"quality" yaml:"quality"`
	// The timestamp associated with the asset property value.
	//
	// The default is the current event time.
	Timestamp interface{} `json:"timestamp" yaml:"timestamp"`
}

A structure that contains value information. For more information, see [AssetPropertyValue](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetPropertyValue.html) in the *AWS IoT SiteWise API Reference* .

You must use expressions for all parameters in `AssetPropertyValue` . The expressions accept literals, operators, functions, references, and substitution templates.

**Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `quality` parameter can be `'GOOD'` . - For references, you must specify either variables or input values. For example, the value for the `quality` parameter can be `$input.TemperatureInput.sensorData.quality` .

For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .

TODO: EXAMPLE

type CfnDetectorModel_AssetPropertyVariantProperty

type CfnDetectorModel_AssetPropertyVariantProperty struct {
	// The asset property value is a Boolean value that must be `'TRUE'` or `'FALSE'` .
	//
	// You must use an expression, and the evaluated result should be a Boolean value.
	BooleanValue *string `json:"booleanValue" yaml:"booleanValue"`
	// The asset property value is a double.
	//
	// You must use an expression, and the evaluated result should be a double.
	DoubleValue *string `json:"doubleValue" yaml:"doubleValue"`
	// The asset property value is an integer.
	//
	// You must use an expression, and the evaluated result should be an integer.
	IntegerValue *string `json:"integerValue" yaml:"integerValue"`
	// The asset property value is a string.
	//
	// You must use an expression, and the evaluated result should be a string.
	StringValue *string `json:"stringValue" yaml:"stringValue"`
}

A structure that contains an asset property value.

For more information, see [Variant](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_Variant.html) in the *AWS IoT SiteWise API Reference* .

You must use expressions for all parameters in `AssetPropertyVariant` . The expressions accept literals, operators, functions, references, and substitution templates.

**Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `integerValue` parameter can be `'100'` . - For references, you must specify either variables or parameters. For example, the value for the `booleanValue` parameter can be `$variable.offline` . - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the `doubleValue` parameter uses a substitution template.

`'${$input.TemperatureInput.sensorData.temperature * 6 / 5 + 32}'`

For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .

You must specify one of the following value types, depending on the `dataType` of the specified asset property. For more information, see [AssetProperty](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetProperty.html) in the *AWS IoT SiteWise API Reference* .

TODO: EXAMPLE

type CfnDetectorModel_ClearTimerProperty

type CfnDetectorModel_ClearTimerProperty struct {
	// The name of the timer to clear.
	TimerName *string `json:"timerName" yaml:"timerName"`
}

Information needed to clear the timer.

TODO: EXAMPLE

type CfnDetectorModel_DetectorModelDefinitionProperty

type CfnDetectorModel_DetectorModelDefinitionProperty struct {
	// The state that is entered at the creation of each detector (instance).
	InitialStateName *string `json:"initialStateName" yaml:"initialStateName"`
	// Information about the states of the detector.
	States interface{} `json:"states" yaml:"states"`
}

Information that defines how a detector operates.

TODO: EXAMPLE

type CfnDetectorModel_DynamoDBProperty

type CfnDetectorModel_DynamoDBProperty struct {
	// The name of the hash key (also called the partition key).
	//
	// The `hashKeyField` value must match the partition key of the target DynamoDB table.
	HashKeyField *string `json:"hashKeyField" yaml:"hashKeyField"`
	// The value of the hash key (also called the partition key).
	HashKeyValue *string `json:"hashKeyValue" yaml:"hashKeyValue"`
	// The name of the DynamoDB table.
	//
	// The `tableName` value must match the table name of the target DynamoDB table.
	TableName *string `json:"tableName" yaml:"tableName"`
	// The data type for the hash key (also called the partition key). You can specify the following values:.
	//
	// - `'STRING'` - The hash key is a string.
	// - `'NUMBER'` - The hash key is a number.
	//
	// If you don't specify `hashKeyType` , the default value is `'STRING'` .
	HashKeyType *string `json:"hashKeyType" yaml:"hashKeyType"`
	// The type of operation to perform. You can specify the following values:.
	//
	// - `'INSERT'` - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.
	// - `'UPDATE'` - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.
	// - `'DELETE'` - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.
	//
	// If you don't specify this parameter, AWS IoT Events triggers the `'INSERT'` operation.
	Operation *string `json:"operation" yaml:"operation"`
	// 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` .
	Payload interface{} `json:"payload" yaml:"payload"`
	// The name of the DynamoDB column that receives the action payload.
	//
	// If you don't specify this parameter, the name of the DynamoDB column is `payload` .
	PayloadField *string `json:"payloadField" yaml:"payloadField"`
	// The name of the range key (also called the sort key).
	//
	// The `rangeKeyField` value must match the sort key of the target DynamoDB table.
	RangeKeyField *string `json:"rangeKeyField" yaml:"rangeKeyField"`
	// The data type for the range key (also called the sort key), You can specify the following values:.
	//
	// - `'STRING'` - The range key is a string.
	// - `'NUMBER'` - The range key is number.
	//
	// If you don't specify `rangeKeyField` , the default value is `'STRING'` .
	RangeKeyType *string `json:"rangeKeyType" yaml:"rangeKeyType"`
	// The value of the range key (also called the sort key).
	RangeKeyValue *string `json:"rangeKeyValue" yaml:"rangeKeyValue"`
}

Defines an action to write to the Amazon DynamoDB table that you created.

The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.

You must use expressions for all parameters in `DynamoDBAction` . The expressions accept literals, operators, functions, references, and substitution templates.

**Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `hashKeyType` parameter can be `'STRING'` . - For references, you must specify either variables or input values. For example, the value for the `hashKeyField` parameter can be `$input.GreenhouseInput.name` . - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the `hashKeyValue` parameter uses a substitution template.

`'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'` - For a string concatenation, you must use `+` . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the `tableName` parameter uses a string concatenation.

`'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date`

For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) 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 value for the `payloadField` parameter is `<payload-field>_raw` .

TODO: EXAMPLE

type CfnDetectorModel_DynamoDBv2Property

type CfnDetectorModel_DynamoDBv2Property struct {
	// The name of the DynamoDB table.
	TableName *string `json:"tableName" yaml:"tableName"`
	// 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` .
	Payload interface{} `json:"payload" yaml:"payload"`
}

Defines an action to write to the Amazon DynamoDB table that you created.

The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.

You must use expressions for all parameters in `DynamoDBv2Action` . The expressions accept literals, operators, functions, references, and substitution templates.

**Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `tableName` parameter can be `'GreenhouseTemperatureTable'` . - For references, you must specify either variables or input values. For example, the value for the `tableName` parameter can be `$variable.ddbtableName` . - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the `contentExpression` parameter in `Payload` uses a substitution template.

`'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'` - For a string concatenation, you must use `+` . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the `tableName` parameter uses a string concatenation.

`'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date`

For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .

The value for the `type` parameter in `Payload` must be `JSON` .

TODO: EXAMPLE

type CfnDetectorModel_EventProperty

type CfnDetectorModel_EventProperty struct {
	// The name of the event.
	EventName *string `json:"eventName" yaml:"eventName"`
	// The actions to be performed.
	Actions interface{} `json:"actions" yaml:"actions"`
	// Optional.
	//
	// The Boolean expression that, when TRUE, causes the `actions` to be performed. If not present, the actions are performed (=TRUE). If the expression result is not a Boolean value, the actions are not performed (=FALSE).
	Condition *string `json:"condition" yaml:"condition"`
}

Specifies the `actions` to be performed when the `condition` evaluates to TRUE.

TODO: EXAMPLE

type CfnDetectorModel_FirehoseProperty

type CfnDetectorModel_FirehoseProperty struct {
	// The name of the Kinesis Data Firehose delivery stream where the data is written.
	DeliveryStreamName *string `json:"deliveryStreamName" yaml:"deliveryStreamName"`
	// You can configure the action payload when you send a message to an Amazon Kinesis Data Firehose delivery stream.
	Payload interface{} `json:"payload" yaml:"payload"`
	// A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream.
	//
	// Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).
	Separator *string `json:"separator" yaml:"separator"`
}

Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.

TODO: EXAMPLE

type CfnDetectorModel_IotEventsProperty

type CfnDetectorModel_IotEventsProperty struct {
	// The name of the AWS IoT Events input where the data is sent.
	InputName *string `json:"inputName" yaml:"inputName"`
	// You can configure the action payload when you send a message to an AWS IoT Events input.
	Payload interface{} `json:"payload" yaml:"payload"`
}

Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.

TODO: EXAMPLE

type CfnDetectorModel_IotSiteWiseProperty

type CfnDetectorModel_IotSiteWiseProperty struct {
	// The value to send to the asset property.
	//
	// This value contains timestamp, quality, and value (TQV) information.
	PropertyValue interface{} `json:"propertyValue" yaml:"propertyValue"`
	// The ID of the asset that has the specified property.
	AssetId *string `json:"assetId" yaml:"assetId"`
	// A unique identifier for this entry.
	//
	// You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.
	EntryId *string `json:"entryId" yaml:"entryId"`
	// The alias of the asset property.
	PropertyAlias *string `json:"propertyAlias" yaml:"propertyAlias"`
	// The ID of the asset property.
	PropertyId *string `json:"propertyId" yaml:"propertyId"`
}

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 use expressions for all parameters in `IotSiteWiseAction` . The expressions accept literals, operators, functions, references, and substitutions templates.

**Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `propertyAlias` parameter can be `'/company/windfarm/3/turbine/7/temperature'` . - For references, you must specify either variables or input values. For example, the value for the `assetId` parameter can be `$input.TurbineInput.assetId1` . - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the `propertyAlias` parameter uses a substitution template.

`'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'`

You must specify either `propertyAlias` or both `assetId` and `propertyId` to identify the target asset property in AWS IoT SiteWise .

For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .

TODO: EXAMPLE

type CfnDetectorModel_IotTopicPublishProperty

type CfnDetectorModel_IotTopicPublishProperty struct {
	// The MQTT topic of the message.
	//
	// You can use a string expression that includes variables ( `$variable.<variable-name>` ) and input values ( `$input.<input-name>.<path-to-datum>` ) as the topic string.
	MqttTopic *string `json:"mqttTopic" yaml:"mqttTopic"`
	// You can configure the action payload when you publish a message to an AWS IoT Core topic.
	Payload interface{} `json:"payload" yaml:"payload"`
}

Information required to publish the MQTT message through the AWS IoT message broker.

TODO: EXAMPLE

type CfnDetectorModel_LambdaProperty

type CfnDetectorModel_LambdaProperty struct {
	// The ARN of the Lambda function that is executed.
	FunctionArn *string `json:"functionArn" yaml:"functionArn"`
	// You can configure the action payload when you send a message to a Lambda function.
	Payload interface{} `json:"payload" yaml:"payload"`
}

Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.

TODO: EXAMPLE

type CfnDetectorModel_OnEnterProperty

type CfnDetectorModel_OnEnterProperty struct {
	// Specifies the actions that are performed when the state is entered and the `condition` is `TRUE` .
	Events interface{} `json:"events" yaml:"events"`
}

When entering this state, perform these `actions` if the `condition` is TRUE.

TODO: EXAMPLE

type CfnDetectorModel_OnExitProperty

type CfnDetectorModel_OnExitProperty struct {
	// Specifies the `actions` that are performed when the state is exited and the `condition` is `TRUE` .
	Events interface{} `json:"events" yaml:"events"`
}

When exiting this state, perform these `actions` if the specified `condition` is `TRUE` .

TODO: EXAMPLE

type CfnDetectorModel_OnInputProperty

type CfnDetectorModel_OnInputProperty struct {
	// Specifies the actions performed when the `condition` evaluates to TRUE.
	Events interface{} `json:"events" yaml:"events"`
	// Specifies the actions performed, and the next state entered, when a `condition` evaluates to TRUE.
	TransitionEvents interface{} `json:"transitionEvents" yaml:"transitionEvents"`
}

Specifies the actions performed when the `condition` evaluates to TRUE.

TODO: EXAMPLE

type CfnDetectorModel_PayloadProperty

type CfnDetectorModel_PayloadProperty struct {
	// The content of the payload.
	//
	// You can use a string expression that includes quoted strings ( `'<string>'` ), variables ( `$variable.<variable-name>` ), input values ( `$input.<input-name>.<path-to-datum>` ), string concatenations, and quoted strings that contain `${}` as the content. The recommended maximum size of a content expression is 1 KB.
	ContentExpression *string `json:"contentExpression" yaml:"contentExpression"`
	// The value of the payload type can be either `STRING` or `JSON` .
	Type *string `json:"type" yaml:"type"`
}

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

TODO: EXAMPLE

type CfnDetectorModel_ResetTimerProperty

type CfnDetectorModel_ResetTimerProperty struct {
	// The name of the timer to reset.
	TimerName *string `json:"timerName" yaml:"timerName"`
}

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.

TODO: EXAMPLE

type CfnDetectorModel_SetTimerProperty

type CfnDetectorModel_SetTimerProperty struct {
	// The name of the timer.
	TimerName *string `json:"timerName" yaml:"timerName"`
	// The duration of the timer, in seconds.
	//
	// You can use a string expression that includes numbers, variables ( `$variable.<variable-name>` ), and input values ( `$input.<input-name>.<path-to-datum>` ) as the duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, the minimum duration is 60 seconds. The evaluated result of the duration is rounded down to the nearest whole number.
	DurationExpression *string `json:"durationExpression" yaml:"durationExpression"`
	// The number of seconds until the timer expires.
	//
	// The minimum value is 60 seconds to ensure accuracy. The maximum value is 31622400 seconds.
	Seconds *float64 `json:"seconds" yaml:"seconds"`
}

Information needed to set the timer.

TODO: EXAMPLE

type CfnDetectorModel_SetVariableProperty

type CfnDetectorModel_SetVariableProperty struct {
	// The new value of the variable.
	Value *string `json:"value" yaml:"value"`
	// The name of the variable.
	VariableName *string `json:"variableName" yaml:"variableName"`
}

Information about the variable and its new value.

TODO: EXAMPLE

type CfnDetectorModel_SnsProperty

type CfnDetectorModel_SnsProperty struct {
	// The ARN of the Amazon SNS target where the message is sent.
	TargetArn *string `json:"targetArn" yaml:"targetArn"`
	// You can configure the action payload when you send a message as an Amazon SNS push notification.
	Payload interface{} `json:"payload" yaml:"payload"`
}

Information required to publish the Amazon SNS message.

TODO: EXAMPLE

type CfnDetectorModel_SqsProperty

type CfnDetectorModel_SqsProperty struct {
	// The URL of the SQS queue where the data is written.
	QueueUrl *string `json:"queueUrl" yaml:"queueUrl"`
	// You can configure the action payload when you send a message to an Amazon SQS queue.
	Payload interface{} `json:"payload" yaml:"payload"`
	// Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue.
	//
	// Otherwise, set this to FALSE.
	UseBase64 interface{} `json:"useBase64" yaml:"useBase64"`
}

Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.

TODO: EXAMPLE

type CfnDetectorModel_StateProperty

type CfnDetectorModel_StateProperty struct {
	// The name of the state.
	StateName *string `json:"stateName" yaml:"stateName"`
	// When entering this state, perform these `actions` if the `condition` is TRUE.
	OnEnter interface{} `json:"onEnter" yaml:"onEnter"`
	// When exiting this state, perform these `actions` if the specified `condition` is `TRUE` .
	OnExit interface{} `json:"onExit" yaml:"onExit"`
	// When an input is received and the `condition` is TRUE, perform the specified `actions` .
	OnInput interface{} `json:"onInput" yaml:"onInput"`
}

Information that defines a state of a detector.

TODO: EXAMPLE

type CfnDetectorModel_TransitionEventProperty

type CfnDetectorModel_TransitionEventProperty struct {
	// Required.
	//
	// A Boolean expression that when TRUE causes the actions to be performed and the `nextState` to be entered.
	Condition *string `json:"condition" yaml:"condition"`
	// The name of the transition event.
	EventName *string `json:"eventName" yaml:"eventName"`
	// The next state to enter.
	NextState *string `json:"nextState" yaml:"nextState"`
	// The actions to be performed.
	Actions interface{} `json:"actions" yaml:"actions"`
}

Specifies the actions performed and the next state entered when a `condition` evaluates to TRUE.

TODO: EXAMPLE

type CfnInput

type CfnInput interface {
	awscdk.CfnResource
	awscdk.IInspectable
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	CfnResourceType() *string
	CreationStack() *[]*string
	InputDefinition() interface{}
	SetInputDefinition(val interface{})
	InputDescription() *string
	SetInputDescription(val *string)
	InputName() *string
	SetInputName(val *string)
	LogicalId() *string
	Node() awscdk.ConstructNode
	Ref() *string
	Stack() awscdk.Stack
	Tags() awscdk.TagManager
	UpdatedProperites() *map[string]interface{}
	AddDeletionOverride(path *string)
	AddDependsOn(target awscdk.CfnResource)
	AddMetadata(key *string, value interface{})
	AddOverride(path *string, value interface{})
	AddPropertyDeletionOverride(propertyPath *string)
	AddPropertyOverride(propertyPath *string, value interface{})
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	GetAtt(attributeName *string) awscdk.Reference
	GetMetadata(key *string) interface{}
	Inspect(inspector awscdk.TreeInspector)
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	OverrideLogicalId(newLogicalId *string)
	Prepare()
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	ShouldSynthesize() *bool
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::IoTEvents::Input`.

The AWS::IoTEvents::Input resource creates an input. To monitor your devices and processes, they must have a way to get telemetry data into AWS IoT Events . This is done by sending messages as *inputs* to AWS IoT Events . For more information, see [How to Use AWS IoT Events](https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html) in the *AWS IoT Events Developer Guide* .

TODO: EXAMPLE

func NewCfnInput

func NewCfnInput(scope awscdk.Construct, id *string, props *CfnInputProps) CfnInput

Create a new `AWS::IoTEvents::Input`.

type CfnInputProps

type CfnInputProps struct {
	// The definition of the input.
	InputDefinition interface{} `json:"inputDefinition" yaml:"inputDefinition"`
	// A brief description of the input.
	InputDescription *string `json:"inputDescription" yaml:"inputDescription"`
	// The name of the input.
	InputName *string `json:"inputName" yaml:"inputName"`
	// An array of key-value pairs to apply to this resource.
	//
	// For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
	Tags *[]*awscdk.CfnTag `json:"tags" yaml:"tags"`
}

Properties for defining a `CfnInput`.

TODO: EXAMPLE

type CfnInput_AttributeProperty

type CfnInput_AttributeProperty struct {
	// An expression that specifies an attribute-value pair in a JSON structure.
	//
	// Use this to specify an attribute from the JSON payload that is made available by the input. Inputs are derived from messages sent to AWS IoT Events ( `BatchPutMessage` ). Each such message contains a JSON payload. The attribute (and its paired value) specified here are available for use in the `condition` expressions used by detectors.
	//
	// Syntax: `<field-name>.<field-name>...`
	JsonPath *string `json:"jsonPath" yaml:"jsonPath"`
}

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.

TODO: EXAMPLE

type CfnInput_InputDefinitionProperty

type CfnInput_InputDefinitionProperty struct {
	// 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, and those attributes (and their paired values) specified here are available for use in the `condition` expressions used by detectors that monitor this input.
	Attributes interface{} `json:"attributes" yaml:"attributes"`
}

The definition of the input.

TODO: EXAMPLE

type DetectorModel

type DetectorModel interface {
	awscdk.Resource
	IDetectorModel
	DetectorModelName() *string
	Env() *awscdk.ResourceEnvironment
	Node() awscdk.ConstructNode
	PhysicalName() *string
	Stack() awscdk.Stack
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	GetResourceNameAttribute(nameAttr *string) *string
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	Prepare()
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
}

Defines an AWS IoT Events detector model in this stack.

TODO: EXAMPLE

Experimental.

func NewDetectorModel

func NewDetectorModel(scope constructs.Construct, id *string, props *DetectorModelProps) DetectorModel

Experimental.

type DetectorModelProps

type DetectorModelProps struct {
	// The state that is entered at the creation of each detector.
	// Experimental.
	InitialState State `json:"initialState" yaml:"initialState"`
	// A brief description of the detector model.
	// Experimental.
	Description *string `json:"description" yaml:"description"`
	// The value used to identify a detector instance.
	//
	// When a device or system sends input, a new
	// detector instance with a unique key value is created. AWS IoT Events can continue to route
	// input to its corresponding detector instance based on this identifying information.
	//
	// This parameter uses a JSON-path expression to select the attribute-value pair in the message
	// payload that is used for identification. To route the message to the correct detector instance,
	// the device must send a message payload that contains the same attribute-value.
	// Experimental.
	DetectorKey *string `json:"detectorKey" yaml:"detectorKey"`
	// The name of the detector model.
	// Experimental.
	DetectorModelName *string `json:"detectorModelName" yaml:"detectorModelName"`
	// Information about the order in which events are evaluated and how actions are executed.
	//
	// When setting to SERIAL, variables are updated and event conditions are evaluated in the order
	// that the events are defined.
	// When setting to BATCH, variables within a state are updated and events within a state are
	// performed only after all event conditions are evaluated.
	// Experimental.
	EvaluationMethod EventEvaluation `json:"evaluationMethod" yaml:"evaluationMethod"`
	// The role that grants permission to AWS IoT Events to perform its operations.
	// Experimental.
	Role awsiam.IRole `json:"role" yaml:"role"`
}

Properties for defining an AWS IoT Events detector model.

TODO: EXAMPLE

Experimental.

type Event

type Event struct {
	// The name of the event.
	// Experimental.
	EventName *string `json:"eventName" yaml:"eventName"`
	// The Boolean expression that, when TRUE, causes the actions to be performed.
	// Experimental.
	Condition Expression `json:"condition" yaml:"condition"`
}

Specifies the actions to be performed when the condition evaluates to TRUE.

TODO: EXAMPLE

Experimental.

type EventEvaluation

type EventEvaluation string

Information about the order in which events are evaluated and how actions are executed.

TODO: EXAMPLE

Experimental.

const (
	EventEvaluation_BATCH  EventEvaluation = "BATCH"
	EventEvaluation_SERIAL EventEvaluation = "SERIAL"
)

type Expression

type Expression interface {
	Evaluate() *string
}

Expression for events in Detector Model state.

TODO: EXAMPLE

See: https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html

Experimental.

func Expression_And

func Expression_And(left Expression, right Expression) Expression

Create a expression for the AND operator. Experimental.

func Expression_CurrentInput

func Expression_CurrentInput(input IInput) Expression

Create a expression for function `currentInput()`.

It is evaluated to true if the specified input message was received. Experimental.

func Expression_Eq

func Expression_Eq(left Expression, right Expression) Expression

Create a expression for the Equal operator. Experimental.

func Expression_FromString

func Expression_FromString(value *string) Expression

Create a expression from the given string. Experimental.

func Expression_InputAttribute

func Expression_InputAttribute(input IInput, path *string) Expression

Create a expression for get an input attribute as `$input.TemperatureInput.temperatures[2]`. Experimental.

type IDetectorModel

type IDetectorModel interface {
	awscdk.IResource
	// The name of the detector model.
	// Experimental.
	DetectorModelName() *string
}

Represents an AWS IoT Events detector model. Experimental.

func DetectorModel_FromDetectorModelName

func DetectorModel_FromDetectorModelName(scope constructs.Construct, id *string, detectorModelName *string) IDetectorModel

Import an existing detector model. Experimental.

type IInput

type IInput interface {
	awscdk.IResource
	// Grant the indicated permissions on this input to the given IAM principal (Role/Group/User).
	// Experimental.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Grant write permissions on this input and its contents to an IAM principal (Role/Group/User).
	// Experimental.
	GrantWrite(grantee awsiam.IGrantable) awsiam.Grant
	// The ARN of the input.
	// Experimental.
	InputArn() *string
	// The name of the input.
	// Experimental.
	InputName() *string
}

Represents an AWS IoT Events input. Experimental.

func Input_FromInputName

func Input_FromInputName(scope constructs.Construct, id *string, inputName *string) IInput

Import an existing input. Experimental.

type Input

type Input interface {
	awscdk.Resource
	IInput
	Env() *awscdk.ResourceEnvironment
	InputArn() *string
	InputName() *string
	Node() awscdk.ConstructNode
	PhysicalName() *string
	Stack() awscdk.Stack
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	GeneratePhysicalName() *string
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	GetResourceNameAttribute(nameAttr *string) *string
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	GrantWrite(grantee awsiam.IGrantable) awsiam.Grant
	OnPrepare()
	OnSynthesize(session constructs.ISynthesisSession)
	OnValidate() *[]*string
	Prepare()
	Synthesize(session awscdk.ISynthesisSession)
	ToString() *string
	Validate() *[]*string
}

Defines an AWS IoT Events input in this stack.

TODO: EXAMPLE

Experimental.

func NewInput

func NewInput(scope constructs.Construct, id *string, props *InputProps) Input

Experimental.

type InputProps

type InputProps struct {
	// An expression that specifies an attribute-value pair in a JSON structure.
	//
	// Use this to specify an attribute from the JSON payload that is made available
	// by the input. Inputs are derived from messages sent to AWS IoT Events (BatchPutMessage).
	// Each such message contains a JSON payload. The attribute (and its paired value)
	// specified here are available for use in the condition expressions used by detectors.
	// Experimental.
	AttributeJsonPaths *[]*string `json:"attributeJsonPaths" yaml:"attributeJsonPaths"`
	// The name of the input.
	// Experimental.
	InputName *string `json:"inputName" yaml:"inputName"`
}

Properties for defining an AWS IoT Events input.

TODO: EXAMPLE

Experimental.

type State

type State interface {
	StateName() *string
	TransitionTo(targetState State, options *TransitionOptions)
}

Defines a state of a detector.

TODO: EXAMPLE

Experimental.

func NewState

func NewState(props *StateProps) State

Experimental.

type StateProps

type StateProps struct {
	// The name of the state.
	// Experimental.
	StateName *string `json:"stateName" yaml:"stateName"`
	// Specifies the events on enter.
	//
	// the conditions of the events are evaluated when the state is entered.
	// If the condition is `TRUE`, the actions of the event are performed.
	// Experimental.
	OnEnter *[]*Event `json:"onEnter" yaml:"onEnter"`
}

Properties for defining a state of a detector.

TODO: EXAMPLE

Experimental.

type TransitionOptions

type TransitionOptions struct {
	// The condition that is used to determine to cause the state transition and the actions.
	//
	// When this was evaluated to TRUE, the state transition and the actions are triggered.
	// Experimental.
	When Expression `json:"when" yaml:"when"`
	// The name of the event.
	// Experimental.
	EventName *string `json:"eventName" yaml:"eventName"`
}

Properties for options of state transition.

TODO: EXAMPLE

Experimental.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL