Importing


The CLI allows you to import resources from files in Lenses into another environment.

Import is done on a per resource basis, the directory structure defined by the CLI whereas a base directory can be provided by the –dir flag.

Processors, connectors, topics and schemas have an additional prefix flag to restrict resources to export. The commands to import the configurations are shown in the table below.

CommandsDescription
aclsImoprt the ACL configuration
alert-channelsImoprt the alert channels configuration
alert-settingsImoprt the alert setting configuration
connectionsImoprt the connections configuration
connectorsImoprt the connectors configuration
processorsImoprt the processors created
quotasImoprt the quotas configuration in Kafka
schemasImoprt the schamas configuration
topicsImoprt the topics registered
policiesImoprt the policies configuration
groupsImoprt the groups created
serviceaccountsImoprt the service accounts created
topic-settingsImoprt the topics settings

Exporting Configurations 

Commands showing how to import the configurations:

lenses-cli import acls --dir my-dir
lenses-cli import alert-channels --dir my-dir
lenses-cli import alert-settings --dir my-dir
lenses-cli import connections --dir my-dir
lenses-cli import connectors --dir my-dir
lenses-cli import processors --dir my-dir
lenses-cli import quotas --dir my-dir
lenses-cli import schemas --dir my-dir
lenses-cli import topics --dir my-dir
lenses-cli import policies --dir my-dir
lenses-cli import groups --dir my-dir
lenses-cli import serviceaccounts --dir my-dir
lenses-cli import topic-settings --dir my-dir

The directory structure created when you export the configuration is the same as the one used when importing the configuration files:

my-dir
├── alert-settings
│   └── alert-setting.yaml
├── apps
│   ├── connectors
│   │   ├── connector-1.yaml
│   │   └── connector-2.yaml
│   └── sql
├── groups
│   └── groups.yaml
├── kafka
│   ├── quotas
│   │   └── quotas.yaml
│   └── topics
│       ├── topic-1.yaml
│       └── topic-2.yaml
├── policies
│   └── policies-city.yaml
├── service-accounts
│   └── servic-eaccounts.yaml
└── schemas
    ├── schema-1.yaml
    └── schema-2.yaml
--
Last modified: July 3, 2024