Docs
api
UHost(UHost)
DescribeUHostKeyPairs

Query Host Key Information - DescribeUHostKeyPairs

Overview

Query one or more key pairs.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is DescribeUHostKeyPairs.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.No
KeyPairFingerPrintstringFingerprint of the key pair.No
OffsetintList start position offset, default is 0No
LimitintReturn data length, default is 20, maximum 100No

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
KeyPairsarray[KeyPairDesc]Key Pair Information SetYes
TotalCountintTotal Number of Key PairsYes

Data Model

KeyPairDesc

Field NameTypeDescription InformationRequired
ProjectIdstringProject ID.No
KeyPairIdstringKey Pair ID.No
KeyPairNamestringKey pair name. The length is 1~63 English or Chinese characters.No
KeyPairFingerPrintstringKey Pair Fingerprint. md5(ProjectId|KeyPairId|PublicKey)No
CreateTimeintThe creation time of the key pair, in Unix Timestamp format.No

Example

Request Example

https://api.ucloud-global.com/?Action=DescribeUHostKeyPairs
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=hHjwEGLs
&KeyPairName=BTpJhjPo
&KeyPairFingerPrint=KEhDIIJf
&Offset=7
&Limit=2

Response Example

{
  "Action": "DescribeUHostKeyPairsResponse",
  "KeyPairs": [
    {
      "CreateTime": "SbXyAFFW",
      "KeyPairFingerPrint": "hDSGSuhK",
      "KeyPairId": "ZBIzfUoy",
      "KeyPairName": "wMJeFQGOjhlyFbvYAGKSysoELNdTbOpeOkABtyxTKfGyheuMVDXxlIVbZDBGXdWoyvkfxaOJLtncqcRWZxLBlEvflSQRyLMofalkxFrSpUmomhMqfjUAyjPyRARVhGfwOEoABifOjGJKzDPtObsplwjWbCNMpqsVAJdfUotcPmrbMtFyOpbBSSSvJvuvgGVjkQoeYqpQAlIAIrFcjOfnFFBzSfSdhPDQEFVxjBcvryrPIeheyjPzXzcEtpqaprwEEAZpxRHynQDCzClDSjMKKDRokbYgTHGgxMxCXMbuigMNjxBoCmKqOzpfSvEXtNXRKOttlgmNnjpLARpNbJxgjxxnbOQiuUFwmRecstEQtezDWrmNQVxZCBBwPJwjVUmNRMoxTTSLixrmBSuTFKXsVAPpwsuGjMoeBDkJAPgzofGRglGpzMJtGKQzeXxqiqQqeDLsBlHFsAYIMpTdEYLhpEKDFrNtbkciavzzsVMCScWUslsNGlOtuSvsrNUBwJnsGkkbBTXNFSYxdHhAodHqrHThejtJPhVXYmvPFHhdnVRVGWxcoXaVBCUhfIboQfAkUxYOJIMYDBzyjgskYOdENYWotJuseLCCaEDWkQityNfuDWQZquvsaoXSYBnqzsSYGzgMVTYLRiiBpXInSavylybdJFgfXQkumPLhUtWRKfgIGsxoGgziwpcuDGfSyHEhznvhucqACsPExdXVFMRRJlBRYMJkgLrhEMhJBkDUVrUPfCZCHjggFSIATcfrzyUdSPnlwiKPeGdqULpprZJHAaEOvEzAFJgJfSFgEdlhrynPwNsEOIdJboDPyunlvIIoxdDJEbxrQNPxLWCFxmCQcLzGQIoTybUwflqreZgNoSeEvVxtTIAdYvGviOKoQBigFFSpzxBDodUbZVBhnOSrLpeiAneGHzFRlCfrFPGlwXqwwoMXdCfXnibPmHXfJEUYdBTKLEwYJJnALUTGALSRpSyxMQjLqaYWTdewJLAiEkPJqRhlIiCchoMuoTpFTwyKQuALthtYHNIljMPbJmszPZxOQRrScCsSQMmMqaBI",
      "ProjectId": "KVBmLnkb"
    }
  ],
  "RetCode": 0,
  "TotalCount": 9
}