Manage Your Immuta Tenant
This page details the immuta
command, its subcommands and arguments, and the workflow for cloning a tenant and using the Immuta API.
Command Overview: immuta
immuta
This command allows you to manage your Immuta tenant by creating data sources, projects, policies, and purposes. The table below illustrates the immuta
subcommands and arguments.
To view a list of the commands available in your current Immuta CLI version, run immuta
with no additional arguments.
Options
Options you can specify with the immuta
command include
--config string
: Specify the configuration file name and where it will be saved. (The default is$HOME/.immutacfg.yaml
.)-h
or--help
: Get more information about the command.-p
or--profile string
: Specify the profile for what tenant or API the CLI will use.
Clone Your Tenant: immuta clone
immuta clone
You need the GOVERNANCE
permission in Immuta to run this command.
If you have an Immuta tenant that was set up without using the API, you can use the immuta clone
command to save all your data sources, projects, policies, and purposes as payloads:
This command will create valid V2 API YAML files for all your data sources, projects, policies, and purposes. Within these files, database passwords and user files (such as a BigQuery auth file) will be removed; instead passwords will appear as {{EnvVar "dbPass"}}
. The CLI will then read the environment variable dbPass
to fill in the password if you use the cloned payload to create or update a data source. File contents will appear as {{ReadFile "<filePath>"}}
, and then the CLI will read the file at the path and replace the value when commands are run.
Options
--force
: Overwrite existing output directory targets. If this flag is omitted, you will receive an error when the output directory exists and is not empty.-h
or--help
: Get details about the command.
Limitations
Tags for data sources and projects are not returned.
Data sources will not have the
sources
field, so if these payloads are used increate
commands, all possible tables will be created as data sources.
immuta api
immuta api
This command makes an authenticated HTTP(s) request to the Immuta API and prints the response. The default HTTP request method is GET
, but POST
is used if any parameters were added. You can override the method with --method
:
Options
-b
,--body string
: Unmodified string to be sent as payload body.-d
,--data key=value
: Add a typed parameter inkey=value
format. The--data
flag behaves like--raw-data
, with type conversion based on the format of the value. Literal values,true
,false
,null
, and integers are converted to appropriate JSON types. This will be sent in as the request payload.--data-raw key=value
: Add a string parameter inkey=value
format. The--data
flag behaves like--raw-data
, with type conversion based on the format of the value. Literal values,true
,false
,null
, and integers are converted to appropriate JSON types. This will be sent in as the request payload.-H
,--header key:value
: Add an HTTP request header inkey:value
format.-h
,--help
: Get details about the command.--input <filepath>
: A raw request body may be passed from the outside via the file specified to use as body for the HTTP request. Pass in '-' for standard input.-X
,--method string
: The HTTP method for the request (defaultGET
).-P
,--path-param key=value
: Add a string parameter in key=value format. Will replace{key}
in the url withvalue
.-q
,--query key=value
: Add a string parameter in key=value format. The key value pairs are serialized into URL query parameters.-t
,--outputTemplate string
: Format the response using a Go template. The provided Go template is rendered using the JSON data as input. For the syntax of Go templates, see this document.
Examples
The documentation below provides descriptions and examples of immuta api
options.
Last updated