| 1 | [vectordb](../README.md) / [Exports](../modules.md) / ConnectionOptions |
| 2 | |
| 3 | # Interface: ConnectionOptions |
| 4 | |
| 5 | ## Table of contents |
| 6 | |
| 7 | ### Properties |
| 8 | |
| 9 | - [apiKey](ConnectionOptions.md#apikey) |
| 10 | - [awsCredentials](ConnectionOptions.md#awscredentials) |
| 11 | - [awsRegion](ConnectionOptions.md#awsregion) |
| 12 | - [hostOverride](ConnectionOptions.md#hostoverride) |
| 13 | - [readConsistencyInterval](ConnectionOptions.md#readconsistencyinterval) |
| 14 | - [region](ConnectionOptions.md#region) |
| 15 | - [storageOptions](ConnectionOptions.md#storageoptions) |
| 16 | - [timeout](ConnectionOptions.md#timeout) |
| 17 | - [uri](ConnectionOptions.md#uri) |
| 18 | |
| 19 | ## Properties |
| 20 | |
| 21 | ### apiKey |
| 22 | |
| 23 | • `Optional` **apiKey**: `string` |
| 24 | |
| 25 | API key for the remote connections |
| 26 | |
| 27 | Can also be passed by setting environment variable `LANCEDB_API_KEY` |
| 28 | |
| 29 | #### Defined in |
| 30 | |
| 31 | [index.ts:112](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L112) |
| 32 | |
| 33 | ___ |
| 34 | |
| 35 | ### awsCredentials |
| 36 | |
| 37 | • `Optional` **awsCredentials**: [`AwsCredentials`](AwsCredentials.md) |
| 38 | |
| 39 | User provided AWS crednetials. |
| 40 | |
| 41 | If not provided, LanceDB will use the default credentials provider chain. |
| 42 | |
| 43 | **`Deprecated`** |
| 44 | |
| 45 | Pass `aws_access_key_id`, `aws_secret_access_key`, and `aws_session_token` |
| 46 | through `storageOptions` instead. |
| 47 | |
| 48 | #### Defined in |
| 49 | |
| 50 | [index.ts:92](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L92) |
| 51 | |
| 52 | ___ |
| 53 | |
| 54 | ### awsRegion |
| 55 | |
| 56 | • `Optional` **awsRegion**: `string` |
| 57 | |
| 58 | AWS region to connect to. Default is defaultAwsRegion |
| 59 | |
| 60 | **`Deprecated`** |
| 61 | |
| 62 | Pass `region` through `storageOptions` instead. |
| 63 | |
| 64 | #### Defined in |
| 65 | |
| 66 | [index.ts:98](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L98) |
| 67 | |
| 68 | ___ |
| 69 | |
| 70 | ### hostOverride |
| 71 | |
| 72 | • `Optional` **hostOverride**: `string` |
| 73 | |
| 74 | Override the host URL for the remote connection. |
| 75 | |
| 76 | This is useful for local testing. |
| 77 | |
| 78 | #### Defined in |
| 79 | |
| 80 | [index.ts:122](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L122) |
| 81 | |
| 82 | ___ |
| 83 | |
| 84 | ### readConsistencyInterval |
| 85 | |
| 86 | • `Optional` **readConsistencyInterval**: `number` |
| 87 | |
| 88 | (For LanceDB OSS only): The interval, in seconds, at which to check for |
| 89 | updates to the table from other processes. If None, then consistency is not |
| 90 | checked. For performance reasons, this is the default. For strong |
| 91 | consistency, set this to zero seconds. Then every read will check for |
| 92 | updates from other processes. As a compromise, you can set this to a |
| 93 | non-zero value for eventual consistency. If more than that interval |
| 94 | has passed since the last check, then the table will be checked for updates. |
| 95 | Note: this consistency only applies to read operations. Write operations are |
| 96 | always consistent. |
| 97 | |
| 98 | #### Defined in |
| 99 | |
| 100 | [index.ts:140](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L140) |
| 101 | |
| 102 | ___ |
| 103 | |
| 104 | ### region |
| 105 | |
| 106 | • `Optional` **region**: `string` |
| 107 | |
| 108 | Region to connect. Default is 'us-east-1' |
| 109 | |
| 110 | #### Defined in |
| 111 | |
| 112 | [index.ts:115](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L115) |
| 113 | |
| 114 | ___ |
| 115 | |
| 116 | ### storageOptions |
| 117 | |
| 118 | • `Optional` **storageOptions**: `Record`\<`string`, `string`\> |
| 119 | |
| 120 | User provided options for object storage. For example, S3 credentials or request timeouts. |
| 121 | |
| 122 | The various options are described at https://lancedb.github.io/lancedb/guides/storage/ |
| 123 | |
| 124 | #### Defined in |
| 125 | |
| 126 | [index.ts:105](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L105) |
| 127 | |
| 128 | ___ |
| 129 | |
| 130 | ### timeout |
| 131 | |
| 132 | • `Optional` **timeout**: `number` |
| 133 | |
| 134 | Duration in milliseconds for request timeout. Default = 10,000 (10 seconds) |
| 135 | |
| 136 | #### Defined in |
| 137 | |
| 138 | [index.ts:127](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L127) |
| 139 | |
| 140 | ___ |
| 141 | |
| 142 | ### uri |
| 143 | |
| 144 | • **uri**: `string` |
| 145 | |
| 146 | LanceDB database URI. |
| 147 | |
| 148 | - `/path/to/database` - local database |
| 149 | - `s3://bucket/path/to/database` or `gs://bucket/path/to/database` - database on cloud storage |
| 150 | - `db://host:port` - remote database (LanceDB cloud) |
| 151 | |
| 152 | #### Defined in |
| 153 | |
| 154 | [index.ts:83](https://github.com/lancedb/lancedb/blob/92179835/node/src/index.ts#L83) |