ImportKeyPair
Last updated
Last updated
The API is used to import an SSH key pair to log in to a Linux
instance.
Note
This request is to import an SSH key pair to be used for later instance login.
A key pair name and several public SSH keys are required.
The following request parameter list only provides API request parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Parameter Name | Type | Description |
---|---|---|
Import an SSH key pair.
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
HTTP Status Code | Error Code | Description |
---|---|---|
keyName
Yes
String
Key pair name.
Up to 32 characters in length are supported, containing letters, digits and special character -_ The names cannot be duplicated.
For example: my_key
, my-key
publicKey
Yes
String
Public SSH keys in OpenSSH
format.
Up to 5 public keys are allowed, separated by pressing ENTER
key.
For example: ssh-rsa XXXXXXXXXXXX key
keyDescription
No
String
Description of key pair. Up to 255 characters in length are allowed.
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
keyId
String
Key pair ID.
400
INVALID_KEY_NAME_MALFORMED
Key pair name error.
400
INVALID_PUBLIC_KEY_MALFORMED
Public key format error.
400
INVALID_KEY_PAIR_EXCEED_LIMIT
Quota limit exceeded.
409
INVALID_KEY_PAIR_NAME_EXIST
Key pair name duplicated.