dcloud ec2 instances send-command

Run a shell command on the instance through Deutsche Cloud Connect, without waiting for it

IAM ec2:RunCommandChanges stateAsks before it deletes (-y skips)

Runs with `exec` (no terminal) as `user` (root or the image’s default user), logged in with a 2-minute certificate: the machine’s sshd log names it `ews:<commandId>:<you>`. `stdin` is passed to the machine and never stored or logged; the command is recorded in the audit log, with its exit code when it ends. On an instance without Connect: 409 with what is possible. `dcloud ec2 instances run-command` sends, waits and exits with the command’s exit code.

Synopsis

dcloud ec2 instances send-command id --command command [flags]

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: /^i-[0-9a-f]{6,32}$/

Flags

  • --commandRequired

    string

    The shell command, run by the login user’s shell (`sh -c` semantics). It is recorded in the audit log: pass secrets on stdin, never in the command

    Constraints: 1-16384 chars

  • --userOptional

    string

    Run as root (the default) or the image’s default user

    Constraints: /^[a-z_][a-z0-9_-]{0,31}$/

  • --timeout-secondsOptional

    number

    Stop the command after this many seconds (1-3600, default 600): status timed_out

    Constraints: integer, 1-3600

  • --stdinOptional

    string

    Bytes for the command’s standard input, base64, at most 1 MiB decoded. Passed through to the machine only: never stored or logged

    Constraints: max 1398104 chars

Example

dcloud ec2 instances send-command id --command example

Generated from the API description, the same one the API checks requests against and the CLI is built from.