diff options
author | brgayazov <bulat@ydb.tech> | 2023-09-22 15:31:12 +0300 |
---|---|---|
committer | brgayazov <bulat@ydb.tech> | 2023-09-22 16:08:45 +0300 |
commit | 43a874265ed8f1a3de511b744da423efa8850f7c (patch) | |
tree | c7c11632e121441233043526d0f4200474feb766 | |
parent | c897ddde288235a9905b1cc67b99a3d12771cd52 (diff) | |
download | ydb-43a874265ed8f1a3de511b744da423efa8850f7c.tar.gz |
Added ydb config info description to docs
8 files changed, 149 insertions, 2 deletions
diff --git a/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md b/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md index 3fc402a1a6e..100f15c1993 100644 --- a/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md +++ b/ydb/docs/en/core/reference/ydb-cli/_includes/commands.md @@ -22,6 +22,7 @@ Any command can be run from the command line with the `--help` option to get hel | Command / subcommand | Brief description | --- | --- +| [config info](../commands/config-info.md) | Displaying [connection parameters](../connect.md) | | [config profile activate](../profile/activate.md) | Activating a [profile](../profile/index.md) | | [config profile create](../profile/create.md) | Creating a [profile](../profile/index.md) | | [config profile delete](../profile/create.md) | Deleting a [profile](../profile/index.md) | diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md index dcf959c4a4e..7904de634f0 100644 --- a/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md +++ b/ydb/docs/en/core/reference/ydb-cli/commands/_includes/service.md @@ -5,10 +5,10 @@ These commands have to do with the {{ ydb-short-name }} CLI client itself and do | Name | Description | | --- | --- | | `-?`, `-h`, `--help` | Output the {{ ydb-short-name }} CLI syntax help | -| `Version` | Output the {{ ydb-short-name }} CLI version (for public builds) | +| `version` | Output the {{ ydb-short-name }} CLI version (for public builds) | | `update` | Update the {{ ydb-short-name }} CLI to the latest version (for public builds) | +| `config info` | Displaying [connection parameters](../../connect.md) | | `--license` | Show the license (for public builds) | | `--credits` | Show third-party product licenses (for public builds) | If it is not known whether the used {{ ydb-short-name }} CLI build is public, you can find out if a particular service command is supported through help output. - diff --git a/ydb/docs/en/core/reference/ydb-cli/commands/config-info.md b/ydb/docs/en/core/reference/ydb-cli/commands/config-info.md new file mode 100644 index 00000000000..4b4ef879821 --- /dev/null +++ b/ydb/docs/en/core/reference/ydb-cli/commands/config-info.md @@ -0,0 +1,70 @@ +# Displaying connection parameters + +`config info` is a service command for debugging various issues with [connection and authentication](../connect.md). The command displays the final connection parameters, such as the [endpoint](../../../concepts/connect.md#endpoint) and [database path](../../../concepts/connect.md#database), obtained by considering parameters from all possible sources. With these parameters, the CLI would connect when executing a command that implies a connection to the database. When specifying the [global option](global-options.md) `-v`, in addition to the final connection parameters, values of all connection parameters from all sources that the CLI managed to detect will be displayed, along with the names of those sources in order of priority + +General format of the command: + +```bash +{{ ydb-cli }} [global options...] config info +``` + +* `global options` — [global parameters](global-options.md). + +## Connection parameter list {#parameters-list} + +* [endpoint](../../../concepts/connect.md#endpoint) — URL of database cluster. +* [database](../../../concepts/connect.md#database) — Database path. +* **Authentication parameters:** + * [token](../../../concepts/auth.md#iam) — Access Token. + * [yc-token](../../../concepts/auth.md#iam) — Refresh Token. + * [sa-key-file](../../../concepts/auth.md#iam) — Service Account Key. + * [use-metadata-credentials](../../../concepts/auth.md#iam) — Metadata. + * [user](../../../concepts/auth.md#static-credentials) + * [password](../../../concepts/auth.md#static-credentials) +* [ca-file](../../../concepts/connect.md#tls-cert) — Root certificate. +* [iam-endpoint](../../../concepts/auth.md#iam) — URL of IAM service. + +## Examples {#examples} + +### Display final connection parameters {#basic-example} + +```bash +$ ydb -e grpcs://another.endpoint:2135 --ca-file some_certs.crt -p db123 config info +endpoint: another.endpoint:2135 +yc-token: SOME_A12****************21_TOKEN +iam-endpoint: iam.api.cloud.yandex.net +ca-file: some_certs.crt +``` + +### Display all connection parameters along with their sources {#verbose-example} + +```bash +$ ydb -e grpcs://another.endpoint:2135 --ca-file some_certs.crt -p db123 -v config info +Using Yandex.Cloud Passport token from YC_TOKEN env variable + +endpoint: another.endpoint:2135 +yc-token: SOME_A12****************21_TOKEN +iam-endpoint: iam.api.cloud.yandex.net +ca-file: some_certs.crt +current auth method: yc-token + +"ca-file" sources: + 1. Value: some_certs.crt. Got from: explicit --ca-file option + +"database" sources: + 1. Value: /some/path. Got from: active profile "test_config_info" + +"endpoint" sources: + 1. Value: another.endpoint:2135. Got from: explicit --endpoint option + 2. Value: db123.endpoint:2135. Got from: profile "db123" from explicit --profile option + 3. Value: some.endpoint:2135. Got from: active profile "test_config_info" + +"iam-endpoint" sources: + 1. Value: iam.api.cloud.yandex.net. Got from: default value + +"sa-key-file" sources: + 1. Value: /Users/username/some-sa-key-file. Got from: active profile "test_config_info" + +"yc-token" sources: + 1. Value: SOME_A12****************21_TOKEN. Got from: YC_TOKEN enviroment variable +``` diff --git a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml index b37dd00be8a..cc97e600b7a 100644 --- a/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml +++ b/ydb/docs/en/core/reference/ydb-cli/toc_i.yaml @@ -105,6 +105,8 @@ items: href: commands/discovery-list.md - name: Authentication href: commands/discovery-whoami.md + - name: Displaying connection parameters + href: commands/config-info.md - name: Getting the YDB CLI version href: version.md - name: Load testing diff --git a/ydb/docs/ru/core/reference/ydb-cli/_includes/commands.md b/ydb/docs/ru/core/reference/ydb-cli/_includes/commands.md index 60d740f6463..35aa2f19b53 100644 --- a/ydb/docs/ru/core/reference/ydb-cli/_includes/commands.md +++ b/ydb/docs/ru/core/reference/ydb-cli/_includes/commands.md @@ -22,6 +22,7 @@ Команда / подкоманда | Краткое описание --- | --- +[config info](../commands/config-info.md) | Просмотр [параметров соединения](../connect.md) [config profile activate](../profile/activate.md) | Активация [профиля](../profile/index.md) [config profile create](../profile/create.md) | Создание [профиля](../profile/index.md) [config profile delete](../profile/create.md) | Удаление [профиля](../profile/index.md) diff --git a/ydb/docs/ru/core/reference/ydb-cli/commands/_includes/service.md b/ydb/docs/ru/core/reference/ydb-cli/commands/_includes/service.md index a482b295d67..00230e5d789 100644 --- a/ydb/docs/ru/core/reference/ydb-cli/commands/_includes/service.md +++ b/ydb/docs/ru/core/reference/ydb-cli/commands/_includes/service.md @@ -7,6 +7,7 @@ `-?`, `-h`, `--help` | Вывод справки о синтаксисе {{ ydb-short-name }} CLI `version` | Вывод информации о версии {{ ydb-short-name }} CLI (для публичных сборок) `update` | Обновление {{ ydb-short-name }} CLI до последней версии (для публичных сборок) +`config info` | Просмотр [параметров соединения](../../connect.md) `--license` | Показать лицензию (для публичных сборок) `--credits` | Показать лицензии сторонних продуктов (для публичных сборок) diff --git a/ydb/docs/ru/core/reference/ydb-cli/commands/config-info.md b/ydb/docs/ru/core/reference/ydb-cli/commands/config-info.md new file mode 100644 index 00000000000..6786547baf4 --- /dev/null +++ b/ydb/docs/ru/core/reference/ydb-cli/commands/config-info.md @@ -0,0 +1,70 @@ +# Просмотр параметров соединения + +`config info` — это сервисная команда для отладки различных проблем с [соединением и аутентификацей](../connect.md). Команда выводит итоговые параметры соединения, вроде [эндпоинта](../../../concepts/connect.md#endpoint) и [пути базы данных](../../../concepts/connect.md#database), полученные рассмотрением параметров из всевозможных источников. С этими параметрами CLI подключилась бы при выполнении команды, подразумевающей соединение с базой данных. При указании [глобальной опции](global-options.md) `-v`, помимо итоговых параметров соединения, будут выведены значения всех параметров соединения из всех источников, которые CLI смог обнаружить, вместе с названиями этих источников, в порядке приоритета. + +Общий вид команды: + +```bash +{{ ydb-cli }} [global options...] config info +``` + +* `global options` — [глобальные параметры](global-options.md). + +## Список параметров соединения {#parameters-list} + +* [endpoint](../../../concepts/connect.md#endpoint) — URL кластера базы данных. +* [database](../../../concepts/connect.md#database) — Путь к базе данных. +* **Параметры аутентификации:** + * [token](../../../concepts/auth.md#iam) — Access Token. + * [yc-token](../../../concepts/auth.md#iam) — Refresh Token. + * [sa-key-file](../../../concepts/auth.md#iam) — Service Account Key. + * [use-metadata-credentials](../../../concepts/auth.md#iam) — Metadata. + * [user](../../../concepts/auth.md#static-credentials) + * [password](../../../concepts/auth.md#static-credentials) +* [ca-file](../../../concepts/connect.md#tls-cert) — Корневой сертификат. +* [iam-endpoint](../../../concepts/auth.md#iam) — URL IAM сервиса. + +## Примеры {#examples} + +### Вывод итоговых параметров соединения {#basic-example} + +```bash +$ ydb -e grpcs://another.endpoint:2135 --ca-file some_certs.crt -p db123 config info +endpoint: another.endpoint:2135 +yc-token: SOME_A12****************21_TOKEN +iam-endpoint: iam.api.cloud.yandex.net +ca-file: some_certs.crt +``` + +### Вывод всех параметров соединения вместе с источниками {#verbose-example} + +```bash +$ ydb -e grpcs://another.endpoint:2135 --ca-file some_certs.crt -p db123 -v config info +Using Yandex.Cloud Passport token from YC_TOKEN env variable + +endpoint: another.endpoint:2135 +yc-token: SOME_A12****************21_TOKEN +iam-endpoint: iam.api.cloud.yandex.net +ca-file: some_certs.crt +current auth method: yc-token + +"ca-file" sources: + 1. Value: some_certs.crt. Got from: explicit --ca-file option + +"database" sources: + 1. Value: /some/path. Got from: active profile "test_config_info" + +"endpoint" sources: + 1. Value: another.endpoint:2135. Got from: explicit --endpoint option + 2. Value: db123.endpoint:2135. Got from: profile "db123" from explicit --profile option + 3. Value: some.endpoint:2135. Got from: active profile "test_config_info" + +"iam-endpoint" sources: + 1. Value: iam.api.cloud.yandex.net. Got from: default value + +"sa-key-file" sources: + 1. Value: /Users/username/some-sa-key-file. Got from: active profile "test_config_info" + +"yc-token" sources: + 1. Value: SOME_A12****************21_TOKEN. Got from: YC_TOKEN enviroment variable +``` diff --git a/ydb/docs/ru/core/reference/ydb-cli/toc_i.yaml b/ydb/docs/ru/core/reference/ydb-cli/toc_i.yaml index 11d60702034..2c98ecf951e 100644 --- a/ydb/docs/ru/core/reference/ydb-cli/toc_i.yaml +++ b/ydb/docs/ru/core/reference/ydb-cli/toc_i.yaml @@ -108,6 +108,8 @@ items: href: commands/discovery-list.md - name: Проверка аутентификации href: commands/discovery-whoami.md + - name: Просмотр параметров соединения + href: commands/config-info.md - name: Вывод версии YDB CLI href: version.md - name: Нагрузочное тестирование |