tencentcloud-sdk-kms 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2396 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ module TencentCloud
18
+ module Kms
19
+ module V20190118
20
+ # 算法的名称 和 标识
21
+ class AlgorithmInfo < TencentCloud::Common::AbstractModel
22
+ # @param KeyUsage: 算法的标识
23
+ # @type KeyUsage: String
24
+ # @param Algorithm: 算法的名称
25
+ # @type Algorithm: String
26
+
27
+ attr_accessor :KeyUsage, :Algorithm
28
+
29
+ def initialize(keyusage=nil, algorithm=nil)
30
+ @KeyUsage = keyusage
31
+ @Algorithm = algorithm
32
+ end
33
+
34
+ def deserialize(params)
35
+ @KeyUsage = params['KeyUsage']
36
+ @Algorithm = params['Algorithm']
37
+ end
38
+ end
39
+
40
+ # ArchiveKey请求参数结构体
41
+ class ArchiveKeyRequest < TencentCloud::Common::AbstractModel
42
+ # @param KeyId: CMK唯一标识符
43
+ # @type KeyId: String
44
+
45
+ attr_accessor :KeyId
46
+
47
+ def initialize(keyid=nil)
48
+ @KeyId = keyid
49
+ end
50
+
51
+ def deserialize(params)
52
+ @KeyId = params['KeyId']
53
+ end
54
+ end
55
+
56
+ # ArchiveKey返回参数结构体
57
+ class ArchiveKeyResponse < TencentCloud::Common::AbstractModel
58
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
59
+ # @type RequestId: String
60
+
61
+ attr_accessor :RequestId
62
+
63
+ def initialize(requestid=nil)
64
+ @RequestId = requestid
65
+ end
66
+
67
+ def deserialize(params)
68
+ @RequestId = params['RequestId']
69
+ end
70
+ end
71
+
72
+ # AsymmetricRsaDecrypt请求参数结构体
73
+ class AsymmetricRsaDecryptRequest < TencentCloud::Common::AbstractModel
74
+ # @param KeyId: CMK的唯一标识
75
+ # @type KeyId: String
76
+ # @param Ciphertext: 使用PublicKey加密的密文,Base64编码
77
+ # @type Ciphertext: String
78
+ # @param Algorithm: 在使用公钥加密时对应的算法:当前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256
79
+ # @type Algorithm: String
80
+
81
+ attr_accessor :KeyId, :Ciphertext, :Algorithm
82
+
83
+ def initialize(keyid=nil, ciphertext=nil, algorithm=nil)
84
+ @KeyId = keyid
85
+ @Ciphertext = ciphertext
86
+ @Algorithm = algorithm
87
+ end
88
+
89
+ def deserialize(params)
90
+ @KeyId = params['KeyId']
91
+ @Ciphertext = params['Ciphertext']
92
+ @Algorithm = params['Algorithm']
93
+ end
94
+ end
95
+
96
+ # AsymmetricRsaDecrypt返回参数结构体
97
+ class AsymmetricRsaDecryptResponse < TencentCloud::Common::AbstractModel
98
+ # @param KeyId: CMK的唯一标识
99
+ # @type KeyId: String
100
+ # @param Plaintext: 解密后的明文,base64编码
101
+ # @type Plaintext: String
102
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
103
+ # @type RequestId: String
104
+
105
+ attr_accessor :KeyId, :Plaintext, :RequestId
106
+
107
+ def initialize(keyid=nil, plaintext=nil, requestid=nil)
108
+ @KeyId = keyid
109
+ @Plaintext = plaintext
110
+ @RequestId = requestid
111
+ end
112
+
113
+ def deserialize(params)
114
+ @KeyId = params['KeyId']
115
+ @Plaintext = params['Plaintext']
116
+ @RequestId = params['RequestId']
117
+ end
118
+ end
119
+
120
+ # AsymmetricSm2Decrypt请求参数结构体
121
+ class AsymmetricSm2DecryptRequest < TencentCloud::Common::AbstractModel
122
+ # @param KeyId: CMK的唯一标识
123
+ # @type KeyId: String
124
+ # @param Ciphertext: 使用PublicKey加密的密文,Base64编码。密文长度不能超过256字节。
125
+ # @type Ciphertext: String
126
+
127
+ attr_accessor :KeyId, :Ciphertext
128
+
129
+ def initialize(keyid=nil, ciphertext=nil)
130
+ @KeyId = keyid
131
+ @Ciphertext = ciphertext
132
+ end
133
+
134
+ def deserialize(params)
135
+ @KeyId = params['KeyId']
136
+ @Ciphertext = params['Ciphertext']
137
+ end
138
+ end
139
+
140
+ # AsymmetricSm2Decrypt返回参数结构体
141
+ class AsymmetricSm2DecryptResponse < TencentCloud::Common::AbstractModel
142
+ # @param KeyId: CMK的唯一标识
143
+ # @type KeyId: String
144
+ # @param Plaintext: 解密后的明文,base64编码
145
+ # @type Plaintext: String
146
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
147
+ # @type RequestId: String
148
+
149
+ attr_accessor :KeyId, :Plaintext, :RequestId
150
+
151
+ def initialize(keyid=nil, plaintext=nil, requestid=nil)
152
+ @KeyId = keyid
153
+ @Plaintext = plaintext
154
+ @RequestId = requestid
155
+ end
156
+
157
+ def deserialize(params)
158
+ @KeyId = params['KeyId']
159
+ @Plaintext = params['Plaintext']
160
+ @RequestId = params['RequestId']
161
+ end
162
+ end
163
+
164
+ # BindCloudResource请求参数结构体
165
+ class BindCloudResourceRequest < TencentCloud::Common::AbstractModel
166
+ # @param KeyId: cmk的ID
167
+ # @type KeyId: String
168
+ # @param ProductId: 云产品的唯一性标识符
169
+ # @type ProductId: String
170
+ # @param ResourceId: 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。
171
+ # @type ResourceId: String
172
+
173
+ attr_accessor :KeyId, :ProductId, :ResourceId
174
+
175
+ def initialize(keyid=nil, productid=nil, resourceid=nil)
176
+ @KeyId = keyid
177
+ @ProductId = productid
178
+ @ResourceId = resourceid
179
+ end
180
+
181
+ def deserialize(params)
182
+ @KeyId = params['KeyId']
183
+ @ProductId = params['ProductId']
184
+ @ResourceId = params['ResourceId']
185
+ end
186
+ end
187
+
188
+ # BindCloudResource返回参数结构体
189
+ class BindCloudResourceResponse < TencentCloud::Common::AbstractModel
190
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
191
+ # @type RequestId: String
192
+
193
+ attr_accessor :RequestId
194
+
195
+ def initialize(requestid=nil)
196
+ @RequestId = requestid
197
+ end
198
+
199
+ def deserialize(params)
200
+ @RequestId = params['RequestId']
201
+ end
202
+ end
203
+
204
+ # CancelKeyArchive请求参数结构体
205
+ class CancelKeyArchiveRequest < TencentCloud::Common::AbstractModel
206
+ # @param KeyId: CMK唯一标识符
207
+ # @type KeyId: String
208
+
209
+ attr_accessor :KeyId
210
+
211
+ def initialize(keyid=nil)
212
+ @KeyId = keyid
213
+ end
214
+
215
+ def deserialize(params)
216
+ @KeyId = params['KeyId']
217
+ end
218
+ end
219
+
220
+ # CancelKeyArchive返回参数结构体
221
+ class CancelKeyArchiveResponse < TencentCloud::Common::AbstractModel
222
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
223
+ # @type RequestId: String
224
+
225
+ attr_accessor :RequestId
226
+
227
+ def initialize(requestid=nil)
228
+ @RequestId = requestid
229
+ end
230
+
231
+ def deserialize(params)
232
+ @RequestId = params['RequestId']
233
+ end
234
+ end
235
+
236
+ # CancelKeyDeletion请求参数结构体
237
+ class CancelKeyDeletionRequest < TencentCloud::Common::AbstractModel
238
+ # @param KeyId: 需要被取消删除的CMK的唯一标志
239
+ # @type KeyId: String
240
+
241
+ attr_accessor :KeyId
242
+
243
+ def initialize(keyid=nil)
244
+ @KeyId = keyid
245
+ end
246
+
247
+ def deserialize(params)
248
+ @KeyId = params['KeyId']
249
+ end
250
+ end
251
+
252
+ # CancelKeyDeletion返回参数结构体
253
+ class CancelKeyDeletionResponse < TencentCloud::Common::AbstractModel
254
+ # @param KeyId: 唯一标志被取消删除的CMK。
255
+ # @type KeyId: String
256
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
257
+ # @type RequestId: String
258
+
259
+ attr_accessor :KeyId, :RequestId
260
+
261
+ def initialize(keyid=nil, requestid=nil)
262
+ @KeyId = keyid
263
+ @RequestId = requestid
264
+ end
265
+
266
+ def deserialize(params)
267
+ @KeyId = params['KeyId']
268
+ @RequestId = params['RequestId']
269
+ end
270
+ end
271
+
272
+ # CreateKey请求参数结构体
273
+ class CreateKeyRequest < TencentCloud::Common::AbstractModel
274
+ # @param Alias: 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。以 kms- 作为前缀的用于云产品使用,Alias 不可重复。
275
+ # @type Alias: String
276
+ # @param Description: CMK 的描述,最大1024字节
277
+ # @type Description: String
278
+ # @param KeyUsage: 指定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非对称密钥
279
+ # @type KeyUsage: String
280
+ # @param Type: 指定key类型,默认为1,1表示默认类型,由KMS创建CMK密钥,2 表示EXTERNAL 类型,该类型需要用户导入密钥材料,参考 GetParametersForImport 和 ImportKeyMaterial 接口
281
+ # @type Type: Integer
282
+ # @param Tags: 标签列表
283
+ # @type Tags: Array
284
+
285
+ attr_accessor :Alias, :Description, :KeyUsage, :Type, :Tags
286
+
287
+ def initialize(_alias=nil, description=nil, keyusage=nil, type=nil, tags=nil)
288
+ @Alias = _alias
289
+ @Description = description
290
+ @KeyUsage = keyusage
291
+ @Type = type
292
+ @Tags = tags
293
+ end
294
+
295
+ def deserialize(params)
296
+ @Alias = params['Alias']
297
+ @Description = params['Description']
298
+ @KeyUsage = params['KeyUsage']
299
+ @Type = params['Type']
300
+ unless params['Tags'].nil?
301
+ @Tags = []
302
+ params['Tags'].each do |i|
303
+ tag_tmp = Tag.new
304
+ tag_tmp.deserialize(i)
305
+ @Tags << tag_tmp
306
+ end
307
+ end
308
+ end
309
+ end
310
+
311
+ # CreateKey返回参数结构体
312
+ class CreateKeyResponse < TencentCloud::Common::AbstractModel
313
+ # @param KeyId: CMK的全局唯一标识符
314
+ # @type KeyId: String
315
+ # @param Alias: 作为密钥更容易辨识,更容易被人看懂的别名
316
+ # @type Alias: String
317
+ # @param CreateTime: 密钥创建时间,unix时间戳
318
+ # @type CreateTime: Integer
319
+ # @param Description: CMK的描述
320
+ # 注意:此字段可能返回 null,表示取不到有效值。
321
+ # @type Description: String
322
+ # @param KeyState: CMK的状态
323
+ # @type KeyState: String
324
+ # @param KeyUsage: CMK的用途
325
+ # @type KeyUsage: String
326
+ # @param TagCode: 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误
327
+ # 注意:此字段可能返回 null,表示取不到有效值。
328
+ # @type TagCode: Integer
329
+ # @param TagMsg: 标签操作的返回信息
330
+ # 注意:此字段可能返回 null,表示取不到有效值。
331
+ # @type TagMsg: String
332
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
333
+ # @type RequestId: String
334
+
335
+ attr_accessor :KeyId, :Alias, :CreateTime, :Description, :KeyState, :KeyUsage, :TagCode, :TagMsg, :RequestId
336
+
337
+ def initialize(keyid=nil, _alias=nil, createtime=nil, description=nil, keystate=nil, keyusage=nil, tagcode=nil, tagmsg=nil, requestid=nil)
338
+ @KeyId = keyid
339
+ @Alias = _alias
340
+ @CreateTime = createtime
341
+ @Description = description
342
+ @KeyState = keystate
343
+ @KeyUsage = keyusage
344
+ @TagCode = tagcode
345
+ @TagMsg = tagmsg
346
+ @RequestId = requestid
347
+ end
348
+
349
+ def deserialize(params)
350
+ @KeyId = params['KeyId']
351
+ @Alias = params['Alias']
352
+ @CreateTime = params['CreateTime']
353
+ @Description = params['Description']
354
+ @KeyState = params['KeyState']
355
+ @KeyUsage = params['KeyUsage']
356
+ @TagCode = params['TagCode']
357
+ @TagMsg = params['TagMsg']
358
+ @RequestId = params['RequestId']
359
+ end
360
+ end
361
+
362
+ # CreateWhiteBoxKey请求参数结构体
363
+ class CreateWhiteBoxKeyRequest < TencentCloud::Common::AbstractModel
364
+ # @param Alias: 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字。Alias不可重复。
365
+ # @type Alias: String
366
+ # @param Algorithm: 创建密钥所有的算法类型,支持的取值:AES_256,SM4
367
+ # @type Algorithm: String
368
+ # @param Description: 密钥的描述,最大1024字节
369
+ # @type Description: String
370
+ # @param Tags: 标签列表
371
+ # @type Tags: Array
372
+
373
+ attr_accessor :Alias, :Algorithm, :Description, :Tags
374
+
375
+ def initialize(_alias=nil, algorithm=nil, description=nil, tags=nil)
376
+ @Alias = _alias
377
+ @Algorithm = algorithm
378
+ @Description = description
379
+ @Tags = tags
380
+ end
381
+
382
+ def deserialize(params)
383
+ @Alias = params['Alias']
384
+ @Algorithm = params['Algorithm']
385
+ @Description = params['Description']
386
+ unless params['Tags'].nil?
387
+ @Tags = []
388
+ params['Tags'].each do |i|
389
+ tag_tmp = Tag.new
390
+ tag_tmp.deserialize(i)
391
+ @Tags << tag_tmp
392
+ end
393
+ end
394
+ end
395
+ end
396
+
397
+ # CreateWhiteBoxKey返回参数结构体
398
+ class CreateWhiteBoxKeyResponse < TencentCloud::Common::AbstractModel
399
+ # @param EncryptKey: 用于加密的密钥,base64编码
400
+ # @type EncryptKey: String
401
+ # @param DecryptKey: 用于解密的密钥,base64编码
402
+ # @type DecryptKey: String
403
+ # @param KeyId: 白盒密钥的全局唯一标识符
404
+ # @type KeyId: String
405
+ # @param TagCode: 标签操作的返回码. 0: 成功;1: 内部错误;2: 业务处理错误
406
+ # 注意:此字段可能返回 null,表示取不到有效值。
407
+ # @type TagCode: Integer
408
+ # @param TagMsg: 标签操作的返回信息
409
+ # 注意:此字段可能返回 null,表示取不到有效值。
410
+ # @type TagMsg: String
411
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
412
+ # @type RequestId: String
413
+
414
+ attr_accessor :EncryptKey, :DecryptKey, :KeyId, :TagCode, :TagMsg, :RequestId
415
+
416
+ def initialize(encryptkey=nil, decryptkey=nil, keyid=nil, tagcode=nil, tagmsg=nil, requestid=nil)
417
+ @EncryptKey = encryptkey
418
+ @DecryptKey = decryptkey
419
+ @KeyId = keyid
420
+ @TagCode = tagcode
421
+ @TagMsg = tagmsg
422
+ @RequestId = requestid
423
+ end
424
+
425
+ def deserialize(params)
426
+ @EncryptKey = params['EncryptKey']
427
+ @DecryptKey = params['DecryptKey']
428
+ @KeyId = params['KeyId']
429
+ @TagCode = params['TagCode']
430
+ @TagMsg = params['TagMsg']
431
+ @RequestId = params['RequestId']
432
+ end
433
+ end
434
+
435
+ # Decrypt请求参数结构体
436
+ class DecryptRequest < TencentCloud::Common::AbstractModel
437
+ # @param CiphertextBlob: 待解密的密文数据
438
+ # @type CiphertextBlob: String
439
+ # @param EncryptionContext: key/value对的json字符串,如果Encrypt指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024字符
440
+ # @type EncryptionContext: String
441
+
442
+ attr_accessor :CiphertextBlob, :EncryptionContext
443
+
444
+ def initialize(ciphertextblob=nil, encryptioncontext=nil)
445
+ @CiphertextBlob = ciphertextblob
446
+ @EncryptionContext = encryptioncontext
447
+ end
448
+
449
+ def deserialize(params)
450
+ @CiphertextBlob = params['CiphertextBlob']
451
+ @EncryptionContext = params['EncryptionContext']
452
+ end
453
+ end
454
+
455
+ # Decrypt返回参数结构体
456
+ class DecryptResponse < TencentCloud::Common::AbstractModel
457
+ # @param KeyId: CMK的全局唯一标识
458
+ # @type KeyId: String
459
+ # @param Plaintext: 解密后的明文。该字段是base64编码的,为了得到原始明文,调用方需要进行base64解码
460
+ # @type Plaintext: String
461
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
462
+ # @type RequestId: String
463
+
464
+ attr_accessor :KeyId, :Plaintext, :RequestId
465
+
466
+ def initialize(keyid=nil, plaintext=nil, requestid=nil)
467
+ @KeyId = keyid
468
+ @Plaintext = plaintext
469
+ @RequestId = requestid
470
+ end
471
+
472
+ def deserialize(params)
473
+ @KeyId = params['KeyId']
474
+ @Plaintext = params['Plaintext']
475
+ @RequestId = params['RequestId']
476
+ end
477
+ end
478
+
479
+ # DeleteImportedKeyMaterial请求参数结构体
480
+ class DeleteImportedKeyMaterialRequest < TencentCloud::Common::AbstractModel
481
+ # @param KeyId: 指定需要删除密钥材料的EXTERNAL CMK。
482
+ # @type KeyId: String
483
+
484
+ attr_accessor :KeyId
485
+
486
+ def initialize(keyid=nil)
487
+ @KeyId = keyid
488
+ end
489
+
490
+ def deserialize(params)
491
+ @KeyId = params['KeyId']
492
+ end
493
+ end
494
+
495
+ # DeleteImportedKeyMaterial返回参数结构体
496
+ class DeleteImportedKeyMaterialResponse < TencentCloud::Common::AbstractModel
497
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
498
+ # @type RequestId: String
499
+
500
+ attr_accessor :RequestId
501
+
502
+ def initialize(requestid=nil)
503
+ @RequestId = requestid
504
+ end
505
+
506
+ def deserialize(params)
507
+ @RequestId = params['RequestId']
508
+ end
509
+ end
510
+
511
+ # DeleteWhiteBoxKey请求参数结构体
512
+ class DeleteWhiteBoxKeyRequest < TencentCloud::Common::AbstractModel
513
+ # @param KeyId: 白盒密钥的全局唯一标识符
514
+ # @type KeyId: String
515
+
516
+ attr_accessor :KeyId
517
+
518
+ def initialize(keyid=nil)
519
+ @KeyId = keyid
520
+ end
521
+
522
+ def deserialize(params)
523
+ @KeyId = params['KeyId']
524
+ end
525
+ end
526
+
527
+ # DeleteWhiteBoxKey返回参数结构体
528
+ class DeleteWhiteBoxKeyResponse < TencentCloud::Common::AbstractModel
529
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
530
+ # @type RequestId: String
531
+
532
+ attr_accessor :RequestId
533
+
534
+ def initialize(requestid=nil)
535
+ @RequestId = requestid
536
+ end
537
+
538
+ def deserialize(params)
539
+ @RequestId = params['RequestId']
540
+ end
541
+ end
542
+
543
+ # DescribeKey请求参数结构体
544
+ class DescribeKeyRequest < TencentCloud::Common::AbstractModel
545
+ # @param KeyId: CMK全局唯一标识符
546
+ # @type KeyId: String
547
+
548
+ attr_accessor :KeyId
549
+
550
+ def initialize(keyid=nil)
551
+ @KeyId = keyid
552
+ end
553
+
554
+ def deserialize(params)
555
+ @KeyId = params['KeyId']
556
+ end
557
+ end
558
+
559
+ # DescribeKey返回参数结构体
560
+ class DescribeKeyResponse < TencentCloud::Common::AbstractModel
561
+ # @param KeyMetadata: 密钥属性信息
562
+ # 注意:此字段可能返回 null,表示取不到有效值。
563
+ # @type KeyMetadata: :class:`Tencentcloud::Kms.v20190118.models.KeyMetadata`
564
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
565
+ # @type RequestId: String
566
+
567
+ attr_accessor :KeyMetadata, :RequestId
568
+
569
+ def initialize(keymetadata=nil, requestid=nil)
570
+ @KeyMetadata = keymetadata
571
+ @RequestId = requestid
572
+ end
573
+
574
+ def deserialize(params)
575
+ unless params['KeyMetadata'].nil?
576
+ @KeyMetadata = KeyMetadata.new
577
+ @KeyMetadata.deserialize(params['KeyMetadata'])
578
+ end
579
+ @RequestId = params['RequestId']
580
+ end
581
+ end
582
+
583
+ # DescribeKeys请求参数结构体
584
+ class DescribeKeysRequest < TencentCloud::Common::AbstractModel
585
+ # @param KeyIds: 查询CMK的ID列表,批量查询一次最多支持100个KeyId
586
+ # @type KeyIds: Array
587
+
588
+ attr_accessor :KeyIds
589
+
590
+ def initialize(keyids=nil)
591
+ @KeyIds = keyids
592
+ end
593
+
594
+ def deserialize(params)
595
+ @KeyIds = params['KeyIds']
596
+ end
597
+ end
598
+
599
+ # DescribeKeys返回参数结构体
600
+ class DescribeKeysResponse < TencentCloud::Common::AbstractModel
601
+ # @param KeyMetadatas: 返回的属性信息列表
602
+ # 注意:此字段可能返回 null,表示取不到有效值。
603
+ # @type KeyMetadatas: Array
604
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
605
+ # @type RequestId: String
606
+
607
+ attr_accessor :KeyMetadatas, :RequestId
608
+
609
+ def initialize(keymetadatas=nil, requestid=nil)
610
+ @KeyMetadatas = keymetadatas
611
+ @RequestId = requestid
612
+ end
613
+
614
+ def deserialize(params)
615
+ unless params['KeyMetadatas'].nil?
616
+ @KeyMetadatas = []
617
+ params['KeyMetadatas'].each do |i|
618
+ keymetadata_tmp = KeyMetadata.new
619
+ keymetadata_tmp.deserialize(i)
620
+ @KeyMetadatas << keymetadata_tmp
621
+ end
622
+ end
623
+ @RequestId = params['RequestId']
624
+ end
625
+ end
626
+
627
+ # DescribeWhiteBoxDecryptKey请求参数结构体
628
+ class DescribeWhiteBoxDecryptKeyRequest < TencentCloud::Common::AbstractModel
629
+ # @param KeyId: 白盒密钥的全局唯一标识符
630
+ # @type KeyId: String
631
+
632
+ attr_accessor :KeyId
633
+
634
+ def initialize(keyid=nil)
635
+ @KeyId = keyid
636
+ end
637
+
638
+ def deserialize(params)
639
+ @KeyId = params['KeyId']
640
+ end
641
+ end
642
+
643
+ # DescribeWhiteBoxDecryptKey返回参数结构体
644
+ class DescribeWhiteBoxDecryptKeyResponse < TencentCloud::Common::AbstractModel
645
+ # @param DecryptKey: 白盒解密密钥,base64编码
646
+ # @type DecryptKey: String
647
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
648
+ # @type RequestId: String
649
+
650
+ attr_accessor :DecryptKey, :RequestId
651
+
652
+ def initialize(decryptkey=nil, requestid=nil)
653
+ @DecryptKey = decryptkey
654
+ @RequestId = requestid
655
+ end
656
+
657
+ def deserialize(params)
658
+ @DecryptKey = params['DecryptKey']
659
+ @RequestId = params['RequestId']
660
+ end
661
+ end
662
+
663
+ # DescribeWhiteBoxDeviceFingerprints请求参数结构体
664
+ class DescribeWhiteBoxDeviceFingerprintsRequest < TencentCloud::Common::AbstractModel
665
+ # @param KeyId: 白盒密钥ID
666
+ # @type KeyId: String
667
+
668
+ attr_accessor :KeyId
669
+
670
+ def initialize(keyid=nil)
671
+ @KeyId = keyid
672
+ end
673
+
674
+ def deserialize(params)
675
+ @KeyId = params['KeyId']
676
+ end
677
+ end
678
+
679
+ # DescribeWhiteBoxDeviceFingerprints返回参数结构体
680
+ class DescribeWhiteBoxDeviceFingerprintsResponse < TencentCloud::Common::AbstractModel
681
+ # @param DeviceFingerprints: 设备指纹列表
682
+ # @type DeviceFingerprints: Array
683
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
684
+ # @type RequestId: String
685
+
686
+ attr_accessor :DeviceFingerprints, :RequestId
687
+
688
+ def initialize(devicefingerprints=nil, requestid=nil)
689
+ @DeviceFingerprints = devicefingerprints
690
+ @RequestId = requestid
691
+ end
692
+
693
+ def deserialize(params)
694
+ unless params['DeviceFingerprints'].nil?
695
+ @DeviceFingerprints = []
696
+ params['DeviceFingerprints'].each do |i|
697
+ devicefingerprint_tmp = DeviceFingerprint.new
698
+ devicefingerprint_tmp.deserialize(i)
699
+ @DeviceFingerprints << devicefingerprint_tmp
700
+ end
701
+ end
702
+ @RequestId = params['RequestId']
703
+ end
704
+ end
705
+
706
+ # DescribeWhiteBoxKeyDetails请求参数结构体
707
+ class DescribeWhiteBoxKeyDetailsRequest < TencentCloud::Common::AbstractModel
708
+ # @param KeyStatus: 过滤条件:密钥的状态,0:disabled,1:enabled
709
+ # @type KeyStatus: Integer
710
+ # @param Offset: 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
711
+ # @type Offset: Integer
712
+ # @param Limit: 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为0, 表示不分页
713
+ # @type Limit: Integer
714
+ # @param TagFilters: 标签过滤条件
715
+ # @type TagFilters: Array
716
+
717
+ attr_accessor :KeyStatus, :Offset, :Limit, :TagFilters
718
+
719
+ def initialize(keystatus=nil, offset=nil, limit=nil, tagfilters=nil)
720
+ @KeyStatus = keystatus
721
+ @Offset = offset
722
+ @Limit = limit
723
+ @TagFilters = tagfilters
724
+ end
725
+
726
+ def deserialize(params)
727
+ @KeyStatus = params['KeyStatus']
728
+ @Offset = params['Offset']
729
+ @Limit = params['Limit']
730
+ unless params['TagFilters'].nil?
731
+ @TagFilters = []
732
+ params['TagFilters'].each do |i|
733
+ tagfilter_tmp = TagFilter.new
734
+ tagfilter_tmp.deserialize(i)
735
+ @TagFilters << tagfilter_tmp
736
+ end
737
+ end
738
+ end
739
+ end
740
+
741
+ # DescribeWhiteBoxKeyDetails返回参数结构体
742
+ class DescribeWhiteBoxKeyDetailsResponse < TencentCloud::Common::AbstractModel
743
+ # @param KeyInfos: 白盒密钥信息列表
744
+ # @type KeyInfos: Array
745
+ # @param TotalCount: key总数量
746
+ # 注意:此字段可能返回 null,表示取不到有效值。
747
+ # @type TotalCount: Integer
748
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
749
+ # @type RequestId: String
750
+
751
+ attr_accessor :KeyInfos, :TotalCount, :RequestId
752
+
753
+ def initialize(keyinfos=nil, totalcount=nil, requestid=nil)
754
+ @KeyInfos = keyinfos
755
+ @TotalCount = totalcount
756
+ @RequestId = requestid
757
+ end
758
+
759
+ def deserialize(params)
760
+ unless params['KeyInfos'].nil?
761
+ @KeyInfos = []
762
+ params['KeyInfos'].each do |i|
763
+ whiteboxkeyinfo_tmp = WhiteboxKeyInfo.new
764
+ whiteboxkeyinfo_tmp.deserialize(i)
765
+ @KeyInfos << whiteboxkeyinfo_tmp
766
+ end
767
+ end
768
+ @TotalCount = params['TotalCount']
769
+ @RequestId = params['RequestId']
770
+ end
771
+ end
772
+
773
+ # DescribeWhiteBoxKey请求参数结构体
774
+ class DescribeWhiteBoxKeyRequest < TencentCloud::Common::AbstractModel
775
+ # @param KeyId: 白盒密钥的全局唯一标识符
776
+ # @type KeyId: String
777
+
778
+ attr_accessor :KeyId
779
+
780
+ def initialize(keyid=nil)
781
+ @KeyId = keyid
782
+ end
783
+
784
+ def deserialize(params)
785
+ @KeyId = params['KeyId']
786
+ end
787
+ end
788
+
789
+ # DescribeWhiteBoxKey返回参数结构体
790
+ class DescribeWhiteBoxKeyResponse < TencentCloud::Common::AbstractModel
791
+ # @param KeyInfo: 白盒密钥信息
792
+ # @type KeyInfo: :class:`Tencentcloud::Kms.v20190118.models.WhiteboxKeyInfo`
793
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
794
+ # @type RequestId: String
795
+
796
+ attr_accessor :KeyInfo, :RequestId
797
+
798
+ def initialize(keyinfo=nil, requestid=nil)
799
+ @KeyInfo = keyinfo
800
+ @RequestId = requestid
801
+ end
802
+
803
+ def deserialize(params)
804
+ unless params['KeyInfo'].nil?
805
+ @KeyInfo = WhiteboxKeyInfo.new
806
+ @KeyInfo.deserialize(params['KeyInfo'])
807
+ end
808
+ @RequestId = params['RequestId']
809
+ end
810
+ end
811
+
812
+ # DescribeWhiteBoxServiceStatus请求参数结构体
813
+ class DescribeWhiteBoxServiceStatusRequest < TencentCloud::Common::AbstractModel
814
+
815
+
816
+ def initialize()
817
+ end
818
+
819
+ def deserialize(params)
820
+ end
821
+ end
822
+
823
+ # DescribeWhiteBoxServiceStatus返回参数结构体
824
+ class DescribeWhiteBoxServiceStatusResponse < TencentCloud::Common::AbstractModel
825
+ # @param ServiceEnabled: 用户的白盒密钥服务是否可用
826
+ # @type ServiceEnabled: Boolean
827
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
828
+ # @type RequestId: String
829
+
830
+ attr_accessor :ServiceEnabled, :RequestId
831
+
832
+ def initialize(serviceenabled=nil, requestid=nil)
833
+ @ServiceEnabled = serviceenabled
834
+ @RequestId = requestid
835
+ end
836
+
837
+ def deserialize(params)
838
+ @ServiceEnabled = params['ServiceEnabled']
839
+ @RequestId = params['RequestId']
840
+ end
841
+ end
842
+
843
+ # 设备指纹
844
+ class DeviceFingerprint < TencentCloud::Common::AbstractModel
845
+ # @param Identity: 指纹信息,由设备指纹采集工具采集获得,格式满足正则表达式:^[0-9a-f]{8}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{14}[\-][0-9a-f]{16}$
846
+ # @type Identity: String
847
+ # @param Description: 描述信息,如:IP,设备名称等,最大1024字节
848
+ # 注意:此字段可能返回 null,表示取不到有效值。
849
+ # @type Description: String
850
+
851
+ attr_accessor :Identity, :Description
852
+
853
+ def initialize(identity=nil, description=nil)
854
+ @Identity = identity
855
+ @Description = description
856
+ end
857
+
858
+ def deserialize(params)
859
+ @Identity = params['Identity']
860
+ @Description = params['Description']
861
+ end
862
+ end
863
+
864
+ # DisableKey请求参数结构体
865
+ class DisableKeyRequest < TencentCloud::Common::AbstractModel
866
+ # @param KeyId: CMK唯一标识符
867
+ # @type KeyId: String
868
+
869
+ attr_accessor :KeyId
870
+
871
+ def initialize(keyid=nil)
872
+ @KeyId = keyid
873
+ end
874
+
875
+ def deserialize(params)
876
+ @KeyId = params['KeyId']
877
+ end
878
+ end
879
+
880
+ # DisableKey返回参数结构体
881
+ class DisableKeyResponse < TencentCloud::Common::AbstractModel
882
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
883
+ # @type RequestId: String
884
+
885
+ attr_accessor :RequestId
886
+
887
+ def initialize(requestid=nil)
888
+ @RequestId = requestid
889
+ end
890
+
891
+ def deserialize(params)
892
+ @RequestId = params['RequestId']
893
+ end
894
+ end
895
+
896
+ # DisableKeyRotation请求参数结构体
897
+ class DisableKeyRotationRequest < TencentCloud::Common::AbstractModel
898
+ # @param KeyId: CMK唯一标识符
899
+ # @type KeyId: String
900
+
901
+ attr_accessor :KeyId
902
+
903
+ def initialize(keyid=nil)
904
+ @KeyId = keyid
905
+ end
906
+
907
+ def deserialize(params)
908
+ @KeyId = params['KeyId']
909
+ end
910
+ end
911
+
912
+ # DisableKeyRotation返回参数结构体
913
+ class DisableKeyRotationResponse < TencentCloud::Common::AbstractModel
914
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
915
+ # @type RequestId: String
916
+
917
+ attr_accessor :RequestId
918
+
919
+ def initialize(requestid=nil)
920
+ @RequestId = requestid
921
+ end
922
+
923
+ def deserialize(params)
924
+ @RequestId = params['RequestId']
925
+ end
926
+ end
927
+
928
+ # DisableKeys请求参数结构体
929
+ class DisableKeysRequest < TencentCloud::Common::AbstractModel
930
+ # @param KeyIds: 需要批量禁用的CMK Id 列表,CMK数量最大支持100
931
+ # @type KeyIds: Array
932
+
933
+ attr_accessor :KeyIds
934
+
935
+ def initialize(keyids=nil)
936
+ @KeyIds = keyids
937
+ end
938
+
939
+ def deserialize(params)
940
+ @KeyIds = params['KeyIds']
941
+ end
942
+ end
943
+
944
+ # DisableKeys返回参数结构体
945
+ class DisableKeysResponse < TencentCloud::Common::AbstractModel
946
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
947
+ # @type RequestId: String
948
+
949
+ attr_accessor :RequestId
950
+
951
+ def initialize(requestid=nil)
952
+ @RequestId = requestid
953
+ end
954
+
955
+ def deserialize(params)
956
+ @RequestId = params['RequestId']
957
+ end
958
+ end
959
+
960
+ # DisableWhiteBoxKey请求参数结构体
961
+ class DisableWhiteBoxKeyRequest < TencentCloud::Common::AbstractModel
962
+ # @param KeyId: 白盒密钥的全局唯一标识符
963
+ # @type KeyId: String
964
+
965
+ attr_accessor :KeyId
966
+
967
+ def initialize(keyid=nil)
968
+ @KeyId = keyid
969
+ end
970
+
971
+ def deserialize(params)
972
+ @KeyId = params['KeyId']
973
+ end
974
+ end
975
+
976
+ # DisableWhiteBoxKey返回参数结构体
977
+ class DisableWhiteBoxKeyResponse < TencentCloud::Common::AbstractModel
978
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
979
+ # @type RequestId: String
980
+
981
+ attr_accessor :RequestId
982
+
983
+ def initialize(requestid=nil)
984
+ @RequestId = requestid
985
+ end
986
+
987
+ def deserialize(params)
988
+ @RequestId = params['RequestId']
989
+ end
990
+ end
991
+
992
+ # DisableWhiteBoxKeys请求参数结构体
993
+ class DisableWhiteBoxKeysRequest < TencentCloud::Common::AbstractModel
994
+ # @param KeyIds: 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。
995
+ # @type KeyIds: Array
996
+
997
+ attr_accessor :KeyIds
998
+
999
+ def initialize(keyids=nil)
1000
+ @KeyIds = keyids
1001
+ end
1002
+
1003
+ def deserialize(params)
1004
+ @KeyIds = params['KeyIds']
1005
+ end
1006
+ end
1007
+
1008
+ # DisableWhiteBoxKeys返回参数结构体
1009
+ class DisableWhiteBoxKeysResponse < TencentCloud::Common::AbstractModel
1010
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1011
+ # @type RequestId: String
1012
+
1013
+ attr_accessor :RequestId
1014
+
1015
+ def initialize(requestid=nil)
1016
+ @RequestId = requestid
1017
+ end
1018
+
1019
+ def deserialize(params)
1020
+ @RequestId = params['RequestId']
1021
+ end
1022
+ end
1023
+
1024
+ # EnableKey请求参数结构体
1025
+ class EnableKeyRequest < TencentCloud::Common::AbstractModel
1026
+ # @param KeyId: CMK唯一标识符
1027
+ # @type KeyId: String
1028
+
1029
+ attr_accessor :KeyId
1030
+
1031
+ def initialize(keyid=nil)
1032
+ @KeyId = keyid
1033
+ end
1034
+
1035
+ def deserialize(params)
1036
+ @KeyId = params['KeyId']
1037
+ end
1038
+ end
1039
+
1040
+ # EnableKey返回参数结构体
1041
+ class EnableKeyResponse < TencentCloud::Common::AbstractModel
1042
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1043
+ # @type RequestId: String
1044
+
1045
+ attr_accessor :RequestId
1046
+
1047
+ def initialize(requestid=nil)
1048
+ @RequestId = requestid
1049
+ end
1050
+
1051
+ def deserialize(params)
1052
+ @RequestId = params['RequestId']
1053
+ end
1054
+ end
1055
+
1056
+ # EnableKeyRotation请求参数结构体
1057
+ class EnableKeyRotationRequest < TencentCloud::Common::AbstractModel
1058
+ # @param KeyId: CMK唯一标识符
1059
+ # @type KeyId: String
1060
+
1061
+ attr_accessor :KeyId
1062
+
1063
+ def initialize(keyid=nil)
1064
+ @KeyId = keyid
1065
+ end
1066
+
1067
+ def deserialize(params)
1068
+ @KeyId = params['KeyId']
1069
+ end
1070
+ end
1071
+
1072
+ # EnableKeyRotation返回参数结构体
1073
+ class EnableKeyRotationResponse < TencentCloud::Common::AbstractModel
1074
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1075
+ # @type RequestId: String
1076
+
1077
+ attr_accessor :RequestId
1078
+
1079
+ def initialize(requestid=nil)
1080
+ @RequestId = requestid
1081
+ end
1082
+
1083
+ def deserialize(params)
1084
+ @RequestId = params['RequestId']
1085
+ end
1086
+ end
1087
+
1088
+ # EnableKeys请求参数结构体
1089
+ class EnableKeysRequest < TencentCloud::Common::AbstractModel
1090
+ # @param KeyIds: 需要批量启用的CMK Id 列表, CMK数量最大支持100
1091
+ # @type KeyIds: Array
1092
+
1093
+ attr_accessor :KeyIds
1094
+
1095
+ def initialize(keyids=nil)
1096
+ @KeyIds = keyids
1097
+ end
1098
+
1099
+ def deserialize(params)
1100
+ @KeyIds = params['KeyIds']
1101
+ end
1102
+ end
1103
+
1104
+ # EnableKeys返回参数结构体
1105
+ class EnableKeysResponse < TencentCloud::Common::AbstractModel
1106
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1107
+ # @type RequestId: String
1108
+
1109
+ attr_accessor :RequestId
1110
+
1111
+ def initialize(requestid=nil)
1112
+ @RequestId = requestid
1113
+ end
1114
+
1115
+ def deserialize(params)
1116
+ @RequestId = params['RequestId']
1117
+ end
1118
+ end
1119
+
1120
+ # EnableWhiteBoxKey请求参数结构体
1121
+ class EnableWhiteBoxKeyRequest < TencentCloud::Common::AbstractModel
1122
+ # @param KeyId: 白盒密钥的全局唯一标识符
1123
+ # @type KeyId: String
1124
+
1125
+ attr_accessor :KeyId
1126
+
1127
+ def initialize(keyid=nil)
1128
+ @KeyId = keyid
1129
+ end
1130
+
1131
+ def deserialize(params)
1132
+ @KeyId = params['KeyId']
1133
+ end
1134
+ end
1135
+
1136
+ # EnableWhiteBoxKey返回参数结构体
1137
+ class EnableWhiteBoxKeyResponse < TencentCloud::Common::AbstractModel
1138
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1139
+ # @type RequestId: String
1140
+
1141
+ attr_accessor :RequestId
1142
+
1143
+ def initialize(requestid=nil)
1144
+ @RequestId = requestid
1145
+ end
1146
+
1147
+ def deserialize(params)
1148
+ @RequestId = params['RequestId']
1149
+ end
1150
+ end
1151
+
1152
+ # EnableWhiteBoxKeys请求参数结构体
1153
+ class EnableWhiteBoxKeysRequest < TencentCloud::Common::AbstractModel
1154
+ # @param KeyIds: 白盒密钥的全局唯一标识符列表。注意:要确保所有提供的KeyId是格式有效的,没有重复,个数不超过50个,并且都是有效存在的。
1155
+ # @type KeyIds: Array
1156
+
1157
+ attr_accessor :KeyIds
1158
+
1159
+ def initialize(keyids=nil)
1160
+ @KeyIds = keyids
1161
+ end
1162
+
1163
+ def deserialize(params)
1164
+ @KeyIds = params['KeyIds']
1165
+ end
1166
+ end
1167
+
1168
+ # EnableWhiteBoxKeys返回参数结构体
1169
+ class EnableWhiteBoxKeysResponse < TencentCloud::Common::AbstractModel
1170
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1171
+ # @type RequestId: String
1172
+
1173
+ attr_accessor :RequestId
1174
+
1175
+ def initialize(requestid=nil)
1176
+ @RequestId = requestid
1177
+ end
1178
+
1179
+ def deserialize(params)
1180
+ @RequestId = params['RequestId']
1181
+ end
1182
+ end
1183
+
1184
+ # EncryptByWhiteBox请求参数结构体
1185
+ class EncryptByWhiteBoxRequest < TencentCloud::Common::AbstractModel
1186
+ # @param KeyId: 白盒密钥的全局唯一标识符
1187
+ # @type KeyId: String
1188
+ # @param PlainText: 待加密的文本, base64编码,文本的原始长度最大不超过4KB
1189
+ # @type PlainText: String
1190
+ # @param InitializationVector: 初始化向量,大小为 16 Bytes,加密算法会使用到, base64编码;如果不传,则由后端服务随机生成。用户需要自行保存该值,作为解密的参数。
1191
+ # @type InitializationVector: String
1192
+
1193
+ attr_accessor :KeyId, :PlainText, :InitializationVector
1194
+
1195
+ def initialize(keyid=nil, plaintext=nil, initializationvector=nil)
1196
+ @KeyId = keyid
1197
+ @PlainText = plaintext
1198
+ @InitializationVector = initializationvector
1199
+ end
1200
+
1201
+ def deserialize(params)
1202
+ @KeyId = params['KeyId']
1203
+ @PlainText = params['PlainText']
1204
+ @InitializationVector = params['InitializationVector']
1205
+ end
1206
+ end
1207
+
1208
+ # EncryptByWhiteBox返回参数结构体
1209
+ class EncryptByWhiteBoxResponse < TencentCloud::Common::AbstractModel
1210
+ # @param InitializationVector: 初始化向量,加密算法会使用到, base64编码。如果由调用方在入参中传入,则原样返回。如果调用方没有传入,则后端服务随机生成,并返回
1211
+ # @type InitializationVector: String
1212
+ # @param CipherText: 加密后的密文,base64编码
1213
+ # @type CipherText: String
1214
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1215
+ # @type RequestId: String
1216
+
1217
+ attr_accessor :InitializationVector, :CipherText, :RequestId
1218
+
1219
+ def initialize(initializationvector=nil, ciphertext=nil, requestid=nil)
1220
+ @InitializationVector = initializationvector
1221
+ @CipherText = ciphertext
1222
+ @RequestId = requestid
1223
+ end
1224
+
1225
+ def deserialize(params)
1226
+ @InitializationVector = params['InitializationVector']
1227
+ @CipherText = params['CipherText']
1228
+ @RequestId = params['RequestId']
1229
+ end
1230
+ end
1231
+
1232
+ # Encrypt请求参数结构体
1233
+ class EncryptRequest < TencentCloud::Common::AbstractModel
1234
+ # @param KeyId: 调用CreateKey生成的CMK全局唯一标识符
1235
+ # @type KeyId: String
1236
+ # @param Plaintext: 被加密的明文数据,该字段必须使用base64编码,原文最大长度支持4K
1237
+ # @type Plaintext: String
1238
+ # @param EncryptionContext: key/value对的json字符串,如果指定了该参数,则在调用Decrypt API时需要提供同样的参数,最大支持1024个字符
1239
+ # @type EncryptionContext: String
1240
+
1241
+ attr_accessor :KeyId, :Plaintext, :EncryptionContext
1242
+
1243
+ def initialize(keyid=nil, plaintext=nil, encryptioncontext=nil)
1244
+ @KeyId = keyid
1245
+ @Plaintext = plaintext
1246
+ @EncryptionContext = encryptioncontext
1247
+ end
1248
+
1249
+ def deserialize(params)
1250
+ @KeyId = params['KeyId']
1251
+ @Plaintext = params['Plaintext']
1252
+ @EncryptionContext = params['EncryptionContext']
1253
+ end
1254
+ end
1255
+
1256
+ # Encrypt返回参数结构体
1257
+ class EncryptResponse < TencentCloud::Common::AbstractModel
1258
+ # @param CiphertextBlob: 加密后的密文,base64编码。注意:本字段中打包了密文和密钥的相关信息,不是对明文的直接加密结果,只有将该字段作为Decrypt接口的输入参数,才可以解密出原文。
1259
+ # @type CiphertextBlob: String
1260
+ # @param KeyId: 加密使用的CMK的全局唯一标识
1261
+ # @type KeyId: String
1262
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1263
+ # @type RequestId: String
1264
+
1265
+ attr_accessor :CiphertextBlob, :KeyId, :RequestId
1266
+
1267
+ def initialize(ciphertextblob=nil, keyid=nil, requestid=nil)
1268
+ @CiphertextBlob = ciphertextblob
1269
+ @KeyId = keyid
1270
+ @RequestId = requestid
1271
+ end
1272
+
1273
+ def deserialize(params)
1274
+ @CiphertextBlob = params['CiphertextBlob']
1275
+ @KeyId = params['KeyId']
1276
+ @RequestId = params['RequestId']
1277
+ end
1278
+ end
1279
+
1280
+ # GenerateDataKey请求参数结构体
1281
+ class GenerateDataKeyRequest < TencentCloud::Common::AbstractModel
1282
+ # @param KeyId: CMK全局唯一标识符
1283
+ # @type KeyId: String
1284
+ # @param KeySpec: 指定生成Datakey的加密算法以及Datakey大小,AES_128或者AES_256。KeySpec 和 NumberOfBytes 必须指定一个
1285
+ # @type KeySpec: String
1286
+ # @param NumberOfBytes: 生成的DataKey的长度,同时指定NumberOfBytes和KeySpec时,以NumberOfBytes为准。最小值为1, 最大值为1024。KeySpec 和 NumberOfBytes 必须指定一个
1287
+ # @type NumberOfBytes: Integer
1288
+ # @param EncryptionContext: key/value对的json字符串,如果使用该字段,则返回的DataKey在解密时需要填入相同的字符串
1289
+ # @type EncryptionContext: String
1290
+
1291
+ attr_accessor :KeyId, :KeySpec, :NumberOfBytes, :EncryptionContext
1292
+
1293
+ def initialize(keyid=nil, keyspec=nil, numberofbytes=nil, encryptioncontext=nil)
1294
+ @KeyId = keyid
1295
+ @KeySpec = keyspec
1296
+ @NumberOfBytes = numberofbytes
1297
+ @EncryptionContext = encryptioncontext
1298
+ end
1299
+
1300
+ def deserialize(params)
1301
+ @KeyId = params['KeyId']
1302
+ @KeySpec = params['KeySpec']
1303
+ @NumberOfBytes = params['NumberOfBytes']
1304
+ @EncryptionContext = params['EncryptionContext']
1305
+ end
1306
+ end
1307
+
1308
+ # GenerateDataKey返回参数结构体
1309
+ class GenerateDataKeyResponse < TencentCloud::Common::AbstractModel
1310
+ # @param KeyId: CMK的全局唯一标识
1311
+ # @type KeyId: String
1312
+ # @param Plaintext: 生成的数据密钥DataKey的明文,该明文使用base64进行了编码,需base64解码后作为数据密钥本地使用
1313
+ # @type Plaintext: String
1314
+ # @param CiphertextBlob: 数据密钥DataKey加密后的密文,用户需要自行保存该密文,KMS不托管用户的数据密钥。可以通过Decrypt接口从CiphertextBlob中获取数据密钥DataKey明文
1315
+ # @type CiphertextBlob: String
1316
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1317
+ # @type RequestId: String
1318
+
1319
+ attr_accessor :KeyId, :Plaintext, :CiphertextBlob, :RequestId
1320
+
1321
+ def initialize(keyid=nil, plaintext=nil, ciphertextblob=nil, requestid=nil)
1322
+ @KeyId = keyid
1323
+ @Plaintext = plaintext
1324
+ @CiphertextBlob = ciphertextblob
1325
+ @RequestId = requestid
1326
+ end
1327
+
1328
+ def deserialize(params)
1329
+ @KeyId = params['KeyId']
1330
+ @Plaintext = params['Plaintext']
1331
+ @CiphertextBlob = params['CiphertextBlob']
1332
+ @RequestId = params['RequestId']
1333
+ end
1334
+ end
1335
+
1336
+ # GenerateRandom请求参数结构体
1337
+ class GenerateRandomRequest < TencentCloud::Common::AbstractModel
1338
+ # @param NumberOfBytes: 生成的随机数的长度。最小值为1, 最大值为1024。
1339
+ # @type NumberOfBytes: Integer
1340
+
1341
+ attr_accessor :NumberOfBytes
1342
+
1343
+ def initialize(numberofbytes=nil)
1344
+ @NumberOfBytes = numberofbytes
1345
+ end
1346
+
1347
+ def deserialize(params)
1348
+ @NumberOfBytes = params['NumberOfBytes']
1349
+ end
1350
+ end
1351
+
1352
+ # GenerateRandom返回参数结构体
1353
+ class GenerateRandomResponse < TencentCloud::Common::AbstractModel
1354
+ # @param Plaintext: 生成的随机数的明文,该明文使用base64编码,用户需要使用base64解码得到明文。
1355
+ # @type Plaintext: String
1356
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1357
+ # @type RequestId: String
1358
+
1359
+ attr_accessor :Plaintext, :RequestId
1360
+
1361
+ def initialize(plaintext=nil, requestid=nil)
1362
+ @Plaintext = plaintext
1363
+ @RequestId = requestid
1364
+ end
1365
+
1366
+ def deserialize(params)
1367
+ @Plaintext = params['Plaintext']
1368
+ @RequestId = params['RequestId']
1369
+ end
1370
+ end
1371
+
1372
+ # GetKeyRotationStatus请求参数结构体
1373
+ class GetKeyRotationStatusRequest < TencentCloud::Common::AbstractModel
1374
+ # @param KeyId: CMK唯一标识符
1375
+ # @type KeyId: String
1376
+
1377
+ attr_accessor :KeyId
1378
+
1379
+ def initialize(keyid=nil)
1380
+ @KeyId = keyid
1381
+ end
1382
+
1383
+ def deserialize(params)
1384
+ @KeyId = params['KeyId']
1385
+ end
1386
+ end
1387
+
1388
+ # GetKeyRotationStatus返回参数结构体
1389
+ class GetKeyRotationStatusResponse < TencentCloud::Common::AbstractModel
1390
+ # @param KeyRotationEnabled: 密钥轮换是否开启
1391
+ # @type KeyRotationEnabled: Boolean
1392
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1393
+ # @type RequestId: String
1394
+
1395
+ attr_accessor :KeyRotationEnabled, :RequestId
1396
+
1397
+ def initialize(keyrotationenabled=nil, requestid=nil)
1398
+ @KeyRotationEnabled = keyrotationenabled
1399
+ @RequestId = requestid
1400
+ end
1401
+
1402
+ def deserialize(params)
1403
+ @KeyRotationEnabled = params['KeyRotationEnabled']
1404
+ @RequestId = params['RequestId']
1405
+ end
1406
+ end
1407
+
1408
+ # GetParametersForImport请求参数结构体
1409
+ class GetParametersForImportRequest < TencentCloud::Common::AbstractModel
1410
+ # @param KeyId: CMK的唯一标识,获取密钥参数的CMK必须是EXTERNAL类型,即在CreateKey时指定Type=2 类型的CMK。
1411
+ # @type KeyId: String
1412
+ # @param WrappingAlgorithm: 指定加密密钥材料的算法,目前支持RSAES_PKCS1_V1_5、RSAES_OAEP_SHA_1、RSAES_OAEP_SHA_256
1413
+ # @type WrappingAlgorithm: String
1414
+ # @param WrappingKeySpec: 指定加密密钥材料的类型,目前只支持RSA_2048
1415
+ # @type WrappingKeySpec: String
1416
+
1417
+ attr_accessor :KeyId, :WrappingAlgorithm, :WrappingKeySpec
1418
+
1419
+ def initialize(keyid=nil, wrappingalgorithm=nil, wrappingkeyspec=nil)
1420
+ @KeyId = keyid
1421
+ @WrappingAlgorithm = wrappingalgorithm
1422
+ @WrappingKeySpec = wrappingkeyspec
1423
+ end
1424
+
1425
+ def deserialize(params)
1426
+ @KeyId = params['KeyId']
1427
+ @WrappingAlgorithm = params['WrappingAlgorithm']
1428
+ @WrappingKeySpec = params['WrappingKeySpec']
1429
+ end
1430
+ end
1431
+
1432
+ # GetParametersForImport返回参数结构体
1433
+ class GetParametersForImportResponse < TencentCloud::Common::AbstractModel
1434
+ # @param KeyId: CMK的唯一标识,用于指定目标导入密钥材料的CMK。
1435
+ # @type KeyId: String
1436
+ # @param ImportToken: 导入密钥材料需要的token,用于作为 ImportKeyMaterial 的参数。
1437
+ # @type ImportToken: String
1438
+ # @param PublicKey: 用于加密密钥材料的RSA公钥,base64编码。使用PublicKey base64解码后的公钥将导入密钥进行加密后作为 ImportKeyMaterial 的参数。
1439
+ # @type PublicKey: String
1440
+ # @param ParametersValidTo: 该导出token和公钥的有效期,超过该时间后无法导入,需要重新调用GetParametersForImport获取。
1441
+ # @type ParametersValidTo: Integer
1442
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1443
+ # @type RequestId: String
1444
+
1445
+ attr_accessor :KeyId, :ImportToken, :PublicKey, :ParametersValidTo, :RequestId
1446
+
1447
+ def initialize(keyid=nil, importtoken=nil, publickey=nil, parametersvalidto=nil, requestid=nil)
1448
+ @KeyId = keyid
1449
+ @ImportToken = importtoken
1450
+ @PublicKey = publickey
1451
+ @ParametersValidTo = parametersvalidto
1452
+ @RequestId = requestid
1453
+ end
1454
+
1455
+ def deserialize(params)
1456
+ @KeyId = params['KeyId']
1457
+ @ImportToken = params['ImportToken']
1458
+ @PublicKey = params['PublicKey']
1459
+ @ParametersValidTo = params['ParametersValidTo']
1460
+ @RequestId = params['RequestId']
1461
+ end
1462
+ end
1463
+
1464
+ # GetPublicKey请求参数结构体
1465
+ class GetPublicKeyRequest < TencentCloud::Common::AbstractModel
1466
+ # @param KeyId: CMK的唯一标识。
1467
+ # @type KeyId: String
1468
+
1469
+ attr_accessor :KeyId
1470
+
1471
+ def initialize(keyid=nil)
1472
+ @KeyId = keyid
1473
+ end
1474
+
1475
+ def deserialize(params)
1476
+ @KeyId = params['KeyId']
1477
+ end
1478
+ end
1479
+
1480
+ # GetPublicKey返回参数结构体
1481
+ class GetPublicKeyResponse < TencentCloud::Common::AbstractModel
1482
+ # @param KeyId: CMK的唯一标识。
1483
+ # @type KeyId: String
1484
+ # @param PublicKey: 经过base64编码的公钥内容。
1485
+ # @type PublicKey: String
1486
+ # @param PublicKeyPem: PEM格式的公钥内容。
1487
+ # @type PublicKeyPem: String
1488
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1489
+ # @type RequestId: String
1490
+
1491
+ attr_accessor :KeyId, :PublicKey, :PublicKeyPem, :RequestId
1492
+
1493
+ def initialize(keyid=nil, publickey=nil, publickeypem=nil, requestid=nil)
1494
+ @KeyId = keyid
1495
+ @PublicKey = publickey
1496
+ @PublicKeyPem = publickeypem
1497
+ @RequestId = requestid
1498
+ end
1499
+
1500
+ def deserialize(params)
1501
+ @KeyId = params['KeyId']
1502
+ @PublicKey = params['PublicKey']
1503
+ @PublicKeyPem = params['PublicKeyPem']
1504
+ @RequestId = params['RequestId']
1505
+ end
1506
+ end
1507
+
1508
+ # GetRegions请求参数结构体
1509
+ class GetRegionsRequest < TencentCloud::Common::AbstractModel
1510
+
1511
+
1512
+ def initialize()
1513
+ end
1514
+
1515
+ def deserialize(params)
1516
+ end
1517
+ end
1518
+
1519
+ # GetRegions返回参数结构体
1520
+ class GetRegionsResponse < TencentCloud::Common::AbstractModel
1521
+ # @param Regions: 可用region列表
1522
+ # 注意:此字段可能返回 null,表示取不到有效值。
1523
+ # @type Regions: Array
1524
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1525
+ # @type RequestId: String
1526
+
1527
+ attr_accessor :Regions, :RequestId
1528
+
1529
+ def initialize(regions=nil, requestid=nil)
1530
+ @Regions = regions
1531
+ @RequestId = requestid
1532
+ end
1533
+
1534
+ def deserialize(params)
1535
+ @Regions = params['Regions']
1536
+ @RequestId = params['RequestId']
1537
+ end
1538
+ end
1539
+
1540
+ # GetServiceStatus请求参数结构体
1541
+ class GetServiceStatusRequest < TencentCloud::Common::AbstractModel
1542
+
1543
+
1544
+ def initialize()
1545
+ end
1546
+
1547
+ def deserialize(params)
1548
+ end
1549
+ end
1550
+
1551
+ # GetServiceStatus返回参数结构体
1552
+ class GetServiceStatusResponse < TencentCloud::Common::AbstractModel
1553
+ # @param ServiceEnabled: KMS服务是否开通, true 表示已开通
1554
+ # @type ServiceEnabled: Boolean
1555
+ # @param InvalidType: 服务不可用类型: 0-未购买,1-正常, 2-欠费停服, 3-资源释放
1556
+ # 注意:此字段可能返回 null,表示取不到有效值。
1557
+ # @type InvalidType: Integer
1558
+ # @param UserLevel: 0-普通版,1-旗舰版
1559
+ # @type UserLevel: Integer
1560
+ # @param ProExpireTime: 旗舰版到期时间
1561
+ # 注意:此字段可能返回 null,表示取不到有效值。
1562
+ # @type ProExpireTime: Integer
1563
+ # @param ProRenewFlag: 旗舰版是否自动续费:0-不自动续费,1-自动续费
1564
+ # 注意:此字段可能返回 null,表示取不到有效值。
1565
+ # @type ProRenewFlag: Integer
1566
+ # @param ProResourceId: 旗舰版购买记录的唯一性标识。如果为开通旗舰版,则返回值为空
1567
+ # 注意:此字段可能返回 null,表示取不到有效值。
1568
+ # @type ProResourceId: String
1569
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1570
+ # @type RequestId: String
1571
+
1572
+ attr_accessor :ServiceEnabled, :InvalidType, :UserLevel, :ProExpireTime, :ProRenewFlag, :ProResourceId, :RequestId
1573
+
1574
+ def initialize(serviceenabled=nil, invalidtype=nil, userlevel=nil, proexpiretime=nil, prorenewflag=nil, proresourceid=nil, requestid=nil)
1575
+ @ServiceEnabled = serviceenabled
1576
+ @InvalidType = invalidtype
1577
+ @UserLevel = userlevel
1578
+ @ProExpireTime = proexpiretime
1579
+ @ProRenewFlag = prorenewflag
1580
+ @ProResourceId = proresourceid
1581
+ @RequestId = requestid
1582
+ end
1583
+
1584
+ def deserialize(params)
1585
+ @ServiceEnabled = params['ServiceEnabled']
1586
+ @InvalidType = params['InvalidType']
1587
+ @UserLevel = params['UserLevel']
1588
+ @ProExpireTime = params['ProExpireTime']
1589
+ @ProRenewFlag = params['ProRenewFlag']
1590
+ @ProResourceId = params['ProResourceId']
1591
+ @RequestId = params['RequestId']
1592
+ end
1593
+ end
1594
+
1595
+ # ImportKeyMaterial请求参数结构体
1596
+ class ImportKeyMaterialRequest < TencentCloud::Common::AbstractModel
1597
+ # @param EncryptedKeyMaterial: 使用GetParametersForImport 返回的PublicKey加密后的密钥材料base64编码。对于国密版本region的KMS,导入的密钥材料长度要求为 128 bit,FIPS版本region的KMS, 导入的密钥材料长度要求为 256 bit。
1598
+ # @type EncryptedKeyMaterial: String
1599
+ # @param ImportToken: 通过调用GetParametersForImport获得的导入令牌。
1600
+ # @type ImportToken: String
1601
+ # @param KeyId: 指定导入密钥材料的CMK,需要和GetParametersForImport 指定的CMK相同。
1602
+ # @type KeyId: String
1603
+ # @param ValidTo: 密钥材料过期时间 unix 时间戳,不指定或者 0 表示密钥材料不会过期,若指定过期时间,需要大于当前时间点,最大支持 2147443200。
1604
+ # @type ValidTo: Integer
1605
+
1606
+ attr_accessor :EncryptedKeyMaterial, :ImportToken, :KeyId, :ValidTo
1607
+
1608
+ def initialize(encryptedkeymaterial=nil, importtoken=nil, keyid=nil, validto=nil)
1609
+ @EncryptedKeyMaterial = encryptedkeymaterial
1610
+ @ImportToken = importtoken
1611
+ @KeyId = keyid
1612
+ @ValidTo = validto
1613
+ end
1614
+
1615
+ def deserialize(params)
1616
+ @EncryptedKeyMaterial = params['EncryptedKeyMaterial']
1617
+ @ImportToken = params['ImportToken']
1618
+ @KeyId = params['KeyId']
1619
+ @ValidTo = params['ValidTo']
1620
+ end
1621
+ end
1622
+
1623
+ # ImportKeyMaterial返回参数结构体
1624
+ class ImportKeyMaterialResponse < TencentCloud::Common::AbstractModel
1625
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1626
+ # @type RequestId: String
1627
+
1628
+ attr_accessor :RequestId
1629
+
1630
+ def initialize(requestid=nil)
1631
+ @RequestId = requestid
1632
+ end
1633
+
1634
+ def deserialize(params)
1635
+ @RequestId = params['RequestId']
1636
+ end
1637
+ end
1638
+
1639
+ # 返回CMK列表信息
1640
+ class Key < TencentCloud::Common::AbstractModel
1641
+ # @param KeyId: CMK的全局唯一标识。
1642
+ # @type KeyId: String
1643
+
1644
+ attr_accessor :KeyId
1645
+
1646
+ def initialize(keyid=nil)
1647
+ @KeyId = keyid
1648
+ end
1649
+
1650
+ def deserialize(params)
1651
+ @KeyId = params['KeyId']
1652
+ end
1653
+ end
1654
+
1655
+ # CMK属性信息
1656
+ class KeyMetadata < TencentCloud::Common::AbstractModel
1657
+ # @param KeyId: CMK的全局唯一标识
1658
+ # @type KeyId: String
1659
+ # @param Alias: 作为密钥更容易辨识,更容易被人看懂的别名
1660
+ # @type Alias: String
1661
+ # @param CreateTime: 密钥创建时间
1662
+ # @type CreateTime: Integer
1663
+ # @param Description: CMK的描述
1664
+ # @type Description: String
1665
+ # @param KeyState: CMK的状态, 取值为:Enabled | Disabled | PendingDelete | PendingImport | Archived
1666
+ # @type KeyState: String
1667
+ # @param KeyUsage: CMK用途,取值为: ENCRYPT_DECRYPT | ASYMMETRIC_DECRYPT_RSA_2048 | ASYMMETRIC_DECRYPT_SM2 | ASYMMETRIC_SIGN_VERIFY_SM2 | ASYMMETRIC_SIGN_VERIFY_RSA_2048 | ASYMMETRIC_SIGN_VERIFY_ECC
1668
+ # @type KeyUsage: String
1669
+ # @param Type: CMK类型,2 表示符合FIPS标准,4表示符合国密标准
1670
+ # @type Type: Integer
1671
+ # @param CreatorUin: 创建者
1672
+ # @type CreatorUin: Integer
1673
+ # @param KeyRotationEnabled: 是否开启了密钥轮换功能
1674
+ # @type KeyRotationEnabled: Boolean
1675
+ # @param Owner: CMK的创建者,用户创建的为 user,授权各云产品自动创建的为对应的产品名
1676
+ # @type Owner: String
1677
+ # @param NextRotateTime: 在密钥轮换开启状态下,下次轮换的时间
1678
+ # @type NextRotateTime: Integer
1679
+ # @param DeletionDate: 计划删除的时间
1680
+ # 注意:此字段可能返回 null,表示取不到有效值。
1681
+ # @type DeletionDate: Integer
1682
+ # @param Origin: CMK 密钥材料类型,由KMS创建的为: TENCENT_KMS, 由用户导入的类型为:EXTERNAL
1683
+ # 注意:此字段可能返回 null,表示取不到有效值。
1684
+ # @type Origin: String
1685
+ # @param ValidTo: 在Origin为 EXTERNAL 时有效,表示密钥材料的有效日期, 0 表示不过期
1686
+ # 注意:此字段可能返回 null,表示取不到有效值。
1687
+ # @type ValidTo: Integer
1688
+ # @param ResourceId: 资源ID,格式:creatorUin/$creatorUin/$keyId
1689
+ # @type ResourceId: String
1690
+
1691
+ attr_accessor :KeyId, :Alias, :CreateTime, :Description, :KeyState, :KeyUsage, :Type, :CreatorUin, :KeyRotationEnabled, :Owner, :NextRotateTime, :DeletionDate, :Origin, :ValidTo, :ResourceId
1692
+
1693
+ def initialize(keyid=nil, _alias=nil, createtime=nil, description=nil, keystate=nil, keyusage=nil, type=nil, creatoruin=nil, keyrotationenabled=nil, owner=nil, nextrotatetime=nil, deletiondate=nil, origin=nil, validto=nil, resourceid=nil)
1694
+ @KeyId = keyid
1695
+ @Alias = _alias
1696
+ @CreateTime = createtime
1697
+ @Description = description
1698
+ @KeyState = keystate
1699
+ @KeyUsage = keyusage
1700
+ @Type = type
1701
+ @CreatorUin = creatoruin
1702
+ @KeyRotationEnabled = keyrotationenabled
1703
+ @Owner = owner
1704
+ @NextRotateTime = nextrotatetime
1705
+ @DeletionDate = deletiondate
1706
+ @Origin = origin
1707
+ @ValidTo = validto
1708
+ @ResourceId = resourceid
1709
+ end
1710
+
1711
+ def deserialize(params)
1712
+ @KeyId = params['KeyId']
1713
+ @Alias = params['Alias']
1714
+ @CreateTime = params['CreateTime']
1715
+ @Description = params['Description']
1716
+ @KeyState = params['KeyState']
1717
+ @KeyUsage = params['KeyUsage']
1718
+ @Type = params['Type']
1719
+ @CreatorUin = params['CreatorUin']
1720
+ @KeyRotationEnabled = params['KeyRotationEnabled']
1721
+ @Owner = params['Owner']
1722
+ @NextRotateTime = params['NextRotateTime']
1723
+ @DeletionDate = params['DeletionDate']
1724
+ @Origin = params['Origin']
1725
+ @ValidTo = params['ValidTo']
1726
+ @ResourceId = params['ResourceId']
1727
+ end
1728
+ end
1729
+
1730
+ # ListAlgorithms请求参数结构体
1731
+ class ListAlgorithmsRequest < TencentCloud::Common::AbstractModel
1732
+
1733
+
1734
+ def initialize()
1735
+ end
1736
+
1737
+ def deserialize(params)
1738
+ end
1739
+ end
1740
+
1741
+ # ListAlgorithms返回参数结构体
1742
+ class ListAlgorithmsResponse < TencentCloud::Common::AbstractModel
1743
+ # @param SymmetricAlgorithms: 本地区支持的对称加密算法
1744
+ # @type SymmetricAlgorithms: Array
1745
+ # @param AsymmetricAlgorithms: 本地区支持的非对称加密算法
1746
+ # @type AsymmetricAlgorithms: Array
1747
+ # @param AsymmetricSignVerifyAlgorithms: 本地区支持的非对称签名验签算法
1748
+ # @type AsymmetricSignVerifyAlgorithms: Array
1749
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1750
+ # @type RequestId: String
1751
+
1752
+ attr_accessor :SymmetricAlgorithms, :AsymmetricAlgorithms, :AsymmetricSignVerifyAlgorithms, :RequestId
1753
+
1754
+ def initialize(symmetricalgorithms=nil, asymmetricalgorithms=nil, asymmetricsignverifyalgorithms=nil, requestid=nil)
1755
+ @SymmetricAlgorithms = symmetricalgorithms
1756
+ @AsymmetricAlgorithms = asymmetricalgorithms
1757
+ @AsymmetricSignVerifyAlgorithms = asymmetricsignverifyalgorithms
1758
+ @RequestId = requestid
1759
+ end
1760
+
1761
+ def deserialize(params)
1762
+ unless params['SymmetricAlgorithms'].nil?
1763
+ @SymmetricAlgorithms = []
1764
+ params['SymmetricAlgorithms'].each do |i|
1765
+ algorithminfo_tmp = AlgorithmInfo.new
1766
+ algorithminfo_tmp.deserialize(i)
1767
+ @SymmetricAlgorithms << algorithminfo_tmp
1768
+ end
1769
+ end
1770
+ unless params['AsymmetricAlgorithms'].nil?
1771
+ @AsymmetricAlgorithms = []
1772
+ params['AsymmetricAlgorithms'].each do |i|
1773
+ algorithminfo_tmp = AlgorithmInfo.new
1774
+ algorithminfo_tmp.deserialize(i)
1775
+ @AsymmetricAlgorithms << algorithminfo_tmp
1776
+ end
1777
+ end
1778
+ unless params['AsymmetricSignVerifyAlgorithms'].nil?
1779
+ @AsymmetricSignVerifyAlgorithms = []
1780
+ params['AsymmetricSignVerifyAlgorithms'].each do |i|
1781
+ algorithminfo_tmp = AlgorithmInfo.new
1782
+ algorithminfo_tmp.deserialize(i)
1783
+ @AsymmetricSignVerifyAlgorithms << algorithminfo_tmp
1784
+ end
1785
+ end
1786
+ @RequestId = params['RequestId']
1787
+ end
1788
+ end
1789
+
1790
+ # ListKeyDetail请求参数结构体
1791
+ class ListKeyDetailRequest < TencentCloud::Common::AbstractModel
1792
+ # @param Offset: 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
1793
+ # @type Offset: Integer
1794
+ # @param Limit: 含义跟 SQL 查询的 Limit 一致,表示本次最多获取 Limit 个元素。缺省值为10,最大值为200
1795
+ # @type Limit: Integer
1796
+ # @param Role: 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk
1797
+ # @type Role: Integer
1798
+ # @param OrderType: 根据CMK创建时间排序, 0 表示按照降序排序,1表示按照升序排序
1799
+ # @type OrderType: Integer
1800
+ # @param KeyState: 根据CMK状态筛选, 0表示全部CMK, 1 表示仅查询Enabled CMK, 2 表示仅查询Disabled CMK,3 表示查询PendingDelete 状态的CMK(处于计划删除状态的Key),4 表示查询 PendingImport 状态的CMK,5 表示查询 Archived 状态的 CMK
1801
+ # @type KeyState: Integer
1802
+ # @param SearchKeyAlias: 根据KeyId或者Alias进行模糊匹配查询
1803
+ # @type SearchKeyAlias: String
1804
+ # @param Origin: 根据CMK类型筛选, "TENCENT_KMS" 表示筛选密钥材料由KMS创建的CMK, "EXTERNAL" 表示筛选密钥材料需要用户导入的 EXTERNAL类型CMK,"ALL" 或者不设置表示两种类型都查询,大小写敏感。
1805
+ # @type Origin: String
1806
+ # @param KeyUsage: 根据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类型
1807
+ # @type KeyUsage: String
1808
+ # @param TagFilters: 标签过滤条件
1809
+ # @type TagFilters: Array
1810
+
1811
+ attr_accessor :Offset, :Limit, :Role, :OrderType, :KeyState, :SearchKeyAlias, :Origin, :KeyUsage, :TagFilters
1812
+
1813
+ def initialize(offset=nil, limit=nil, role=nil, ordertype=nil, keystate=nil, searchkeyalias=nil, origin=nil, keyusage=nil, tagfilters=nil)
1814
+ @Offset = offset
1815
+ @Limit = limit
1816
+ @Role = role
1817
+ @OrderType = ordertype
1818
+ @KeyState = keystate
1819
+ @SearchKeyAlias = searchkeyalias
1820
+ @Origin = origin
1821
+ @KeyUsage = keyusage
1822
+ @TagFilters = tagfilters
1823
+ end
1824
+
1825
+ def deserialize(params)
1826
+ @Offset = params['Offset']
1827
+ @Limit = params['Limit']
1828
+ @Role = params['Role']
1829
+ @OrderType = params['OrderType']
1830
+ @KeyState = params['KeyState']
1831
+ @SearchKeyAlias = params['SearchKeyAlias']
1832
+ @Origin = params['Origin']
1833
+ @KeyUsage = params['KeyUsage']
1834
+ unless params['TagFilters'].nil?
1835
+ @TagFilters = []
1836
+ params['TagFilters'].each do |i|
1837
+ tagfilter_tmp = TagFilter.new
1838
+ tagfilter_tmp.deserialize(i)
1839
+ @TagFilters << tagfilter_tmp
1840
+ end
1841
+ end
1842
+ end
1843
+ end
1844
+
1845
+ # ListKeyDetail返回参数结构体
1846
+ class ListKeyDetailResponse < TencentCloud::Common::AbstractModel
1847
+ # @param TotalCount: CMK的总数量
1848
+ # @type TotalCount: Integer
1849
+ # @param KeyMetadatas: 返回的属性信息列表。
1850
+ # 注意:此字段可能返回 null,表示取不到有效值。
1851
+ # @type KeyMetadatas: Array
1852
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1853
+ # @type RequestId: String
1854
+
1855
+ attr_accessor :TotalCount, :KeyMetadatas, :RequestId
1856
+
1857
+ def initialize(totalcount=nil, keymetadatas=nil, requestid=nil)
1858
+ @TotalCount = totalcount
1859
+ @KeyMetadatas = keymetadatas
1860
+ @RequestId = requestid
1861
+ end
1862
+
1863
+ def deserialize(params)
1864
+ @TotalCount = params['TotalCount']
1865
+ unless params['KeyMetadatas'].nil?
1866
+ @KeyMetadatas = []
1867
+ params['KeyMetadatas'].each do |i|
1868
+ keymetadata_tmp = KeyMetadata.new
1869
+ keymetadata_tmp.deserialize(i)
1870
+ @KeyMetadatas << keymetadata_tmp
1871
+ end
1872
+ end
1873
+ @RequestId = params['RequestId']
1874
+ end
1875
+ end
1876
+
1877
+ # ListKeys请求参数结构体
1878
+ class ListKeysRequest < TencentCloud::Common::AbstractModel
1879
+ # @param Offset: 含义跟 SQL 查询的 Offset 一致,表示本次获取从按一定顺序排列数组的第 Offset 个元素开始,缺省为0
1880
+ # @type Offset: Integer
1881
+ # @param Limit: 含义跟 SQL 查询的 Limit 一致,表示本次获最多获取 Limit 个元素。缺省值为10,最大值为200
1882
+ # @type Limit: Integer
1883
+ # @param Role: 根据创建者角色筛选,默认 0 表示用户自己创建的cmk, 1 表示授权其它云产品自动创建的cmk
1884
+ # @type Role: Integer
1885
+
1886
+ attr_accessor :Offset, :Limit, :Role
1887
+
1888
+ def initialize(offset=nil, limit=nil, role=nil)
1889
+ @Offset = offset
1890
+ @Limit = limit
1891
+ @Role = role
1892
+ end
1893
+
1894
+ def deserialize(params)
1895
+ @Offset = params['Offset']
1896
+ @Limit = params['Limit']
1897
+ @Role = params['Role']
1898
+ end
1899
+ end
1900
+
1901
+ # ListKeys返回参数结构体
1902
+ class ListKeysResponse < TencentCloud::Common::AbstractModel
1903
+ # @param Keys: CMK列表数组
1904
+ # 注意:此字段可能返回 null,表示取不到有效值。
1905
+ # @type Keys: Array
1906
+ # @param TotalCount: CMK的总数量
1907
+ # @type TotalCount: Integer
1908
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1909
+ # @type RequestId: String
1910
+
1911
+ attr_accessor :Keys, :TotalCount, :RequestId
1912
+
1913
+ def initialize(keys=nil, totalcount=nil, requestid=nil)
1914
+ @Keys = keys
1915
+ @TotalCount = totalcount
1916
+ @RequestId = requestid
1917
+ end
1918
+
1919
+ def deserialize(params)
1920
+ unless params['Keys'].nil?
1921
+ @Keys = []
1922
+ params['Keys'].each do |i|
1923
+ key_tmp = Key.new
1924
+ key_tmp.deserialize(i)
1925
+ @Keys << key_tmp
1926
+ end
1927
+ end
1928
+ @TotalCount = params['TotalCount']
1929
+ @RequestId = params['RequestId']
1930
+ end
1931
+ end
1932
+
1933
+ # OverwriteWhiteBoxDeviceFingerprints请求参数结构体
1934
+ class OverwriteWhiteBoxDeviceFingerprintsRequest < TencentCloud::Common::AbstractModel
1935
+ # @param KeyId: 白盒密钥ID
1936
+ # @type KeyId: String
1937
+ # @param DeviceFingerprints: 设备指纹列表,如果列表为空,则表示删除该密钥对应的所有指纹信息。列表最大长度不超过200。
1938
+ # @type DeviceFingerprints: Array
1939
+
1940
+ attr_accessor :KeyId, :DeviceFingerprints
1941
+
1942
+ def initialize(keyid=nil, devicefingerprints=nil)
1943
+ @KeyId = keyid
1944
+ @DeviceFingerprints = devicefingerprints
1945
+ end
1946
+
1947
+ def deserialize(params)
1948
+ @KeyId = params['KeyId']
1949
+ unless params['DeviceFingerprints'].nil?
1950
+ @DeviceFingerprints = []
1951
+ params['DeviceFingerprints'].each do |i|
1952
+ devicefingerprint_tmp = DeviceFingerprint.new
1953
+ devicefingerprint_tmp.deserialize(i)
1954
+ @DeviceFingerprints << devicefingerprint_tmp
1955
+ end
1956
+ end
1957
+ end
1958
+ end
1959
+
1960
+ # OverwriteWhiteBoxDeviceFingerprints返回参数结构体
1961
+ class OverwriteWhiteBoxDeviceFingerprintsResponse < TencentCloud::Common::AbstractModel
1962
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
1963
+ # @type RequestId: String
1964
+
1965
+ attr_accessor :RequestId
1966
+
1967
+ def initialize(requestid=nil)
1968
+ @RequestId = requestid
1969
+ end
1970
+
1971
+ def deserialize(params)
1972
+ @RequestId = params['RequestId']
1973
+ end
1974
+ end
1975
+
1976
+ # ReEncrypt请求参数结构体
1977
+ class ReEncryptRequest < TencentCloud::Common::AbstractModel
1978
+ # @param CiphertextBlob: 需要重新加密的密文
1979
+ # @type CiphertextBlob: String
1980
+ # @param DestinationKeyId: 重新加密使用的CMK,如果为空,则使用密文原有的CMK重新加密(若密钥没有轮换则密文不会刷新)
1981
+ # @type DestinationKeyId: String
1982
+ # @param SourceEncryptionContext: CiphertextBlob 密文加密时使用的key/value对的json字符串。如果加密时未使用,则为空
1983
+ # @type SourceEncryptionContext: String
1984
+ # @param DestinationEncryptionContext: 重新加密使用的key/value对的json字符串,如果使用该字段,则返回的新密文在解密时需要填入相同的字符串
1985
+ # @type DestinationEncryptionContext: String
1986
+
1987
+ attr_accessor :CiphertextBlob, :DestinationKeyId, :SourceEncryptionContext, :DestinationEncryptionContext
1988
+
1989
+ def initialize(ciphertextblob=nil, destinationkeyid=nil, sourceencryptioncontext=nil, destinationencryptioncontext=nil)
1990
+ @CiphertextBlob = ciphertextblob
1991
+ @DestinationKeyId = destinationkeyid
1992
+ @SourceEncryptionContext = sourceencryptioncontext
1993
+ @DestinationEncryptionContext = destinationencryptioncontext
1994
+ end
1995
+
1996
+ def deserialize(params)
1997
+ @CiphertextBlob = params['CiphertextBlob']
1998
+ @DestinationKeyId = params['DestinationKeyId']
1999
+ @SourceEncryptionContext = params['SourceEncryptionContext']
2000
+ @DestinationEncryptionContext = params['DestinationEncryptionContext']
2001
+ end
2002
+ end
2003
+
2004
+ # ReEncrypt返回参数结构体
2005
+ class ReEncryptResponse < TencentCloud::Common::AbstractModel
2006
+ # @param CiphertextBlob: 重新加密后的密文
2007
+ # @type CiphertextBlob: String
2008
+ # @param KeyId: 重新加密使用的CMK
2009
+ # @type KeyId: String
2010
+ # @param SourceKeyId: 重新加密前密文使用的CMK
2011
+ # @type SourceKeyId: String
2012
+ # @param ReEncrypted: true表示密文已经重新加密。同一个CMK进行重加密,在密钥没有发生轮换的情况下不会进行实际重新加密操作,返回原密文
2013
+ # @type ReEncrypted: Boolean
2014
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2015
+ # @type RequestId: String
2016
+
2017
+ attr_accessor :CiphertextBlob, :KeyId, :SourceKeyId, :ReEncrypted, :RequestId
2018
+
2019
+ def initialize(ciphertextblob=nil, keyid=nil, sourcekeyid=nil, reencrypted=nil, requestid=nil)
2020
+ @CiphertextBlob = ciphertextblob
2021
+ @KeyId = keyid
2022
+ @SourceKeyId = sourcekeyid
2023
+ @ReEncrypted = reencrypted
2024
+ @RequestId = requestid
2025
+ end
2026
+
2027
+ def deserialize(params)
2028
+ @CiphertextBlob = params['CiphertextBlob']
2029
+ @KeyId = params['KeyId']
2030
+ @SourceKeyId = params['SourceKeyId']
2031
+ @ReEncrypted = params['ReEncrypted']
2032
+ @RequestId = params['RequestId']
2033
+ end
2034
+ end
2035
+
2036
+ # ScheduleKeyDeletion请求参数结构体
2037
+ class ScheduleKeyDeletionRequest < TencentCloud::Common::AbstractModel
2038
+ # @param KeyId: CMK的唯一标志
2039
+ # @type KeyId: String
2040
+ # @param PendingWindowInDays: 计划删除时间区间[7,30]
2041
+ # @type PendingWindowInDays: Integer
2042
+
2043
+ attr_accessor :KeyId, :PendingWindowInDays
2044
+
2045
+ def initialize(keyid=nil, pendingwindowindays=nil)
2046
+ @KeyId = keyid
2047
+ @PendingWindowInDays = pendingwindowindays
2048
+ end
2049
+
2050
+ def deserialize(params)
2051
+ @KeyId = params['KeyId']
2052
+ @PendingWindowInDays = params['PendingWindowInDays']
2053
+ end
2054
+ end
2055
+
2056
+ # ScheduleKeyDeletion返回参数结构体
2057
+ class ScheduleKeyDeletionResponse < TencentCloud::Common::AbstractModel
2058
+ # @param DeletionDate: 计划删除执行时间
2059
+ # @type DeletionDate: Integer
2060
+ # @param KeyId: 唯一标志被计划删除的CMK
2061
+ # @type KeyId: String
2062
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2063
+ # @type RequestId: String
2064
+
2065
+ attr_accessor :DeletionDate, :KeyId, :RequestId
2066
+
2067
+ def initialize(deletiondate=nil, keyid=nil, requestid=nil)
2068
+ @DeletionDate = deletiondate
2069
+ @KeyId = keyid
2070
+ @RequestId = requestid
2071
+ end
2072
+
2073
+ def deserialize(params)
2074
+ @DeletionDate = params['DeletionDate']
2075
+ @KeyId = params['KeyId']
2076
+ @RequestId = params['RequestId']
2077
+ end
2078
+ end
2079
+
2080
+ # SignByAsymmetricKey请求参数结构体
2081
+ class SignByAsymmetricKeyRequest < TencentCloud::Common::AbstractModel
2082
+ # @param Algorithm: 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256
2083
+ # @type Algorithm: String
2084
+ # @param Message: 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,消息摘要长度(Base64编码前的长度)必须等于32字节
2085
+ # @type Message: String
2086
+ # @param KeyId: 密钥的唯一标识
2087
+ # @type KeyId: String
2088
+ # @param MessageType: 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。
2089
+ # @type MessageType: String
2090
+
2091
+ attr_accessor :Algorithm, :Message, :KeyId, :MessageType
2092
+
2093
+ def initialize(algorithm=nil, message=nil, keyid=nil, messagetype=nil)
2094
+ @Algorithm = algorithm
2095
+ @Message = message
2096
+ @KeyId = keyid
2097
+ @MessageType = messagetype
2098
+ end
2099
+
2100
+ def deserialize(params)
2101
+ @Algorithm = params['Algorithm']
2102
+ @Message = params['Message']
2103
+ @KeyId = params['KeyId']
2104
+ @MessageType = params['MessageType']
2105
+ end
2106
+ end
2107
+
2108
+ # SignByAsymmetricKey返回参数结构体
2109
+ class SignByAsymmetricKeyResponse < TencentCloud::Common::AbstractModel
2110
+ # @param Signature: 签名,Base64编码
2111
+ # @type Signature: String
2112
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2113
+ # @type RequestId: String
2114
+
2115
+ attr_accessor :Signature, :RequestId
2116
+
2117
+ def initialize(signature=nil, requestid=nil)
2118
+ @Signature = signature
2119
+ @RequestId = requestid
2120
+ end
2121
+
2122
+ def deserialize(params)
2123
+ @Signature = params['Signature']
2124
+ @RequestId = params['RequestId']
2125
+ end
2126
+ end
2127
+
2128
+ # 标签键和标签值
2129
+ class Tag < TencentCloud::Common::AbstractModel
2130
+ # @param TagKey: 标签键
2131
+ # @type TagKey: String
2132
+ # @param TagValue: 标签值
2133
+ # @type TagValue: String
2134
+
2135
+ attr_accessor :TagKey, :TagValue
2136
+
2137
+ def initialize(tagkey=nil, tagvalue=nil)
2138
+ @TagKey = tagkey
2139
+ @TagValue = tagvalue
2140
+ end
2141
+
2142
+ def deserialize(params)
2143
+ @TagKey = params['TagKey']
2144
+ @TagValue = params['TagValue']
2145
+ end
2146
+ end
2147
+
2148
+ # 标签过滤器
2149
+ class TagFilter < TencentCloud::Common::AbstractModel
2150
+ # @param TagKey: 标签键
2151
+ # @type TagKey: String
2152
+ # @param TagValue: 标签值
2153
+ # @type TagValue: Array
2154
+
2155
+ attr_accessor :TagKey, :TagValue
2156
+
2157
+ def initialize(tagkey=nil, tagvalue=nil)
2158
+ @TagKey = tagkey
2159
+ @TagValue = tagvalue
2160
+ end
2161
+
2162
+ def deserialize(params)
2163
+ @TagKey = params['TagKey']
2164
+ @TagValue = params['TagValue']
2165
+ end
2166
+ end
2167
+
2168
+ # UnbindCloudResource请求参数结构体
2169
+ class UnbindCloudResourceRequest < TencentCloud::Common::AbstractModel
2170
+ # @param KeyId: cmk的ID
2171
+ # @type KeyId: String
2172
+ # @param ProductId: 云产品的唯一性标识符
2173
+ # @type ProductId: String
2174
+ # @param ResourceId: 资源/实例ID,由调用方根据自己的云产品特征来定义,以字符串形式做存储。
2175
+ # @type ResourceId: String
2176
+
2177
+ attr_accessor :KeyId, :ProductId, :ResourceId
2178
+
2179
+ def initialize(keyid=nil, productid=nil, resourceid=nil)
2180
+ @KeyId = keyid
2181
+ @ProductId = productid
2182
+ @ResourceId = resourceid
2183
+ end
2184
+
2185
+ def deserialize(params)
2186
+ @KeyId = params['KeyId']
2187
+ @ProductId = params['ProductId']
2188
+ @ResourceId = params['ResourceId']
2189
+ end
2190
+ end
2191
+
2192
+ # UnbindCloudResource返回参数结构体
2193
+ class UnbindCloudResourceResponse < TencentCloud::Common::AbstractModel
2194
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2195
+ # @type RequestId: String
2196
+
2197
+ attr_accessor :RequestId
2198
+
2199
+ def initialize(requestid=nil)
2200
+ @RequestId = requestid
2201
+ end
2202
+
2203
+ def deserialize(params)
2204
+ @RequestId = params['RequestId']
2205
+ end
2206
+ end
2207
+
2208
+ # UpdateAlias请求参数结构体
2209
+ class UpdateAliasRequest < TencentCloud::Common::AbstractModel
2210
+ # @param Alias: 新的别名,1-60个字符或数字的组合
2211
+ # @type Alias: String
2212
+ # @param KeyId: CMK的全局唯一标识符
2213
+ # @type KeyId: String
2214
+
2215
+ attr_accessor :Alias, :KeyId
2216
+
2217
+ def initialize(_alias=nil, keyid=nil)
2218
+ @Alias = _alias
2219
+ @KeyId = keyid
2220
+ end
2221
+
2222
+ def deserialize(params)
2223
+ @Alias = params['Alias']
2224
+ @KeyId = params['KeyId']
2225
+ end
2226
+ end
2227
+
2228
+ # UpdateAlias返回参数结构体
2229
+ class UpdateAliasResponse < TencentCloud::Common::AbstractModel
2230
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2231
+ # @type RequestId: String
2232
+
2233
+ attr_accessor :RequestId
2234
+
2235
+ def initialize(requestid=nil)
2236
+ @RequestId = requestid
2237
+ end
2238
+
2239
+ def deserialize(params)
2240
+ @RequestId = params['RequestId']
2241
+ end
2242
+ end
2243
+
2244
+ # UpdateKeyDescription请求参数结构体
2245
+ class UpdateKeyDescriptionRequest < TencentCloud::Common::AbstractModel
2246
+ # @param Description: 新的描述信息,最大支持1024字节
2247
+ # @type Description: String
2248
+ # @param KeyId: 需要修改描述信息的CMK ID
2249
+ # @type KeyId: String
2250
+
2251
+ attr_accessor :Description, :KeyId
2252
+
2253
+ def initialize(description=nil, keyid=nil)
2254
+ @Description = description
2255
+ @KeyId = keyid
2256
+ end
2257
+
2258
+ def deserialize(params)
2259
+ @Description = params['Description']
2260
+ @KeyId = params['KeyId']
2261
+ end
2262
+ end
2263
+
2264
+ # UpdateKeyDescription返回参数结构体
2265
+ class UpdateKeyDescriptionResponse < TencentCloud::Common::AbstractModel
2266
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2267
+ # @type RequestId: String
2268
+
2269
+ attr_accessor :RequestId
2270
+
2271
+ def initialize(requestid=nil)
2272
+ @RequestId = requestid
2273
+ end
2274
+
2275
+ def deserialize(params)
2276
+ @RequestId = params['RequestId']
2277
+ end
2278
+ end
2279
+
2280
+ # VerifyByAsymmetricKey请求参数结构体
2281
+ class VerifyByAsymmetricKeyRequest < TencentCloud::Common::AbstractModel
2282
+ # @param KeyId: 密钥的唯一标识
2283
+ # @type KeyId: String
2284
+ # @param SignatureValue: 签名值,通过调用KMS签名接口生成
2285
+ # @type SignatureValue: String
2286
+ # @param Message: 消息原文或消息摘要。如果提供的是消息原文,则消息原文的长度(Base64编码前的长度)不超过4096字节。如果提供的是消息摘要,则消息摘要长度(Base64编码前的长度)必须等于32字节
2287
+ # @type Message: String
2288
+ # @param Algorithm: 签名算法,支持的算法:SM2DSA,ECC_P256_R1,RSA_PSS_SHA_256,RSA_PKCS1_SHA_256
2289
+ # @type Algorithm: String
2290
+ # @param MessageType: 消息类型:RAW,DIGEST,如果不传,默认为RAW,表示消息原文。
2291
+ # @type MessageType: String
2292
+
2293
+ attr_accessor :KeyId, :SignatureValue, :Message, :Algorithm, :MessageType
2294
+
2295
+ def initialize(keyid=nil, signaturevalue=nil, message=nil, algorithm=nil, messagetype=nil)
2296
+ @KeyId = keyid
2297
+ @SignatureValue = signaturevalue
2298
+ @Message = message
2299
+ @Algorithm = algorithm
2300
+ @MessageType = messagetype
2301
+ end
2302
+
2303
+ def deserialize(params)
2304
+ @KeyId = params['KeyId']
2305
+ @SignatureValue = params['SignatureValue']
2306
+ @Message = params['Message']
2307
+ @Algorithm = params['Algorithm']
2308
+ @MessageType = params['MessageType']
2309
+ end
2310
+ end
2311
+
2312
+ # VerifyByAsymmetricKey返回参数结构体
2313
+ class VerifyByAsymmetricKeyResponse < TencentCloud::Common::AbstractModel
2314
+ # @param SignatureValid: 签名是否有效。true:签名有效,false:签名无效。
2315
+ # @type SignatureValid: Boolean
2316
+ # @param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
2317
+ # @type RequestId: String
2318
+
2319
+ attr_accessor :SignatureValid, :RequestId
2320
+
2321
+ def initialize(signaturevalid=nil, requestid=nil)
2322
+ @SignatureValid = signaturevalid
2323
+ @RequestId = requestid
2324
+ end
2325
+
2326
+ def deserialize(params)
2327
+ @SignatureValid = params['SignatureValid']
2328
+ @RequestId = params['RequestId']
2329
+ end
2330
+ end
2331
+
2332
+ # 白盒密钥信息
2333
+ class WhiteboxKeyInfo < TencentCloud::Common::AbstractModel
2334
+ # @param KeyId: 白盒密钥的全局唯一标识符
2335
+ # @type KeyId: String
2336
+ # @param Alias: 作为密钥更容易辨识,更容易被人看懂的别名, 不可为空,1-60个字母数字 - _ 的组合,首字符必须为字母或者数字. 不可重复
2337
+ # @type Alias: String
2338
+ # @param CreatorUin: 创建者
2339
+ # @type CreatorUin: Integer
2340
+ # @param Description: 密钥的描述信息
2341
+ # @type Description: String
2342
+ # @param CreateTime: 密钥创建时间,Unix时间戳
2343
+ # @type CreateTime: Integer
2344
+ # @param Status: 白盒密钥的状态, 取值为:Enabled | Disabled
2345
+ # @type Status: String
2346
+ # @param OwnerUin: 创建者
2347
+ # @type OwnerUin: Integer
2348
+ # @param Algorithm: 密钥所用的算法类型
2349
+ # @type Algorithm: String
2350
+ # @param EncryptKey: 白盒加密密钥,base64编码
2351
+ # @type EncryptKey: String
2352
+ # @param DecryptKey: 白盒解密密钥,base64编码
2353
+ # @type DecryptKey: String
2354
+ # @param ResourceId: 资源ID,格式:creatorUin/$creatorUin/$keyId
2355
+ # @type ResourceId: String
2356
+ # @param DeviceFingerprintBind: 是否有设备指纹与当前密钥绑定
2357
+ # 注意:此字段可能返回 null,表示取不到有效值。
2358
+ # @type DeviceFingerprintBind: Boolean
2359
+
2360
+ attr_accessor :KeyId, :Alias, :CreatorUin, :Description, :CreateTime, :Status, :OwnerUin, :Algorithm, :EncryptKey, :DecryptKey, :ResourceId, :DeviceFingerprintBind
2361
+
2362
+ def initialize(keyid=nil, _alias=nil, creatoruin=nil, description=nil, createtime=nil, status=nil, owneruin=nil, algorithm=nil, encryptkey=nil, decryptkey=nil, resourceid=nil, devicefingerprintbind=nil)
2363
+ @KeyId = keyid
2364
+ @Alias = _alias
2365
+ @CreatorUin = creatoruin
2366
+ @Description = description
2367
+ @CreateTime = createtime
2368
+ @Status = status
2369
+ @OwnerUin = owneruin
2370
+ @Algorithm = algorithm
2371
+ @EncryptKey = encryptkey
2372
+ @DecryptKey = decryptkey
2373
+ @ResourceId = resourceid
2374
+ @DeviceFingerprintBind = devicefingerprintbind
2375
+ end
2376
+
2377
+ def deserialize(params)
2378
+ @KeyId = params['KeyId']
2379
+ @Alias = params['Alias']
2380
+ @CreatorUin = params['CreatorUin']
2381
+ @Description = params['Description']
2382
+ @CreateTime = params['CreateTime']
2383
+ @Status = params['Status']
2384
+ @OwnerUin = params['OwnerUin']
2385
+ @Algorithm = params['Algorithm']
2386
+ @EncryptKey = params['EncryptKey']
2387
+ @DecryptKey = params['DecryptKey']
2388
+ @ResourceId = params['ResourceId']
2389
+ @DeviceFingerprintBind = params['DeviceFingerprintBind']
2390
+ end
2391
+ end
2392
+
2393
+ end
2394
+ end
2395
+ end
2396
+