snowflake-sdk
Version:
Node.js driver for Snowflake
310 lines (309 loc) • 8.59 kB
TypeScript
export = ConnectionConfig;
/**
* A Connection configuration object that should be available to all stateful
* objects in the driver.
*
* @param {Object} options
* @param {Boolean} [validateCredentials]
* @param {Boolean} [qaMode]
* @param {Object} [clientInfo]
*
* @constructor
*/
declare function ConnectionConfig(options: Object, validateCredentials?: boolean, qaMode?: boolean, clientInfo?: Object): void;
declare class ConnectionConfig {
/**
* A Connection configuration object that should be available to all stateful
* objects in the driver.
*
* @param {Object} options
* @param {Boolean} [validateCredentials]
* @param {Boolean} [qaMode]
* @param {Object} [clientInfo]
*
* @constructor
*/
constructor(options: Object, validateCredentials?: boolean, qaMode?: boolean, clientInfo?: Object);
connectionShapeForTelemetry: import("../telemetry/connection_identifier_shape").ConnectionShapePayload;
_qaMode: boolean | undefined;
queryTag: any;
/**
* Returns an object that contains information about the proxy hostname, port,
* etc. for when http requests are made.
*
* @returns {Object}
*/
getProxy: () => Object;
/**
* Returns the warehouse to automatically use once a connection has been
* established.
*
* @returns {String}
*/
getWarehouse: () => string;
/**
* Returns the database to automatically use once a connection has been
* established.
*
* @returns {String}
*/
getDatabase: () => string;
/**
* Returns the schema to automatically use once a connection has been
* established.
*
* @returns {String}
*/
getSchema: () => string;
/**
* Returns the role to automatically use once a connection has been
* established.
*
* @returns {String}
*/
getRole: () => string;
/**
* Returns the service name.
*
* @returns {String}
*/
getServiceName: () => string;
/**
* Returns the authenticator to use for establishing a connection.
*
* @returns {String}
*/
getAuthenticator: () => string;
/**
* Returns the timeout in millis used for authentication by external browser.
*
* @returns {String}
*/
getBrowserActionTimeout: () => string;
/**
* Returns the private key string.
*
* @returns {String}
*/
getPrivateKey: () => string;
/**
* Returns the private key file location.
*
* @returns {String}
*/
getPrivateKeyPath: () => string;
/**
* Returns the private key passphrase.
*
* @returns {String}
*/
getPrivateKeyPass: () => string;
/**
* Returns the OAuth token.
*
* @returns {String}
*/
getToken: () => string;
/**
* Returns the streamResult flag.
*
* @returns {boolean}
*/
getStreamResult: () => boolean;
/**
* Returns the fetchAsString array.
*
* @returns {String[]}
*/
getFetchAsString: () => string[];
/**
* Returns the rowMode string value ('array', 'object' or 'object_with_renamed_duplicated_columns'). Could be null or undefined.
*
* @returns {String}
*/
getRowMode: () => string;
/**
* Returns the client type.
*
* @returns {String}
*/
getClientType: () => string;
/**
* Returns the client name.
*
* @returns {String}
*/
getClientName: () => string;
/**
* Returns the client version.
*
* @returns {String}
*/
getClientVersion: () => string;
/**
* Returns the client application.
*
* @returns {String}
*/
getClientApplication: () => string;
/**
* Returns a JSON object containing version information for all the various
* components of the runtime, e.g. node, v8, openssl, etc.
*
* @returns {Object}
*/
getClientEnvironment: () => Object;
/**
* Returns the client session keep alive setting.
*
* @returns {String}
*/
getClientSessionKeepAlive: () => string;
/**
* Returns the client session keep alive heartbeat frequency setting.
*
* @returns {String}
*/
getClientSessionKeepAliveHeartbeatFrequency: () => string;
/**
* Returns the client treat integer as setting
*
* @returns {String}
*/
getJsTreatIntegerAsBigInt: () => string;
/**
* Returns the setting for the GCS_USE_DOWNSCOPED_CREDENTIAL session parameter
*
* @returns {String}
*/
getGcsUseDownscopedCredential: () => string;
/**
* Returns the bind threshold
*
* @returns {string}
*/
getbindThreshold: () => string;
/**
* Returns the force stage bind error
*
* @returns {string}
*/
getForceStageBindError: () => string;
/**
* Returns whether the Retry reason is included or not in the retry url
*
* @returns {Boolean}
*/
getIncludeRetryReason: () => boolean;
/**
* Returns whether the Query Context Cache is enabled or not by the configuration
*
* @returns {Boolean}
*/
getDisableQueryContextCache: () => boolean;
/**
* Returns the client config file
*
* @returns {String}
*/
getClientConfigFile: () => string;
/**
* Returns the max login timeout
*
* @returns {Number}
*/
getRetryTimeout: () => number;
getDisableConsoleLogin: () => boolean;
/**
* Returns whether the SAML URL check is enabled or not.
*
* @returns {Boolean}
*/
getDisableSamlURLCheck: () => boolean;
getCredentialCacheDir: () => string | null;
getClientRequestMFAToken: () => boolean;
/**
* Returns whether the auth token saves on the local machine or not.
*
* @returns {Boolean}
*/
getClientStoreTemporaryCredential: () => boolean;
getPasscodeInPassword: () => boolean;
getPasscode: () => any;
getOauthClientId: () => any;
getOauthClientSecret: () => any;
getOauthAuthorizationUrl: () => any;
getOauthTokenRequestUrl: () => any;
getOauthRedirectUri: () => any;
getOauthScope: () => any;
getOauthChallengeMethod: () => any;
getOauthHttpAllowed: () => any;
/**
* Returns attributes of Connection Config object that can be used to identify
* the connection, when ID is not available in the scope. This is not sufficient set,
* since multiple connections can be instantiated for the same config, but can be treated as a hint.
*
* @returns {string}
*/
describeIdentityAttributes: () => string;
username: any;
password: any;
accessUrl: any;
region: any;
account: any;
token: any;
host: any;
sessionToken: any;
masterToken: any;
masterTokenExpirationTime: any;
sessionTokenExpirationTime: any;
clientConfigFile: any;
openExternalBrowserCallback: any;
browserRedirectPort: any;
browserResponseRenderer: any;
oauthEnableSingleUseRefreshTokens: any;
workloadIdentityProvider: any;
workloadIdentityImpersonationPath: any;
workloadIdentityAzureEntraIdResource: any;
workloadIdentityAzureClientId: any;
workloadIdentityAwsUseOutboundToken: any;
rowStreamHighWaterMark: any;
crlValidatorConfig: {
checkMode: any;
allowCertificatesWithoutCrlURL: any;
inMemoryCache: any;
onDiskCache: any;
};
serverSessionKeepAlive: any;
_mapParameters: {};
agentClass: any;
agentCache: Map<any, any>;
/**
* Destroys all HTTP(S) agents cached for this connection and clears the cache.
* This releases keep-alive sockets and file descriptors held by the agents.
*/
destroyAgentCache(): void;
/**
* Determines if qa-mode is on.
*
* @returns {Boolean}
*/
isQaMode(): boolean;
/**
* Clears all credential-related information.
*/
clearCredentials(): void;
getTimeout(): Object;
getResultPrefetch(): Object;
getResultStreamInterrupts(): Object;
getResultChunkCacheSize(): Object;
getResultProcessingBatchSize(): Object;
getResultProcessingBatchDuration(): Object;
getRetryLargeResultSetMaxNumRetries(): Object;
getRetryLargeResultSetMaxSleepTime(): Object;
getRetrySfMaxNumRetries(): Object;
getRetrySfMaxLoginRetries(): Object;
getRetrySfStartingSleepTime(): Object;
getRetrySfMaxSleepTime(): Object;
private _getParameterValue;
}