Getting a secret profile¶
profile = client.secret_profile.get(profile_id=profile_id)
Fetches an existing profile by the ID that create returned, or that you copied from the platform UI.
Parameters¶
Parameter |
Type |
Meaning |
|---|---|---|
|
|
The profile’s ID. |
Return value¶
A Profile. See Secret profiles for the
attribute descriptions. As with create, secret_data is an obfuscated copy;
the secret itself cannot be read back.
Errors¶
SecretProfileNotFoundErrorNo profile with this ID exists, or
profile_idis empty.
Any other failure surfaces as one of the general SDK exceptions described in Errors.
Example¶
from arango_ai_sdk.exceptions import SecretProfileNotFoundError
try:
profile = client.secret_profile.get(profile_id="does-not-exist")
except SecretProfileNotFoundError:
print("Create the profile first.")
else:
print(profile.name, profile.profile_type)