Skip to content

import-tenants

This command imports tenants from a JSON file previously exported by the export-tenants command. The product-admin role is required for subscriptions to be considered. Unless you are a product administrator, subscriptions are ignored.

This feature is only available with a Professional Subscription.

dblinter [<options>] import-tenants [<args>]

See Options. Mandatory options are tenantName, userName and accessToken.

--<argument>=<value>

It is not possible to set arguments using environment variables. Beside that, in dbLinter, both arguments and options are treated in the same way. Therefore, they can be used in any order. For example, they can be used before or after the command name. We use options when the semantics are identical for each applicable command. Arguments are used when the semantics change for a command.

  • inputName
    This is the relative path to the input file name. The default is tenants.json.

  • tenantFilter
    This is the regular expression used to filter tenant names to be imported. The default is .+.

Terminal window
dbLinter import-tenants \
--tenantName=Demo \
--userName=philipp.salvisberg+42@gmail.com \
--accessToken=*** \
--inputName=demo.json \
--tenantFilter=.+

The console output looks like this:

Importing tenants ...
Filtering tenants with pattern '.+'...
Tenants imported successfully from demo.json