Apps API Reference¶
Apps¶
- class apolo_sdk.Apps¶
Application management subsystem. Allows listing and uninstalling applications, as well as browsing available application templates.
- async list(states: list[AppState] | None = None, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[App]][source]¶
List applications, async iterator. Yields
Appinstances.- Parameters:
- async install(app_data: dict, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) App[source]¶
Install a new application instance from template data.
- Parameters:
app_data (dict) – Dictionary containing application installation data.
cluster_name (str) – cluster to install application. Default is current cluster.
org_name (str) – org to install application. Default is current org.
project_name (str) – project to install application. Default is current project.
- async uninstall(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, *, force: bool = False) None[source]¶
Uninstall an application instance.
- Parameters:
app_id (str) – The ID of the application instance to uninstall.
cluster_name (str) – cluster where the application is deployed. Default is current cluster.
org_name (str) – org where the application is deployed. Default is current org.
project_name (str) – project where the application is deployed. Default is current project.
force (bool) – Force uninstall the application. Default is False.
- async list_templates(cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppTemplate]][source]¶
List available application templates, async iterator. Yields
AppTemplateinstances.
- async list_template_versions(name: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppTemplate]][source]¶
List all available versions for a specific app template, async iterator. Yields
AppTemplateinstances.
- async get_template(name: str, version: str | None = None, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AppTemplate[source]¶
Get complete metadata for a specific app template.
- Parameters:
name (str) – The name of the app template.
version (str) – The version of the app template. Default is “latest”.
cluster_name (str) – cluster to get template from. Default is current cluster.
org_name (str) – org to get template from. Default is current org.
project_name (str) – project to get template from. Default is current project.
- async get_output(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) dict[str, Any][source]¶
Get output parameters from an app instance.
Returns a dictionary containing output parameters as key-value pairs. Output parameters are values generated by the application after installation, such as URLs, passwords, API keys, and other configuration values.
- Parameters:
- Returns:
Dictionary containing output parameters as key-value pairs.
- Return type:
- Raises:
ResourceNotFound – If app instance not found or no output records exist.
- async get_values(app_id: str | None = None, value_type: str | None = None, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppValue]][source]¶
Get values from app instances, async iterator. Yields
AppValueinstances.- Parameters:
app_id (str) – Optional app instance ID to filter values.
value_type (str) – Optional value type to filter.
cluster_name (str) – cluster to get values from. Default is current cluster.
org_name (str) – org to get values from. Default is current org.
project_name (str) – project to get values from. Default is current project.
- async logs(app_id: str, *, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, since: datetime | None = None, timestamps: bool = False) AsyncContextManager[AsyncIterator[bytes]][source]¶
Get logs for an app instance, async iterator. Yields chunks of logs as
bytes.- Parameters:
app_id (str) – The ID of the app instance.
cluster_name (str) – Cluster where the app is deployed. Default is current cluster.
org_name (str) – Organization where the app is deployed. Default is current org.
project_name (str) – Project where the app is deployed. Default is current project.
since (datetime) – Optional timestamp to start logs from.
timestamps (bool) – Include timestamps in the logs output.
- async get_events(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None) AsyncContextManager[AsyncIterator[AppEvent]][source]¶
Get events for an app instance, async iterator. Yields
AppEventinstances.- Parameters:
- async get_revisions(app_id: str) list[AppConfigurationRevision][source]¶
Get configuration revision history for an app instance.
- Parameters:
app_id (str) – The ID of the app instance.
- Returns:
List of configuration revisions.
- Return type:
- async rollback(app_id: str, revision_number: int, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, comment: str | None = None) App[source]¶
Rollback an app instance to a previous configuration revision.
- Parameters:
app_id (str) – The ID of the app instance.
revision_number (int) – The revision number to rollback to.
cluster_name (str) – Cluster where the app is deployed. Default is current cluster.
org_name (str) – Organization where the app is deployed. Default is current org.
project_name (str) – Project where the app is deployed. Default is current project.
comment (str) – Optional comment describing the rollback.
- Returns:
The updated application instance.
- Return type:
- async get_input(app_id: str, cluster_name: str | None = None, org_name: str | None = None, project_name: str | None = None, revision: int | None = None) dict[str, Any][source]¶
Get input parameters for an app instance, optionally for a specific revision.
- Parameters:
app_id (str) – The ID of the app instance.
cluster_name (str) – Cluster where the app is deployed. Default is current cluster.
org_name (str) – Organization where the app is deployed. Default is current org.
project_name (str) – Project where the app is deployed. Default is current project.
revision (int) – Optional revision number to get input for. Default is current revision.
- Returns:
Dictionary containing input parameters.
- Return type:
===
- class apolo_sdk.App¶
Read-only
dataclassfor describing application instance.- created_at¶
Timestamp when the application was created,
datetime.
- updated_at¶
Timestamp when the application was last updated,
datetime.
===
- class apolo_sdk.AppTemplate¶
Read-only
dataclassfor describing an application template.
===
- class apolo_sdk.AppValue¶
Read-only
dataclassfor describing an application value.- value¶
The actual value, can be any type.
===
- class apolo_sdk.AppState¶
Enumeration of possible application states.
- QUEUED¶
Application is queued for deployment.
- PROGRESSING¶
Application deployment is in progress.
- HEALTHY¶
Application is healthy and running.
- DEGRADED¶
Application is running but in a degraded state.
- ERRORED¶
Application has encountered an error.
- UNINSTALLING¶
Application is being uninstalled.
- UNINSTALLED¶
Application has been uninstalled.
===
- class apolo_sdk.AppEvent¶
Read-only
dataclassfor describing an application event.- created_at¶
Timestamp when the event was created,
datetime.
- resources¶
List of resources associated with the event,
listofAppEventResource.
===
- class apolo_sdk.AppEventResource¶
Read-only
dataclassfor describing a resource in an application event.
===