Skip to content

iter_list_created_artifacts async

iter_list_created_artifacts(
    progress_update_stream: ProgressUpdateStream,
    migration_task_name: MigrationTaskName,
    *,
    config_overrides: Optional[AsyncMigrationHubClientConfig] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[MaxResultsCreatedArtifacts] = None,
) -> AsyncIterator[CreatedArtifact]
Source code in docs_src/capo_migration_hub/_services/async_migration_hub.py
async def iter_list_created_artifacts(
    self,
    progress_update_stream: "capo_migration_hub.types.progress_update_stream.ProgressUpdateStream",
    migration_task_name: "capo_migration_hub.types.migration_task_name.MigrationTaskName",
    *,
    config_overrides: Optional[AsyncMigrationHubClientConfig] = None,
    next_token: Optional["capo_migration_hub.types.token.Token"] = None,
    max_results: Optional[
        "capo_migration_hub.types.max_results_created_artifacts.MaxResultsCreatedArtifacts"
    ] = None,
) -> "AsyncIterator[capo_migration_hub.types.created_artifact.CreatedArtifact]":
    _token = next_token
    while True:
        _response = await self.list_created_artifacts(
            progress_update_stream,
            migration_task_name,
            config_overrides=config_overrides,
            next_token=_token,
            max_results=max_results,
        )
        _page = _resolve_path(_response, ("created_artifact_list",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break