pub enum EamTaskCommand {
New {
name: String,
type: String,
target: Vec<String>,
setting: Vec<String>,
definition: Option<PathBuf>,
schedule_mode: ScheduleMode,
},
Force {
name: String,
},
Suspend {
name: String,
},
Resume {
name: String,
},
Cancel {
name: String,
},
Modify {
name: String,
enable: bool,
disable: bool,
schedule_mode: Option<String>,
setting: Vec<String>,
description: Option<String>,
},
Delete {
name: String,
},
}Expand description
eam task … — the guarded writes (07-02 Task 3; the five
lifecycle/mutation verbs arrive 10-04). new carries the typed
guard ladder (backup+OnDemand unguarded; mutating types and any
non-OnDemand schedule need –yes; restore/install/upgrade types
refuse outright — see README); force dispatches NOW, always
guarded; suspend/resume/cancel/modify/delete are the
two-tier guarded verbs (pure precheck → blast-radius preview
fetch → confirm-with-preview → action — the refusal message IS
the blast radius).
Variants§
New
Create a task definition (scheduleMode defaults to OnDemand — never auto-fires)
Fields
type: StringTask type — the openapi taxonomy, three classes with different guard consequences:
-
benign (no –yes with the default OnDemand schedule): eam_backup
-
mutating (need –yes — they act on their agent targets when dispatched): eam_restart, eam_sendProject, eam_sendResource, eam_sendTags, eam_activateLicense, eam_updateLicense, eam_unactivateLicense
-
refused (exit 6 eam_task_type_refused — fleet-destructive; run from the EAM console): eam_restoreBackup, eam_installModules, eam_remoteUpgrade
Any OTHER type fails safe to the –yes rung (unknown future types stay accepted, never silently unguarded).
Example: ign eam task new nightly-backup eam_backup –target gw-a
setting: Vec<String>Setting as K=V with scalar auto-typing — bool/int ride typed, anything else stays a string (repeatable; arrays/objects need –definition)
definition: Option<PathBuf>Full-JSON settings file deep-merged over the composed
config.settings (the typed/array settings path)
schedule_mode: ScheduleModeSchedule mode (default OnDemand — never auto-fires; Immediate/Scheduled/AtTime/AtDelay require –yes)
Force
Force-dispatch a task NOW — destructive, refused without –yes (it dispatches to the agent targets immediately). The confirmation prompt (and every refusal) carries the blast-radius preview line.
Suspend
Suspend a task definition’s scheduled dispatches — TASK-scoped
runtime verb (there is NO agent-level suspend on the wire; an
“agent” is suspended by suspending its tasks). Refused exit 2
without –yes, the blast-radius preview in the refusal
message; on a stock gateway the runtime seam honestly refuses
eam_not_controller (exit 6).
Resume
Resume a suspended task definition — the suspend inverse (TASK-scoped, like suspend). Refused exit 2 without –yes with the blast-radius preview in the message.
Cancel
Cancel a task’s PENDING execution (TASK-scoped). Refused exit
2 without –yes with the blast-radius preview in the message;
nothing pending is an honest no-op (fired: false), a
canCancel: false row reports the gateway’s own refusal.
Modify
Rewrite targeted keys of a task definition — the full-record read-modify-write (every key the gateway answered rides back; only the targeted keys change). Rename is deliberately ABSENT (the wire answers PUT-rename with 404 — see README’s create-new + delete-old composite). Refused exit 2 without –yes with the blast-radius preview in the message.
Example: ign eam task modify nightly-backup –enable
Fields
schedule_mode: Option<String>Rewrite config.profile.scheduleMode (e.g. OnDemand,
Scheduled — the scheduleDetails string itself is out of
scope; the read-back shows the landed pairing)
Delete
Delete a task definition — signature-keyed (the gateway refuses a stale signature), behind the same –yes guard. Refused exit 2 without –yes with the blast-radius preview in the message.
Trait Implementations§
Source§impl Debug for EamTaskCommand
impl Debug for EamTaskCommand
Source§impl FromArgMatches for EamTaskCommand
impl FromArgMatches for EamTaskCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for EamTaskCommand
impl Subcommand for EamTaskCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand