CreateKeyPair

Last Updated At: 2026-08-02 00:05:21

1. Interface Description

Interface request domain name: cvm.api3.convergecloud.com.

This API is used to create an OpenSSH RSA key pair, which can be used to log in to a Linux instance.

  • Developers only need to specify the key pair name. The system will automatically create the key pair and return the ID, public key, and private key of the generated key pair.

  • The key pair name cannot be the same as that of existing key pairs.

  • The private key can be saved to a file for SSH authentication.

  • The cloud platform will not save the private key. Please keep it properly.

Default interface request rate limit: 10 times per second.

Interface update time: 2022-04-20 03:42:29.

The interface only verifies the signature but does not authenticate.

2. Input Parameters

The following list of request parameters only lists interface request parameters and some public parameters, For a complete list of public parameters see public request parameters.

Parameter name Required Allow NULL Type Description
Action Yes No String Public parameter, The value of this interface: CreateKeyPair
Version Yes No String Public parameter, The value of this interface: 2017-03-12
Region No No String Public parameter,Regional information A list of supported geographies is available through the DescribeRegions interface
KeyName Yes No String Key pair name, which can include numbers, letters, and underscores, with a length not exceeding 25 characters. Key pair names should be different from existing ones.
Example: alice_use
ProjectId Yes No Int64 Can only be set to 0.
Example: 0

3. Output Parameters

Parameter name Type Description
KeyPair CreateKeyPair Key pair information.
Example:View
RequestId String Unique request id, Each request will return. The RequestId of the request needs to be provided when locating the problem.

4. Error Code

The following lists only the error codes related to the interface business logic, For other error codes, see public ErrorCode.

Error Code Description
InvalidProjectId.NotFound Invalid project ID. The specified project ID does not exist.
InternalServerError Internal operation error.
InvalidKeyPairNameEmpty The key name is empty.
InvalidParameterValue Invalid parameter value. The format of the parameter value is incorrect or not supported, etc.
MissingParameter Parameters are missing. The request did not include mandatory parameters.
InvalidKeyPairName.Duplicate The key pair names are duplicate.
InvalidKeyPair.LimitExceeded The number of key pairs exceeds the limit.
InvalidKeyPairNameTooLong The key name exceeds 25 characters.
InvalidKeyPairNameIncludeIllegalChar The key name includes illegal characters. The key name only supports letters, digits, and underscores.