Skip to main content

ecs keypair

Manage SSH key pairs

Run ecctl ecs keypair <action> -h for usage, or ecctl schema ecs.keypair.<action> --full for the complete, agent-readable spec of every parameter and behavior.

create

ecctl ecs keypair create [flags]

Create or import a key pair

  • Kind: mutation · Risk: medium
APIWhen calledPurpose
ImportKeyPairWhen --public-key is specified.Perform the resource operation.
CreateKeyPairWhen --public-key is not specified.Perform the resource operation.
DescribeKeyPairsEvery time the command runs.Read the resource view.
ParameterTypeRequiredDescription
--namestringkey pair name
--regionstringAlibaba Cloud region
--public-keystringexisting public key to import (switches create to ImportKeyPair)
--resource-groupstringresource group ID
--tagkey_valuetag assignment key=value

delete

ecctl ecs keypair delete [<ids>...] [flags]

Delete key pairs

  • Kind: mutation · Risk: high
APIWhen calledPurpose
DeleteKeyPairsEvery time the command runs.Perform the resource operation.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region

get

ecctl ecs keypair get <id> [flags]

Get key pair

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeKeyPairsEvery time the command runs.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--fieldsstringcomma-separated resource fields to include

list

ecctl ecs keypair list <id> [flags]

List key pairs

  • Kind: read · Risk: low
APIWhen calledPurpose
DescribeKeyPairsEvery time the command runs.Read the resource view.
ParameterTypeRequiredDescription
--regionstringAlibaba Cloud region
--fieldsstringcomma-separated resource fields to include
--filterkey_valuefilter expression key=value
--limitintegermaximum resources to return (default: 50)
--pageintegerresults page to return (default: 1)