Skip to content

iter_list_object_annotations async

iter_list_object_annotations(
    bucket: BucketName,
    key: ObjectKey,
    *,
    config_overrides: Optional[AsyncS3ClientConfig] = None,
    version_id: Optional[ObjectVersionId] = None,
    max_annotation_results: Optional[MaxAnnotationResults] = None,
    annotation_prefix: Optional[AnnotationPrefix] = None,
    continuation_token: Optional[Token] = None,
    request_payer: Optional[RequestPayer] = None,
    expected_bucket_owner: Optional[AccountId] = None,
) -> AsyncIterator[AnnotationEntry]
Source code in docs_src/capo_s3/_services/async_s3.py
async def iter_list_object_annotations(
    self,
    bucket: "capo_s3.types.bucket_name.BucketName",
    key: "capo_s3.types.object_key.ObjectKey",
    *,
    config_overrides: Optional[AsyncS3ClientConfig] = None,
    version_id: Optional["capo_s3.types.object_version_id.ObjectVersionId"] = None,
    max_annotation_results: Optional[
        "capo_s3.types.max_annotation_results.MaxAnnotationResults"
    ] = None,
    annotation_prefix: Optional[
        "capo_s3.types.annotation_prefix.AnnotationPrefix"
    ] = None,
    continuation_token: Optional["capo_s3.types.token.Token"] = None,
    request_payer: Optional["capo_s3.types.request_payer.RequestPayer"] = None,
    expected_bucket_owner: Optional["capo_s3.types.account_id.AccountId"] = None,
) -> "AsyncIterator[capo_s3.types.annotation_entry.AnnotationEntry]":
    _token = continuation_token
    while True:
        _response = await self.list_object_annotations(
            bucket,
            key,
            config_overrides=config_overrides,
            version_id=version_id,
            max_annotation_results=max_annotation_results,
            annotation_prefix=annotation_prefix,
            continuation_token=_token,
            request_payer=request_payer,
            expected_bucket_owner=expected_bucket_owner,
        )
        _page = _resolve_path(_response, ("annotations",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_continuation_token",))
        if not _token:
            break