Secret profiles¶
You do not construct this class yourself. The client owns a
SecretProfileManager and exposes it as
client.secret_profile. Its operations return
Profile instances, documented in Models.
- class arango_ai_sdk.resources.SecretProfileManager(communication)¶
Create and fetch secret profiles through the communication layer.
- Parameters:
communication (
Communication) – Shared transport. This namespace callssend_requestand nothing else.
- create(name, secret, *, provider=None, description=None, profile_type=ProfileType.LLM)¶
Create a secret profile holding one secret and return it.
- Parameters:
name (
str) – Human-readable profile name. Letters, digits, spaces, underscores and hyphens, 1 to 63 characters. Validated by the service, not here.secret (
str) – The secret to store, e.g. an API key. Sent once, then only ever referenced by the returnedprofile_id. Never logged and never included in an exception message.provider (
str, optional) – Provider the secret belongs to, e.g."openai". Recommended so later stages can pick the right profile; not validated by the service.description (
str, optional) – Free text, at most 1024 characters. Omitted from the request when not given.profile_type (
ProfileType, optional) – Category of the profile. Defaults toProfileType.LLM, which is what AutoGraph expects for chat and embedding keys.
- Returns:
The created profile.
secret_datacarries only an obfuscated copy of the secret;profile_idis what later stages need.- Return type:
Profile- Raises:
InvalidSecretNameError – The service rejected
name.InvalidSecretValueError – The service rejected
secret(empty or longer than 4096 characters).ServiceError – Any other error answer from the service.
- get(profile_id)¶
Fetch an existing secret profile by its ID.
- Parameters:
profile_id (
str) – ID returned bycreate(), or copied from the platform UI.- Returns:
The profile as the service returned it, secret obfuscated.
- Return type:
Profile- Raises:
SecretProfileNotFoundError – No profile with this ID exists, or
profile_idis empty.ServiceError – Any other error answer from the service.