Update Policy by Service Name and Policy Name
API Name | update policy |
---|---|
Request Type | PUT |
Request URL | service/public/v2/api/service/{service-name}/policy/{policy-name} |
Request Params |
{ "allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [ { "accesses": [ { "isAllowed": true, "type": "drop" } ], "conditions": [], "delegateAdmin": true, "groups": [], "users": [ "hadoop", "admin" ] } ], "description": "Policy for Service: cl1_test", "isAuditEnabled": true, "isEnabled": true, "name": "cl1_test-1", "policyItems": [ { "accesses": [ { "isAllowed": true, "type": "select" }, { "isAllowed": true, "type": "update" }, { "isAllowed": true, "type": "create" }, { "isAllowed": true, "type": "drop" } ], "conditions": [], "delegateAdmin": true, "groups": ["public"], "users": [ ] } ], "resources": { "root": { "isExcludes": false, "isRecursive": false, "values": [ "abc" ] }, "sub": { "isExcludes": false, "isRecursive": false, "values": [ "*" ] } }, "service": "cl1_test", "version": 1 } |
|
200 - Application/json |
Response |
{ "allowExceptions": [], "createTime": 1451350456000, "createdBy": "Admin", "denyExceptions": [], "denyPolicyItems": [ { "accesses": [ { "isAllowed": true, "type": "drop" } ], "conditions": [], "delegateAdmin": true, "groups": [], "users": [ "hadoop", "admin" ] } ], "description": "Policy for Service: cl1_test", "guid": "ff0b3c4a-6aa0-4803-9314-17f3b8950482", "id": 8, "isAuditEnabled": true, "isEnabled": true, "name": "cl1_test-1", "policyItems": [ { "accesses": [ { "isAllowed": true, "type": "select" }, { "isAllowed": true, "type": "update" }, { "isAllowed": true, "type": "create" }, { "isAllowed": true, "type": "drop" } ], "conditions": [], "delegateAdmin": true, "groups": [ "public" ], "users": [] } ], "resourceSignature": "8a2fac99ba72c687defacff39d6354fb", "resources": { "root": { "isExcludes": false, "isRecursive": false, "values": [ "abc" ] }, "sub": { "isExcludes": false, "isRecursive": false, "values": [ "*" ] } }, "service": "cl1_test", "updateTime": 1451352707567, "updatedBy": "Admin", "version": 2 } |