aws iot list-topic-rules
Lists the rules for the specific topic. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To list your rules
The following list-topic-rules example lists all rules that you have defined.
aws iot list-topic-rulesIdentifyIts output
{
"rules": [
{
"ruleArn": "arn:aws:iot:us-west-2:123456789012:rule/MyRPiLowMoistureAlertRule",
"ruleName": "MyRPiLowMoistureAlertRule",
"topicPattern": "$aws/things/MyRPi/shadow/update/accepted",
"createdAt": 1558624363.0,
"ruleDisabled": false
},
{
"ruleArn": "arn:aws:iot:us-west-2:123456789012:rule/MyPlantPiMoistureAlertRule",
"ruleName": "MyPlantPiMoistureAlertRule",
"topicPattern": "$aws/things/MyPlantPi/shadow/update/accepted",
"createdAt": 1541458459.0,
"ruleDisabled": false
}
]
}For more information, see Viewing a rule in the AWS IoT Developers Guide.
Options
--max-resultsThe maximum number of results to return.--next-tokenTo retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.--rule-disabledSpecifies whether the rule is disabled.--topicThe topic.