所属服务

keypair

Action

VerifyPublicKey

Version

2018-02-08

Method

POST

描述

验证用户秘钥对公钥,上传秘钥对公钥会涉及到对公钥格式做验证。

请求参数

参数名称说明参数类型是否必填
ActionVerifyPublicKeystring
Version2018-02-08string

Body

参数名称说明参数类型是否必填
KeyContent秘钥对公钥内容string

返回参数

返回参数被覆盖

错误码

错误码(Code)错误提示(Message)http status code说明
Success处理成功200null
InvalidParameters参数不合法400null
UnauthorizedOperation无权限访问403null
MissingParameter参数缺失400null

请求示例

curl -X POST \
'{G0Host}/keypair?Action=VerifyPublicKey&Version=2018-02-08' \
-H 'Accept: application/json;charset=UTF-8' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'X-163-RequestId: 1277c404-09f4-4dc2-98f4-98a39a325e84' \
-H 'X-163-AcceptLanguage: zh' \
-H 'X-163-SignatureVersion: 2.0' \
-H 'X-163-SignatureNonce: ecdb157b-6f43-4921-81ce-9fbd889b701f' \
-H 'X-163-DryRun: false' \
-H 'X-163-Date: 2018-08-21T02:04:55Z' \
-H 'host: {G0Host}' \
-H 'Authorization: HMAC-SHA256 Credential=bd9e3a3d25fa4deda81d7d6954a34342/20180821/cn-east-1/keypair/163_request, SignedHeaders=host;x-163-acceptlanguage;x-163-date;x-163-dryrun;x-163-signaturenonce;x-163-signatureversion, Signature=0fc41a1fa18212c8de221d3b44bc09666635c8bab89360abe69cb6eeec9df6b0' \
-b '{"KeyContent":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwO9vK8S6PSWfsoyEnEaFwQPGTNWSqL18pl7gr9EXa7+DFkw5A763SBUvd30XfeXEwQVRGO/IcaMFP3nRe7P3TmjYk+JLe80hHSKsWm3ctI/nt5qFePwE685ESWZeHPkWXn2plXd0LICbtqBq5M8AupEv4CjueUXQkDVyySNZvbBoNGuQl9HoKFCv4MVxn4lgQWdNfwBb7QKnct4OPav5lVcJ6qwRPuXM/uEw42FZXf2ovaBQSUvsR88hJfZmEMX/qS5EqQnudrlkw0XLV5NsCvRZhbupMGVz2rdUePjjI5nuT2oMbLPmiiQBEeMUBlyOLX7Ekc2+md2xCuWoAyQsJ wacaca@corp.netease.com"}'

返回示例

{
    "Message":"处理成功",
    "RequestId":"1277c404-09f4-4dc2-98f4-98a39a325e84",
    "Code":"Success"
}