Skip to content

list_themes

list_themes(
    app_id: str,
    environment_name: str,
    *,
    config_overrides: Optional[AmplifyUIBuilderClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[ListEntityLimit] = None,
) -> ListThemesResponse

Retrieves a list of themes for a specified Amplify app and backend environment.

Parameters:

  • app_id (str) –

    The unique ID for the Amplify app.

  • environment_name (str) –

    The name of the backend environment that is a part of the Amplify app.

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

    The token to request the next page of results.

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

    The maximum number of theme results to return in the response.

Raises:

Source code in docs_src/capo_amplifyuibuilder/_services/amplify_ui_builder.py
def list_themes(
    self,
    app_id: str,
    environment_name: str,
    *,
    config_overrides: Optional[AmplifyUIBuilderClientConfig] = None,
    next_token: Optional[str] = None,
    max_results: Optional[
        "capo_amplifyuibuilder.types.list_entity_limit.ListEntityLimit"
    ] = None,
) -> "capo_amplifyuibuilder.types.list_themes_response.ListThemesResponse":
    """<p>Retrieves a list of themes for a specified Amplify app and backend environment.</p>

    Args:
        app_id: <p>The unique ID for the Amplify app.</p>
        environment_name: <p>The name of the backend environment that is a part of the Amplify app.</p>
        next_token: <p>The token to request the next page of results.</p>
        max_results: <p>The maximum number of theme results to return in the response.</p>

    Raises:
        capo_amplifyuibuilder.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred. Please retry your request.</p>
        capo_amplifyuibuilder.errors.invalid_parameter_exception.InvalidParameterException: <p>An invalid or out-of-range value was supplied for the input parameter.</p>
        capo_amplifyuibuilder.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_amplifyuibuilder.types.list_themes_request.ListThemesRequest]",
    ) -> OperationResponse[
        "capo_amplifyuibuilder.types.list_themes_response.ListThemesResponse"
    ]:
        import capo_amplifyuibuilder._operations.amplify_ui_builder.list_themes

        output, http_response = (
            capo_amplifyuibuilder._operations.amplify_ui_builder.list_themes.list_themes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListThemes")
    )
    input_: capo_amplifyuibuilder.types.list_themes_request.ListThemesRequest = {
        "app_id": app_id,
        "environment_name": environment_name,
    }
    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