ai_core_sdk.resource_clients.docker_registry_secrets_client module

class ai_core_sdk.resource_clients.docker_registry_secrets_client.DockerRegistrySecretsClient(rest_client: RestClient)

Bases: BaseClient

DockerRegistrySecretsClient is a class implemented for interacting with the docker registry secret related endpoints of the server. It implements the base class ai_api_client_sdk.resource_clients.base_client.BaseClient

create(name: str, data: dict) Message

Creates a docker secret based on the configuration in the request body.

Parameters:
  • name (str) – name of the docker registry secret

  • data (dict) – json dict, defining the docker registry secret

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.Message

delete(name: str) BasicResponse

Deletes the docker registry secret with the given name if it exists.

Parameters:

name (str) – name of the docker registry secret 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) DockerRegistrySecret

Returns the metadata of the docker registry secrets which matches the given name.

Parameters:

name (str) – name of the docker registry secret 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 metadata of the docker registry secret

Return type:

class:ai_core_sdk.models.docker_registry_secret.DockerRegistrySecret

modify(name: str, data: dict) BasicResponse

Updates the docker registry secret

Parameters:
  • name (str) – name of the docker registry secret to be modified

  • data (dict) – json dict, defining the docker registry secret

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(top: int = None, skip: int = None) DockerRegistrySecretQueryResponse

Gets a list of metadata of docker registry secrets.

Parameters:
  • top (int, optional) – Number of docker registry secrets to be retrieved, defaults to None

  • skip (int, optional) – Number of docker registry secrets to be skipped, from the list of the queried docker registry secrets, defaults to None

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 of metadata of secrets

Return type:

class:ai_core_sdk.models.docker_registry_secret_query_response.DockerRegistrySecretQueryResponse