def iter_list_active_violations(
self,
*,
config_overrides: Optional[IoTClientConfig] = None,
thing_name: Optional[
"capo_iot.types.device_defender_thing_name.DeviceDefenderThingName"
] = None,
security_profile_name: Optional[
"capo_iot.types.security_profile_name.SecurityProfileName"
] = None,
behavior_criteria_type: Optional[
"capo_iot.types.behavior_criteria_type.BehaviorCriteriaType"
] = None,
list_suppressed_alerts: Optional[
"capo_iot.types.list_suppressed_alerts.ListSuppressedAlerts"
] = None,
verification_state: Optional[
"capo_iot.types.verification_state.VerificationState"
] = None,
next_token: Optional["capo_iot.types.next_token.NextToken"] = None,
max_results: Optional["capo_iot.types.max_results.MaxResults"] = None,
) -> "Iterator[capo_iot.types.active_violation.ActiveViolation]":
_token = next_token
while True:
_response = self.list_active_violations(
config_overrides=config_overrides,
thing_name=thing_name,
security_profile_name=security_profile_name,
behavior_criteria_type=behavior_criteria_type,
list_suppressed_alerts=list_suppressed_alerts,
verification_state=verification_state,
next_token=_token,
max_results=max_results,
)
_page = _resolve_path(_response, ("active_violations",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break