Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/ /
Atlas CLI
/ / /

Atlas 조직 apiKeys 할당

지정된 조직 API 키에 대한 역할 또는 설명을 수정합니다.

공개 미리 보기: MongoDB Atlas 관리자 API 에서 자동으로 생성된 Atlas API 하위 명령은 관리자 API 에 대한 전체 범위를 제공하며 현재 공개 미리 보기로 제공됩니다( 피드백 https:// 피드백.mongodb.com/에서 제공하세요. 포럼/930808-Atlas-cli). 관리자 API 기능에는 자체 출시하다 수명 주기가 있으며, 이는 제공된 API 엔드포인트 문서 링크를 통해 확인할 수 있습니다.

이 명령으로 조직 API 키의 역할을 수정하면 지정한 값이 API 키에 할당된 기존 역할을 덮어씁니다.

apiKeyId 인수에 사용할 수 있는 값을 보려면 atlas 조직 apiKeys 목록을 실행합니다.

이 명령을 사용하려면 조직 사용자 관리자 역할이 있는 사용자 계정 또는 API 키로 인증해야 합니다.

명령 구문
atlas organizations apiKeys assign <apiKeyId> [options]
이름
유형
필수 사항
설명

apiKeyId

문자열

true

API 키를 식별하는 고유한 24자리 문자열입니다.

이름
유형
필수 사항
설명

--desc

문자열

거짓

API 키에 대한 설명입니다.

-h, --help

거짓

할당 도움말

--orgId

문자열

거짓

사용할 조직 ID입니다. 이 옵션은 구성 파일 또는 환경 변수의 설정을 재정의합니다.

-o, --output

문자열

거짓

출력 형식입니다. 유효한 값은 json, json-path, go-템플릿 또는 go-템플릿 파일입니다. 전체 출력을 보려면 -o json 옵션을 사용합니다.

--role

strings

거짓

Role or roles that you want to assign to the API key. To assign more than one role, specify each role with a separate role flag or specify all of the roles as a comma-separated list using one role flag. For the full list of accepted values, see the Items Enum for the corresponding Atlas API endpoint: https://www.mongodb.com/ko-kr/docs/api/doc/atlas-admin-api-v2/operation/operation-updateapikey. To learn more about organization level user roles, see: https://dochub.mongodb.org/core/atlas-org-roles. Passing this flag replaces preexisting data.

이름
유형
필수 사항
설명

-P, --profile

문자열

거짓

구성 파일 에서 사용할 프로필의 이름입니다. Atlas CLI 의 프로필에 대해 학습 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings를 참조하세요.

명령이 성공하면 Atlas CLI는 다음 샘플과 유사한 출력을 반환합니다. 괄호 안의 값은 사용자의 값을 나타냅니다.

API Key '<Id>' successfully updated.
# Modify the role and description for the API key with the ID 5f24084d8dbffa3ad3f21234 for the organization with the ID 5a1b39eec902201990f12345:
atlas organizations apiKeys assign 5f24084d8dbffa3ad3f21234 --role ORG_MEMBER --desc "User1 Member Key" --orgId 5a1b39eec902201990f12345 --output json

돌아가기

목록

이 페이지의 내용