tencentcloud-sdk-nodejs-kms 4.0.1051 → 4.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1841 +0,0 @@
1
- /*
2
- * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing,
11
- * software distributed under the License is distributed on an
12
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13
- * KIND, either express or implied. See the License for the
14
- * specific language governing permissions and limitations
15
- * under the License.
16
- */
17
-
18
- /**
19
- * UpdateAlias请求参数结构体
20
- */
21
- export interface UpdateAliasRequest {
22
- /**
23
- * 新的别名,1-60个字符或数字的组合
24
- */
25
- Alias: string
26
- /**
27
- * CMK的全局唯一标识符
28
- */
29
- KeyId: string
30
- }
31
-
32
- /**
33
- * EnableWhiteBoxKey请求参数结构体
34
- */
35
- export interface EnableWhiteBoxKeyRequest {
36
- /**
37
- * 白盒密钥的全局唯一标识符
38
- */
39
- KeyId: string
40
- }
41
-
42
- /**
43
- * AsymmetricRsaDecrypt请求参数结构体
44
- */
45
- export interface AsymmetricRsaDecryptRequest {
46
- /**
47
- * CMK的唯一标识
48
- */
49
- KeyId: string
50
- /**
51
- * 使用PublicKey加密的密文,Base64编码
52
- */
53
- Ciphertext: string
54
- /**
55
- * 在使用公钥加密时对应的算法:当前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256
56
- */
57
- Algorithm: string
58
- }
59
-
60
- /**
61
- * EnableKeyRotation请求参数结构体
62
- */
63
- export interface EnableKeyRotationRequest {
64
- /**
65
- * CMK唯一标识符
66
- */
67
- KeyId: string
68
- /**
69
- * 密钥轮转周期,单位天,允许范围 7 ~ 365,默认值 365。
70
- */
71
- RotateDays?: number
72
- }
73
-
74
- /**
75
- * DescribeWhiteBoxKeyDetails返回参数结构体
76
- */
77
- export interface DescribeWhiteBoxKeyDetailsResponse {
78
- /**
79
- * 白盒密钥信息列表。
80
- */
81
- KeyInfos?: Array<WhiteboxKeyInfo>
82
- /**
83
- * 白盒密钥总数。
84
- */
85
- TotalCount?: number
86
- /**
87
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
88
- */
89
- RequestId?: string
90
- }
91
-
92
- /**
93
- * CreateKey请求参数结构体
94
- */
95
- export interface CreateKeyRequest {
96
- /**
97
- * 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
98
- */
99
- Alias: string
100
- /**
101
- * CMK 的描述,最大1024字节
102
- */
103
- Description?: string
104
- /**
105
- * 指定key的用途,默认为 "ENCRYPT_DECRYPT" 表示创建对称加解密密钥,其它支持用途 “ASYMMETRIC_DECRYPT_RSA_2048” 表示创建用于加解密的RSA2048非对称密钥,“ASYMMETRIC_DECRYPT_SM2” 表示创建用于加解密的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_SM2” 表示创建用于签名验签的SM2非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECC” 表示创建用于签名验签的ECC非对称密钥,“ASYMMETRIC_SIGN_VERIFY_RSA_2048” 表示创建用于签名验签的RSA_2048非对称密钥,“ASYMMETRIC_SIGN_VERIFY_ECDSA384”表示创建用于签名验签的 ECDSA384 非对称秘钥。完整的秘钥用途与算法支持列表可通过 ListAlgorithms 接口获取。
106
- */
107
- KeyUsage?: string
108
- /**
109
- * 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
110
- */
111
- Type?: number
112
- /**
113
- * 标签列表
114
- */
115
- Tags?: Array<Tag>
116
- /**
117
- * KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
118
- */
119
- HsmClusterId?: string
120
- }
121
-
122
- /**
123
- * DisableWhiteBoxKey返回参数结构体
124
- */
125
- export interface DisableWhiteBoxKeyResponse {
126
- /**
127
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
128
- */
129
- RequestId?: string
130
- }
131
-
132
- /**
133
- * DisableKey返回参数结构体
134
- */
135
- export interface DisableKeyResponse {
136
- /**
137
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
138
- */
139
- RequestId?: string
140
- }
141
-
142
- /**
143
- * DescribeWhiteBoxServiceStatus请求参数结构体
144
- */
145
- export type DescribeWhiteBoxServiceStatusRequest = null
146
-
147
- /**
148
- * VerifyByAsymmetricKey请求参数结构体
149
- */
150
- export interface VerifyByAsymmetricKeyRequest {
151
- /**
152
- * 密钥的唯一标识
153
- */
154
- KeyId: string
155
- /**
156
- * 签名值,通过调用KMS签名接口生成
157
- */
158
- SignatureValue: string
159
- /**
160
- * 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,则消息摘要长度(Base64编码前的长度)必须等于32字节
161
- */
162
- Message: string
163
- /**
164
- * 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256 等。更多支持的算法可通过 ListAlgorithms 接口进行查询。
165
- */
166
- Algorithm: string
167
- /**
168
- * 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。
169
- */
170
- MessageType?: string
171
- }
172
-
173
- /**
174
- * DescribeKey请求参数结构体
175
- */
176
- export interface DescribeKeyRequest {
177
- /**
178
- * CMK全局唯一标识符
179
- */
180
- KeyId: string
181
- }
182
-
183
- /**
184
- * 白盒密钥信息
185
- */
186
- export interface WhiteboxKeyInfo {
187
- /**
188
- * 白盒密钥的全局唯一标识符
189
- */
190
- KeyId?: string
191
- /**
192
- * 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字. 不可重复
193
- */
194
- Alias?: string
195
- /**
196
- * 创建者
197
- */
198
- CreatorUin?: number
199
- /**
200
- * 密钥的描述信息
201
- */
202
- Description?: string
203
- /**
204
- * 密钥创建时间,Unix时间戳
205
- */
206
- CreateTime?: number
207
- /**
208
- * 白盒密钥的状态, 取值为:Enabled | Disabled
209
- */
210
- Status?: string
211
- /**
212
- * 创建者
213
- */
214
- OwnerUin?: number
215
- /**
216
- * 密钥所用的算法类型
217
- */
218
- Algorithm?: string
219
- /**
220
- * 白盒加密密钥,base64编码
221
- */
222
- EncryptKey?: string
223
- /**
224
- * 白盒解密密钥,base64编码
225
- */
226
- DecryptKey?: string
227
- /**
228
- * 资源ID,格式:creatorUin/$creatorUin/$keyId
229
- */
230
- ResourceId?: string
231
- /**
232
- * 是否有设备指纹与当前密钥绑定
233
- */
234
- DeviceFingerprintBind?: boolean
235
- }
236
-
237
- /**
238
- * ListAlgorithms返回参数结构体
239
- */
240
- export interface ListAlgorithmsResponse {
241
- /**
242
- * 本地区支持的对称加密算法
243
- */
244
- SymmetricAlgorithms?: Array<AlgorithmInfo>
245
- /**
246
- * 本地区支持的非对称加密算法
247
- */
248
- AsymmetricAlgorithms?: Array<AlgorithmInfo>
249
- /**
250
- * 本地区支持的非对称签名验签算法
251
- */
252
- AsymmetricSignVerifyAlgorithms?: Array<AlgorithmInfo>
253
- /**
254
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
255
- */
256
- RequestId?: string
257
- }
258
-
259
- /**
260
- * DisableKeys返回参数结构体
261
- */
262
- export interface DisableKeysResponse {
263
- /**
264
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
265
- */
266
- RequestId?: string
267
- }
268
-
269
- /**
270
- * DescribeWhiteBoxKey返回参数结构体
271
- */
272
- export interface DescribeWhiteBoxKeyResponse {
273
- /**
274
- * 白盒密钥信息
275
- */
276
- KeyInfo?: WhiteboxKeyInfo
277
- /**
278
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
279
- */
280
- RequestId?: string
281
- }
282
-
283
- /**
284
- * UpdateKeyDescription返回参数结构体
285
- */
286
- export interface UpdateKeyDescriptionResponse {
287
- /**
288
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
289
- */
290
- RequestId?: string
291
- }
292
-
293
- /**
294
- * DescribeWhiteBoxServiceStatus返回参数结构体
295
- */
296
- export interface DescribeWhiteBoxServiceStatusResponse {
297
- /**
298
- * 用户的白盒密钥服务是否可用
299
- */
300
- ServiceEnabled?: boolean
301
- /**
302
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
303
- */
304
- RequestId?: string
305
- }
306
-
307
- /**
308
- * ImportKeyMaterial请求参数结构体
309
- */
310
- export interface ImportKeyMaterialRequest {
311
- /**
312
- * 使用GetParametersForImport 返回的PublicKey加密后的密钥材料base64编码。对于国密版本region的KMS,导入的密钥材料长度要求为 128 bit,FIPS版本region的KMS, 导入的密钥材料长度要求为 256 bit。
313
- */
314
- EncryptedKeyMaterial: string
315
- /**
316
- * 通过调用GetParametersForImport获得的导入令牌。
317
- */
318
- ImportToken: string
319
- /**
320
- * 指定导入密钥材料的CMK,需要和GetParametersForImport 指定的CMK相同。
321
- */
322
- KeyId: string
323
- /**
324
- * 密钥材料过期时间 unix 时间戳,不指定或者 0 表示密钥材料不会过期,若指定过期时间,需要大于当前时间点,最大支持 2147443200。
325
- */
326
- ValidTo?: number
327
- }
328
-
329
- /**
330
- * EnableKey请求参数结构体
331
- */
332
- export interface EnableKeyRequest {
333
- /**
334
- * CMK唯一标识符
335
- */
336
- KeyId: string
337
- }
338
-
339
- /**
340
- * GetKeyRotationStatus请求参数结构体
341
- */
342
- export interface GetKeyRotationStatusRequest {
343
- /**
344
- * CMK唯一标识符
345
- */
346
- KeyId: string
347
- }
348
-
349
- /**
350
- * ListAlgorithms请求参数结构体
351
- */
352
- export type ListAlgorithmsRequest = null
353
-
354
- /**
355
- * 标签键和标签值
356
- */
357
- export interface Tag {
358
- /**
359
- * 标签键
360
- */
361
- TagKey: string
362
- /**
363
- * 标签值
364
- */
365
- TagValue: string
366
- }
367
-
368
- /**
369
- * ListKeyDetail返回参数结构体
370
- */
371
- export interface ListKeyDetailResponse {
372
- /**
373
- * CMK的总数量
374
- */
375
- TotalCount?: number
376
- /**
377
- * 返回的属性信息列表。
378
- */
379
- KeyMetadatas?: Array<KeyMetadata>
380
- /**
381
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
382
- */
383
- RequestId?: string
384
- }
385
-
386
- /**
387
- * GenerateDataKey请求参数结构体
388
- */
389
- export interface GenerateDataKeyRequest {
390
- /**
391
- * CMK全局唯一标识符
392
- */
393
- KeyId: string
394
- /**
395
- * 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个
396
- */
397
- KeySpec?: string
398
- /**
399
- * 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个
400
- */
401
- NumberOfBytes?: number
402
- /**
403
- * key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串
404
- */
405
- EncryptionContext?: string
406
- /**
407
- * PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。
408
- */
409
- EncryptionPublicKey?: string
410
- /**
411
- * 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。
412
- */
413
- EncryptionAlgorithm?: string
414
- }
415
-
416
- /**
417
- * UpdateAlias返回参数结构体
418
- */
419
- export interface UpdateAliasResponse {
420
- /**
421
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
422
- */
423
- RequestId?: string
424
- }
425
-
426
- /**
427
- * ScheduleKeyDeletion返回参数结构体
428
- */
429
- export interface ScheduleKeyDeletionResponse {
430
- /**
431
- * 计划删除执行时间
432
- */
433
- DeletionDate?: number
434
- /**
435
- * 唯一标志被计划删除的CMK
436
- */
437
- KeyId?: string
438
- /**
439
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
440
- */
441
- RequestId?: string
442
- }
443
-
444
- /**
445
- * PostQuantumCryptoVerify请求参数结构体
446
- */
447
- export interface PostQuantumCryptoVerifyRequest {
448
- /**
449
- * 密钥的唯一标识
450
- */
451
- KeyId: string
452
- /**
453
- * 签名值,通过调用KMS PostQuantumCryptoSign签名接口生成
454
- */
455
- SignatureValue: string
456
- /**
457
- * Base64 编码的消息原文,消息原文的长度(Base64编码前的长度)不超过4096字节。
458
- */
459
- Message: string
460
- }
461
-
462
- /**
463
- * GenerateRandom返回参数结构体
464
- */
465
- export interface GenerateRandomResponse {
466
- /**
467
- * 生成的随机数的明文,该明文使用base64编码,用户需要使用base64解码得到明文。
468
- */
469
- Plaintext: string
470
- /**
471
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
472
- */
473
- RequestId?: string
474
- }
475
-
476
- /**
477
- * DescribeKeys请求参数结构体
478
- */
479
- export interface DescribeKeysRequest {
480
- /**
481
- * 查询CMK的ID列表,批量查询一次最多支持100个KeyId
482
- */
483
- KeyIds: Array<string>
484
- }
485
-
486
- /**
487
- * GetPublicKey请求参数结构体
488
- */
489
- export interface GetPublicKeyRequest {
490
- /**
491
- * CMK的唯一标识。
492
- */
493
- KeyId: string
494
- }
495
-
496
- /**
497
- * GetServiceStatus请求参数结构体
498
- */
499
- export type GetServiceStatusRequest = null
500
-
501
- /**
502
- * EnableWhiteBoxKeys返回参数结构体
503
- */
504
- export interface EnableWhiteBoxKeysResponse {
505
- /**
506
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
507
- */
508
- RequestId?: string
509
- }
510
-
511
- /**
512
- * ArchiveKey返回参数结构体
513
- */
514
- export interface ArchiveKeyResponse {
515
- /**
516
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
517
- */
518
- RequestId?: string
519
- }
520
-
521
- /**
522
- * VerifyByAsymmetricKey返回参数结构体
523
- */
524
- export interface VerifyByAsymmetricKeyResponse {
525
- /**
526
- * 签名是否有效。true:签名有效,false:签名无效。
527
- */
528
- SignatureValid?: boolean
529
- /**
530
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
531
- */
532
- RequestId?: string
533
- }
534
-
535
- /**
536
- * DescribeWhiteBoxKey请求参数结构体
537
- */
538
- export interface DescribeWhiteBoxKeyRequest {
539
- /**
540
- * 白盒密钥的全局唯一标识符
541
- */
542
- KeyId: string
543
- }
544
-
545
- /**
546
- * GetParametersForImport返回参数结构体
547
- */
548
- export interface GetParametersForImportResponse {
549
- /**
550
- * CMK的唯一标识,用于指定目标导入密钥材料的CMK。
551
- */
552
- KeyId: string
553
- /**
554
- * 导入密钥材料需要的token,用于作为 ImportKeyMaterial 的参数。
555
- */
556
- ImportToken: string
557
- /**
558
- * 用于加密密钥材料的RSA公钥,base64编码。使用PublicKey base64解码后的公钥将导入密钥进行加密后作为 ImportKeyMaterial 的参数。
559
- */
560
- PublicKey: string
561
- /**
562
- * 该导出token和公钥的有效期,超过该时间后无法导入,需要重新调用GetParametersForImport获取。
563
- */
564
- ParametersValidTo: number
565
- /**
566
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
567
- */
568
- RequestId?: string
569
- }
570
-
571
- /**
572
- * Decrypt返回参数结构体
573
- */
574
- export interface DecryptResponse {
575
- /**
576
- * CMK的全局唯一标识
577
- */
578
- KeyId?: string
579
- /**
580
- * 若调用时未提供 EncryptionPublicKey,该字段值为 Base64 编码的明文,需进行 Base64 解码以获取明文。
581
- 若调用时提供了 EncryptionPublicKey,则该字段值为使用 EncryptionPublicKey 公钥进行非对称加密后的 Base64 编码的密文。需在 Base64 解码后,使用用户上传的公钥对应的私钥进行进一步解密,以获取明文。
582
- */
583
- Plaintext?: string
584
- /**
585
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
586
- */
587
- RequestId?: string
588
- }
589
-
590
- /**
591
- * CreateWhiteBoxKey返回参数结构体
592
- */
593
- export interface CreateWhiteBoxKeyResponse {
594
- /**
595
- * 用于加密的密钥,base64编码
596
- */
597
- EncryptKey?: string
598
- /**
599
- * 用于解密的密钥,base64编码
600
- */
601
- DecryptKey?: string
602
- /**
603
- * 白盒密钥的全局唯一标识符
604
- */
605
- KeyId?: string
606
- /**
607
- * 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误
608
- */
609
- TagCode?: number
610
- /**
611
- * 标签操作的返回信息
612
- */
613
- TagMsg?: string
614
- /**
615
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
616
- */
617
- RequestId?: string
618
- }
619
-
620
- /**
621
- * 返回CMK列表信息
622
- */
623
- export interface Key {
624
- /**
625
- * CMK的全局唯一标识。
626
- */
627
- KeyId?: string
628
- }
629
-
630
- /**
631
- * DeleteImportedKeyMaterial返回参数结构体
632
- */
633
- export interface DeleteImportedKeyMaterialResponse {
634
- /**
635
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
636
- */
637
- RequestId?: string
638
- }
639
-
640
- /**
641
- * EnableKeys请求参数结构体
642
- */
643
- export interface EnableKeysRequest {
644
- /**
645
- * 需要批量启用的CMK Id 列表, CMK数量最大支持100
646
- */
647
- KeyIds: Array<string>
648
- }
649
-
650
- /**
651
- * EnableWhiteBoxKeys请求参数结构体
652
- */
653
- export interface EnableWhiteBoxKeysRequest {
654
- /**
655
- * 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。
656
- */
657
- KeyIds: Array<string>
658
- }
659
-
660
- /**
661
- * EncryptByWhiteBox返回参数结构体
662
- */
663
- export interface EncryptByWhiteBoxResponse {
664
- /**
665
- * 初始化向量,加密算法会使用到, base64编码。如果由调用方在入参中传入,则原样返回。如果调用方没有传入,则后端服务随机生成,并返回
666
- */
667
- InitializationVector?: string
668
- /**
669
- * 加密后的密文,base64编码
670
- */
671
- CipherText?: string
672
- /**
673
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
674
- */
675
- RequestId?: string
676
- }
677
-
678
- /**
679
- * DescribeKeys返回参数结构体
680
- */
681
- export interface DescribeKeysResponse {
682
- /**
683
- * 返回的属性信息列表
684
- */
685
- KeyMetadatas?: Array<KeyMetadata>
686
- /**
687
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
688
- */
689
- RequestId?: string
690
- }
691
-
692
- /**
693
- * EnableWhiteBoxKey返回参数结构体
694
- */
695
- export interface EnableWhiteBoxKeyResponse {
696
- /**
697
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
698
- */
699
- RequestId?: string
700
- }
701
-
702
- /**
703
- * ReEncrypt请求参数结构体
704
- */
705
- export interface ReEncryptRequest {
706
- /**
707
- * 需要重新加密的密文
708
- */
709
- CiphertextBlob: string
710
- /**
711
- * 重新加密使用的CMK,如果为空,则使用密文原有的CMK重新加密(若密钥没有轮换则密文不会刷新)
712
- */
713
- DestinationKeyId?: string
714
- /**
715
- * CiphertextBlob 密文加密时使用的key/value对的json字符串。如果加密时未使用,则为空
716
- */
717
- SourceEncryptionContext?: string
718
- /**
719
- * 重新加密使用的key/value对的json字符串,如果使用该字段,则返回的新密文在解密时需要填入相同的字符串
720
- */
721
- DestinationEncryptionContext?: string
722
- }
723
-
724
- /**
725
- * ListKeys返回参数结构体
726
- */
727
- export interface ListKeysResponse {
728
- /**
729
- * CMK列表数组
730
- */
731
- Keys?: Array<Key>
732
- /**
733
- * CMK的总数量
734
- */
735
- TotalCount?: number
736
- /**
737
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
738
- */
739
- RequestId?: string
740
- }
741
-
742
- /**
743
- * AsymmetricSm2Decrypt返回参数结构体
744
- */
745
- export interface AsymmetricSm2DecryptResponse {
746
- /**
747
- * CMK的唯一标识
748
- */
749
- KeyId?: string
750
- /**
751
- * 解密后的明文,base64编码
752
- */
753
- Plaintext?: string
754
- /**
755
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
756
- */
757
- RequestId?: string
758
- }
759
-
760
- /**
761
- * DisableKeyRotation返回参数结构体
762
- */
763
- export interface DisableKeyRotationResponse {
764
- /**
765
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
766
- */
767
- RequestId?: string
768
- }
769
-
770
- /**
771
- * DisableWhiteBoxKeys请求参数结构体
772
- */
773
- export interface DisableWhiteBoxKeysRequest {
774
- /**
775
- * 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。
776
- */
777
- KeyIds: Array<string>
778
- }
779
-
780
- /**
781
- * ListKeyDetail请求参数结构体
782
- */
783
- export interface ListKeyDetailRequest {
784
- /**
785
- * 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
786
- */
787
- Offset?: number
788
- /**
789
- * 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为10,最大值为200
790
- */
791
- Limit?: number
792
- /**
793
- * 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk
794
- */
795
- Role?: number
796
- /**
797
- * 根据CMK创建时间排序, 0 表示按照降序排序,1表示按照升序排序
798
- */
799
- OrderType?: number
800
- /**
801
- * 根据CMK状态筛选, 0表示全部CMK, 1 表示仅查询Enabled CMK, 2 表示仅查询Disabled CMK,3 表示查询PendingDelete 状态的CMK(处于计划删除状态的Key),4 表示查询 PendingImport 状态的CMK,5 表示查询 Archived 状态的 CMK
802
- */
803
- KeyState?: number
804
- /**
805
- * 根据KeyId或者Alias进行模糊匹配查询
806
- */
807
- SearchKeyAlias?: string
808
- /**
809
- * 根据CMK类型筛选, "TENCENT_KMS" 表示筛选密钥材料由KMS创建的CMK, "EXTERNAL" 表示筛选密钥材料需要用户导入的 EXTERNAL类型CMK,"ALL" 或者不设置表示两种类型都查询,大小写敏感。
810
- */
811
- Origin?: string
812
- /**
813
- * 根据CMK的KeyUsage筛选,ALL表示筛选全部,可使用的参数为:ALL 或 ENCRYPT_DECRYPT 或 ASYMMETRIC_DECRYPT_RSA_2048 或 ASYMMETRIC_DECRYPT_SM2 或 ASYMMETRIC_SIGN_VERIFY_SM2 或 ASYMMETRIC_SIGN_VERIFY_RSA_2048 或 ASYMMETRIC_SIGN_VERIFY_ECC,为空则默认筛选ENCRYPT_DECRYPT类型
814
- */
815
- KeyUsage?: string
816
- /**
817
- * 标签过滤条件
818
- */
819
- TagFilters?: Array<TagFilter>
820
- /**
821
- * KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
822
- */
823
- HsmClusterId?: string
824
- }
825
-
826
- /**
827
- * DeleteWhiteBoxKey请求参数结构体
828
- */
829
- export interface DeleteWhiteBoxKeyRequest {
830
- /**
831
- * 白盒密钥的全局唯一标识符
832
- */
833
- KeyId: string
834
- }
835
-
836
- /**
837
- * 算法的名称 和 标识
838
- */
839
- export interface AlgorithmInfo {
840
- /**
841
- * 算法的标识
842
- */
843
- KeyUsage?: string
844
- /**
845
- * 算法的名称
846
- */
847
- Algorithm?: string
848
- }
849
-
850
- /**
851
- * GetRegions返回参数结构体
852
- */
853
- export interface GetRegionsResponse {
854
- /**
855
- * 可用region列表
856
- */
857
- Regions?: Array<string>
858
- /**
859
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
860
- */
861
- RequestId?: string
862
- }
863
-
864
- /**
865
- * GenerateDataKey返回参数结构体
866
- */
867
- export interface GenerateDataKeyResponse {
868
- /**
869
- * CMK的全局唯一标识
870
- */
871
- KeyId?: string
872
- /**
873
- * 若调用时未提供 EncryptionPublicKey,该字段值为生成的数据密钥 DataKey 的 Base64 编码的明文,需进行 Base64 解码以获取 DataKey 明文。
874
- 若调用时提供了 EncryptionPublicKey,则该字段值为使用 EncryptionPublicKey 公钥进行非对称加密后的 Base64 编码的密文。需在 Base64 解码后,使用用户上传的公钥对应的私钥进行进一步解密,以获取 DataKey 明文。
875
- */
876
- Plaintext?: string
877
- /**
878
- * 数据密钥DataKey加密后的密文,用户需要自行保存该密文,KMS不托管用户的数据密钥。可以通过Decrypt接口从CiphertextBlob中获取数据密钥DataKey明文
879
- */
880
- CiphertextBlob?: string
881
- /**
882
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
883
- */
884
- RequestId?: string
885
- }
886
-
887
- /**
888
- * CreateWhiteBoxKey请求参数结构体
889
- */
890
- export interface CreateWhiteBoxKeyRequest {
891
- /**
892
- * 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。Alias不可重复。
893
- */
894
- Alias: string
895
- /**
896
- * 创建密钥所有的算法类型,支持的取值:AES_256,SM4
897
- */
898
- Algorithm: string
899
- /**
900
- * 密钥的描述,最大1024字节
901
- */
902
- Description?: string
903
- /**
904
- * 标签列表
905
- */
906
- Tags?: Array<Tag>
907
- }
908
-
909
- /**
910
- * OverwriteWhiteBoxDeviceFingerprints返回参数结构体
911
- */
912
- export interface OverwriteWhiteBoxDeviceFingerprintsResponse {
913
- /**
914
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
915
- */
916
- RequestId?: string
917
- }
918
-
919
- /**
920
- * DisableWhiteBoxKeys返回参数结构体
921
- */
922
- export interface DisableWhiteBoxKeysResponse {
923
- /**
924
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
925
- */
926
- RequestId?: string
927
- }
928
-
929
- /**
930
- * ArchiveKey请求参数结构体
931
- */
932
- export interface ArchiveKeyRequest {
933
- /**
934
- * CMK唯一标识符
935
- */
936
- KeyId: string
937
- }
938
-
939
- /**
940
- * GetParametersForImport请求参数结构体
941
- */
942
- export interface GetParametersForImportRequest {
943
- /**
944
- * CMK的唯一标识,获取密钥参数的CMK必须是EXTERNAL类型,即在CreateKey时指定Type=2 类型的CMK。
945
- */
946
- KeyId: string
947
- /**
948
- * 指定加密密钥材料的算法,目前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256
949
- */
950
- WrappingAlgorithm: string
951
- /**
952
- * 指定加密密钥材料的类型,目前只支持RSA_2048
953
- */
954
- WrappingKeySpec: string
955
- }
956
-
957
- /**
958
- * CreateKey返回参数结构体
959
- */
960
- export interface CreateKeyResponse {
961
- /**
962
- * CMK的全局唯一标识符
963
- */
964
- KeyId?: string
965
- /**
966
- * 作为密钥更容易辨识,更容易被人看懂的别名
967
- */
968
- Alias?: string
969
- /**
970
- * 密钥创建时间,unix时间戳
971
- */
972
- CreateTime?: number
973
- /**
974
- * CMK的描述
975
- */
976
- Description?: string
977
- /**
978
- * CMK的状态
979
- */
980
- KeyState?: string
981
- /**
982
- * CMK的用途
983
- */
984
- KeyUsage?: string
985
- /**
986
- * 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误
987
- */
988
- TagCode?: number
989
- /**
990
- * 标签操作的返回信息
991
- */
992
- TagMsg?: string
993
- /**
994
- * HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)
995
- */
996
- HsmClusterId?: string
997
- /**
998
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
999
- */
1000
- RequestId?: string
1001
- }
1002
-
1003
- /**
1004
- * ReEncrypt返回参数结构体
1005
- */
1006
- export interface ReEncryptResponse {
1007
- /**
1008
- * 重新加密后的密文
1009
- */
1010
- CiphertextBlob?: string
1011
- /**
1012
- * 重新加密使用的CMK
1013
- */
1014
- KeyId?: string
1015
- /**
1016
- * 重新加密前密文使用的CMK
1017
- */
1018
- SourceKeyId?: string
1019
- /**
1020
- * true表示密文已经重新加密。同一个CMK进行重加密,在密钥没有发生轮换的情况下不会进行实际重新加密操作,返回原密文
1021
- */
1022
- ReEncrypted?: boolean
1023
- /**
1024
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1025
- */
1026
- RequestId?: string
1027
- }
1028
-
1029
- /**
1030
- * Encrypt返回参数结构体
1031
- */
1032
- export interface EncryptResponse {
1033
- /**
1034
- * 加密后的密文,base64编码。注意:本字段中打包了密文和密钥的相关信息,不是对明文的直接加密结果,只有将该字段作为Decrypt接口的输入参数,才可以解密出原文。
1035
- */
1036
- CiphertextBlob?: string
1037
- /**
1038
- * 加密使用的CMK的全局唯一标识
1039
- */
1040
- KeyId?: string
1041
- /**
1042
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1043
- */
1044
- RequestId?: string
1045
- }
1046
-
1047
- /**
1048
- * CancelKeyDeletion请求参数结构体
1049
- */
1050
- export interface CancelKeyDeletionRequest {
1051
- /**
1052
- * 需要被取消删除的CMK的唯一标志
1053
- */
1054
- KeyId: string
1055
- }
1056
-
1057
- /**
1058
- * DeleteImportedKeyMaterial请求参数结构体
1059
- */
1060
- export interface DeleteImportedKeyMaterialRequest {
1061
- /**
1062
- * 指定需要删除密钥材料的EXTERNAL CMK。
1063
- */
1064
- KeyId: string
1065
- }
1066
-
1067
- /**
1068
- * EnableKey返回参数结构体
1069
- */
1070
- export interface EnableKeyResponse {
1071
- /**
1072
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1073
- */
1074
- RequestId?: string
1075
- }
1076
-
1077
- /**
1078
- * GetServiceStatus返回参数结构体
1079
- */
1080
- export interface GetServiceStatusResponse {
1081
- /**
1082
- * KMS服务是否开通, true 表示已开通
1083
- */
1084
- ServiceEnabled?: boolean
1085
- /**
1086
- * 服务不可用类型: 0-未购买,1-正常, 2-欠费停服, 3-资源释放
1087
- */
1088
- InvalidType?: number
1089
- /**
1090
- * 0-普通版,1-旗舰版
1091
- */
1092
- UserLevel?: number
1093
- /**
1094
- * 旗舰版到期时间(Epoch Unix Timestamp)。
1095
- */
1096
- ProExpireTime?: number
1097
- /**
1098
- * 旗舰版是否自动续费:0-不自动续费,1-自动续费
1099
- */
1100
- ProRenewFlag?: number
1101
- /**
1102
- * 旗舰版购买记录的唯一性标识。如果为开通旗舰版,则返回值为空
1103
- */
1104
- ProResourceId?: string
1105
- /**
1106
- * 是否开通 KMS 托管版
1107
- */
1108
- ExclusiveVSMEnabled?: boolean
1109
- /**
1110
- * 是否开通 KMS 独享版
1111
- */
1112
- ExclusiveHSMEnabled?: boolean
1113
- /**
1114
- * KMS 订阅信息。
1115
- */
1116
- SubscriptionInfo?: string
1117
- /**
1118
- * 返回KMS用户密钥使用数量
1119
- */
1120
- CmkUserCount?: number
1121
- /**
1122
- * 返回KMS用户密钥规格数量
1123
- */
1124
- CmkLimit?: number
1125
- /**
1126
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1127
- */
1128
- RequestId?: string
1129
- }
1130
-
1131
- /**
1132
- * 设备指纹
1133
- */
1134
- export interface DeviceFingerprint {
1135
- /**
1136
- * 指纹信息,由设备指纹采集工具采集获得,格式满足正则表达式:^[0-9a-f]{8}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{16}$
1137
- */
1138
- Identity: string
1139
- /**
1140
- * 描述信息,如:IP,设备名称等,最大1024字节
1141
- */
1142
- Description?: string
1143
- }
1144
-
1145
- /**
1146
- * GetKeyRotationStatus返回参数结构体
1147
- */
1148
- export interface GetKeyRotationStatusResponse {
1149
- /**
1150
- * 密钥轮换是否开启
1151
- */
1152
- KeyRotationEnabled?: boolean
1153
- /**
1154
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1155
- */
1156
- RequestId?: string
1157
- }
1158
-
1159
- /**
1160
- * Encrypt请求参数结构体
1161
- */
1162
- export interface EncryptRequest {
1163
- /**
1164
- * 调用CreateKey生成的CMK全局唯一标识符
1165
- */
1166
- KeyId: string
1167
- /**
1168
- * 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K
1169
- */
1170
- Plaintext: string
1171
- /**
1172
- * key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符
1173
- */
1174
- EncryptionContext?: string
1175
- }
1176
-
1177
- /**
1178
- * AsymmetricSm2Decrypt请求参数结构体
1179
- */
1180
- export interface AsymmetricSm2DecryptRequest {
1181
- /**
1182
- * CMK的唯一标识
1183
- */
1184
- KeyId: string
1185
- /**
1186
- * 使用PublicKey加密的密文,Base64编码,原始密文格式需要为C1C3C2_ASN1。原始密文长度不能超过256字节。
1187
- */
1188
- Ciphertext: string
1189
- }
1190
-
1191
- /**
1192
- * DeleteWhiteBoxKey返回参数结构体
1193
- */
1194
- export interface DeleteWhiteBoxKeyResponse {
1195
- /**
1196
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1197
- */
1198
- RequestId?: string
1199
- }
1200
-
1201
- /**
1202
- * ListKeys请求参数结构体
1203
- */
1204
- export interface ListKeysRequest {
1205
- /**
1206
- * 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
1207
- */
1208
- Offset?: number
1209
- /**
1210
- * 含义跟 SQL 查询的 Limit 一致,表示本次获最多获取 Limit 个元素。缺省值为10,最大值为200
1211
- */
1212
- Limit?: number
1213
- /**
1214
- * 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk
1215
- */
1216
- Role?: number
1217
- /**
1218
- * KMS 高级版对应的 HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)。
1219
- */
1220
- HsmClusterId?: string
1221
- }
1222
-
1223
- /**
1224
- * DescribeWhiteBoxDecryptKey请求参数结构体
1225
- */
1226
- export interface DescribeWhiteBoxDecryptKeyRequest {
1227
- /**
1228
- * 白盒密钥的全局唯一标识符
1229
- */
1230
- KeyId: string
1231
- }
1232
-
1233
- /**
1234
- * CMK属性信息
1235
- */
1236
- export interface KeyMetadata {
1237
- /**
1238
- * CMK的全局唯一标识
1239
- */
1240
- KeyId?: string
1241
- /**
1242
- * 作为密钥更容易辨识,更容易被人看懂的别名
1243
- */
1244
- Alias?: string
1245
- /**
1246
- * 密钥创建时间
1247
- */
1248
- CreateTime?: number
1249
- /**
1250
- * CMK的描述
1251
- */
1252
- Description?: string
1253
- /**
1254
- * CMK的状态, 取值为:Enabled | Disabled | PendingDelete | PendingImport | Archived
1255
- */
1256
- KeyState?: string
1257
- /**
1258
- * CMK用途,取值为: ENCRYPT_DECRYPT | ASYMMETRIC_DECRYPT_RSA_2048 | ASYMMETRIC_DECRYPT_SM2 | ASYMMETRIC_SIGN_VERIFY_SM2 | ASYMMETRIC_SIGN_VERIFY_RSA_2048 | ASYMMETRIC_SIGN_VERIFY_ECC
1259
- */
1260
- KeyUsage?: string
1261
- /**
1262
- * CMK类型,2 表示符合FIPS标准,4表示符合国密标准
1263
- */
1264
- Type?: number
1265
- /**
1266
- * 创建者
1267
- */
1268
- CreatorUin?: number
1269
- /**
1270
- * 是否开启了密钥轮换功能
1271
- */
1272
- KeyRotationEnabled?: boolean
1273
- /**
1274
- * CMK的创建者,用户创建的为 user,授权各云产品自动创建的为对应的产品名
1275
- */
1276
- Owner?: string
1277
- /**
1278
- * 在密钥轮换开启状态下,下次轮换的时间
1279
- */
1280
- NextRotateTime?: number
1281
- /**
1282
- * 计划删除的时间
1283
- */
1284
- DeletionDate?: number
1285
- /**
1286
- * CMK 密钥材料类型,由KMS创建的为: TENCENT_KMS, 由用户导入的类型为:EXTERNAL
1287
- */
1288
- Origin?: string
1289
- /**
1290
- * 在Origin为 EXTERNAL 时有效,表示密钥材料的有效日期, 0 表示不过期
1291
- */
1292
- ValidTo?: number
1293
- /**
1294
- * 资源ID,格式:creatorUin/$creatorUin/$keyId
1295
- */
1296
- ResourceId?: string
1297
- /**
1298
- * HSM 集群 ID(仅对 KMS 独占版/托管版服务实例有效)
1299
- */
1300
- HsmClusterId?: string
1301
- /**
1302
- * 密钥轮转周期(天)
1303
- */
1304
- RotateDays?: number
1305
- /**
1306
- * 上次乱转时间(Unix timestamp)
1307
- */
1308
- LastRotateTime?: number
1309
- }
1310
-
1311
- /**
1312
- * CancelKeyArchive返回参数结构体
1313
- */
1314
- export interface CancelKeyArchiveResponse {
1315
- /**
1316
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1317
- */
1318
- RequestId?: string
1319
- }
1320
-
1321
- /**
1322
- * Decrypt请求参数结构体
1323
- */
1324
- export interface DecryptRequest {
1325
- /**
1326
- * 待解密的密文数据
1327
- */
1328
- CiphertextBlob: string
1329
- /**
1330
- * key/value对的json字符串,如果Encrypt指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024字符
1331
- */
1332
- EncryptionContext?: string
1333
- /**
1334
- * PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。
1335
- */
1336
- EncryptionPublicKey?: string
1337
- /**
1338
- * 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。
1339
- */
1340
- EncryptionAlgorithm?: string
1341
- }
1342
-
1343
- /**
1344
- * DescribeWhiteBoxKeyDetails请求参数结构体
1345
- */
1346
- export interface DescribeWhiteBoxKeyDetailsRequest {
1347
- /**
1348
- * 过滤条件:密钥的状态,0:disabled,1:enabled
1349
- */
1350
- KeyStatus?: number
1351
- /**
1352
- * 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
1353
- */
1354
- Offset?: number
1355
- /**
1356
- * 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为0, 表示不分页
1357
- */
1358
- Limit?: number
1359
- /**
1360
- * 标签过滤条件
1361
- */
1362
- TagFilters?: Array<TagFilter>
1363
- }
1364
-
1365
- /**
1366
- * PostQuantumCryptoSign请求参数结构体
1367
- */
1368
- export interface PostQuantumCryptoSignRequest {
1369
- /**
1370
- * Base64 编码的消息原文。消息原文的长度(Base64编码前的长度)不超过4096字节。
1371
- */
1372
- Message: string
1373
- /**
1374
- * 密钥的唯一标识
1375
- */
1376
- KeyId: string
1377
- }
1378
-
1379
- /**
1380
- * PostQuantumCryptoDecrypt请求参数结构体
1381
- */
1382
- export interface PostQuantumCryptoDecryptRequest {
1383
- /**
1384
- * 待解密的密文数据
1385
- */
1386
- CiphertextBlob: string
1387
- /**
1388
- * PEM 格式公钥字符串,支持 RSA2048 和 SM2 公钥,用于对返回数据中的 Plaintext 值进行加密。若为空,则不对 Plaintext 值加密。
1389
- */
1390
- EncryptionPublicKey?: string
1391
- /**
1392
- * 非对称加密算法,配合 EncryptionPublicKey 对返回数据进行加密。目前支持:SM2(以 C1C3C2 格式返回密文),SM2_C1C3C2_ASN1 (以 C1C3C2 ASN1 格式返回密文),RSAES_PKCS1_V1_5,RSAES_OAEP_SHA_1,RSAES_OAEP_SHA_256。若为空,则默认为 SM2。
1393
- */
1394
- EncryptionAlgorithm?: string
1395
- }
1396
-
1397
- /**
1398
- * AsymmetricRsaDecrypt返回参数结构体
1399
- */
1400
- export interface AsymmetricRsaDecryptResponse {
1401
- /**
1402
- * CMK的唯一标识
1403
- */
1404
- KeyId?: string
1405
- /**
1406
- * 解密后的明文,base64编码
1407
- */
1408
- Plaintext?: string
1409
- /**
1410
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1411
- */
1412
- RequestId?: string
1413
- }
1414
-
1415
- /**
1416
- * CancelKeyDeletion返回参数结构体
1417
- */
1418
- export interface CancelKeyDeletionResponse {
1419
- /**
1420
- * 唯一标志被取消删除的CMK。
1421
- */
1422
- KeyId?: string
1423
- /**
1424
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1425
- */
1426
- RequestId?: string
1427
- }
1428
-
1429
- /**
1430
- * DisableKeys请求参数结构体
1431
- */
1432
- export interface DisableKeysRequest {
1433
- /**
1434
- * 需要批量禁用的CMK Id 列表,CMK数量最大支持100
1435
- */
1436
- KeyIds: Array<string>
1437
- }
1438
-
1439
- /**
1440
- * DisableWhiteBoxKey请求参数结构体
1441
- */
1442
- export interface DisableWhiteBoxKeyRequest {
1443
- /**
1444
- * 白盒密钥的全局唯一标识符
1445
- */
1446
- KeyId: string
1447
- }
1448
-
1449
- /**
1450
- * UnbindCloudResource请求参数结构体
1451
- */
1452
- export interface UnbindCloudResourceRequest {
1453
- /**
1454
- * cmk的ID
1455
- */
1456
- KeyId: string
1457
- /**
1458
- * 云产品的唯一性标识符
1459
- */
1460
- ProductId: string
1461
- /**
1462
- * 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。
1463
- */
1464
- ResourceId: string
1465
- }
1466
-
1467
- /**
1468
- * OverwriteWhiteBoxDeviceFingerprints请求参数结构体
1469
- */
1470
- export interface OverwriteWhiteBoxDeviceFingerprintsRequest {
1471
- /**
1472
- * 白盒密钥ID
1473
- */
1474
- KeyId: string
1475
- /**
1476
- * 设备指纹列表,如果列表为空,则表示删除该密钥对应的所有指纹信息。列表最大长度不超过200。
1477
- */
1478
- DeviceFingerprints?: Array<DeviceFingerprint>
1479
- }
1480
-
1481
- /**
1482
- * EnableKeyRotation返回参数结构体
1483
- */
1484
- export interface EnableKeyRotationResponse {
1485
- /**
1486
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1487
- */
1488
- RequestId?: string
1489
- }
1490
-
1491
- /**
1492
- * BindCloudResource返回参数结构体
1493
- */
1494
- export interface BindCloudResourceResponse {
1495
- /**
1496
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1497
- */
1498
- RequestId?: string
1499
- }
1500
-
1501
- /**
1502
- * EnableKeys返回参数结构体
1503
- */
1504
- export interface EnableKeysResponse {
1505
- /**
1506
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1507
- */
1508
- RequestId?: string
1509
- }
1510
-
1511
- /**
1512
- * SignByAsymmetricKey请求参数结构体
1513
- */
1514
- export interface SignByAsymmetricKeyRequest {
1515
- /**
1516
- * 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256 等。更多支持的算法可通过 ListAlgorithms 接口进行查询。
1517
- */
1518
- Algorithm: string
1519
- /**
1520
- * 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,消息摘要长度(Base64编码前的长度)必须等于32字节
1521
- */
1522
- Message: string
1523
- /**
1524
- * 密钥的唯一标识
1525
- */
1526
- KeyId: string
1527
- /**
1528
- * 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。
1529
- */
1530
- MessageType?: string
1531
- }
1532
-
1533
- /**
1534
- * DescribeWhiteBoxDeviceFingerprints请求参数结构体
1535
- */
1536
- export interface DescribeWhiteBoxDeviceFingerprintsRequest {
1537
- /**
1538
- * 白盒密钥ID
1539
- */
1540
- KeyId: string
1541
- }
1542
-
1543
- /**
1544
- * GetRegions请求参数结构体
1545
- */
1546
- export type GetRegionsRequest = null
1547
-
1548
- /**
1549
- * PostQuantumCryptoEncrypt返回参数结构体
1550
- */
1551
- export interface PostQuantumCryptoEncryptResponse {
1552
- /**
1553
- * 加密后的密文,base64编码。注意:本字段中打包了密文和密钥的相关信息,不是对明文的直接加密结果,只有将该字段作为PostQuantumCryptoDecrypt接口的输入参数,才可以解密出原文。
1554
- */
1555
- CiphertextBlob?: string
1556
- /**
1557
- * 加密使用的CMK的全局唯一标识
1558
- */
1559
- KeyId?: string
1560
- /**
1561
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1562
- */
1563
- RequestId?: string
1564
- }
1565
-
1566
- /**
1567
- * EncryptByWhiteBox请求参数结构体
1568
- */
1569
- export interface EncryptByWhiteBoxRequest {
1570
- /**
1571
- * 白盒密钥的全局唯一标识符
1572
- */
1573
- KeyId: string
1574
- /**
1575
- * 待加密的文本, base64编码,文本的原始长度最大不超过4KB
1576
- */
1577
- PlainText: string
1578
- /**
1579
- * 初始化向量,大小为 16 Bytes,加密算法会使用到, base64编码;如果不传,则由后端服务随机生成。用户需要自行保存该值,作为解密的参数。
1580
- */
1581
- InitializationVector?: string
1582
- }
1583
-
1584
- /**
1585
- * GenerateRandom请求参数结构体
1586
- */
1587
- export interface GenerateRandomRequest {
1588
- /**
1589
- * 生成的随机数的长度。最小值为1, 最大值为1024。
1590
- */
1591
- NumberOfBytes: number
1592
- }
1593
-
1594
- /**
1595
- * ScheduleKeyDeletion请求参数结构体
1596
- */
1597
- export interface ScheduleKeyDeletionRequest {
1598
- /**
1599
- * CMK的唯一标志
1600
- */
1601
- KeyId: string
1602
- /**
1603
- * 计划删除时间区间[7,30]
1604
- */
1605
- PendingWindowInDays: number
1606
- }
1607
-
1608
- /**
1609
- * PostQuantumCryptoEncrypt请求参数结构体
1610
- */
1611
- export interface PostQuantumCryptoEncryptRequest {
1612
- /**
1613
- * 调用CreateKey生成的CMK全局唯一标识符
1614
- */
1615
- KeyId: string
1616
- /**
1617
- * 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K
1618
- */
1619
- PlainText: string
1620
- }
1621
-
1622
- /**
1623
- * DisableKey请求参数结构体
1624
- */
1625
- export interface DisableKeyRequest {
1626
- /**
1627
- * CMK唯一标识符
1628
- */
1629
- KeyId: string
1630
- }
1631
-
1632
- /**
1633
- * ImportKeyMaterial返回参数结构体
1634
- */
1635
- export interface ImportKeyMaterialResponse {
1636
- /**
1637
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1638
- */
1639
- RequestId?: string
1640
- }
1641
-
1642
- /**
1643
- * GetPublicKey返回参数结构体
1644
- */
1645
- export interface GetPublicKeyResponse {
1646
- /**
1647
- * CMK的唯一标识。
1648
- */
1649
- KeyId: string
1650
- /**
1651
- * 经过base64编码的公钥内容。
1652
- */
1653
- PublicKey: string
1654
- /**
1655
- * PEM格式的公钥内容。
1656
- */
1657
- PublicKeyPem: string
1658
- /**
1659
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1660
- */
1661
- RequestId?: string
1662
- }
1663
-
1664
- /**
1665
- * BindCloudResource请求参数结构体
1666
- */
1667
- export interface BindCloudResourceRequest {
1668
- /**
1669
- * cmk的ID
1670
- */
1671
- KeyId: string
1672
- /**
1673
- * 云产品的唯一性标识符
1674
- */
1675
- ProductId: string
1676
- /**
1677
- * 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。
1678
- */
1679
- ResourceId: string
1680
- }
1681
-
1682
- /**
1683
- * 标签过滤器
1684
- */
1685
- export interface TagFilter {
1686
- /**
1687
- * 标签键
1688
- */
1689
- TagKey: string
1690
- /**
1691
- * 标签值
1692
- */
1693
- TagValue?: Array<string>
1694
- }
1695
-
1696
- /**
1697
- * PostQuantumCryptoSign返回参数结构体
1698
- */
1699
- export interface PostQuantumCryptoSignResponse {
1700
- /**
1701
- * 签名值,Base64编码。可使用 PostQuantumCryptoVerify接口对签名值进行验证。
1702
- */
1703
- Signature?: string
1704
- /**
1705
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1706
- */
1707
- RequestId?: string
1708
- }
1709
-
1710
- /**
1711
- * SignByAsymmetricKey返回参数结构体
1712
- */
1713
- export interface SignByAsymmetricKeyResponse {
1714
- /**
1715
- * 签名,Base64编码
1716
- */
1717
- Signature?: string
1718
- /**
1719
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1720
- */
1721
- RequestId?: string
1722
- }
1723
-
1724
- /**
1725
- * PostQuantumCryptoVerify返回参数结构体
1726
- */
1727
- export interface PostQuantumCryptoVerifyResponse {
1728
- /**
1729
- * 签名是否有效。true:签名有效,false:签名无效。
1730
- */
1731
- SignatureValid?: boolean
1732
- /**
1733
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1734
- */
1735
- RequestId?: string
1736
- }
1737
-
1738
- /**
1739
- * DescribeWhiteBoxDecryptKey返回参数结构体
1740
- */
1741
- export interface DescribeWhiteBoxDecryptKeyResponse {
1742
- /**
1743
- * 白盒解密密钥,base64编码
1744
- */
1745
- DecryptKey?: string
1746
- /**
1747
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1748
- */
1749
- RequestId?: string
1750
- }
1751
-
1752
- /**
1753
- * DescribeWhiteBoxDeviceFingerprints返回参数结构体
1754
- */
1755
- export interface DescribeWhiteBoxDeviceFingerprintsResponse {
1756
- /**
1757
- * 设备指纹列表
1758
- */
1759
- DeviceFingerprints?: Array<DeviceFingerprint>
1760
- /**
1761
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1762
- */
1763
- RequestId?: string
1764
- }
1765
-
1766
- /**
1767
- * PostQuantumCryptoDecrypt返回参数结构体
1768
- */
1769
- export interface PostQuantumCryptoDecryptResponse {
1770
- /**
1771
- * CMK的全局唯一标识
1772
- */
1773
- KeyId?: string
1774
- /**
1775
- * 若调用时未提供 EncryptionPublicKey,该字段值为 Base64 编码的明文,需进行 Base64 解码以获取明文。
1776
- 若调用时提供了 EncryptionPublicKey,则该字段值为使用 EncryptionPublicKey 公钥进行非对称加密后的 Base64 编码的密文。需在 Base64 解码后,使用用户上传的公钥对应的私钥进行进一步解密,以获取明文。
1777
- */
1778
- PlainText?: string
1779
- /**
1780
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1781
- */
1782
- RequestId?: string
1783
- }
1784
-
1785
- /**
1786
- * UpdateKeyDescription请求参数结构体
1787
- */
1788
- export interface UpdateKeyDescriptionRequest {
1789
- /**
1790
- * 新的描述信息,最大支持1024字节
1791
- */
1792
- Description: string
1793
- /**
1794
- * 需要修改描述信息的CMK ID
1795
- */
1796
- KeyId: string
1797
- }
1798
-
1799
- /**
1800
- * UnbindCloudResource返回参数结构体
1801
- */
1802
- export interface UnbindCloudResourceResponse {
1803
- /**
1804
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1805
- */
1806
- RequestId?: string
1807
- }
1808
-
1809
- /**
1810
- * DescribeKey返回参数结构体
1811
- */
1812
- export interface DescribeKeyResponse {
1813
- /**
1814
- * 密钥属性信息
1815
- */
1816
- KeyMetadata?: KeyMetadata
1817
- /**
1818
- * 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
1819
- */
1820
- RequestId?: string
1821
- }
1822
-
1823
- /**
1824
- * CancelKeyArchive请求参数结构体
1825
- */
1826
- export interface CancelKeyArchiveRequest {
1827
- /**
1828
- * CMK唯一标识符
1829
- */
1830
- KeyId: string
1831
- }
1832
-
1833
- /**
1834
- * DisableKeyRotation请求参数结构体
1835
- */
1836
- export interface DisableKeyRotationRequest {
1837
- /**
1838
- * CMK唯一标识符
1839
- */
1840
- KeyId: string
1841
- }