ai_core_sdk.resource_clients.applications_client module¶
- class ai_core_sdk.resource_clients.applications_client.ApplicationsClient(rest_client: RestClient)¶
Bases:
BaseClientApplicationsClient is a class implemented for interacting with the applications related endpoints of the server. It implements the base class
ai_api_client_sdk.resource_clients.base_client.BaseClient- create(revision: str, path: str, application_name: str = None, repository_name: str = None, repository_url: str = None) BasicResponse¶
Creates an application.
- Parameters:
revision (str) – revision to synchronize
path (str) – within the repository to synchronize
application_name (str, optional) – Name of the application
repository_name (str, optional) – Name of the repository to synchronize. Either this or the repository_url needs to be provided
repository_url (str, optional) – URL of the repository to synchronize. Either this or the repository_name needs to be provided
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.base_models.BasicResponse
- delete(application_name: str) BasicResponse¶
Deletes the application.
- Parameters:
application_name (str) – name of the application to be deleted
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIPreconditionFailedException if a 412 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.base_models.BasicResponse
- get(application_name: str) Application¶
Retrieves the application from the server.
- Parameters:
application_name (str) – name of the application to be retrieved
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
The retrieved application
- Return type:
class:ai_core_sdk.models.application.Application
- get_status(application_name: str) ApplicationStatus¶
Retrieves the application status from the server.
- Parameters:
application_name (str) – name of the application
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
The retrieved application status
- Return type:
class:ai_core_sdk.models.application_status.ApplicationStatus
- modify(application_name: str, repository_url: str, path: str, revision: str) BasicResponse¶
Modifies the application
- Parameters:
application_name – name of the application to be modified
repository_url (str)
revision (str)
path (str)
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIPreconditionFailedException if a 412 response is received from the server
- Returns:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.base_models.BasicResponse
- query() ApplicationQueryResponse¶
Returns the applications.
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
The retrieved applications
- Return type:
class:ai_core_sdk.models.application_query_response.ApplicationQueryResponse
- refresh(application_name: str) BasicResponse¶
Triggers synchronisation of the application.
- Parameters:
application_name (str) – name of the application to be refreshed
- Raises:
class:ai_api_client_sdk.exception.AIAPIInvalidRequestException if a 400 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIAuthorizationException if a 401 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPINotFoundException if a 404 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIPreconditionFailedException if a 412 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIServerException if a non-2XX response is received from the server
- Returns:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.base_models.BasicResponse