compute-grants:request-approval

Ask for compute spending to be approved before you acquire. Returns one of three outcomes in `status`. `already_approved`: an active grant of this session with money left covers it; pass its `compute_grant_id` to compute:acquire. `approval_required`: a person must open and approve `approval_url` (it proposes `suggested_hard_cap_cents`), then call compute-grants:list with the same --approval_session_id until the grant is `active`. `insufficient_credits`: your credit balance is zero or below, so no grant funded from your own credits can be created; add credits (see credits:balance) and ask again. Every outcome also carries `budget_source`, `grant_action` and `approval_session_id`. It records the request and refreshes the session; it launches and spends nothing.

Reference for flywheel compute-grants:request-approval.

Command Group

Other Commands

Summary

Ask for compute spending to be approved before you acquire. Returns one of three outcomes in status. already_approved: an active grant of this session with money left covers it; pass its compute_grant_id to compute:acquire. approval_required: a person must open and approve approval_url (it proposes suggested_hard_cap_cents), then call compute-grants:list with the same --approval_session_id until the grant is active. insufficient_credits: your credit balance is zero or below, so no grant funded from your own credits can be created; add credits (see credits:balance) and ask again. Every outcome also carries budget_source, grant_action and approval_session_id. It records the request and refreshes the session; it launches and spends nothing.

Effect

changes data

Usage

flywheel compute-grants:request-approval <FLAGS>

Required flags

FlagValueDefaultChoicesDescription
--purposestringWhy you need the compute, shown to the person approving. Surrounding whitespace is dropped. Recorded with the request, not a launch.
--requested_skustringOffer to rent: offer_id of an allowed row from compute:options, such as lambda::gpu_1x_a10 (provider and offer joined by ::). Approval requests store it as given. Acquire adds the --provider prefix when you pass one; otherwise it sends the value as given.
--budget_sourcestringuser: spend your own credits. root: spend a campaign budget funded by the campaign's organizer; needs --compute_budget_id to create.

Optional flags

FlagValueDefaultChoicesDescription
--regionstringRegion from the offer's regions in compute:options. Required when the offer's region_selection_mode is required_from_list; otherwise optional (omitted: the first listed region). Approval requests only store it.
--acquire_node_idstringNode you plan to acquire for: checks that you can read it and, for a root budget, that the budget belongs to the node's root. Required with --budget_source root and --grant_action create; optional otherwise. Missing or hidden: 404.
--approval_session_idstringsession_id from compute-grants:request-approval or approval-sessions:list. A grant bound to another session: 403. Pass it to reuse an existing session.
--lease_control_tokenstringFrom compute.lease_control_token in compute:acquire; scopes the leases you control (not an SSH credential). No matching lease: empty status, no_active_lease from release-all, 403 on connect or single release. When set, the request also checks lease status first.
--grant_actionstringcreate: a new grant (an active grant of this session with money left is reused and answers already_approved). top_up: raise an existing grant by one more approval; needs --target_compute_grant_id. Omitted: create.
--compute_budget_idstringCampaign budget to draw on, from budget.compute_budget_id or budgets[].compute_budget_id of campaign-budgets:list. Required to create a new root approval (an existing reusable grant of the session is answered already_approved first). With top_up it must match the budget of the target grant (another: 422). For user with create it names the budget of the new grant (omitted: the server makes one).
--target_compute_grant_idstringGrant to top up, from compute-grants:list: active in this approval session and funded by the same budget_source. Required with top_up; refused with create.
--providerstringCompute provider ID, e.g. lambda (see provider in compute:options). Optional filters: omitted means all. Acquire prefixes an unqualified SKU with it; executions and approval requests just store it.
--suggested_hard_cap_centsintegerSpending cap to propose to the approver, in cents. 0 or less: the server proposes one (from the grant's earlier cap, otherwise 5000; kept between 1 and 10,000,000). Not a request for zero dollars.
--formatFORMATjson, tsv, csv, tableOutput format for command results.
--envPROFILESelect a CLI profile; unconfigured default requires FLYWHEEL_BASE_URL.
--outPATHWrite output to a file path, or use - for stdout.
--openOpen browser-bound URLs when supported.
--no-retryDisable transient-error retries.
--retry-maxNMaximum transient-error retry attempts.
--waitBlock on async operations until a terminal state is reached.
--wait-timeoutSECONDS600Seconds to wait for --wait before timing out. Defaults to 600.
--allow-selfAllow mutating the currently active credential.
--timeoutSECONDSSet the per-request timeout budget in seconds.
--idempotency-keyKEYReuse an Idempotency-Key so ambiguous write failures can be retried with the same key.
--forceForce safety-gated operations where supported.
--yesConfirm forced compute:release-all --force. Other runtime commands do not read --yes.
--debugPrint structured request debugging with secrets masked.
--verbosePrint verbose progress for long-running operations.
-h, --helpShow this help.

Examples

Request approval.

flywheel compute-grants:request-approval --purpose "train" --requested_sku lambda::gpu_1x_a10 --region us-east --budget_source user

Output

Default format: json.

FieldType
purposestring
requested_skustring
regionstring | null
budget_source"user" | "root"
grant_action"create" | "top_up"
approval_session_idstring
approval_sessionobject
grantsarray<object>
messagestring
acquire_node_id (optional)string | null
compute_status (optional)object | null
status"already_approved" | "insufficient_credits" | "approval_required"
compute_grant_id (optional)string
compute_budget_id (optional)string | null
credits (optional)object | object | null
request_id (optional)string
approval_url (optional)string
suggested_hard_cap_cents (optional)integer
target_compute_grant_id (optional)string | null
campaign_budgets (optional)array<object> | null
wait_result (optional)object