async def iter_get_groups_for_capacity_reservation(
self,
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
capacity_reservation_id: Optional[
"capo_ec2.types.capacity_reservation_id.CapacityReservationId"
] = None,
next_token: Optional["capo_ec2.types.string.String"] = None,
max_results: Optional[
"capo_ec2.types.get_groups_for_capacity_reservation_request_max_results.GetGroupsForCapacityReservationRequestMaxResults"
] = None,
dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "AsyncIterator[capo_ec2.types.capacity_reservation_group.CapacityReservationGroup]":
_token = next_token
while True:
_response = await self.get_groups_for_capacity_reservation(
config_overrides=config_overrides,
capacity_reservation_id=capacity_reservation_id,
next_token=_token,
max_results=max_results,
dry_run=dry_run,
)
_page = _resolve_path(_response, ("capacity_reservation_groups",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break