- 产品文档
- > 计算服务
- > 容器服务
- > 开发指南
- > 密钥 OpenAPI
- > 验证密钥对公钥
所属服务
keypair
Action
VerifyPublicKey
Version
2018-02-08
Method
POST
描述
验证用户秘钥对公钥,上传秘钥对公钥会涉及到对公钥格式做验证。
请求参数
参数名称 | 说明 | 参数类型 | 是否必填 |
---|---|---|---|
Action | VerifyPublicKey | string | 是 |
Version | 2018-02-08 | string | 是 |
Body
参数名称 | 说明 | 参数类型 | 是否必填 |
---|---|---|---|
KeyContent | 秘钥对公钥内容 | string | 是 |
返回参数
返回参数被覆盖
错误码
错误码(Code) | 错误提示(Message) | http status code | 说明 |
---|---|---|---|
Success | 处理成功 | 200 | null |
InvalidParameters | 参数不合法 | 400 | null |
UnauthorizedOperation | 无权限访问 | 403 | null |
MissingParameter | 参数缺失 | 400 | null |
请求示例
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"
}