ai_core_sdk.resource_clients.repositories_client module¶
- class ai_core_sdk.resource_clients.repositories_client.RepositoriesClient(rest_client: RestClient)¶
Bases:
BaseClientRepositoriesClient is a class implemented for interacting with the repositories related endpoints of the server. It implements the base class
ai_api_client_sdk.resource_clients.base_client.BaseClient- create(name: str, url: str, username: str, password: str) Message¶
On-boards a new GitOps repository
- Parameters:
name (str) – name of the GitOps repository
url (str) – url of the GitOps repository
username (str) – username to the GitOps repository
password (str) – password to the GitOps repository
- 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_core_sdk.models.base_models.BasicNameResponse
- delete(name: str) BasicResponse¶
Off-boards a GitOps repository.
- Parameters:
name (str) – name of the repository 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(name: str) Repository¶
Retrieves the access details for a repository if it exists.
- Parameters:
name (str) – name of the repository 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 access details for a repository
- Return type:
class:ai_core_client_sdk.models.docker_registry_secret.DockerRegistrySecret
- modify(name: str, username: str, password: str) BasicResponse¶
Updates the referenced repository credentials to synchronize repository.
- Parameters:
name (str) – name of the repository to be modified
username (str) – username to the repository
password (str) – password to the repository
- 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() RepositoryQueryResponse¶
Retrieves a list of all GitOps repositories for a tenant.
- 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:
A list all GitOps repositories for a tenant
- Return type:
class:ai_core_client_sdk.models.repository_query_response.RepositoryQueryResponse