创建新的角色授权。输入属性与 CLI 中定义的属性相同。每个授权都具有所定义的 scope 属性。可根据此输入范围设置其他属性。范围值包括:
ad cluster keystore role stmf user alert dataset nas schema svc workflow appliance hardware net stat update worksheet
请求示例:
POST /api/role/v1/roles/role_workflow/authorizations HTTP/1.1 Authorization: Basic abcefgMWE= Host: zfs-storage.example.com:215 Accept: application/json Content-Type: application/json Content-Length: 41 {"scope": "workflow", "allow_read": true}
结果示例:
HTTP/1.1 201 Created X-Zfssa-Appliance-Api: 1.0 Content-Type: application/json Content-Length: 171 Location: /api/role/v1/roles/role_workflow/authorizations/auth-000 { "auth": { "allow_modify": false, "allow_read": true, "href": "/api/role/v1/roles/role_workflow/authorizations/auth-000", "owner": "*", "scope": "workflow", "uuid": "*" } }