You need to enable JavaScript to run this app.
导航
GetParametersForImport - 获取导入参数
最近更新时间:2024.08.29 17:27:53首次发布时间:2024.08.29 17:27:53

获取导入参数

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数

参数
类型
是否必填
示例值
描述
Action
String

GetParametersForImport

要执行的操作,取值:GetParametersForImport。

Version
String

2021-02-18

API的版本,取值:2021-02-18。

KeyringName
String

keyring-name

密钥环名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]

KeyName
String

key-name

主密钥名称,长度为 2 - 31 个字符。合法字符:[a-zA-Z0-9-_]

WrappingKeySpec
String

RSA_2048

用于加密密钥材料的公钥类型,取值:
RSA_2048(默认)
EC_SM2
当前用户主密钥保护级别为SOFTWARE时,禁止选择EC_SM2

WrappingAlgorithm
String

RSAES_OAEP_SHA_256

用于加密密钥材料的算法,当WrappingKeySpec取值RSA_2048时,取值:
RSAES_OAEP_SHA_256(默认)
RSAES_OAEP_SHA_1
RSAES_PKCS1_V1_5
当WrappingKeySpec取值EC_SM2时,取值:
SM2PKE

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构

参数
类型
示例值
描述
KeyringID
String

958e5604-1f97-4b36-8e2d-d8d36973a3c6

密钥环唯一标识符,UUID形式

KeyID
String

7a20e103-0871-437a-a120-985102c9c57b

主密钥唯一标识符,UUID形式

PublicKey
String

MIIBCgKCAQEAxmNnGkAgjTGvtWDdOCEj9rqoiXniqKhq9iGmB1ybHUT1mzqS9S59Ph/I13vIAJh7451qd+H3eUf9E0KU8FHi0JbKDtwEdxwo9HgRRRXJwBkHq+4bYCeP3qX0vaE0/VmMnWV984+U9G/BxuTfnv7a2GeaYmmabK8NmTgPWsAn56BFFSxKgvz/qhue0nODuRI54FuwRjZhCxMkiucjboBCTvlVYSJ7jwDEpCtSDZLcCOJExY6ddfIGpGJdNPoT3n2HRHH8gJYS3hz0+IDW5NQxPDTHDBlCjAE5gzOL3Wsj+Ac2kUfDTWTo41RHEnPIl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smowFkg5X4qYWKGlFWl7el/EqACy9BoutLyNiA7lVye03GEngYnZ2DQ4qQjdZCy8wo0dWVSdbbOaZTgz80pnY/xTn5hrc7reBJhz22FP/bHqa2jFFZ+ST8p6kdA1ITwcRdo8A50aw2zOsyImtojU3Gx9u0wYKcoR8h9oB6RVZh8O25A1AwPWpLsIyOHbVXbUhHXe300So7SAkOrUIbBBADOV+joRsRKlVn6QfnFh+sXR8ooaG5qdQfCC0+T4bwd2ccPdaUwII8dkc4JQMIy5JSMoZ3mor/F2GksIswoMxCVWSXF68bM0V21ZkjsAALPglHDOdrD7ZwFVqAuz3ei+6yDLPeg81NYJd8Hz0dhFHNWJ5+55AqOytdgBsSlncQ0FKT4qgeOhmQGGnVGFphI3Rtb3GtwvM2UvKwQ5iK5mKL8g9Fm4FMXQFW6QUjYESTaQxcoqR1H9lVJf7GUJOJygst80pF6D3fY502pue84VOkdvLYwKBxVky+DqyANql3iZvNMQ8WlbB19DPx5N3SNkuTGxZ00wjhvXj3q3DL8y8cwFtunU+aSRcXQ3uuTSP9Df4xJBVmlHBxOo9USLTcb2kJmFQxc9EGlBOBAUDO25n87hj1RwLkAqXzSGJGiG7wDYmbBVSUDp/E/Xrx7x1FerE0LtSKsMUU7qSpRguTXHSN0Ca8c8x9Zw7sBWv/N8SQ7xODxascrq6DgHjlhPxgdyzDOZjKcvVUd9qdUgJ930=

导入令牌,Base64编码

TokenExpireTime
String

2022-09-21T11:09:36.711107236+08:00

导入令牌的过期时间

请求示例

GET /?Action=GetParametersForImport&Version=2021-02-18&KeyringName=demo&KeyName=demo&WrappingKeySpec=RSA_2048&WrappingAlgorithm=RSAES_OAEP_SHA_256 HTTP/1.1
Host: kms.volcengineapi.com
X-Date: 20240708T133851Z
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240708/cn-beijing/kms/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f


返回示例

{
  "ResponseMetadata": {
    "RequestId": "20240708213937121238014183AFA0E5",
    "Action": "GetParametersForImport",
    "Version": "2021-02-18",
    "Service": "kms",
    "Region": "cn-beijing"
  },
  "Result": {
    "KeyringID": "958e5604-1f97-4b36-8e2d-d8d36973a3c6",
    "KeyID": "7a20e103-0871-437a-a120-985102c9c57b",
    "PublicKey": "MIIBCgKCAQEAxmNnGkAgjTGvtWDdOCEj9rqoiXniqKhq9iGmB1ybHUT1mzqS9S59Ph/I13vIAJh7451qd+H3eUf9E0KU8FHi0JbKDtwEdxwo9HgRRRXJwBkHq+4bYCeP3qX0vaE0/VmMnWV984+U9G/BxuTfnv7a2GeaYmmabK8NmTgPWsAn56BFFSxKgvz/qhue0nODuRI54FuwRjZhCxMkiucjboBCTvlVYSJ7jwDEpCtSDZLcCOJExY6ddfIGpGJdNPoT3n2HRHH8gJYS3hz0+IDW5NQxPDTHDBlCjAE5gzOL3Wsj+Ac2kUfDTWTo41RHEnPIlgVa6BMZZmKbxQFOOXZnyiirDQIDAQAB",
    "ImportToken": "UlNBXzIwNDg6UlNBRVNfT0FFUF9TSEFfMjU2OpWOVgQfl0s2ji3Y02lzo8Z6IOEDCHFDeqEgmFECycV7cIAqYwAAAAD+2I1wT+04hXlV+WnPoVlpsWWmU1N/XJrpchmJfWQAXsE8Fowq2T+vIJ1AhpsZ42L/eYVhZhkplJdTwZ80snfGnQRfDjj2gTjduMc8K3sRpnb3FhXtkiaVcBHoh9SI59Qa0q8p5ytz6Q1avREAfmPuIJlceft/uhnMhgZ58RH5S6kFGOpGy/usJAHFl9GpwtZ7B2w2nbEnI4XiY/EwcVMNYN4m4maDxQgw3APxG3gkOhAye2yayylnrax7ICMODwUa448E3Qsu13v7IeBGZlvvuT6OPO9wsbeBS0NkC1LlDPFCZKuzrxPMiYEL3GgK+mW39YekOXx7vhxBQumt15ylzScJmRzCq7TKWzT8xKjasrkXKDKT6sh9TgQ8ORBLT3BsvfftWn3zyPDK3IqbmEMgCU4X6YYelG8fT6V5DvpVd1bJEth/TLyut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cb2kJmFQxc9EGlBOBAUDO25n87hj1RwLkAqXzSGJGiG7wDYmbBVSUDp/E/Xrx7x1FerE0LtSKsMUU7qSpRguTXHSN0Ca8c8x9Zw7sBWv/N8SQ7xODxascrq6DgHjlhPxgdyzDOZjKcvVUd9qdUgJ930=",
    "TokenExpireTime": "2022-09-21T11:09:36.711107236+08:00"
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
InvalidParameter
The request parameter %s is invalid.
400
InvalidKeyOrigin
Current key origin: %s does not allow to perform this action
403
Reject.Throttling.Action
The request of Action: %s upper limit is exceeded.
403
AccessDenied
User is not authorized to do this action
404
Not Found
Not found %s [%s].
500
UndefinedError
Undefined Internal Error. Pls Contact With Admin.