def iter_describe_instances(
self,
*,
config_overrides: Optional[GameLiftClientConfig] = None,
fleet_id: Optional["capo_gamelift.types.fleet_id_or_arn.FleetIdOrArn"] = None,
instance_id: Optional["capo_gamelift.types.instance_id.InstanceId"] = None,
limit: Optional["capo_gamelift.types.positive_integer.PositiveInteger"] = None,
next_token: Optional[
"capo_gamelift.types.non_zero_and_max_string.NonZeroAndMaxString"
] = None,
location: Optional[
"capo_gamelift.types.location_string_model.LocationStringModel"
] = None,
) -> "Iterator[capo_gamelift.types.instance.Instance]":
_token = next_token
while True:
_response = self.describe_instances(
config_overrides=config_overrides,
fleet_id=fleet_id,
instance_id=instance_id,
limit=limit,
next_token=_token,
location=location,
)
_page = _resolve_path(_response, ("instances",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break