Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15953

[Atlas CLI] missing apiKey information for roles at project level vs org level

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Atlas, mcli
    • Labels:
    • 2

       

      tluck@M-C02ZJQ8GMD6M ~/my_src/atlas

      $ atlas --profile=test-7 project apiKey create --role PROJ_OWNER --desc "test" --help

      MongoDB returns the private API key only once. After you run this command, immediately copy, save, and secure both the public and private API keys.

       

      Usage:

        atlas projects apiKeys create [flags]

       

      Examples:

        # Create an organization API key with the ORG_OWNER role and assign it to the project with ID 5e2211c17a3e5a48f5497de3:

        atlas projects apiKeys create --desc "My API key" --projectId 5e1234c17a3e5a48f5497de3 --role ORG_OWNER --output json

       

      Flags:

            --desc string        Description of the API key.

        -h, --help               help for create

        -o, --output string      Output format. Valid values are json, json-path, go-template, or go-template-file.

            --projectId string   Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.

            --role strings       Role or roles that you want to assign to the API key. To assign more than one role, you can specify each role with a separate role flag or specify all of the roles as a comma-separated list using one role flag. Valid values are ORG_OWNER, ORG_MEMBER, ORG_GROUP_CREATOR, ORG_BILLING_ADMIN, and ORG_READ_ONLY.

      the roles for a project apiKey should be:

       

              "roleName": "GROUP_CLUSTER_MANAGER"

              "roleName": "GROUP_OWNER"

              "roleName": "ORG_MEMBER"

              "roleName": "GROUP_DATA_ACCESS_ADMIN"

              "roleName": "GROUP_DATA_ACCESS_READ_WRITE"

              "roleName": "GROUP_SEARCH_INDEX_EDITOR"

              "roleName": "GROUP_READ_ONLY"

              "roleName": "GROUP_DATA_ACCESS_READ_ONLY"

        for example:

       # atlas --profile=test-1 project apiKey create --role GROUP_OWNER --desc "cli 1"

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            thomas.luckenbach@mongodb.com Thomas Luckenbach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              1 year, 6 weeks, 3 days ago