RuleAction
This class encapsulates and extends the ROS resource type ALIYUN::IOT::RuleAction
, which is used to create a rule action for a specified rule.
Initializers
import ros_cdk_iot
ros_cdk_iot.RuleAction(
scope: Construct,
id: str,
configuration: typing.Union[str, IResolvable],
rule_id: typing.Union[typing.Union[int, float], IResolvable],
type: typing.Union[str, IResolvable],
error_action_flag: typing.Union[bool, IResolvable] = None,
iot_instance_id: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
configuration |
typing.Union[str, ros_cdk_core.IResolvable] |
Property configuration: The configurations of the rule action. |
rule_id |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property ruleId: The ID of the rule for which you want to create an action. |
type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property type: The type of the rule action. |
error_action_flag |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property errorActionFlag: Indicates whether the rule action forwarded error operation data. |
iot_instance_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property iotInstanceId: The ID of the instance. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
configuration
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property configuration: The configurations of the rule action.
You must specify a JSON string. The configurations for different types of rule actions are different. For more information about required syntax and examples, see the following tables.
rule_id
Required
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property ruleId: The ID of the rule for which you want to create an action.
You can use either of the following methods to view the rule ID: 1. Log on to the IoT Platform console and choose Rules>Data Forwarding. 2. Call the ListRule operation.
type
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property type: The type of the rule action.
Valid values: MNS: forwards data in the topics that have been processed by the rule engine to Message Service (MNS) for message transmission. FC: forwards data in the topics that have been processed by the rule engine to Function Compute for event computing. REPUBLISH: forwards data in the topics that have been processed by the rule engine to another IoT Platform topic. AMQP: forwards data to AMQP consumer groups. OTS: forwards data in the topics that have been processed by the rule engine to Table Store for NoSQL data storage. Note Rules of the binary data format (the DataType parameter is set toBINARY) do not support forwarding data to Table Store. Destination Alibaba Cloud services that are supported by the rule engine vary based on regions. For more information about the regions and destination cloud services that are supported by the rule engine, see Regions and zones.
error_action_flag
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property errorActionFlag: Indicates whether the rule action forwarded error operation data.
Error operation data indicates that the rule engine failed to forward data from the IoT Platform topic to the destination cloud service. A data forwarding failure indicates that forwarding retries also failed. Valid values: true: forwards error operation data. false: forwards normal data instead of error operation data. Default value: false.
iot_instance_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property iotInstanceId: The ID of the instance.
This parameter is not required for public instances. However, the parameter is required for the instances that you have purchased.
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_iot
ros_cdk_iot.RuleAction.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_action_id |
ros_cdk_core.IResolvable |
Attribute ActionId: The ID of the rule action. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_action_id
Required
attr_action_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ActionId: The ID of the rule action.