Domain name for API request: ssm.intl.tencentcloudapi.com.
This API is used to obtain the plaintext information of an SSH key pair credential.
A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: GetSSHKeyPairValue. |
| Version | Yes | String | Common Params. The value used for this API: 2019-09-23. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| SecretName | No | String | Secret name. This secret can only be of the SSH key pair secret type. |
| SSHKeyId | No | String | SSH key pair ID, which is the unique identifier of the SSH key pair in CVM. |
| Parameter Name | Type | Description |
|---|---|---|
| SSHKeyID | String | SSH key pair ID. |
| PublicKey | String | Public key in plaintext, encoded in base64. |
| PrivateKey | String | Private key in plaintext, encoded in base64. |
| ProjectID | Integer | ID of the project to which the key pair belongs. |
| SSHKeyDescription | String | Description of the SSH key pair. Users can modify the description of the key pair in the CVM console. |
| SSHKeyName | String | Name of the SSH key pair. Users can modify the name of the key pair in the CVM console. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to get the plaintext of an SSH key pair credential.
POST / HTTP/1.1
Host: ssm.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetSSHKeyPairValue
<Common request parameters>
{
"SecretName": "test2-sshkey-secret"
}
{
"Response": {
"PrivateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKC***********NEuTGXFT8sLJ\n-----END RSA PRIVATE KEY-----",
"ProjectID": 0,
"PublicKey": "ssh-rsa AAAA********H5TD4ab skey-e0vbh2ts",
"RequestId": "9f436a38-ced1-45f0-9b51-946958b90244",
"SSHKeyDescription": "created by ssm",
"SSHKeyID": "skey-e0vbh2ts",
"SSHKeyName": "test2_key"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.AccessKmsError | KMS operation failed. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.TagKeysDuplicated | Duplicate tag key. |
| InvalidParameterValue.TagsNotExisted | The tag key or tag value does not exist. |
| MissingParameter | Missing parameter error. |
| OperationDenied | Operation denied. |
| RequestLimitExceeded | The number of requests exceeds the frequency limit. |
| ResourceNotFound | Resources do not exist. |
| ResourceUnavailable | The resource is unavailable. |
| UnauthorizedOperation | Unauthorized operation. |
| UnauthorizedOperation.AccessKmsError | Failed to access KMS. |
| UnknownParameter | Unknown parameter error. |
| UnsupportedOperation | The operation is not supported. |
フィードバック