pub enum Commands {
Create {
ami_id: String,
},
List,
Delete {
wait: bool,
},
Start,
Stop {
wait: bool,
},
Upload {
src: Option<String>,
dst: Option<String>,
user: String,
},
Run {
user: String,
command: Vec<String>,
},
Shell {
user: String,
},
Obliterate,
}Variants§
Create
Create new instance, and print out host.
If not machine_type is specified, allow user to choose machine_type from list of options.
List
List all instances created by this tool, which is under the same tag.
Delete
Delete 1 or more instances, where all options are displayed using a multi-select input.
Start
Start 1 or more instances.
Starting a stopped instance without an EIP will result in a new IP being assigned.
Stop
Stop 1 or more instances.
Upload
Upload local file(s) or directory to remote target instance directory.
Uses SFTP that rides on top of SSH to transfer files.
Fields
src: Option<String>Local relative/absolute path to file(s) or directory.
If no src is specified, then files within with current
working directory will be uploaded to $HOME of remote.
dst: Option<String>Destination folder path on remote instance to upload files to.
Destination folder(s) must exist, otherwise you have to manually
create them using the run subcommand.
If no dst is specified, files will be uploaded the $HOME/root directory of remote. Root folder will be auto-created.
Run
Executes a given command on remote instance. Warn: output is not printed on centos distro (there may be more).
Only run commands that are non-blocking. Commands like
opening vi does not working at the moment.
TODO: run cmd from target directory.
Shell
SSH into instance.
Executes default bash shell.
Obliterate
Terminate all resources deployed by tool. Does not remove AWS iAM permissions.
Yugi: “I have assembled all the 5 pieces of Exodia. Exodia obliterate!”
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
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 Commands
impl Subcommand for Commands
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 subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more