Compute CLI Command Reference

Every dcloud ec2 command. The shape is dcloud <service> <resource> <verb>; every command also takes the global flags (--json, --profile, --dry-run, …).

dcloud ec2 instances

Virtual machines

  • listList instances
  • runLaunch an instance
  • getDescribe one instance
  • set-tagsRelabel an instance in one call: set some tags, remove others
  • waitWait until the instance is running (or stopped, or terminated)
  • get-identityInstance identity: its role, when the secret was rotated and last used, from where
  • set-roleGive the instance an IAM role it gets short-lived credentials for
  • remove-roleTake the instance role away; sessions already issued expire within the hour
  • connect-statusDeutsche Cloud Connect on this instance: connected or not, who can log in, the keys Deutsche Cloud added
  • add-keyAdd a key pair to a running instance (root and its default user), no reboot
  • remove-keyRemove a key pair Deutsche Cloud added from a running instance
  • start-sessionOpen a terminal on the instance (Deutsche Cloud Connect, no inbound port)
  • attach-sessionA fresh ticket to re-attach to your own session (the shell waits 60 s after a drop)
  • list-sessionsTerminal sessions on this instance: who, when, how long, bytes
  • end-sessionEnd a terminal session (your own needs no permission)
  • get-user-dataRead the cloud-init user data an instance booted with
  • install-volume-helperGet the script that lets an older instance open encrypted volumes
  • get-patch-stateOS patch state: pending security updates, reboot needed or scheduled, kernel
  • terminateTerminate an instance and delete its machine
  • startStart a stopped instance
  • stopPower off an instance
  • shutdownAsk the guest OS to shut down cleanly
  • rebootReboot an instance
  • renameSet or clear an instance display name
  • security-groupsList the security groups attached to an instance
  • set-security-groupsReplace the security groups attached to an instance
  • resizeChange an instance server type

dcloud ec2 nat-gateways

IPv4 internet access for a VPC’s machines without a public IPv4

  • listList NAT gateways
  • createGive a VPC a NAT gateway (one per VPC); answers 202 while it is built
  • getA NAT gateway: state, egress address, address in the VPC
  • deleteDelete a NAT gateway: the route first, then its machine

dcloud ec2 vpcs

Private networks

dcloud ec2 subnets

Subnets within a VPC

  • listList subnets, optionally filtered by VPC
  • createCreate a subnet: a range of the VPC in one availability zone
  • deleteDelete a subnet no instance holds an address in

dcloud ec2 availability-zones

Availability zones: one provider location each (de1a = fsn1, de1b = nbg1)

  • listList the availability zones of a region, with the location behind each

dcloud ec2 instance-type-offerings

Which instance types each zone sells right now. The provider sells from live stock; refreshed every minute

  • listList instance types per availability zone with inStock and when it last changed (e.g. "arm-2 sold out in de1a, in stock in de1b")

dcloud ec2 security-groups

Firewall rule sets attached to instances

dcloud ec2 key-pairs

SSH public keys registered for launch

  • importRegister an existing SSH public key
  • deleteDelete a key pair

dcloud ec2 sessions

Terminal sessions on instances (Deutsche Cloud Connect), across the organization

  • listTerminal sessions: who opened which instance, when, for how long

dcloud ec2 machine-images

Snapshots of an instance root volume

  • listList machine images owned by the org
  • createSnapshot a running instance into a machine image
  • deregisterDelete the provider snapshot and mark the image deregistered

dcloud ec2 snapshot-policies

Scheduled instance snapshots with retention

  • listList snapshot policies
  • createSnapshot instances on a schedule and keep the newest N per instance
  • getA snapshot policy, with the images it holds
  • updateChange, pause or resume a snapshot policy
  • runRun a snapshot policy now, outside its schedule
  • deleteDelete a snapshot policy; the images it took are kept

dcloud ec2 volumes

Block storage you create, attach to an instance, and delete

  • listList volumes
  • getDescribe a volume
  • createCreate a volume in a region
  • attachAttach a volume to an instance in the same region
  • rotate-keyReplace an encrypted volume’s LUKS passphrase with a new key
  • detachDetach a volume from its instance
  • modifyRename a volume or grow it
  • deleteDelete a detached volume and its data

dcloud ec2 snapshots

Volume snapshots: a volume’s blocks in object storage, restorable into a new volume

  • listList volume snapshots (optionally of one volume)
  • getDescribe a volume snapshot and its progress
  • createSnapshot a volume
  • deleteDelete a volume snapshot and the data no other snapshot uses

dcloud ec2 elastic-ips

Floating IPv4 addresses

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