dcloud ec2 key-pairs import

Register an existing SSH public key

IAM ec2:ImportKeyPairChanges state

One store with `kms ssh-key-pairs` (list, generate, sync from a password manager): the pair is the same object there, under the same id.

Synopsis

dcloud ec2 key-pairs import --name name --public-key publicKey [flags]

Flags

  • --nameRequired

    string

    A display name

    Constraints: 1-64 chars

  • --region-idOptional

    string

    Ignored: an SSH key is not regional. Kept for old clients

    Constraints: min 1 chars

  • --public-keyRequired

    string

    The public key in OpenSSH format, e.g. "ssh-ed25519 AAAA… comment"

    Constraints: min 1 chars

  • --tagsOptional

    map of string

    Tags for the new resource, e.g. {"env": "prod", "project": "shop"}. Keys your organization marks required must be present, or the create is refused with the missing keys (GET /tags/api/keys lists them).

    Constraints: key=value

Example

dcloud ec2 key-pairs import --name example --public-key example

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