list_rules
async
¶
list_rules(
*,
config_overrides: Optional[AsyncCloudWatchEventsClientConfig] = None,
name_prefix: Optional[RuleName] = None,
event_bus_name: Optional[EventBusNameOrArn] = None,
next_token: Optional[NextToken] = None,
limit: Optional[LimitMax100] = None,
) -> ListRulesResponse
Lists your Amazon EventBridge rules. You can either list all the rules or you can provide a prefix to match to the rule names.
ListRules does not list the targets of a rule. To see the targets associated with a rule, use ListTargetsByRule.
Parameters:
-
name_prefix(Optional[RuleName], default:None) –The prefix matching the rule name.
-
event_bus_name(Optional[EventBusNameOrArn], default:None) –The name or ARN of the event bus to list the rules for. If you omit this, the default event bus is used.
-
next_token(Optional[NextToken], default:None) –The token returned by a previous call to retrieve the next set of results.
-
limit(Optional[LimitMax100], default:None) –The maximum number of results to return.
Raises:
-
InternalException–This exception occurs due to unexpected causes.
-
ResourceNotFoundException–An entity that you specified does not exist.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudwatch_events/_services/async_cloud_watch_events.py
2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 | |