Edit policy
- Print
- PDF
Edit policy
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Edits a policy.
API
- PUT /policies/{policyId}
Requests
Path Variables
Parameters | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
policyId | Y | string | Policy ID |
Body
{
"description": "string",
"permissions": [
{
"effect": "string",
"targets": [
{
"product": "string",
"actions": [
"string"
],
"resourceNrns": [
"string"
]
}
]
}
]
}
Parameters | Requirement status | Type | Restrictions | Description |
---|---|---|---|---|
description | Y | string | Policy description | |
permissions | Y | array | Permission list | |
permissions.effect | Y | string | Permission status (currently only supports Allow) | |
permissions.targets | Y | array | Permission target | |
permissions.targets.product | Y | string | Target service code | Target product code |
permissions.targets.actions | Y | array | - The following rules need to be applied according to the service-specific authority unit - Detailed action unit > Action name or View*, Change* - All views unit or All changes unit > All views: View*/All changes: Change* - Service units > Full authority: * | Target action |
permissions.targets.resourceNrns | Y | array | If nrn is not specified, an asterisk (*) must be applied | Target resource nrns |
Responses
- Responses
{
"policyId": "string",
"policyName": "string",
"description": "string",
"validationResult": {
"details": [
{
"code": "string",
"location": "string",
"message": "string",
"type": "ERROR"
}
],
"success": true
}
}
Parameter name | Requirement status | Type | Description |
---|---|---|---|
policyId | N | string | Policy ID |
policyName | N | string | Policy |
description | N | string | Policy description |
validationResult. | Y | object | Policy creation success status |
validationResult.success | Y | boolean | Policy creation success status |
validationResult.details | N | array | Validation check result details |
validationResult.details.code | N | string | Validation check detailed code |
validationResult.details.location | N | string | Validation check location |
validationResult.details.message | N | string | Validation check detailed message |
validationResult.details.type | N | string | - Validation check result type (INFO/WARN/ERROR) - Failure when ERROR is included |
- Response examples - Success
{
"policyId": "000000000-qwer-asdf-123456789012",
"policyName": "policy-test",
"description": "policy test ",
"validationResult": {
"success": true
}
}
- Response examples - Failure
{
"validationResult": {
"success": false,
"details": [
{
"type": "ERROR",
"code": "iam.error.requiredFieldIsMissing",
"location": "permissions",
"message": "The required value is missing."
}
]
}
}
Was this article helpful?