Skip to content

Manage Projects

Audience: Data Owners and Governors

Content Summary: This page details the immuta project command, its subcommands and arguments, and the workflow for creating, renaming, and deleting projects.

Command: immuta project

This command allows you to list, save, delete, and rename projects in your instance of Immuta. The table below illustrates subcommands and arguments.

Subcommands Description Argument(s)
delete Delete a project by project key. project key
list List all project keys. n/a
rename Rename the project key. new project key
save Create or update a project in Immuta. filepath

Options

Use these options to get more details about the project command or any of its subcommands:

  • -h
  • --help
Manage Projects

Usage:
  immuta project [command]

Available Commands:
  delete      Delete a project by project key
  list        List all policy keys
  rename      Rename the project key
  save        Create/Update a Project in Immuta

Flags:
  -h, --help   help for project

Global Flags:
      --config string    config file (default $HOME/.immutacfg.yaml)
  -p, --profile string   specifies the profile for what instance/api the cli will use (default "default")

Use "immuta project [command] --help" for more information about a command.

Create Project: immuta project save

  1. Add your project information in a valid YAML file for the V2 API. Additional payload examples for creating projects can be found here:

    name: Demo Project
    projectKey: demo project
    description: "Users need approval to join this project"
    allowMaskedJoins: true
    subscriptionPolicy:
        type: approval
        approvals:
        - requiredPermission: GOVERNANCE
            specificApproverRequired: false
        - requiredPermission: ADMIN
            specificApproverRequired: false
    
  2. Run immuta project save <filepath> [--dryRun] [--deleteWorkSpaceDataSources], referencing the file you just created. The options you can specify include

    • --deleteWorkSpaceDataSources: Delete all data and the data sources associated with a project workspace when the workspace is deleted.
    • -d or --dryRun: No updates will be made.
    • -h or --help: Get more information about the command.

Example

The example below illustrates a user listing all projects and then creating the project demo project.

$ immuta project list
Public

$ immuta project save test-project.yml
{"dryRun":false,"creating":true,"updating":false,"numberOfDataSourcesAdded":0,"numberOfDataSourcesRemoved":0,"creatingWorkspace":false,"deletingWorkspace":false,"projectId":3}

$ immuta project list
Public
demo project

Rename a Project Key: immuta project rename

  1. Opt to list all project keys to identify which project you would like to rename by running immuta project list. Options you can specify include

    • -h or --help: Get more information about the command.
    • -v or --verbose: Print response as JSON.
  2. Rename the project key by running immuta project rename <old project key> <new project key>, enclosing the name of the project key in quotation marks. Options you can specify to get more information about this command include -h or --help.

Example

The example below illustrates a user renaming the demo project project key to data analytics team.

$ immuta project list
Public
demo project

$ immuta project rename "demo project" "Data Analytics Team"
{"oldProjectKey":"demo project","newProjectKey":"Data Analytics Team"}

$ immuta project list
Data Analytics Team
Public

Delete a Project: immuta project delete

  1. Opt to list all project keys to determine which project key you would like to delete by running immuta project list. Options you can specify include

    • -h or --help: Get more information about the command.
    • -v or --verbose: Print response as JSON.
  2. Delete a project key by running immuta project delete <project key> [--dryRun] [--hardDelete, enclosing the project key in quotation marks. Options you can specify include

    • -d or --dryRun: No updates will be made.
    • --hardDelete: If this is set, it will delete everything related to the project in Immuta. If not set, it will only disable the project.
    • -h or --help: Get more information about the command.

Example

The example below illustrates a user first disabling and then deleting the project Data Analytics Team.

$ immuta project list
Data Analytics Team
Public

$ immuta project delete "Data Analytics Team"
{"dryRun":false,"deleting":"Data Analytics Team"}

$ immuta project list
Data Analytics Team
Public

$ immuta project delete "Data Analytics Team" --hardDelete
{"dryRun":false,"deleting":"Data Analytics Team"}

$ immuta project list
Public