Use the ClientOptions property cloud to connect to your DataStax Astra database using your secure connection bundle (secure-connect-DATABASE_NAME.zip) and credentials property to provide your CQL credentials.
Here is an example of the minimum configuration needed to connect to your DataStax Astra database using the secure connection bundle:
const client = new Client({ cloud: { secureConnectBundle: 'path/to/secure-connect-DATABASE_NAME.zip' }, credentials: { username: 'user_name', password: 'p@ssword1' } });
You can configure your Client instance using other ClientOptions properties, for example:
const client = new Client({ cloud: { secureConnectBundle: 'path/to/secure-connect-DATABASE_NAME.zip' }, credentials: { username: 'user_name', password: 'p@ssword1' }, keyspace: 'my_ks' });
Note that contactPoints and sslOptions should not be set when using secureConnectBundle.