docs
api
UHost(UHost)
ImportUHostKeyPairs

Import the public part of the key pair - ImportUHostKeyPairs

Overview

After importing the key pair, only the public key part is kept. You need to properly save the private key part of the key pair yourself.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is ImportUHostKeyPairs.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegion. See List of Regions and Availability ZonesNo
ZonestringAvailability Zone. See Availability Zone ListNo
ProjectIdstringProject ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface.No
KeyPairNamestringKey pair name. Composed of letters, numbers, and symbols, the length is 1-63 characters.Yes
PublicKeyBodystringThe content of the public key in the key pair.Yes

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
KeyPairNamestringKey Pair NameYes
KeyPairIdstringKey Pair IdentifierNo
KeyPairFingerPrintstringKey Pair Fingerprint. According to the public key fingerprint format defined by RFC4716, the MD5 message digest algorithm is used. The specific information format processed by the algorithm: ProjectIdKeyPairId|PublicKeyBody.No

Example

Request Example

https://api.surfercloud.com/?Action=ImportUHostKeyPairs
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=SbUkIcDH
&KeyPairName=AvMxnTFF
&KeyPairFingerPrint=CrRMVFAh
&Offset=4
&Limit=2

Response Example

{
  "Action": "ImportUHostKeyPairsResponse",
  "KeyPairFingerPrint": "dcEwwOjw",
  "KeyPairId": "fAfiTLeG",
  "KeyPairs": [
    {
      "CreateTime": "ioZVoqOy",
      "KeyPairFingerPrint": "WGLwoysy",
      "KeyPairId": "rVMtzwbR",
      "KeyPairName": "ffBMnglwJxnXLpczybVcYxXcLecyHPGTwNRkGkWSeLjEnehGNXfXEGFeJBSdUVDNVKhCNAyykNTEaZwYRadRXPZxMZDErhqHMVTyUeUbkIbipLUrSeWpYkdADUxIZxBzVvIMtiHJHGVHcQmOEpTrBhWNeMJsQmTabwMyZeOjUovZZpemahAtnEGqljWAUdgYGrWnaMMRUZzutJyDxUuJbTGbHyMhfnzfbaKGIulWCBfEuBDhTXbZjSYxVUCwVzTXSoDdSyXtVXkircmRcrStCBgJuiOnbkauLyfvvFspMCEjnIYgnVarveyDvDkQakayndkfPnHfbxFXXFdGZHNdrpCNVuqARtyAmXrJgCLuyjcbmiujuuhVSmkPgIFZdoBzAGhtuMDgOgcWKqJpYuKQRRWtINJkUzRSLmbhGCWPVTjjYvgQPDnQvNRehTffgJRUkMdJoygAUObKakcrLnZNEnKueavdWlCKlMejUZSZtJgcjzVsvDBuOLvtsCuLLNTUBBHHaMKOXIQqCsEplgMZWwGDQZDBOIhOUksYuEjkbQKRepTGTSWSSxnUFsfqxlIUgHblbYlcdjnwWeSNvMZPRvyUXeGcMhbJzPUbPtmEKGPwGnvMrTrfRHLuKXYtsTPnowalTwxErqTyGksVQBfylcHZsChsUAXuREhhoNohaLWRUfuVeZhTRLQGcHjrjSGFVslNWZMgdCPevMoeVmeOdmKoxbgUmggKflZTKBzXrwpbAAGKGWPrTzuybxDHquKNkjMVigcoGBKuhLaRlkISeolwEXMwNsfDGPKmclVawxvmgsryaLMXyCSqFkEgeZCNCvYMRAlDtCnalcRAjXDehFndRwcIQQRSgMOydiVKJgpvvPTnZnxDcwxqLJKvVbpDfkhwwkYFmLJMmdDqjbmTRStcWMfBTcrLSOhqJAbKtLhmmkxLOuCbYMskyLFcJzWPwLswEOiQUYULRyjjQogdTEtAQApNBeCFKjxALtuslyMGUPmjcrPFgHRegCfwKuhGGLzZWrREtyAVInRsOJerxwrxvKICcGdrYFwWHzHv",
      "ProjectId": "dZOrNBWV"
    }
  ],
  "RetCode": 0,
  "TotalCount": 2
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.