list_topic_rules

IoT.Client.list_topic_rules(**kwargs)

Lists the rules for the specific topic.

Requires permission to access the ListTopicRules action.

See also: AWS API Documentation

Request Syntax

response = client.list_topic_rules(
    topic='string',
    maxResults=123,
    nextToken='string',
    ruleDisabled=True|False
)
Parameters
  • topic (string) -- The topic.
  • maxResults (integer) -- The maximum number of results to return.
  • nextToken (string) -- To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
  • ruleDisabled (boolean) -- Specifies whether the rule is disabled.
Return type

dict

Returns

Response Syntax

{
    'rules': [
        {
            'ruleArn': 'string',
            'ruleName': 'string',
            'topicPattern': 'string',
            'createdAt': datetime(2015, 1, 1),
            'ruleDisabled': True|False
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    The output from the ListTopicRules operation.

    • rules (list) --

      The rules.

      • (dict) --

        Describes a rule.

        • ruleArn (string) --

          The rule ARN.

        • ruleName (string) --

          The name of the rule.

        • topicPattern (string) --

          The pattern for the topic names that apply.

        • createdAt (datetime) --

          The date and time the rule was created.

        • ruleDisabled (boolean) --

          Specifies whether the rule is disabled.

    • nextToken (string) --

      The token to use to get the next set of results, or null if there are no additional results.

Exceptions

  • IoT.Client.exceptions.InternalException
  • IoT.Client.exceptions.InvalidRequestException
  • IoT.Client.exceptions.ServiceUnavailableException