tencent cloud

Secrets Manager

GetSSHKeyPairValue

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-11-30 19:10:27

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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.

3. Output Parameters

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.

4. Example

Example1 Getting the Plaintext of an SSH Key Pair Credential

This example shows you how to get the plaintext of an SSH key pair credential.

Input Example

POST / HTTP/1.1
Host: ssm.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetSSHKeyPairValue
<Common request parameters>

{
    "SecretName": "test2-sshkey-secret"
}

Output Example

{
    "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"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백