Hi everyone,
The api key creation and project assignment syntax only shows the option to list a single project..
Is there a way to assign an api key to more than one project?
Hi everyone,
The api key creation and project assignment syntax only shows the option to list a single project..
Is there a way to assign an api key to more than one project?
Hi @Nivi_Mor1
This example is assigning an existing api key 673d1c592178de088b1492f0
to another project 588fc162d383ad09d65f7ae2
:
atlas projects apiKeys assign 673d1c592178de088b1492f0 --role GROUP_OWNER --projectId 588fc162d383ad09d65f7ae2
Here is the output of describe showing it as an Org_Member of my organization and Group_Owner of two projects.
atlas organizations apiKeys describe 673d1c592178de088b1492f0 -o json
{
"desc": "key0",
"id": "673d1c592178de088b1492f0",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas/v2/orgs/599ef3039f78f769464dc547/apiKeys/673d1c592178de088b1492f0",
"rel": "self"
}
],
"privateKey": "********-****-****-8e1f18d1422a",
"publicKey": "fcpwktvo",
"roles": [
{
"groupId": "588fc162d383ad09d65f7ae2",
"roleName": "GROUP_OWNER"
},
{
"orgId": "599ef3039f78f769464dc547",
"roleName": "ORG_MEMBER"
},
{
"groupId": "664558580333232c97f65b94",
"roleName": "GROUP_OWNER"
}
]
}
@chris thanks for your reply that’s exactly what I was looking for.
Too bad this is not explicitly mentioned in the docs.
Thanks again!
You’re welcome @Nivi_Mor1
On each docs page there is a “Rate This Page” that can be used to submit a rating and suggestions.
Topic | Replies | Views | Activity |
---|---|---|---|
Set time for Rotate Log Files without crontab | 0 | 247 | Jul 2024 |
Mongodb-community v7 mongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017 | 1 | 243 | Aug 2024 |
SSL peer certificate validation failed after renewing certificate | 1 | 324 | Oct 2024 |
Issue with Cluster Monitoring: Changing Hostname from localhost to 19b7c27076e1 | 0 | 19 | Sep 2024 |
Creation of Read Only User is not working | 1 | 50 | Oct 2024 |