Cloudbreak CLI Reference
Also available as:
PDF

database test

Test database connection.

Sub-commands

by-name Tests a stored database configuration identified by its name

by-params Tests database connection parameters

Required options

Options required for by-name sub-command:

--name [$VALUE] Database registration name

Options required for by-params sub-command:

--db-username [$VALUE] Username to use for the JDBC connection

--db-password [$VALUE] Password to use for the JDBC connection

--url [$VALUE] JDBC connection URL in the form of jdbc:db-type://address:port/db

--type [$VALUE] Type of database (the service name that will use the database

Options

--server [$VALUE] Cloudbreak server address [$CB_SERVER_ADDRESS]

--username [$VALUE] Cloudbreak user name (e-mail address) [$CB_USER_NAME]

--password [$VALUE] Cloudbreak password [$CB_PASSWORD]

--workspace [$VALUE] Name of the workspace holding the resource

--profile [$VALUE] Selects a config profile to use [$CB_PROFILE]

--auth-type [$VALUE] Authentication method to use. Values: oauth2, basic [$CB_AUTH_TYPE]

Examples

Tests connection to a previously registered database called “testpostgres”:

database test --name testpostgres

Tests connection to a database based on connection parameters provided:

cb database test by-params --type HIVE --url jdbc:postgresql://test-db.cic6nusrpqec.us-west-2.rds.amazonaws.com:5432/testdb --db-username testuser --db-password MySecurePassword123