更新时间:2022-08-23 GMT+08:00
获取密钥导入参数
功能介绍
获取导入密钥的必要参数,包括密钥导入令牌和密钥加密公钥。
返回的公钥类型默认为RSA_2048。
URI
请求消息
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
key_id |
是 |
String |
密钥ID,36字节,满足正则匹配“^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$”。 例如:0d0466b0-e727-4d9c-b35d-f84bb474a37f |
wrapping_algorithm |
是 |
String |
密钥材料加密算法,枚举如下:
|
sequence |
否 |
String |
请求消息序列号,36字节序列号。 例如:919c82d4-8046-4722-9094-35c3c6524cff |
响应消息
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
key_id |
是 |
String |
密钥ID,base64格式。 |
import_token |
是 |
String |
密钥导入令牌。 |
expiration_time |
是 |
String |
导入参数到期时间,时间戳,即从1970年1月1日至该时间的总秒数。 |
public_key |
是 |
String |
加密密钥材料的公钥,base64格式。 |
示例
如下以获取密钥ID为“bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e”,加密算法为“RSAES_OAEP_SHA_1”的导入参数为例。
- 请求样例
{ "key_id": "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e", "wrapping_algorithm":"RSAES_OAEP_SHA_1" }
- 响应样例
{ "key_id": "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e", "import_token":"AACIBjY2ZTQxYjBmLTY3ZWItNDU4Ny04OTIxLWVhZTVhZjg5NDZmYQAAuihvPN7Hly3uhp7cWw4cfuwDIem9mGwaIl7/HTx10+8ENsRR4FB7DCR+zG1s7UIZMAZRLx7LD1lkXY+rfN5ibDOOHZkoIiVSh+9u7xtC5m/mNpIFeyqumxHei2I8CNdsNuJtjLV5bDU3tQrIkj72HCWpC0k9yf1ZSvi3yCwD4wyULXBsYwUa76bTK85MIZNGGtqfOyV6w74MT6m70gLhog8r7oWe6Gbof58uyYfFMbc+s0OpkzMjvlvl1HApyOTij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vSMJpVI3MFHh5lWjEn8L/XpprLy1FqHSSvgB99qwiPw1ZGTL5XGSrIpCV3/ah8u+5VGoIUJZTtiZk6OQDkFH9fxwIahYvLI8/yjrWFLtJuApr7aIrhRN0iDBINxddNh8M0A9sIFoS3D5RNKITjIKIMl/GVz+mHaPjK+91M/b7JrNvinFCMQDGrb/1qoGQIDAQAB" }
或
{ "error": { "error_code": "KMS.XXXX", "error_msg": "XXX" } }
父主题: API说明