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
| Flag | Value | Default | Choices | Description |
|---|---|---|---|---|
--purpose | string | Why you need the compute, shown to the person approving. Surrounding whitespace is dropped. Recorded with the request, not a launch. | ||
--requested_sku | string | Offer 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_source | string | user: spend your own credits. root: spend a campaign budget funded by the campaign's organizer; needs --compute_budget_id to create. |
Optional flags
| Flag | Value | Default | Choices | Description |
|---|---|---|---|---|
--region | string | Region 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_id | string | Node 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_id | string | session_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_token | string | From 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_action | string | create: 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_id | string | Campaign 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_id | string | Grant 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. | ||
--provider | string | Compute 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_cents | integer | Spending 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. | ||
--format | FORMAT | json, tsv, csv, table | Output format for command results. | |
--env | PROFILE | Select a CLI profile; unconfigured default requires FLYWHEEL_BASE_URL. | ||
--out | PATH | Write output to a file path, or use - for stdout. | ||
--open | Open browser-bound URLs when supported. | |||
--no-retry | Disable transient-error retries. | |||
--retry-max | N | Maximum transient-error retry attempts. | ||
--wait | Block on async operations until a terminal state is reached. | |||
--wait-timeout | SECONDS | 600 | Seconds to wait for --wait before timing out. Defaults to 600. | |
--allow-self | Allow mutating the currently active credential. | |||
--timeout | SECONDS | Set the per-request timeout budget in seconds. | ||
--idempotency-key | KEY | Reuse an Idempotency-Key so ambiguous write failures can be retried with the same key. | ||
--force | Force safety-gated operations where supported. | |||
--yes | Confirm forced compute:release-all --force. Other runtime commands do not read --yes. | |||
--debug | Print structured request debugging with secrets masked. | |||
--verbose | Print verbose progress for long-running operations. | |||
-h, --help | Show this help. |
Examples
Request approval.
flywheel compute-grants:request-approval --purpose "train" --requested_sku lambda::gpu_1x_a10 --region us-east --budget_source userOutput
Default format: json.
| Field | Type |
|---|---|
purpose | string |
requested_sku | string |
region | string | null |
budget_source | "user" | "root" |
grant_action | "create" | "top_up" |
approval_session_id | string |
approval_session | object |
grants | array<object> |
message | string |
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 |
compute-grants:list
List your compute grants: spending allowances, each tied to one approval session. Returns `grants`, each with `compute_grant_id`, `approval_session_id`, `budget_source`, `compute_budget_id`, `grant_cents`, `spent_cents`, `remaining_cents`, `status` (`active` or `expired`) and timestamps. A session ID that is unknown or not yours returns an empty list.
feedback:create
Submit bounded feedback to the Flywheel team.