UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

uip gov

Manage UiPath governance — AOps policies, Access policies, and compliance packs — using the `uip gov` tool.

uip gov is the Governance tool: it manages three distinct governance surfaces under one CLI — AOps policies (product configuration limits enforced by UiPath products like StudioX), Access policies (who/what can invoke an Agent, Flow, or other agentic resource), and compliance packs (bundles of AOps/Access policies mapped to a named compliance framework, like ISO 42001, that can be toggled on for a tenant in one step). Install it with uip tools install gov, or invoke uip gov … and let auto-install run. See Tools (plugins) for the install model.

The tool ships as the @uipath/gov-tool package, and its command surface is split across this page and two sibling pages because of its size.

This resource spans four pages

  • This page — concepts, and access-policy (list/get/create/update/delete/evaluate).
  • aops-policy — policy CRUD, product, license-type, template.
  • aops-policy deployment and deployed-policy — assign policies to tenants/users/groups, and resolve the effective policy at runtime.
  • compliance-packscatalog (browse) and state (per-tenant enable/disable/coverage).

概念

  • AOps policies vs. Access policies — these are two independent systems with their own APIs, data shapes, and verbs; they are not variants of the same resource. AOps policies constrain product configuration (e.g. a StudioX policy limiting which project settings are allowed) and are scoped by productName/licenseType/tenant-user-group inheritance. Access policies constrain who/what can invoke a resource (e.g. which actors may invoke a given Agent) and are evaluated by a Policy Decision Point (PDP) against a live request context.
  • Compliance packs bridge the two — a pack bundles a set of pre-built AOps policies (and potentially Access policies) mapped to clauses of a named framework (ISO 42001, etc.). Enabling a pack deploys its policies to Aops in one call instead of authoring each one by hand.
  • Read-only reference dataproduct, license-type, and the compliance-pack catalog are read-only: they exist to discover valid values for the mutating commands (--product-name, license-type identifiers, packId), not to be edited via the CLI.

大纲

uip gov access-policy list [--limit <n>] [--offset <n>] [--filter <odata>] [--sort-by <field> asc|desc]
uip gov access-policy get <policyId>
uip gov access-policy create --file <path>
uip gov access-policy update --file <path>
uip gov access-policy delete <policyId...>
uip gov access-policy evaluate --resource-type <type> [--resource-id <id>] [--actor-identity-id <id>] [--actor-process-type <type>] [--actor-process-id <id>] [--folder-key <key>] [--trace-parent-id <id>]
uip gov access-policy list [--limit <n>] [--offset <n>] [--filter <odata>] [--sort-by <field> asc|desc]
uip gov access-policy get <policyId>
uip gov access-policy create --file <path>
uip gov access-policy update --file <path>
uip gov access-policy delete <policyId...>
uip gov access-policy evaluate --resource-type <type> [--resource-id <id>] [--actor-identity-id <id>] [--actor-process-type <type>] [--actor-process-id <id>] [--folder-key <key>] [--trace-parent-id <id>]

uip gov access-policy

Manage Access Policies end-to-end. Two backing services are wrapped: the Policy Administration Point (PAP) for list/get/create/update/delete on policy records, and the Policy Decision Point (PDP) for evaluate, which resolves the effective Allow/Deny decision for a concrete request context.

备注:

Typical flow: author a PolicyDefinition JSON → create --file ...evaluate --resource-type <type> (with other context flags) to confirm the policy takes effect → iterate with update --file ....

uip gov access-policy list

Search for policies with optional OData filtering and pagination.

选项
默认描述
--limit <n>non-negative integer20Page size — maximum policies to return.
--offset <n>non-negative integer0Records to skip before the returned page.
--filter <filter>OData expressione.g. "status in ('Active')".
--sort-by <order><Field> asc|desce.g. "Name asc", "CreatedOn desc".
--login-validity <minutes>non-negative integerOverride the interactive-login token lifetime for this call.
示例
uip gov access-policy list --filter "status in ('Active')" --sort-by "Name asc"
uip gov access-policy list --filter "status in ('Active')" --sort-by "Name asc"
数据形状(--输出 json)
{
  "Code": "PolicyList",
  "Data": {
    "totalCount": 1,
    "results": [
      { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Agent Governance", "status": "Active" }
    ]
  }
}
{
  "Code": "PolicyList",
  "Data": {
    "totalCount": 1,
    "results": [
      { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Agent Governance", "status": "Active" }
    ]
  }
}

uip gov access-policy get

Fetch the full PolicyDefinition for one policy by UUID — use to inspect selectors/rules/enforcement, or to seed an update.

参数
名称必填用途
<policyId>Policy UUID, from access-policy list.
示例
uip gov access-policy get a1b2c3d4-0000-0000-0000-000000000001
uip gov access-policy get a1b2c3d4-0000-0000-0000-000000000001
数据形状(--输出 json)
{
  "Code": "PolicyGet",
  "Data": { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Agent Governance", "status": "Active" }
}
{
  "Code": "PolicyGet",
  "Data": { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Agent Governance", "status": "Active" }
}

uip gov access-policy create

Create a new access policy from a JSON file conforming to PolicyDefinition. Sent as-is (no envelope wrapping) — do not include a server-assigned id.

选项
必填描述
--file <path>路径JSON file containing the PolicyDefinition to create.
--login-validity <minutes>non-negative integerOverride the interactive-login token lifetime.

A name conflict with an existing policy fails the call — check access-policy list first.

示例
uip gov access-policy create --file ./policy.json
uip gov access-policy create --file ./policy.json
数据形状(--输出 json)
{
  "Code": "PolicyCreated",
  "Data": {
    "statusCode": 200,
    "errors": null,
    "upsertedPolicy": { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Agent Governance", "status": "Active" }
  }
}
{
  "Code": "PolicyCreated",
  "Data": {
    "statusCode": 200,
    "errors": null,
    "upsertedPolicy": { "id": "a1b2c3d4-0000-0000-0000-000000000001", "name": "Agent Governance", "status": "Active" }
  }
}

Capture upsertedPolicy.id for follow-up evaluate/update/delete calls.

uip gov access-policy update

Update an existing access policy from a JSON file. Sent as an HTTP PATCH — the file must include the policy's id.

选项
必填描述
--file <path>路径JSON file with the updated PolicyDefinition (must include id).
--login-validity <minutes>non-negative integerOverride the interactive-login token lifetime.

To seed the file: access-policy get <id>, edit the JSON, pass it back via --file.

示例
uip gov access-policy update --file ./policy.json
uip gov access-policy update --file ./policy.json
数据形状(--输出 json)

Same shape as create, with Code: "PolicyUpdated".

uip gov access-policy delete

Delete one or more access policies by UUID in a single request. Permanent — no soft-delete/undo.

参数
名称必填用途
<policyId...>One or more policy UUIDs, space-separated.
示例
uip gov access-policy delete a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002
uip gov access-policy delete a1b2c3d4-0000-0000-0000-000000000001 a1b2c3d4-0000-0000-0000-000000000002
数据形状(--输出 json)
{ "Code": "PolicyDeleted", "Data": { "PolicyIds": ["a1b2c3d4-0000-0000-0000-000000000001", "a1b2c3d4-0000-0000-0000-000000000002"] } }
{ "Code": "PolicyDeleted", "Data": { "PolicyIds": ["a1b2c3d4-0000-0000-0000-000000000001", "a1b2c3d4-0000-0000-0000-000000000002"] } }

uip gov access-policy evaluate

Ask the PDP to resolve the effective Allow/Deny decision for a request context — preview what an actor will see before rollout, or debug a production denial. Requires tenant context (login must target a specific tenant, not just an organization).

选项
必填描述
--resource-type <type>one of Agent, AgenticProcess, RPAWorkflow, APIWorkflow, CaseManagement, FlowThe protected asset being accessed.
--resource-id <id>字符串Identifier of the specific resource instance (e.g. an Agent UUID).
--actor-identity-id <id>字符串Actor identifier — only required with an S2S token; with a user token the actor is inferred from the bearer.
--actor-process-type <type>one of Agent, AgenticProcess, CaseManagement, FlowThe workflow/agent being executed on the actor's behalf, if any.
--actor-process-id <id>字符串Identifier of that executable (e.g. a Flow UUID).
--folder-key <key>UUIDFolder key scoping the request.
--trace-parent-id <id>字符串W3C traceparent value to correlate this evaluation with upstream traces.
--login-validity <minutes>non-negative integerOverride the interactive-login token lifetime.

Fails with a clear "tenant context" error if the client can't resolve a tenant ID from the current login.

示例
uip gov access-policy evaluate --resource-type Agent
uip gov access-policy evaluate --resource-type Agent
数据形状(--输出 json)
{
  "Code": "PolicyEvaluated",
  "Data": { "enforcement": "Allow", "evaluationDetails": null, "effectivePolicies": [] }
}
{
  "Code": "PolicyEvaluated",
  "Data": { "enforcement": "Allow", "evaluationDetails": null, "effectivePolicies": [] }
}

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新