Skip to content

export_themes async

export_themes(
    app_id: str,
    environment_name: str,
    *,
    config_overrides: Optional[AsyncAmplifyUIBuilderClientConfig] = None,
    next_token: Optional[str] = None,
) -> ExportThemesResponse

Exports theme configurations to code that is ready to integrate into an Amplify app.

Parameters:

  • app_id (str) –

    The unique ID of the Amplify app to export the themes to.

  • environment_name (str) –

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

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

    The token to request the next page of results.

Raises:

Source code in docs_src/capo_amplifyuibuilder/_services/async_amplify_ui_builder.py
async def export_themes(
    self,
    app_id: str,
    environment_name: str,
    *,
    config_overrides: Optional[AsyncAmplifyUIBuilderClientConfig] = None,
    next_token: Optional[str] = None,
) -> "capo_amplifyuibuilder.types.export_themes_response.ExportThemesResponse":
    """<p>Exports theme configurations to code that is ready to integrate into an Amplify app.</p>

    Args:
        app_id: <p>The unique ID of the Amplify app to export the themes to.</p>
        environment_name: <p>The name of the backend environment that is part of the Amplify app.</p>
        next_token: <p>The token to request the next page of results.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_amplifyuibuilder.types.export_themes_request.ExportThemesRequest]",
    ) -> AsyncOperationResponse[
        "capo_amplifyuibuilder.types.export_themes_response.ExportThemesResponse"
    ]:
        import capo_amplifyuibuilder._operations.amplify_ui_builder.export_themes

        (
            output,
            http_response,
        ) = await capo_amplifyuibuilder._operations.amplify_ui_builder.export_themes.async_export_themes(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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