ai_core_sdk.resource_clients package
Submodules
ai_core_sdk.resource_clients.applications_client module
- class ApplicationsClient
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, path, application_name=None, repository_name=None, repository_url=None)
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)
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)
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)
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, repository_url, path, revision)
Modifies the application
- Parameters:
application_name (str) -- 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()
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)
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
ai_core_sdk.resource_clients.docker_registry_secrets_client module
- class DockerRegistrySecretsClient
Bases:
BaseClientDockerRegistrySecretsClient 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, data)
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)
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)
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, data)
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=None, skip=None)
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
ai_core_sdk.resource_clients.internal_rest_client module
- class InternalRestClient
Bases:
RestClientInternalRestClient is a class implemented for sending requests to services within aicore. The InternalRestClient should only be used for services that do not require authentication when called within aicore.
- __init__(base_url=None, get_token=None, resource_group=None, *args, **kwargs)
ai_core_sdk.resource_clients.kpi_client module
- class KpiClient
Bases:
BaseClientKpiClient is a class implemented for interacting with the analytics kpi endpoint of the server. It implements the base class
ai_api_client_sdk.resource_clients.base_client.BaseClient- query()
Retrieves the number of executions, artifacts, and deployments for each resource group, scenario, and executable.
- 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 KPI data
- Return type:
class:ai_core_sdk.models.kpi.Kpi
ai_core_sdk.resource_clients.metrics_client module
- class MetricsCoreClient
Bases:
MetricsClientMetricsCoreClient is a class implemented for interacting with the metrics related endpoints of the server. It is inherited from the base class
ai_api_client_sdk.resource_clients.metrics_client.MetricsClient- __init__(rest_client, execution_id=None)
- Parameters:
execution_id (str)
- Return type:
None
- log_metrics(metrics, execution_id='', artifact_name=None, resource_group=None)
Creates or updates the metrics for an execution.
- param metrics:
List of the metrics related to the execution,
- type metrics:
List[class:ai_api_client_sdk.metric.Metric]
- param execution_id:
ID of the execution, of which the metrics should be modified.
- type execution_id:
str
- param artifact_name:
Name of the artifact to associate with a metric, defaults to None
- type artifact_name:
str
- param resource_group:
Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None- type resource_group:
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.AIAPIServerException if a non-2XX response is received from the server
- Parameters:
metrics (List[Metric])
execution_id (str)
artifact_name (str)
resource_group (str)
- Return type:
None
- modify(execution_id='', metrics=None, tags=None, custom_info=None, resource_group=None)
Creates or updates the metrics for an execution.
- param execution_id:
ID of the execution, of which the metrics should be modified.
- type execution_id:
str
- param metrics:
List of the metrics related to the execution, defaults to None
- type metrics:
List[class:ai_api_client_sdk.metric.Metric], optional
- param tags:
List of the tags related to the execution, defaults to None
- type tags:
List[class:'ai_api_client_sdk.models.metric_tag.MetricTag'], optional
- param custom_info:
List of custom info related to the execution, defaults to None
- type custom_info:
List[class:ai_api_client_sdk.models.metric_custom_info.MetricCustomInfo], optional
- param resource_group:
Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None- type resource_group:
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.AIAPIServerException if a non-2XX response is received from the server
- Parameters:
execution_id (str)
metrics (List[Metric])
tags (List[MetricTag])
custom_info (List[MetricCustomInfo])
resource_group (str)
- Return type:
None
- set_custom_info(custom_info, execution_id='', resource_group=None)
- log custom info against the given execution
captures consumption semantics for the metrics or complex metric in JSON format.
- param custom_info:
List of custom info related to the execution
- type custom_info:
List[class:ai_api_client_sdk.models.metric_custom_info.MetricCustomInfo], optional
- param execution_id:
ID of the execution, of which the metrics should be modified.
- type execution_id:
str
- param resource_group:
Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None- type resource_group:
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.AIAPIServerException if a non-2XX response is received from the server
- Parameters:
custom_info (List[MetricCustomInfo])
execution_id (str)
resource_group (str)
- Return type:
None
- set_tags(tags, execution_id='', resource_group=None)
log tags against the given execution
- param tags:
List of the tags related to the execution, defaults to None
- type tags:
List[class:'ai_api_client_sdk.models.metric_tag.MetricTag']
- param execution_id:
ID of the execution, of which the metrics should be modified.
- type execution_id:
str
- param resource_group:
Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_api_client_sdk.ai_api_v2_client.AIAPIV2Clientshould be specified, defaults to None- type resource_group:
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.AIAPIServerException if a non-2XX response is received from the server
- Parameters:
tags (List[MetricTag])
execution_id (str)
resource_group (str)
- Return type:
None
ai_core_sdk.resource_clients.object_store_secrets_client module
- class ObjectStoreSecretsClient
Bases:
BaseClientObjectStoreSecretsClient is a class implemented for interacting with the object store secret related endpoints of the server. It implements the base class
ai_api_client_sdk.resource_clients.base_client.BaseClient- create(name, type, data, bucket=None, endpoint=None, region=None, path_prefix=None, verifyssl=None, usehttps=None, resource_group=None)
Creates an object store secret.
- Parameters:
name (str) -- name of the object store secret
type (str) -- type of object storage
data (str) -- data to be posted
bucket (str) -- name of the bucket
endpoint (str) -- endpoint of object storage
region (str) -- region of object storage
path_prefix (str) -- path prefix
verifyssl (str) -- verify ssl
usehttps (str) -- use https
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, 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.AIAPIForbiddenException if a 403 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIConflictException if a 409 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 available secrets
- Return type:
class:ai_core_sdk.models.base_models.BasicNameResponse
- delete(name, resource_group=None)
Deletes the object store secret.
- Parameters:
name (str) -- name of the object store secret to be deleted
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, 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.AIAPIForbiddenException if a 403 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:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.base_models.BasicResponse
- get(name, resource_group=None)
Retrieves the object store secret from the server.
- Parameters:
name (str) -- name of the object store secret to be retrieved
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, 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.AIAPIForbiddenException if a 403 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 object store secret
- Return type:
class:ai_core_sdk.models.object_store_secret.ObjectStoreSecret
- modify(name, type, data, bucket=None, endpoint=None, region=None, path_prefix=None, verifyssl=None, usehttps=None, resource_group=None)
Modifies the object store secret
- Parameters:
name (str) -- name of the object store secret to be modified
type (str) -- type of object storage
data (str) -- data to be posted
bucket (str) -- name of the bucket
endpoint (str) -- endpoint of object storage
region (str) -- region of object storage
path_prefix (str) -- path prefix
verifyssl (str) -- verify ssl
usehttps (str) -- use https
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, 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.AIAPIForbiddenException if a 403 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=None, skip=None, resource_group=None)
Returns the object store secrets.
- Parameters:
top (int, optional) -- Number of object store secrets to be retrieved, defaults to None
skip (int, optional) -- Number of object store secrets to be skipped, from the list of the queried object store secrets, defaults to None
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, 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.AIAPIForbiddenException if a 403 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 object store secrets
- Return type:
class:ai_core_sdk.models.object_store_secret_query_response.ObjectStoreSecretQueryResponse
ai_core_sdk.resource_clients.repositories_client module
- class RepositoriesClient
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, url, username, password)
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)
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)
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, username, password)
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()
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
ai_core_sdk.resource_clients.secrets_client module
- class SecretsClient
Bases:
BaseClientSecretsClient is a class implemented for interacting with the secret related endpoints of the server. It implements the base class
ai_api_client_sdk.resource_clients.base_client.BaseClient- create(name, data, resource_group=None, ai_tenant_scope=True)
Creates a secret.
- Parameters:
name (str) -- name of the secret
data (dict) -- data of secret
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, defaults to Noneai_tenant_scope (bool) -- Specify whether the main tenant scope is to be used
- 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.AIAPIForbiddenException if a 403 response is received from the server
- Raises:
class:ai_api_client_sdk.exception.AIAPIConflictException if a 409 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 available secrets
- Return type:
class:ai_core_sdk.models.base_models.Message
- delete(name, resource_group=None, ai_tenant_scope=True)
Deletes the secret.
- Parameters:
name (str) -- name of the secret to be deleted
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, defaults to Noneai_tenant_scope (bool) -- Specify whether the main tenant scope is to be used
- 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.AIAPIForbiddenException if a 403 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:
An object representing the response from the server
- Return type:
class:ai_api_client_sdk.models.base_models.Message
- modify(name, data, resource_group=None, ai_tenant_scope=True)
Modifies the secret.
- Parameters:
name (str) -- name of the secret to be modified
data (dict) -- data of secret
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, defaults to Noneai_tenant_scope (bool) -- Specify whether the main tenant scope is to be used
- 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.AIAPIForbiddenException if a 403 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.Message
- query(top=None, skip=None, resource_group=None, ai_tenant_scope=True)
Returns the secrets.
- Parameters:
top (int, optional) -- Number of secrets to be retrieved, defaults to None
skip (int, optional) -- Number of secrets to be skipped, from the list of the queried secrets, defaults to None
resource_group (str) -- Resource Group which the request should be sent on behalf. Either this or a default resource group in the
ai_core_sdk.ai_core_v2_client.AICoreV2Clientshould be specified, defaults to Noneai_tenant_scope (bool) -- Specify whether the main tenant scope is to be used
- 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.AIAPIForbiddenException if a 403 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 secrets
- Return type:
class:ai_core_sdk.models.secret_query_response.SecretQueryResponse