UpgradeAssistantClient¶
Client for the Kibana Upgrade Assistant API.
The Upgrade Assistant helps you prepare a cluster for a major version upgrade by reporting deprecation issues that must be resolved first.
Note
The Upgrade Assistant API is in technical preview in Kibana 9.4; it may change or be removed in a future release. It is not space-scoped.
- class kibana._sync.client.upgrade_assistant.UpgradeAssistantClient(client, default_space_id=None, validate_spaces=True)[source]¶
Bases:
NamespaceClientClient for the Kibana Upgrade Assistant API.
The Upgrade Assistant helps you prepare a cluster for a major version upgrade by reporting deprecation issues that must be resolved first.
Note
The Upgrade Assistant API is in Technical Preview in Kibana 9.4; it may change or be removed in a future release. It is not space-scoped.
Example
>>> from kibana import Kibana >>> client = Kibana("http://localhost:5601", api_key="...") >>> status = client.upgrade_assistant.status() >>> status.body["readyForUpgrade"] True
Checking Upgrade Readiness
from kibana import Kibana client = Kibana("http://localhost:5601", api_key="your_api_key") status = client.upgrade_assistant.status() if status.body["readyForUpgrade"]: print("Cluster is ready for the next major upgrade") else: print(status.body["details"])
- status()[source]¶
Get the upgrade readiness status.
Check the status of your cluster: whether it is ready for an upgrade and, if not, which deprecation issues remain to be resolved.
Note
Technical Preview in Kibana 9.4.
- Returns:
readyForUpgrade(bool): Whether the cluster is ready to be upgraded.details(str): Human-readable summary of the readiness state (when ready or when issues remain).recentEsDeprecationLogs(dict): Recent Elasticsearch deprecation log entries (countandlogs).kibanaApiDeprecations(list): Deprecated Kibana API usage detected on this cluster.
- Return type:
ObjectApiResponse whose body includes
- Raises:
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
TransportError – If unable to connect to Kibana.
Example
>>> response = client.upgrade_assistant.status() >>> if response.body["readyForUpgrade"]: ... print("Cluster is ready for upgrade") ... else: ... print(response.body.get("details", "Issues remain")) Cluster is ready for upgrade
- __init__(client, default_space_id=None, validate_spaces=True)¶
Initialize NamespaceClient with optional space support.
AsyncUpgradeAssistantClient¶
Asynchronous version of the UpgradeAssistantClient for use with async/await syntax.
- class kibana._async.client.upgrade_assistant.AsyncUpgradeAssistantClient(client, default_space_id=None, validate_spaces=True)[source]¶
Bases:
AsyncNamespaceClientAsync client for the Kibana Upgrade Assistant API.
The Upgrade Assistant helps you prepare a cluster for a major version upgrade by reporting deprecation issues that must be resolved first.
Note
The Upgrade Assistant API is in Technical Preview in Kibana 9.4; it may change or be removed in a future release. It is not space-scoped.
Example
>>> from kibana import AsyncKibana >>> client = AsyncKibana("http://localhost:5601", api_key="...") >>> status = await client.upgrade_assistant.status() >>> status.body["readyForUpgrade"] True
Usage
The AsyncUpgradeAssistantClient provides the same methods as UpgradeAssistantClient but all methods are async and must be awaited:
from kibana import AsyncKibana import asyncio async def main(): async with AsyncKibana("http://localhost:5601") as client: status = await client.upgrade_assistant.status() print(status.body["readyForUpgrade"]) asyncio.run(main())
- async status()[source]¶
Get the upgrade readiness status.
Check the status of your cluster: whether it is ready for an upgrade and, if not, which deprecation issues remain to be resolved.
Note
Technical Preview in Kibana 9.4.
- Returns:
readyForUpgrade(bool): Whether the cluster is ready to be upgraded.details(str): Human-readable summary of the readiness state (when ready or when issues remain).recentEsDeprecationLogs(dict): Recent Elasticsearch deprecation log entries (countandlogs).kibanaApiDeprecations(list): Deprecated Kibana API usage detected on this cluster.
- Return type:
ObjectApiResponse whose body includes
- Raises:
AuthenticationException – If authentication fails.
AuthorizationException – If insufficient privileges.
TransportError – If unable to connect to Kibana.
Example
>>> response = await client.upgrade_assistant.status() >>> if response.body["readyForUpgrade"]: ... print("Cluster is ready for upgrade") ... else: ... print(response.body.get("details", "Issues remain")) Cluster is ready for upgrade
- __init__(client, default_space_id=None, validate_spaces=True)¶
Initialize AsyncNamespaceClient with optional space support.