iam.cli-auth-policy.dry-run

Show who and what a proposed policy would affect, changing nothing

POST /iam/api/cli-auth-policy/dry-runIAM iam:GetCliAuthPolicyRead

Lists people with neither a passkey nor a Touch ID device key, personal access keys that would be refused, unverified CLI sessions that would stop, and machine keys (never affected).

Request syntax

POST /iam/api/cli-auth-policy/dry-run
{
  "requirePasskeyCli": "boolean",
  "personalKeyMaxAgeDays": "number",
  "cliStepUpMaxMinutes": "object"
}

Request body

  • requirePasskeyCliRequired

    boolean

    People's CLI sessions must be opened with Touch ID or a passkey, sensitive commands ask for a fresh confirmation once the person's confirmation window has passed, and older CLIs can no longer sign in with a 90-day access key. Service accounts and role sessions are never affected

  • personalKeyMaxAgeDaysRequired

    number

    People's own access keys: null = no restriction, 0 = refused, N = refused once older than N days (at most 3650). Keys of service accounts and role sessions, and keys with a scope policy, are never refused

    Constraints: integer, 0-3650

    May be null.

  • cliStepUpMaxMinutesOptional

    object

    The longest a Touch ID or passkey confirmation may last for people of this organization, in minutes: 1, 2, 5, 10, 15, 30 or 60 (each person chooses 5 to 60, 5 by default). null: no cap below 60. Left out: unchanged

    Constraints: JSON

    May be null.

Response

200 with { policy, peopleWithoutFactor (name, email, role; empty unless requirePasskeyCli), refusedKeys (accessKeyId, username, ageDays, lastUsedAt; every personal key past the limit, oldest first), unverifiedCliSessions (0 unless requirePasskeyCli), machineKeys, warnings }.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow iam:GetCliAuthPolicy on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud iam cli-auth-policy dry-run --require-passkey-cli --personal-key-max-age-days 1

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_iam_cli-auth-policy_dry-run.