EncryptedIndex instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
index_name | str | Name of an existing index |
index_key | bytes | (Optional) 32-byte encryption key. Required for indexes created with the SDK-supplied KEK path (provider: none); omit for KMS-backed indexes. |
In v0.17
index_key is optional. KMS-backed indexes (created with kms_name) omit it — the server resolves the DEK via the persisted KMSBlob. SDK-supplied indexes (created with only index_key) must re-supply the same 32-byte key here.Returns
An instance ofEncryptedIndex bound to the loaded index. The SDK probes the describe endpoint during load, so a missing or inaccessible index raises here rather than silently returning a phantom handle.
Exceptions
ValueError
ValueError
- Raised if
index_keyis provided but is not exactly 32 bytes. - Raised if the index does not exist on the server (the describe probe fails).
- Raised if the supplied key does not match the cached envelope hash (SDK-supplied path).
- Raised by the server if a KMS-backed index’s slot is unavailable.
Network/API Errors
Network/API Errors
- Raised if the API request fails due to network issues.
- Raised if the server returns an HTTP error status.
- Raised if the server is unreachable or times out.