OCI Vault: how to Retrieve Secrets with Python SDK v2.3.0 - 'InvalidParameter' handling
I'm updating my dependencies and I can't seem to get I've been struggling with this for a few days now and could really use some help. I'm currently working with an scenario while trying to retrieve secrets from OCI Vault using the Python SDK (version 2.3.0). Despite following the official documentation, I'm working with an 'InvalidParameter' exception. The code snippet I'm using is as follows: ```python import oci # Configuration details config = oci.config.from_file() # Using default config file vault_client = oci.key_management.KmsVaultsClient(config) # Attempting to get the secret secret_id = 'ocid1.vaultsecret.oc1..exampleuniqueID' try: secret = vault_client.get_secret(secret_id) print(f'Secret retrieved: {secret.data}') except oci.exceptions.InvalidParameter as e: print(f'behavior: {e}') ``` I checked the secret OCID and it looks correct. I also verified that my IAM policy allows access to the Vault and that the secret is in the same region as the SDK configuration. Additionally, I've ensured that the compartment ID is correct in the config file. I even tried using a different secret to see if it was a one-off scenario, but the same exception occurs. Hereβs the behavior message Iβm seeing: ``` oci.exceptions.InvalidParameter: Invalid Parameter provided. Please check the parameters and try again. ``` Is there something I might be missing or any common pitfalls in using the OCI SDK for secret retrieval that could lead to this behavior? Any insights would be greatly appreciated! I'd be grateful for any help. This is my first time working with Python 3.11. I'd be grateful for any help. I'm on Debian using the latest version of Python.