Ephemeral Dashboard

class perses_api.ephemeral_dashboard.EphemeralDashboard[source]

Bases: object

The class includes all necessary methods to access the Perses ephemeral dashboards API

Parameters:

perses_api_model (APIModel) – Inject a Perses API model object that includes all necessary values and information

api

This is where we store the api

Type:

Api

__init__(perses_api_model: APIModel)[source]
create_ephemeral_dashboard(project_name: str, ephemeral_dashboard: EphemeralDashboard) dict[source]

The method includes a functionality to create a new ephemeral dashboard within a project

Parameters:
  • project_name (str) – Specify the name of the project to create the ephemeral dashboard in

  • ephemeral_dashboard (EphemeralDashboard) – Specify the ephemeral dashboard resource to create

Raises:
  • ValueError – Missed specifying a necessary value

  • Exception – Unspecified error by executing the API call

Returns:

The created ephemeral dashboard dict

Return type:

dict

delete_ephemeral_dashboard(project_name: str, name: str) None[source]

The method includes a functionality to delete an ephemeral dashboard by name

Parameters:
  • project_name (str) – Specify the name of the project the ephemeral dashboard belongs to

  • name (str) – Specify the name of the ephemeral dashboard to delete

Raises:

ValueError – Missed specifying a necessary value

get_ephemeral_dashboard(project_name: str, name: str) dict[source]

The method includes a functionality to retrieve a single ephemeral dashboard by name

Parameters:
  • project_name (str) – Specify the name of the project the ephemeral dashboard belongs to

  • name (str) – Specify the name of the ephemeral dashboard to retrieve

Raises:
  • ValueError – Missed specifying a necessary value

  • Exception – Unspecified error by executing the API call

Returns:

The ephemeral dashboard dict

Return type:

dict

get_ephemeral_dashboards(project_name: str, name: str = None) list[source]

The method includes a functionality to retrieve all ephemeral dashboards within a project

Parameters:
  • project_name (str) – Specify the name of the project to list ephemeral dashboards for

  • name (str) – Specify a name to filter the results (default None)

Raises:
  • ValueError – Missed specifying a necessary value

  • Exception – Unspecified error by executing the API call

Returns:

A list of ephemeral dashboard dicts

Return type:

list

update_ephemeral_dashboard(project_name: str, name: str, ephemeral_dashboard: EphemeralDashboard) dict[source]

The method includes a functionality to update an existing ephemeral dashboard by name

Parameters:
  • project_name (str) – Specify the name of the project the ephemeral dashboard belongs to

  • name (str) – Specify the name of the ephemeral dashboard to update

  • ephemeral_dashboard (EphemeralDashboard) – Specify the updated ephemeral dashboard resource

Raises:
  • ValueError – Missed specifying a necessary value

  • Exception – Unspecified error by executing the API call

Returns:

The updated ephemeral dashboard dict

Return type:

dict