Skip to content

list_managed_apis async

list_managed_apis(
    *,
    config_overrides: Optional[AsyncAPIPortalClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    product_id: Optional[ProductId] = None,
) -> ListManagedApisResponse

Lists the Managed APIs in your account.

Parameters:

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

    The maximum number of results to return in one page, from 1 to 100.

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

    The pagination token returned by a previous call. Omit it to get the first page.

  • product_id (Optional[ProductId], default: None ) –

    Optional filter: when supplied, only Managed APIs associated with this product are returned.

Raises:

  • AccessDeniedException –

    You do not have permission to perform this operation.

  • BadRequestException –

    The request is not valid. The message identifies the field or value that failed validation.

  • LimitExceededException –

    The request rate or a service quota was exceeded. Reduce the request rate or the number of resources and try again.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_apiportal/_services/async_api_portal.py
async def list_managed_apis(
    self,
    *,
    config_overrides: Optional[AsyncAPIPortalClientConfig] = None,
    max_results: Optional["capo_apiportal.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_apiportal.types.next_token.NextToken"] = None,
    product_id: Optional["capo_apiportal.types.product_id.ProductId"] = None,
) -> "capo_apiportal.types.list_managed_apis_response.ListManagedApisResponse":
    """Lists the Managed APIs in your account.

    Args:
        max_results: The maximum number of results to return in one page, from 1 to 100.
        next_token: The pagination token returned by a previous call. Omit it to get the first page.
        product_id: Optional filter: when supplied, only Managed APIs associated with this product are returned.

    Raises:
        capo_apiportal.errors.access_denied_exception.AccessDeniedException: You do not have permission to perform this operation.
        capo_apiportal.errors.bad_request_exception.BadRequestException: The request is not valid. The message identifies the field or value that failed validation.
        capo_apiportal.errors.limit_exceeded_exception.LimitExceededException: The request rate or a service quota was exceeded. Reduce the request rate or the number of resources and try again.
        capo_apiportal.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_apiportal.types.list_managed_apis_request.ListManagedApisRequest]",
    ) -> AsyncOperationResponse[
        "capo_apiportal.types.list_managed_apis_response.ListManagedApisResponse"
    ]:
        import capo_apiportal._operations.api_portal_control_service.list_managed_apis

        (
            output,
            http_response,
        ) = await capo_apiportal._operations.api_portal_control_service.list_managed_apis.async_list_managed_apis(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListManagedApis")
    )
    input_: capo_apiportal.types.list_managed_apis_request.ListManagedApisRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if product_id is not None:
        input_["product_id"] = product_id

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