Assign Policy to Role
- Print
- PDF
Assign Policy to Role
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
- Assign a policy to Role.
API
- POST /roles/{roleNo}/policies
Request
Path Variables
Parameter | Mandatory | Type | Constraints | Description |
---|---|---|---|---|
roleNo | Y | String | Role No |
##### Body
{
"policyIdList": [
"string"
]
}
Parameter | Mandatory | Type | Constraints | Description |
---|---|---|---|---|
policyIdList | Y | array | policy Id List |
Response
- Response
Parameter | Mandatory | Type | Constraints |
---|---|---|---|
ProcessResult | Y | Array | Processing Result |
- Example Response - Success
[
{
"id": "policyId",
"name": "addPolicy",
"success": true
}
]
- Response Example - Policies Already Added
[
{
"success": false,
"id": "policyId",
"message": "This policy is already registered."
}
]
Error
Errors that may occur while using this action are listed below. For error response format, please see ErrorResponse.
For more information about common errors, refer to Naver Cloud Platform API.
HTTP status code | Error Code | Error Message |
---|---|---|
401 | 30 | Invalid roleNo. |
Was this article helpful?