You need to enable JavaScript to run this app.
导航
ReplicateKey - 复制多地域密钥
最近更新时间:2025.02.05 16:25:29首次发布时间:2025.02.05 11:27:13
我的收藏
有用
有用
无用
无用

复制多地域密钥

请求参数

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

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

ReplicateKey

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

Version
String

2021-02-18

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

KeyringName
String

test

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

KeyName
String

mrk-test

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

KeyID
String

39a0e7c6-b7dd-4c83-b400-3449bb95403a

主密钥ID,二选一:
KeyringName 和 KeyName
KeyID

ReplicaRegion
String

cn-shanghai

待复制的密钥目标地域

Description
String

replica key

复制地域密钥的描述

返回参数

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

参数
类型
示例值
描述
ReplicaKey
Object

{
"ID": "d24a9f14-1a8b-4393-b66e-b77b766b5735",
"CreationDate": 1625818017,
"UpdateDate": 1625818017591,
"KeyName": "mrk-test",
"KeySpec": "SYMMETRIC_256",
"Description": "replica key",
"KeyState": "Enable",
"KeyUsage": "ENCRYPT_DECRYPT",
"ProtectionLevel": "SOFTWARE",
"Origin": "CloudKMS",
"MultiRegion": true,
"MultiRegionConfiguration": {
"MultiRegionKeyType": "REPLICA",
"PrimaryKey": {
"Trn": "trn:kms:cn-beijing:2100042018:keyrings/test/keys/mrk-test",
"Region": "cn-beijing"
},
"ReplicaKeys": [
{
"Trn": "trn:kms:cn-shanghai:2100042018:keyrings/test/keys/mrk-test",
"Region": "cn-shanghai"
}
]
}
}

复制密钥的信息

请求示例

POST /?Action=ReplicateKey&Version=2021-02-18 HTTP/1.1
Host: iam.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20241219T130940Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20241219/cn-beijing/kms/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{
  "KeyringName": "test",
  "KeyName": "mrk-test",
  "ReplicaRegion": "cn-shanghai",
  "Description": "replica key"
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "202412192110310861602270319AF37F",
    "Action": "ReplicateKey",
    "Version": "2021-02-18",
    "Service": "kms",
    "Region": "cn-beijing"
  },
  "Result": {
    "ReplicaKey": {
      "ID": "d24a9f14-1a8b-4393-b66e-b77b766b5735",
      "CreationDate": 1625818017,
      "UpdateDate": 1625818017591,
      "KeyName": "mrk-test",
      "KeySpec": "SYMMETRIC_256",
      "Description": "replica key",
      "KeyState": "Enable",
      "KeyUsage": "ENCRYPT_DECRYPT",
      "ProtectionLevel": "SOFTWARE",
      "Origin": "CloudKMS",
      "MultiRegion": true,
      "MultiRegionConfiguration": { 
         "MultiRegionKeyType": "REPLICA",
         "PrimaryKey": { 
            "Trn": "trn:kms:cn-beijing:2100042018:keyrings/test/keys/mrk-test",
            "Region": "cn-beijing"
         },
         "ReplicaKeys": [ 
            { 
               "Trn": "trn:kms:cn-shanghai:2100042018:keyrings/test/keys/mrk-test",
               "Region": "cn-shanghai"
            }
         ]
      }
    }
  }
}

错误码

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

状态码
错误码
错误信息
说明
400
InvalidParameter

The request parameter %s is invalid.

400
InvalidOperation

The request was rejected because the specified resource is not valid for this operation.

400
InvalidReplicaRegion

The replica region [%s] is not valid

400
InvalidKeyStatus

Current key status: %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

403
KMS_ServiceNotOpen

KMS service not open yet, please open the service and try again later.

404
Not Found

Not found %s [%s].

409
Conflict

The %s resource %s is conflict.

500
UndefinedError

Undefined Internal Error. Pls Contact With Admin.