서브계정 생성
- 인쇄
- PDF
서브계정 생성
- 인쇄
- PDF
기사 요약
이 요약이 도움이 되었나요?
의견을 보내 주셔서 감사합니다.
Classic/VPC 환경에서 이용 가능합니다.
서브 계정을 생성합니다. 서브 계정을 생성하면 계정별 권한 설정이 가능하여 안전하고 안정적으로 서비스를 운영할 수 있습니다.
참고
서브 계정은 최대 500개까지 생성할 수 있습니다.
요청
요청 형식을 설명합니다. 요청 형식은 다음과 같습니다.
메서드 | URI |
---|---|
POST | /api/v1/sub-accounts |
요청 헤더
Sub Account API에서 공통으로 사용하는 헤더에 대한 정보는 Sub Account 요청 헤더를 참조해 주십시오.
요청 바디
요청 바디에 대한 설명은 다음과 같습니다.
필드 | 타입 | 필수 여부 | 설명 |
---|---|---|---|
active | Boolean | Required | 서브 계정 상태
|
apiAllowSources | Array | Optional | 서브 계정의 API 접근 가능 소스 목록 |
canAPIGatewayAccess | Boolean | Required | 서브 계정의 API Gateway 접근 가능 여부
|
canConsoleAccess | Boolean | Required | 서브 계정의 콘솔 접근 가능 여부
|
consolePermitIps | Array | Optional | 서브 계정의 콘솔 접근 가능 IP 대역 목록 |
email | String | Optional | 서브 계정 사용자 메일 주소
|
isMfaMandatory | Boolean | Optional | 서브 계정의 2차 인증 필수 여부
|
loginId | String | Required | 서브 계정 로그인 아이디
|
memo | String | Optional | 서브 계정에 대한 설명(Bytes)
|
name | String | Required | 서브 계정 사용자 이름
|
needPasswordGenerate | Boolean | Optional | 서브 계정 로그인 비밀번호 생성 방식
|
needPasswordReset | Boolean | Required | 서브 계정 로그인 비밀번호 재설정 알림 여부
|
password | String | Conditional | 서브 계정 로그인 비밀번호
|
useApiAllowSource | Boolean | Optional | 서브 계정의 API 접근 가능 소스 제한 여부
|
useConsolePermitIp | Boolean | Optional | 서브 계정의 콘솔 접근 가능 IP 대역 제한 여부
|
apiAllowSources
apiAllowSources
에 대한 설명은 다음과 같습니다.
필드 | 타입 | 필수 여부 | 설명 |
---|---|---|---|
type | String | Conditional | 접근 소스 유형
|
source | String | Conditional | 접근 소스 정보
|
요청 예시
요청 예시는 다음과 같습니다.
curl --location --request POST 'https://subaccount.apigw.gov-ntruss.com/api/v1/sub-accounts' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"active": true,
"apiAllowSources": [
{
"type": "IP",
"source": "***.***.***.***"
}
],
"canAPIGatewayAccess": true,
"canConsoleAccess": true,
"consolePermitIps": [
"***.***.***.***"
],
"email": "email@ncloud.com",
"isMfaMandatory": false,
"loginId": "testuser33",
"memo": "testuser account",
"name": "userts3",
"needPasswordGenerate": true,
"needPasswordReset": true,
"useApiAllowSource": true,
"useConsolePermitIp": true
}'
응답
응답 형식을 설명합니다.
응답 바디
응답 바디에 대한 설명은 다음과 같습니다.
필드 | 타입 | 필수 여부 | 설명 |
---|---|---|---|
id | String | - | 서브 계정 아이디 |
success | Boolean | - | API 호출 성공 여부
|
generatedPassword | String | - | 서브 계정 비밀번호
|
응답 상태 코드
Sub Account API에서 공통으로 사용하는 응답 상태 코드에 대한 정보는 Sub Account 응답 상태 코드를 참조해 주십시오.
응답 예시
응답 예시는 다음과 같습니다.
{
"id": "e60b75d0-****-****-****-***********",
"success": true,
"generatedPassword": "*****************"
}
이 문서가 도움이 되었습니까?