drive_lease_acquire
Back up a Drive file and acquire a write lease, authorizing repeated writes to that file until expiry with one consent.
Instructions
Back up a Drive file and acquire a write lease. Mirrors omni-dev drive lease acquire. Example: file_id:"1a2B3c4D", expiry_minutes:30. Prompts for device-owner authentication (Touch ID or account password; operator biometrics_only requires Touch ID). Native Docs/Sheets need the selected account's lease_backup_folder_id. Operator-only headless waiver applies; callers cannot set it. One consent covers repeated writes to that file until expiry. already-leased successfully returns the existing token, even if stale: release it via CLI or wait for expiry before renewing. The OS prompt can wait up to 120 seconds. Timeout/cancellation is not rollback: wait for the original call to finish, then explicitly repeat acquisition to recover an undelivered live token without another prompt/backup. Do not automatically race acquisitions. Output is tagged YAML; denied/unavailable/refused/failed set is_error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Selects a named Drive account instead of the ambient `--account`/`OMNI_DEV_DRIVE_ACCOUNT` resolution — e.g. `work`. Omit to use the resolved default account (or the legacy single-account credentials, if no named accounts are configured). Call `drive_account_list` to discover configured names. | |
| file_id | Yes | Drive file id to back up and lease, e.g. 1a2B3c4D. Required. | |
| expiry_minutes | No | Lease lifetime in minutes (1–1440). Defaults to operator env/settings, then 30; writes never extend it. |