Expression
- class aws_cdk.aws_iotevents_alpha.Expression
Bases:
object
(experimental) Expression for events in Detector Model state.
- See:
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# Example automatically generated from non-compiling source. May contain errors. import aws_cdk.aws_iotevents_alpha as iotevents import aws_cdk.aws_iotevents_actions_alpha as actions # input: iotevents.IInput state = iotevents.State( state_name="MyState", on_enter=[iotevents.Event( event_name="test-event", condition=iotevents.Expression.current_input(input), actions=[ actions.SetTimerAction("MyTimer", { "duration": cdk.Duration.seconds(60) }) ] )] )
- Stability:
experimental
Methods
- abstract evaluate(parent_priority=None)
(experimental) This is called to evaluate the expression.
- Parameters:
parent_priority (
Union
[int
,float
,None
]) – priority of the parent of this expression, used for determining whether or not to add parenthesis around the expression. This is intended to be set according to MDN rules, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table for details- Stability:
experimental
- Return type:
str
Static Methods
- classmethod add(left, right)
(experimental) Create a expression for the Addition operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod and_(left, right)
(experimental) Create a expression for the AND operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod bitwise_and(left, right)
(experimental) Create a expression for the Bitwise AND operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod bitwise_or(left, right)
(experimental) Create a expression for the Bitwise OR operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod bitwise_xor(left, right)
(experimental) Create a expression for the Bitwise XOR operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod concat(left, right)
(experimental) Create a expression for the String Concatenation operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod current_input(input)
(experimental) Create a expression for function
currentInput()
.It is evaluated to true if the specified input message was received.
- Parameters:
input (
IInput
) –- Stability:
experimental
- Return type:
- classmethod divide(left, right)
(experimental) Create a expression for the Division operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod eq(left, right)
(experimental) Create a expression for the Equal operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod from_string(value)
(experimental) Create a expression from the given string.
- Parameters:
value (
str
) –- Stability:
experimental
- Return type:
- classmethod gt(left, right)
(experimental) Create a expression for the Greater Than operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod gte(left, right)
(experimental) Create a expression for the Greater Than Or Equal operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod input_attribute(input, path)
(experimental) Create a expression for get an input attribute as
$input.TemperatureInput.temperatures[2]
.- Parameters:
input (
IInput
) –path (
str
) –
- Stability:
experimental
- Return type:
- classmethod lt(left, right)
(experimental) Create a expression for the Less Than operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod lte(left, right)
(experimental) Create a expression for the Less Than Or Equal operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod multiply(left, right)
(experimental) Create a expression for the Multiplication operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod neq(left, right)
(experimental) Create a expression for the Not Equal operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod or_(left, right)
(experimental) Create a expression for the OR operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod subtract(left, right)
(experimental) Create a expression for the Subtraction operator.
- Parameters:
left (
Expression
) –right (
Expression
) –
- Stability:
experimental
- Return type:
- classmethod timeout(timer_name)
(experimental) Create a expression for function
timeout("timer-name")
.It is evaluated to true if the specified timer has elapsed. You can define a timer only using the
setTimer
action.- Parameters:
timer_name (
str
) –- Stability:
experimental
- Return type: