Skip to content

list_portals

list_portals(
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListPortalsResponse

Retrieves a list or web portals.

Parameters:

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

    The pagination token used to retrieve the next page of results for this operation.

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

    The maximum number of results to be included in the next page.

Raises:

Source code in docs_src/capo_workspaces_web/_services/work_spaces_web.py
def list_portals(
    self,
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    next_token: Optional[
        "capo_workspaces_web.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[
        "capo_workspaces_web.types.max_results.MaxResults"
    ] = None,
) -> "capo_workspaces_web.types.list_portals_response.ListPortalsResponse":
    """<p>Retrieves a list or web portals.</p>

    Args:
        next_token: <p>The pagination token used to retrieve the next page of results for this operation. </p>
        max_results: <p>The maximum number of results to be included in the next page.</p>

    Raises:
        capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
        capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
        capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
        capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workspaces_web.types.list_portals_request.ListPortalsRequest]",
    ) -> OperationResponse[
        "capo_workspaces_web.types.list_portals_response.ListPortalsResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.list_portals

        output, http_response = (
            capo_workspaces_web._operations.aws_ermine_control_plane_service.list_portals.list_portals(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_workspaces_web.types.list_portals_response.ListPortalsResponse",
    ) -> dict[str, Any]:
        import capo_workspaces_web.types.list_portals_response

        return capo_workspaces_web.types.list_portals_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListPortals", redact_output=_redact_output),
    )
    input_: capo_workspaces_web.types.list_portals_request.ListPortalsRequest = {}
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output