概览
使用以下 URL 和方法创建作业、守护程序高级设置和守护程序访问所需的权限:
项 | 说明 | ||
---|---|---|---|
URL | /datamover/policies | ||
方法 | POST |
启用安全设置后,只有 Viewpoint 或命令行超级用户可以创建策略。
请求标头
- Authorization
- 说明:基本标头身份验证如果从 Viewpoint 调用,则用户必须是 dmcl_admin。
- Portlet-User
- 说明:Viewpoint 用户登录
- Portlet-Roles
- 说明:与 Viewpoint 用户登录关联的角色
请求参数
- policies
- 说明:将一组权限与一组用户或角色相关联的对象列表
响应参数
无需响应参数。
示例
下面是一个用于创建策略的请求示例:
[ { "service" : "datamover", "type" : "user", "principals" : [ "admin", "user1"], "actions" : [ "read", "write", "execute" ], "resources" : [ "tdrn:datamover:job:test", "tdrn:datamover:job:testCP_002", "tdrn:datamover:job:dm31111_001" ] }, { "service" : "datamover", "type" : "user", "principals" : [ "user1" ], "actions" : [ "owner" ], "resources" : [ "tdrn:datamover:job:test", "tdrn:datamover:job:testCP_002" ] },{ "service" : "datamover", "type" : "user", "principals" : [ "tester_002"], "actions" : [ "owner" ], "resources" : [ "tdrn:datamover:job:dm31111_001" ] } ]
当用户无权创建或替换策略时会返回以下失败响应代码示例:
{ "message" : "When security is on, only commandline super user or viewpoint could create policies. The user does not have the permission to run UPDATE_JOB_PERMISSIONS command" }