uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UIP Insights 角色
“uip Insights 角色”的语法和选项,可读取活动租户的 Insights 角色。
uip insights roles 读取活动租户中定义的 Insights 角色。这是一个只读表面,没有“创建”、“更新”或“删除”动词。
重要提示:
读取 Insights 角色需要活动租户具有Insights Management 查看权限。没有用户身份的会话(例如,使用客户端凭据登录的会话)根本无法读取此数据,并会收到 403。
大纲
uip insights roles list [--include-resource] [-l <n>] [-o <n>]
uip insights roles get <role-id> [--include-resource]
uip insights roles list [--include-resource] [-l <n>] [-o <n>]
uip insights roles get <role-id> [--include-resource]
UIP Insights 角色列表
列出当前调用者可见的 Insights 角色。可以对该列表进行权限筛选(不具有完整模式权限的租户只能看到只读角色集),并且列表可以触发对许可的缓存调用,以检查该权限。
选项
| 标记 | 描述 |
|---|---|
--include-resource | 在输出中包括角色资源字符串,该字符串可以包含组织和租户 GUID。默认情况下为关闭。 |
-l, --limit <number> | 要返回的最大行数。默认为 50。 |
-o, --offset <number> | 返回结果之前要跳过的行。 |
分页在客户端进行:后端返回完整的未分页列表,CLI 在获取后对其进行切片。
示例
uip insights roles list
uip insights roles list --include-resource --limit 100
uip insights roles list
uip insights roles list --include-resource --limit 100
数据形状 — 默认视图
{
"Code": "InsightsRolesList",
"Data": [
{ "id": "c1d2e3f4-0000-0000-0000-000000000001", "name": "Viewer", "actions": ["Read"] }
],
"Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "Total": 1, "HasMore": false },
"Instructions": "Role names can be entitlement-filtered: a role missing from this list can still exist and 'roles get' can still resolve it. Listing roles can trigger a cached entitlement call to Licensing. 'uip insights users list' and 'uip insights groups list' show these roles by name on each principal's row."
}
{
"Code": "InsightsRolesList",
"Data": [
{ "id": "c1d2e3f4-0000-0000-0000-000000000001", "name": "Viewer", "actions": ["Read"] }
],
"Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "Total": 1, "HasMore": false },
"Instructions": "Role names can be entitlement-filtered: a role missing from this list can still exist and 'roles get' can still resolve it. Listing roles can trigger a cached entitlement call to Licensing. 'uip insights users list' and 'uip insights groups list' show these roles by name on each principal's row."
}
数据形状 — with --include-resource
{
"Code": "InsightsRolesList",
"Data": [
{
"id": "c1d2e3f4-0000-0000-0000-000000000001",
"name": "Viewer",
"actions": ["Read"],
"resource": "orn:orch:tenant:t1:role:Viewer"
}
],
"Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "Total": 1, "HasMore": false }
}
{
"Code": "InsightsRolesList",
"Data": [
{
"id": "c1d2e3f4-0000-0000-0000-000000000001",
"name": "Viewer",
"actions": ["Read"],
"resource": "orn:orch:tenant:t1:role:Viewer"
}
],
"Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "Total": 1, "HasMore": false }
}
空列表是成功结果,而不是错误 — 没有行时,响应会省略上方的常量/保留注释,因为不会从空结果中保留任何内容。
uip Insights 角色获取
通过 GUID 获取一个 Insights 角色。列表的权限筛选器在此不适用 — get 可以解析 list 筛选出的角色。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<role-id> | 是 | 角色 GUID。必须是真实的 GUID — 格式错误的值会在任何网络调用之前导致客户端失败,Run 'uip insights roles list' to find a role ID.。 |
选项
| 标记 | 描述 |
|---|---|
--include-resource | 在输出中包含角色资源字符串。默认情况下为关闭。 |
示例
uip insights roles get c1d2e3f4-0000-0000-0000-000000000001
uip insights roles get c1d2e3f4-0000-0000-0000-000000000001
数据形状(--输出 json)
{
"Code": "InsightsRoleGet",
"Data": { "id": "c1d2e3f4-0000-0000-0000-000000000001", "name": "Viewer", "actions": ["Read"] }
}
{
"Code": "InsightsRoleGet",
"Data": { "id": "c1d2e3f4-0000-0000-0000-000000000001", "name": "Viewer", "actions": ["Read"] }
}
使用 --include-resource,相同的形状将获得 resource 字段,与列表视图相同。
404 上显示 Role <id> was not found in the active Insights tenant, or is not visible there. — 如果每个 Insights RBAC 命令都返回 404,则租户可能未配置 Insights 门户服务。
另请参阅
- Insights 概述
- 用户、组— 其他 RBAC 读取面;两者都显示由此命令的数据解析的角色名称。