CmdID

CmdID / aws / aws iot

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

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To list your rules

The following list-topic-rules example lists all rules that you have defined.

aws iot list-topic-rulesIdentify
Its 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

4 in the AWS CLI reference
--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.