Skip to content

list_items async

list_items(
    *,
    config_overrides: Optional[AsyncMediaStoreDataClientConfig] = None,
    path: Optional[ListPathNaming] = None,
    max_results: Optional[ListLimit] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListItemsResponse

Provides a list of metadata entries about folders and objects in the specified folder.

Parameters:

  • path (Optional[ListPathNaming], default: None ) –

    The path in the container from which to retrieve items. Format: //

  • max_results (Optional[ListLimit], default: None ) –

    The maximum number of results to return per API request. For example, you submit a ListItems request with MaxResults set at 500. Although 2,000 items match your request, the service returns no more than the first 500 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value.

    If MaxResults is not included in the request, the service defaults to pagination with a maximum of 1,000 results per page.

  • next_token (Optional[PaginationToken], default: None ) –

    The token that identifies which batch of results that you want to see. For example, you submit a ListItems request with MaxResults set at 500. The service returns the first batch of results (up to 500) and a NextToken value. To see the next batch of results, you can submit the ListItems request a second time and specify the NextToken value.

    Tokens expire after 15 minutes.

Raises:

Source code in docs_src/capo_mediastore_data/_services/async_media_store_data.py
async def list_items(
    self,
    *,
    config_overrides: Optional[AsyncMediaStoreDataClientConfig] = None,
    path: Optional[
        "capo_mediastore_data.types.list_path_naming.ListPathNaming"
    ] = None,
    max_results: Optional["capo_mediastore_data.types.list_limit.ListLimit"] = None,
    next_token: Optional[
        "capo_mediastore_data.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_mediastore_data.types.list_items_response.ListItemsResponse":
    """<p>Provides a list of metadata entries about folders and objects in the specified folder.</p>

    Args:
        path: <p>The path in the container from which to retrieve items. Format: <folder name>/<folder name>/<file name></p>
        max_results: <p>The maximum number of results to return per API request. For example, you submit a <code>ListItems</code> request with <code>MaxResults</code> set at 500. Although 2,000 items match your request, the service returns no more than the first 500 items. (The service also returns a <code>NextToken</code> value that you can use to fetch the next batch of results.) The service might return fewer results than the <code>MaxResults</code> value.</p> <p>If <code>MaxResults</code> is not included in the request, the service defaults to pagination with a maximum of 1,000 results per page.</p>
        next_token: <p>The token that identifies which batch of results that you want to see. For example, you submit a <code>ListItems</code> request with <code>MaxResults</code> set at 500. The service returns the first batch of results (up to 500) and a <code>NextToken</code> value. To see the next batch of results, you can submit the <code>ListItems</code> request a second time and specify the <code>NextToken</code> value.</p> <p>Tokens expire after 15 minutes.</p>

    Raises:
        capo_mediastore_data.errors.container_not_found_exception.ContainerNotFoundException: <p>The specified container was not found for the specified account.</p>
        capo_mediastore_data.errors.internal_server_error.InternalServerError: <p>The service is temporarily unavailable.</p>
        capo_mediastore_data.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediastore_data.types.list_items_request.ListItemsRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediastore_data.types.list_items_response.ListItemsResponse"
    ]:
        import capo_mediastore_data._operations.media_store_object_20170901.list_items

        (
            output,
            http_response,
        ) = await capo_mediastore_data._operations.media_store_object_20170901.list_items.async_list_items(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListItems")
    )
    input_: capo_mediastore_data.types.list_items_request.ListItemsRequest = {}
    if path is not None:
        input_["path"] = path
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output