Skip to content

search_products async

search_products(
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
    filters: Optional[ProductViewFilters] = None,
    page_size: Optional[PageSizeMax100] = None,
    sort_by: Optional[ProductViewSortBy] = None,
    sort_order: Optional[SortOrder] = None,
    page_token: Optional[PageToken] = None,
) -> SearchProductsOutput

Gets information about the products to which the caller has access.

Parameters:

  • accept_language (Optional[AcceptLanguage], default: None ) –

    The language code.

    • jp - Japanese

    • zh - Chinese

  • filters (Optional[ProductViewFilters], default: None ) –

    The search filters. If no search filters are specified, the output includes all products to which the caller has access.

  • page_size (Optional[PageSizeMax100], default: None ) –

    The maximum number of items to return with this call.

  • sort_by (Optional[ProductViewSortBy], default: None ) –

    The sort field. If no value is specified, the results are not sorted.

  • sort_order (Optional[SortOrder], default: None ) –

    The sort order. If no value is specified, the results are not sorted.

  • page_token (Optional[PageToken], default: None ) –

    The page token for the next set of results. To retrieve the first set of results, use null.

Raises:

Source code in docs_src/capo_service_catalog/_services/async_service_catalog.py
async def search_products(
    self,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
    filters: Optional[
        "capo_service_catalog.types.product_view_filters.ProductViewFilters"
    ] = None,
    page_size: Optional[
        "capo_service_catalog.types.page_size_max100.PageSizeMax100"
    ] = None,
    sort_by: Optional[
        "capo_service_catalog.types.product_view_sort_by.ProductViewSortBy"
    ] = None,
    sort_order: Optional["capo_service_catalog.types.sort_order.SortOrder"] = None,
    page_token: Optional["capo_service_catalog.types.page_token.PageToken"] = None,
) -> "capo_service_catalog.types.search_products_output.SearchProductsOutput":
    """<p>Gets information about the products to which the caller has access.</p>

    Args:
        accept_language: <p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>
        filters: <p>The search filters. If no search filters are specified, the output includes all products to which the caller has access.</p>
        page_size: <p>The maximum number of items to return with this call.</p>
        sort_by: <p>The sort field. If no value is specified, the results are not sorted.</p>
        sort_order: <p>The sort order. If no value is specified, the results are not sorted.</p>
        page_token: <p>The page token for the next set of results. To retrieve the first set of results, use null.</p>

    Raises:
        capo_service_catalog.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the operation are not valid.</p>
        capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_service_catalog.types.search_products_input.SearchProductsInput]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog.types.search_products_output.SearchProductsOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.search_products

        (
            output,
            http_response,
        ) = await capo_service_catalog._operations.aws242_service_catalog_service.search_products.async_search_products(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SearchProducts")
    )
    input_: capo_service_catalog.types.search_products_input.SearchProductsInput = {}
    if accept_language is not None:
        input_["accept_language"] = accept_language
    if filters is not None:
        input_["filters"] = filters
    if page_size is not None:
        input_["page_size"] = page_size
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if page_token is not None:
        input_["page_token"] = page_token

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