Skip to main content
Loads and returns an existing EncryptedIndex instance.

Parameters

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.
For SDK-supplied indexes, the encryption key must exactly match the key used during index creation. KMS-backed indexes are tied to their kms_name slot in the service YAML — load fails if that slot is missing or unreachable.

Returns

An instance of EncryptedIndex 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

  • Raised if index_key is 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.
  • 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.

Example Usage

SDK-supplied index

KMS-backed index