ai_core_sdk.resource_clients.object_store_secrets_client module¶
- class ai_core_sdk.resource_clients.object_store_secrets_client.ObjectStoreSecretsClient(rest_client: RestClient)¶
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: str, type: str, data: dict, bucket: str = None, endpoint: str = None, region: str = None, path_prefix: str = None, verifyssl: str = None, usehttps: str = None, resource_group: str = None) Message¶
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: str, resource_group: str = None) BasicResponse¶
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: str, resource_group: str = None) ObjectStoreSecret¶
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: str, type: str, data: dict, bucket: str = None, endpoint: str = None, region: str = None, path_prefix: str = None, verifyssl: str = None, usehttps: str = None, resource_group: str = None) BasicResponse¶
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: int = None, skip: int = None, resource_group: str = None) ObjectStoreSecretQueryResponse¶
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