Create Host Key Pair - CreateUHostKeyPair
Overview
Create Host Key Pair Information
Definition
Public Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Action | string | Corresponding API command name, the current API is CreateUHostKeyPair. | Yes |
| PublicKey | string | The user’s public key can be obtained from Console  | Yes |
| Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Region | string | Region. See List of Regions and Availability Zones | No |
| Zone | string | Availability Zone. See Availability Zone List | No |
| ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | No |
| KeyPairName | string | Key pair name. Composed of letters, numbers, and symbols, with a length of 1-63 characters. | Yes |
Response Field
| Field Name | Type | Description Information | Required |
|---|---|---|---|
| RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
| Action | string | Operation command name. | Yes |
| Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
| KeyPair | KeyPair | Key Information | Yes |
Data Model
KeyPair
| Field Name | Type | Description Information | Required |
|---|---|---|---|
| ProjectId | string | Project ID. | No |
| KeyPairId | string | Key Pair ID. | No |
| KeyPairName | string | Key pair name. The length is 1~63 English or Chinese characters. | No |
| KeyPairFingerPrint | string | Key Pair Fingerprint. md5(ProjectId|KeyPairId|PublicKey) | No |
| PrivateKeyBody | string | The content of the private key in the key pair. Only the creation interface will return this. | No |
| CreateTime | int | The creation time of the key pair, in Unix Timestamp format. | No |
Example
Request Example
https://api.sigcalcloud.com/?Action=CreateUHostKeyPair
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=EmINSQAU
&KeyPairName=IqZZckdRResponse Example
{
"Action": "CreateUHostKeyPairResponse",
"KeyPairName": "bRkLZgiA",
"RetCode": 0
}