CLI & fgshell 命令参考¶
每个 DotID control-plane operation 都有两种可用方式 — fgai CLI 和 in-console fgshell — 除了创建全新 root-user account,它仍然是 browser sign-up flow。两个 surface 调用相同的 control-plane APIs(参见 CLI authentication);每个调用都会进行 authorization-check。
有关如何认证,请参阅 CLI authentication。
命令组(fgai <group> …)¶
组 |
它管理什么 |
|---|---|
|
Service users, roles, policies, access keys, STS, workload identities, Identity Center workforce users/groups/permission sets/assignments, delegations, authorization checks, and your own account's alias/settings |
|
Accounts — provision member accounts、get/update、status(close/reopen/suspend/restore)、service installations |
|
Organizations — OUs, SCPs, member accounts, invitations, service installations, service delegations, enterprise onboarding (placeholder accounts + lifecycle) |
|
Quota scopes、your quotas 和 quota requests |
|
你的 audit events、account events、single event lookup |
|
开发者服务注册、提交、凭证 |
|
浏览 catalog 并管理 installations |
|
PassPort application launch links + app-entry routing |
运行 fgai <group>(或 fgai <group> help)列出其子命令;identity 组还会再嵌套一层:fgai identity <resource> <verb>。
约定¶
Path parameters are flags:
fgai identity service-user delete --account <id> --user <id>.Create/update bodies 是 raw JSON: 传入
--body '{…}'或--body-file path.json(-读取 stdin)。字段遵循 API 的 snake_case 形态。输出是 API 的 JSON 响应,并经过 pretty-print;空的(204)响应会打印
ok。
示例¶
# Identity Center + IAM
fgai identity service-user list --account 3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f
fgai identity idc-user list --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b
fgai identity role create --account 3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f --body-file role.json
fgai identity access-key rotate --account 3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f --accessKey AKIA…
fgai identity sts assume-role --body '{"role_frn":"frn:…:iam:role/Deploy","external_id":"…"}'
fgai identity authorize check --body '{"principal":{"account_id":"3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f","user_id":"<user-uuid>","user_type":"iam","ic_session":false},"action":"iam:CreateServiceUser","resource":"frn:3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f:iam:user/*"}'
# Your own account's alias and settings — the account is the credential's own, so there is
# no --account flag. The alias write needs the alias_revision you read from the account;
# a stale revision is refused with 409 alias_revision_mismatch.
fgai identity account get-settings
fgai identity account update-settings --default-locale ja --default-theme dark
fgai identity account set-alias --body '{"alias":"store-tokyo-01","expected_alias_revision":3}'
# Accounts & organizations
fgai account provision --body '{"email":"ops@acme.io","account_name":"acme-prod","ou_id":"Root"}'
fgai org scp-attach --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --scp scp-123 --body '{"target_type":"OU","target_id":"ou-1"}'
fgai org invite-create --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --body '{"email":"partner@x.io"}'
# Service delegation — choose the member account that administers one service for the organization
# (run with a management-account credential; one delegated account per service)
fgai org service-delegation-set --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --service example-service \
--delegated-admin-account-id 3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f
fgai org service-delegation-get --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --service example-service
fgai org service-delegation-revoke --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --service example-service
# Enterprise onboarding — cheap placeholder accounts, materialized on first use
fgai org onboard-accounts --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b \
--body '{"ou_node_id":"<ou>","accounts":[{"name":"warehouse-01"},{"name":"warehouse-02"}]}'
fgai org account-lifecycle --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --status PLACEHOLDER
fgai org onboard-grant-operator --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --account <account> # -> ACTIVE
fgai org account-lifecycle --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --status ACTIVE
fgai org onboard-terminate --org 7b39dd74-1f2e-4d3c-9b8a-7c6d5e4f3a2b --account <account> # -> CLOSED
# PassPort — resolve where an app should open for the signed-in principal
fgai passport app-entry-resolve --body '{"appId":"<app>","accountId":"<account>"}'
fgai passport application --app <app>
# Quotas & audit
fgai quota request --body '{"quota_id":"q-1","desired":50}'
fgai audit account-events --account 3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f \
--from 2026-10-01T00:00:00Z --to 2026-10-10T23:59:59Z
# Cross-account actions: each account's trail holds its own copy, joined by one id
fgai audit account-events --account 3857bedb-0a1b-4c2d-8e3f-4a5b6c7d8e9f \
--from 2026-10-01T00:00:00Z --to 2026-10-10T23:59:59Z \
--event-type api_call --read-only false --shared-event-id <shared_event_id>
An action that crosses accounts (for example an AssumeRole from account A into a
role in account B) is recorded once in each account's trail. Every copy carries the
same shared_event_id; recipient_account_id names the trail the copy belongs to and
user_identity.account_id names the caller's account. event_type is one of
api_call, platform_event, console_sign_in or service_event.
Path parameters are account and organization UUIDs — the API rejects shortened ids as malformed, so use the full form everywhere.
Enterprise onboarding & account lifecycle¶
fgai org onboard-accounts bulk-creates cheap placeholder accounts under an
organization (immediate 202); the expensive per-account setup is deferred until
first use — see Provisioning at scale.
Each account moves through PLACEHOLDER → MATERIALIZING → ACTIVE, with CLOSED as
the terminal teardown state; filter a listing with
fgai org account-lifecycle --org <org> --status <STATUS>. The status values and
the full row shape are in
Account lifecycle status.
Verb |
Effect |
|---|---|
|
Bulk-create placeholder accounts (body |
|
Grant the first operator — moves the account to |
|
Provision the first service user — materializes the account's realm |
|
Transition to terminal |
onboard-purge is deliberately absent: hard-delete is classified platform-operator
in the edge declaration, not a partner verb. A placeholder created in error is
removed by operator tooling.
Service delegation¶
A service delegation names the ONE member account that administers a given service on behalf
of the whole organization. Only the organization's management account can set, read or
revoke it, and the calling credential must itself be allowed the
<service>:OrgDelegation:Set / <service>:OrgDelegation:Revoke action in that account.
Verb |
Effect |
|---|---|
|
Designate (or replace) the delegated account. |
|
Read the current delegation; |
|
Remove the delegation ( |
This is a different object from delegation-create (an OU or account delegating scope to a
manager account) and from register-delegated-admin.
fgshell¶
相同操作也可在 console shell 内作为 dotid <group> [<resource>] <verb> 命令使用,并接收相同参数。fgshell 会使用你的会话身份,将每条命令发送到 DotID control-plane API,因此你在 fgshell 中能做的事情,正好等同于你的权限允许的事情 — 与 CLI 和 console 一致。变更型命令会提示确认。