aws-sdk-kms 1.22.0 → 1.27.0

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.
@@ -47,6 +47,8 @@ module Aws::KMS
47
47
  CustomKeyStoreNotFoundException = Shapes::StructureShape.new(name: 'CustomKeyStoreNotFoundException')
48
48
  CustomKeyStoresList = Shapes::ListShape.new(name: 'CustomKeyStoresList')
49
49
  CustomKeyStoresListEntry = Shapes::StructureShape.new(name: 'CustomKeyStoresListEntry')
50
+ CustomerMasterKeySpec = Shapes::StringShape.new(name: 'CustomerMasterKeySpec')
51
+ DataKeyPairSpec = Shapes::StringShape.new(name: 'DataKeyPairSpec')
50
52
  DataKeySpec = Shapes::StringShape.new(name: 'DataKeySpec')
51
53
  DateType = Shapes::TimestampShape.new(name: 'DateType')
52
54
  DecryptRequest = Shapes::StructureShape.new(name: 'DecryptRequest')
@@ -70,12 +72,18 @@ module Aws::KMS
70
72
  EnableKeyRotationRequest = Shapes::StructureShape.new(name: 'EnableKeyRotationRequest')
71
73
  EncryptRequest = Shapes::StructureShape.new(name: 'EncryptRequest')
72
74
  EncryptResponse = Shapes::StructureShape.new(name: 'EncryptResponse')
75
+ EncryptionAlgorithmSpec = Shapes::StringShape.new(name: 'EncryptionAlgorithmSpec')
76
+ EncryptionAlgorithmSpecList = Shapes::ListShape.new(name: 'EncryptionAlgorithmSpecList')
73
77
  EncryptionContextKey = Shapes::StringShape.new(name: 'EncryptionContextKey')
74
78
  EncryptionContextType = Shapes::MapShape.new(name: 'EncryptionContextType')
75
79
  EncryptionContextValue = Shapes::StringShape.new(name: 'EncryptionContextValue')
76
80
  ErrorMessageType = Shapes::StringShape.new(name: 'ErrorMessageType')
77
81
  ExpirationModelType = Shapes::StringShape.new(name: 'ExpirationModelType')
78
82
  ExpiredImportTokenException = Shapes::StructureShape.new(name: 'ExpiredImportTokenException')
83
+ GenerateDataKeyPairRequest = Shapes::StructureShape.new(name: 'GenerateDataKeyPairRequest')
84
+ GenerateDataKeyPairResponse = Shapes::StructureShape.new(name: 'GenerateDataKeyPairResponse')
85
+ GenerateDataKeyPairWithoutPlaintextRequest = Shapes::StructureShape.new(name: 'GenerateDataKeyPairWithoutPlaintextRequest')
86
+ GenerateDataKeyPairWithoutPlaintextResponse = Shapes::StructureShape.new(name: 'GenerateDataKeyPairWithoutPlaintextResponse')
79
87
  GenerateDataKeyRequest = Shapes::StructureShape.new(name: 'GenerateDataKeyRequest')
80
88
  GenerateDataKeyResponse = Shapes::StructureShape.new(name: 'GenerateDataKeyResponse')
81
89
  GenerateDataKeyWithoutPlaintextRequest = Shapes::StructureShape.new(name: 'GenerateDataKeyWithoutPlaintextRequest')
@@ -88,6 +96,8 @@ module Aws::KMS
88
96
  GetKeyRotationStatusResponse = Shapes::StructureShape.new(name: 'GetKeyRotationStatusResponse')
89
97
  GetParametersForImportRequest = Shapes::StructureShape.new(name: 'GetParametersForImportRequest')
90
98
  GetParametersForImportResponse = Shapes::StructureShape.new(name: 'GetParametersForImportResponse')
99
+ GetPublicKeyRequest = Shapes::StructureShape.new(name: 'GetPublicKeyRequest')
100
+ GetPublicKeyResponse = Shapes::StructureShape.new(name: 'GetPublicKeyResponse')
91
101
  GrantConstraints = Shapes::StructureShape.new(name: 'GrantConstraints')
92
102
  GrantIdType = Shapes::StringShape.new(name: 'GrantIdType')
93
103
  GrantList = Shapes::ListShape.new(name: 'GrantList')
@@ -99,6 +109,7 @@ module Aws::KMS
99
109
  GrantTokenType = Shapes::StringShape.new(name: 'GrantTokenType')
100
110
  ImportKeyMaterialRequest = Shapes::StructureShape.new(name: 'ImportKeyMaterialRequest')
101
111
  ImportKeyMaterialResponse = Shapes::StructureShape.new(name: 'ImportKeyMaterialResponse')
112
+ IncorrectKeyException = Shapes::StructureShape.new(name: 'IncorrectKeyException')
102
113
  IncorrectKeyMaterialException = Shapes::StructureShape.new(name: 'IncorrectKeyMaterialException')
103
114
  IncorrectTrustAnchorException = Shapes::StructureShape.new(name: 'IncorrectTrustAnchorException')
104
115
  InvalidAliasNameException = Shapes::StructureShape.new(name: 'InvalidAliasNameException')
@@ -110,6 +121,7 @@ module Aws::KMS
110
121
  InvalidKeyUsageException = Shapes::StructureShape.new(name: 'InvalidKeyUsageException')
111
122
  InvalidMarkerException = Shapes::StructureShape.new(name: 'InvalidMarkerException')
112
123
  KMSInternalException = Shapes::StructureShape.new(name: 'KMSInternalException')
124
+ KMSInvalidSignatureException = Shapes::StructureShape.new(name: 'KMSInvalidSignatureException')
113
125
  KMSInvalidStateException = Shapes::StructureShape.new(name: 'KMSInvalidStateException')
114
126
  KeyIdType = Shapes::StringShape.new(name: 'KeyIdType')
115
127
  KeyList = Shapes::ListShape.new(name: 'KeyList')
@@ -135,6 +147,7 @@ module Aws::KMS
135
147
  ListRetirableGrantsRequest = Shapes::StructureShape.new(name: 'ListRetirableGrantsRequest')
136
148
  MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException')
137
149
  MarkerType = Shapes::StringShape.new(name: 'MarkerType')
150
+ MessageType = Shapes::StringShape.new(name: 'MessageType')
138
151
  NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException')
139
152
  NumberOfBytesType = Shapes::IntegerShape.new(name: 'NumberOfBytesType')
140
153
  OriginType = Shapes::StringShape.new(name: 'OriginType')
@@ -144,6 +157,7 @@ module Aws::KMS
144
157
  PolicyNameType = Shapes::StringShape.new(name: 'PolicyNameType')
145
158
  PolicyType = Shapes::StringShape.new(name: 'PolicyType')
146
159
  PrincipalIdType = Shapes::StringShape.new(name: 'PrincipalIdType')
160
+ PublicKeyType = Shapes::BlobShape.new(name: 'PublicKeyType')
147
161
  PutKeyPolicyRequest = Shapes::StructureShape.new(name: 'PutKeyPolicyRequest')
148
162
  ReEncryptRequest = Shapes::StructureShape.new(name: 'ReEncryptRequest')
149
163
  ReEncryptResponse = Shapes::StructureShape.new(name: 'ReEncryptResponse')
@@ -151,6 +165,10 @@ module Aws::KMS
151
165
  RevokeGrantRequest = Shapes::StructureShape.new(name: 'RevokeGrantRequest')
152
166
  ScheduleKeyDeletionRequest = Shapes::StructureShape.new(name: 'ScheduleKeyDeletionRequest')
153
167
  ScheduleKeyDeletionResponse = Shapes::StructureShape.new(name: 'ScheduleKeyDeletionResponse')
168
+ SignRequest = Shapes::StructureShape.new(name: 'SignRequest')
169
+ SignResponse = Shapes::StructureShape.new(name: 'SignResponse')
170
+ SigningAlgorithmSpec = Shapes::StringShape.new(name: 'SigningAlgorithmSpec')
171
+ SigningAlgorithmSpecList = Shapes::ListShape.new(name: 'SigningAlgorithmSpecList')
154
172
  Tag = Shapes::StructureShape.new(name: 'Tag')
155
173
  TagException = Shapes::StructureShape.new(name: 'TagException')
156
174
  TagKeyList = Shapes::ListShape.new(name: 'TagKeyList')
@@ -165,6 +183,8 @@ module Aws::KMS
165
183
  UpdateCustomKeyStoreRequest = Shapes::StructureShape.new(name: 'UpdateCustomKeyStoreRequest')
166
184
  UpdateCustomKeyStoreResponse = Shapes::StructureShape.new(name: 'UpdateCustomKeyStoreResponse')
167
185
  UpdateKeyDescriptionRequest = Shapes::StructureShape.new(name: 'UpdateKeyDescriptionRequest')
186
+ VerifyRequest = Shapes::StructureShape.new(name: 'VerifyRequest')
187
+ VerifyResponse = Shapes::StructureShape.new(name: 'VerifyResponse')
168
188
  WrappingKeySpec = Shapes::StringShape.new(name: 'WrappingKeySpec')
169
189
 
170
190
  AliasList.member = Shapes::ShapeRef.new(shape: AliasListEntry)
@@ -232,6 +252,7 @@ module Aws::KMS
232
252
  CreateKeyRequest.add_member(:policy, Shapes::ShapeRef.new(shape: PolicyType, location_name: "Policy"))
233
253
  CreateKeyRequest.add_member(:description, Shapes::ShapeRef.new(shape: DescriptionType, location_name: "Description"))
234
254
  CreateKeyRequest.add_member(:key_usage, Shapes::ShapeRef.new(shape: KeyUsageType, location_name: "KeyUsage"))
255
+ CreateKeyRequest.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, location_name: "CustomerMasterKeySpec"))
235
256
  CreateKeyRequest.add_member(:origin, Shapes::ShapeRef.new(shape: OriginType, location_name: "Origin"))
236
257
  CreateKeyRequest.add_member(:custom_key_store_id, Shapes::ShapeRef.new(shape: CustomKeyStoreIdType, location_name: "CustomKeyStoreId"))
237
258
  CreateKeyRequest.add_member(:bypass_policy_lockout_safety_check, Shapes::ShapeRef.new(shape: BooleanType, location_name: "BypassPolicyLockoutSafetyCheck"))
@@ -267,10 +288,13 @@ module Aws::KMS
267
288
  DecryptRequest.add_member(:ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, required: true, location_name: "CiphertextBlob"))
268
289
  DecryptRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
269
290
  DecryptRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
291
+ DecryptRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
292
+ DecryptRequest.add_member(:encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "EncryptionAlgorithm"))
270
293
  DecryptRequest.struct_class = Types::DecryptRequest
271
294
 
272
295
  DecryptResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
273
296
  DecryptResponse.add_member(:plaintext, Shapes::ShapeRef.new(shape: PlaintextType, location_name: "Plaintext"))
297
+ DecryptResponse.add_member(:encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "EncryptionAlgorithm"))
274
298
  DecryptResponse.struct_class = Types::DecryptResponse
275
299
 
276
300
  DeleteAliasRequest.add_member(:alias_name, Shapes::ShapeRef.new(shape: AliasNameType, required: true, location_name: "AliasName"))
@@ -329,18 +353,47 @@ module Aws::KMS
329
353
  EncryptRequest.add_member(:plaintext, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Plaintext"))
330
354
  EncryptRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
331
355
  EncryptRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
356
+ EncryptRequest.add_member(:encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "EncryptionAlgorithm"))
332
357
  EncryptRequest.struct_class = Types::EncryptRequest
333
358
 
334
359
  EncryptResponse.add_member(:ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextBlob"))
335
360
  EncryptResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
361
+ EncryptResponse.add_member(:encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "EncryptionAlgorithm"))
336
362
  EncryptResponse.struct_class = Types::EncryptResponse
337
363
 
364
+ EncryptionAlgorithmSpecList.member = Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec)
365
+
338
366
  EncryptionContextType.key = Shapes::ShapeRef.new(shape: EncryptionContextKey)
339
367
  EncryptionContextType.value = Shapes::ShapeRef.new(shape: EncryptionContextValue)
340
368
 
341
369
  ExpiredImportTokenException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
342
370
  ExpiredImportTokenException.struct_class = Types::ExpiredImportTokenException
343
371
 
372
+ GenerateDataKeyPairRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
373
+ GenerateDataKeyPairRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
374
+ GenerateDataKeyPairRequest.add_member(:key_pair_spec, Shapes::ShapeRef.new(shape: DataKeyPairSpec, required: true, location_name: "KeyPairSpec"))
375
+ GenerateDataKeyPairRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
376
+ GenerateDataKeyPairRequest.struct_class = Types::GenerateDataKeyPairRequest
377
+
378
+ GenerateDataKeyPairResponse.add_member(:private_key_ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "PrivateKeyCiphertextBlob"))
379
+ GenerateDataKeyPairResponse.add_member(:private_key_plaintext, Shapes::ShapeRef.new(shape: PlaintextType, location_name: "PrivateKeyPlaintext"))
380
+ GenerateDataKeyPairResponse.add_member(:public_key, Shapes::ShapeRef.new(shape: PublicKeyType, location_name: "PublicKey"))
381
+ GenerateDataKeyPairResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
382
+ GenerateDataKeyPairResponse.add_member(:key_pair_spec, Shapes::ShapeRef.new(shape: DataKeyPairSpec, location_name: "KeyPairSpec"))
383
+ GenerateDataKeyPairResponse.struct_class = Types::GenerateDataKeyPairResponse
384
+
385
+ GenerateDataKeyPairWithoutPlaintextRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
386
+ GenerateDataKeyPairWithoutPlaintextRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
387
+ GenerateDataKeyPairWithoutPlaintextRequest.add_member(:key_pair_spec, Shapes::ShapeRef.new(shape: DataKeyPairSpec, required: true, location_name: "KeyPairSpec"))
388
+ GenerateDataKeyPairWithoutPlaintextRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
389
+ GenerateDataKeyPairWithoutPlaintextRequest.struct_class = Types::GenerateDataKeyPairWithoutPlaintextRequest
390
+
391
+ GenerateDataKeyPairWithoutPlaintextResponse.add_member(:private_key_ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "PrivateKeyCiphertextBlob"))
392
+ GenerateDataKeyPairWithoutPlaintextResponse.add_member(:public_key, Shapes::ShapeRef.new(shape: PublicKeyType, location_name: "PublicKey"))
393
+ GenerateDataKeyPairWithoutPlaintextResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
394
+ GenerateDataKeyPairWithoutPlaintextResponse.add_member(:key_pair_spec, Shapes::ShapeRef.new(shape: DataKeyPairSpec, location_name: "KeyPairSpec"))
395
+ GenerateDataKeyPairWithoutPlaintextResponse.struct_class = Types::GenerateDataKeyPairWithoutPlaintextResponse
396
+
344
397
  GenerateDataKeyRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
345
398
  GenerateDataKeyRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
346
399
  GenerateDataKeyRequest.add_member(:number_of_bytes, Shapes::ShapeRef.new(shape: NumberOfBytesType, location_name: "NumberOfBytes"))
@@ -395,6 +448,18 @@ module Aws::KMS
395
448
  GetParametersForImportResponse.add_member(:parameters_valid_to, Shapes::ShapeRef.new(shape: DateType, location_name: "ParametersValidTo"))
396
449
  GetParametersForImportResponse.struct_class = Types::GetParametersForImportResponse
397
450
 
451
+ GetPublicKeyRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
452
+ GetPublicKeyRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
453
+ GetPublicKeyRequest.struct_class = Types::GetPublicKeyRequest
454
+
455
+ GetPublicKeyResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
456
+ GetPublicKeyResponse.add_member(:public_key, Shapes::ShapeRef.new(shape: PublicKeyType, location_name: "PublicKey"))
457
+ GetPublicKeyResponse.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, location_name: "CustomerMasterKeySpec"))
458
+ GetPublicKeyResponse.add_member(:key_usage, Shapes::ShapeRef.new(shape: KeyUsageType, location_name: "KeyUsage"))
459
+ GetPublicKeyResponse.add_member(:encryption_algorithms, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpecList, location_name: "EncryptionAlgorithms"))
460
+ GetPublicKeyResponse.add_member(:signing_algorithms, Shapes::ShapeRef.new(shape: SigningAlgorithmSpecList, location_name: "SigningAlgorithms"))
461
+ GetPublicKeyResponse.struct_class = Types::GetPublicKeyResponse
462
+
398
463
  GrantConstraints.add_member(:encryption_context_subset, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContextSubset"))
399
464
  GrantConstraints.add_member(:encryption_context_equals, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContextEquals"))
400
465
  GrantConstraints.struct_class = Types::GrantConstraints
@@ -425,6 +490,9 @@ module Aws::KMS
425
490
 
426
491
  ImportKeyMaterialResponse.struct_class = Types::ImportKeyMaterialResponse
427
492
 
493
+ IncorrectKeyException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
494
+ IncorrectKeyException.struct_class = Types::IncorrectKeyException
495
+
428
496
  IncorrectKeyMaterialException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
429
497
  IncorrectKeyMaterialException.struct_class = Types::IncorrectKeyMaterialException
430
498
 
@@ -458,6 +526,9 @@ module Aws::KMS
458
526
  KMSInternalException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
459
527
  KMSInternalException.struct_class = Types::KMSInternalException
460
528
 
529
+ KMSInvalidSignatureException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
530
+ KMSInvalidSignatureException.struct_class = Types::KMSInvalidSignatureException
531
+
461
532
  KMSInvalidStateException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
462
533
  KMSInvalidStateException.struct_class = Types::KMSInvalidStateException
463
534
 
@@ -482,6 +553,9 @@ module Aws::KMS
482
553
  KeyMetadata.add_member(:cloud_hsm_cluster_id, Shapes::ShapeRef.new(shape: CloudHsmClusterIdType, location_name: "CloudHsmClusterId"))
483
554
  KeyMetadata.add_member(:expiration_model, Shapes::ShapeRef.new(shape: ExpirationModelType, location_name: "ExpirationModel"))
484
555
  KeyMetadata.add_member(:key_manager, Shapes::ShapeRef.new(shape: KeyManagerType, location_name: "KeyManager"))
556
+ KeyMetadata.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, location_name: "CustomerMasterKeySpec"))
557
+ KeyMetadata.add_member(:encryption_algorithms, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpecList, location_name: "EncryptionAlgorithms"))
558
+ KeyMetadata.add_member(:signing_algorithms, Shapes::ShapeRef.new(shape: SigningAlgorithmSpecList, location_name: "SigningAlgorithms"))
485
559
  KeyMetadata.struct_class = Types::KeyMetadata
486
560
 
487
561
  KeyUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
@@ -560,14 +634,19 @@ module Aws::KMS
560
634
 
561
635
  ReEncryptRequest.add_member(:ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, required: true, location_name: "CiphertextBlob"))
562
636
  ReEncryptRequest.add_member(:source_encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "SourceEncryptionContext"))
637
+ ReEncryptRequest.add_member(:source_key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "SourceKeyId"))
563
638
  ReEncryptRequest.add_member(:destination_key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "DestinationKeyId"))
564
639
  ReEncryptRequest.add_member(:destination_encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "DestinationEncryptionContext"))
640
+ ReEncryptRequest.add_member(:source_encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "SourceEncryptionAlgorithm"))
641
+ ReEncryptRequest.add_member(:destination_encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "DestinationEncryptionAlgorithm"))
565
642
  ReEncryptRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
566
643
  ReEncryptRequest.struct_class = Types::ReEncryptRequest
567
644
 
568
645
  ReEncryptResponse.add_member(:ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextBlob"))
569
646
  ReEncryptResponse.add_member(:source_key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "SourceKeyId"))
570
647
  ReEncryptResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
648
+ ReEncryptResponse.add_member(:source_encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "SourceEncryptionAlgorithm"))
649
+ ReEncryptResponse.add_member(:destination_encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "DestinationEncryptionAlgorithm"))
571
650
  ReEncryptResponse.struct_class = Types::ReEncryptResponse
572
651
 
573
652
  RetireGrantRequest.add_member(:grant_token, Shapes::ShapeRef.new(shape: GrantTokenType, location_name: "GrantToken"))
@@ -587,6 +666,20 @@ module Aws::KMS
587
666
  ScheduleKeyDeletionResponse.add_member(:deletion_date, Shapes::ShapeRef.new(shape: DateType, location_name: "DeletionDate"))
588
667
  ScheduleKeyDeletionResponse.struct_class = Types::ScheduleKeyDeletionResponse
589
668
 
669
+ SignRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
670
+ SignRequest.add_member(:message, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Message"))
671
+ SignRequest.add_member(:message_type, Shapes::ShapeRef.new(shape: MessageType, location_name: "MessageType"))
672
+ SignRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
673
+ SignRequest.add_member(:signing_algorithm, Shapes::ShapeRef.new(shape: SigningAlgorithmSpec, required: true, location_name: "SigningAlgorithm"))
674
+ SignRequest.struct_class = Types::SignRequest
675
+
676
+ SignResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
677
+ SignResponse.add_member(:signature, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "Signature"))
678
+ SignResponse.add_member(:signing_algorithm, Shapes::ShapeRef.new(shape: SigningAlgorithmSpec, location_name: "SigningAlgorithm"))
679
+ SignResponse.struct_class = Types::SignResponse
680
+
681
+ SigningAlgorithmSpecList.member = Shapes::ShapeRef.new(shape: SigningAlgorithmSpec)
682
+
590
683
  Tag.add_member(:tag_key, Shapes::ShapeRef.new(shape: TagKeyType, required: true, location_name: "TagKey"))
591
684
  Tag.add_member(:tag_value, Shapes::ShapeRef.new(shape: TagValueType, required: true, location_name: "TagValue"))
592
685
  Tag.struct_class = Types::Tag
@@ -625,6 +718,19 @@ module Aws::KMS
625
718
  UpdateKeyDescriptionRequest.add_member(:description, Shapes::ShapeRef.new(shape: DescriptionType, required: true, location_name: "Description"))
626
719
  UpdateKeyDescriptionRequest.struct_class = Types::UpdateKeyDescriptionRequest
627
720
 
721
+ VerifyRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
722
+ VerifyRequest.add_member(:message, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Message"))
723
+ VerifyRequest.add_member(:message_type, Shapes::ShapeRef.new(shape: MessageType, location_name: "MessageType"))
724
+ VerifyRequest.add_member(:signature, Shapes::ShapeRef.new(shape: CiphertextType, required: true, location_name: "Signature"))
725
+ VerifyRequest.add_member(:signing_algorithm, Shapes::ShapeRef.new(shape: SigningAlgorithmSpec, required: true, location_name: "SigningAlgorithm"))
726
+ VerifyRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
727
+ VerifyRequest.struct_class = Types::VerifyRequest
728
+
729
+ VerifyResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
730
+ VerifyResponse.add_member(:signature_valid, Shapes::ShapeRef.new(shape: BooleanType, location_name: "SignatureValid"))
731
+ VerifyResponse.add_member(:signing_algorithm, Shapes::ShapeRef.new(shape: SigningAlgorithmSpec, location_name: "SigningAlgorithm"))
732
+ VerifyResponse.struct_class = Types::VerifyResponse
733
+
628
734
 
629
735
  # @api private
630
736
  API = Seahorse::Model::Api.new.tap do |api|
@@ -744,6 +850,8 @@ module Aws::KMS
744
850
  o.errors << Shapes::ShapeRef.new(shape: DisabledException)
745
851
  o.errors << Shapes::ShapeRef.new(shape: InvalidCiphertextException)
746
852
  o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
853
+ o.errors << Shapes::ShapeRef.new(shape: IncorrectKeyException)
854
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
747
855
  o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
748
856
  o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
749
857
  o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
@@ -910,6 +1018,38 @@ module Aws::KMS
910
1018
  o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
911
1019
  end)
912
1020
 
1021
+ api.add_operation(:generate_data_key_pair, Seahorse::Model::Operation.new.tap do |o|
1022
+ o.name = "GenerateDataKeyPair"
1023
+ o.http_method = "POST"
1024
+ o.http_request_uri = "/"
1025
+ o.input = Shapes::ShapeRef.new(shape: GenerateDataKeyPairRequest)
1026
+ o.output = Shapes::ShapeRef.new(shape: GenerateDataKeyPairResponse)
1027
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1028
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1029
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1030
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1031
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1032
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1033
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1034
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1035
+ end)
1036
+
1037
+ api.add_operation(:generate_data_key_pair_without_plaintext, Seahorse::Model::Operation.new.tap do |o|
1038
+ o.name = "GenerateDataKeyPairWithoutPlaintext"
1039
+ o.http_method = "POST"
1040
+ o.http_request_uri = "/"
1041
+ o.input = Shapes::ShapeRef.new(shape: GenerateDataKeyPairWithoutPlaintextRequest)
1042
+ o.output = Shapes::ShapeRef.new(shape: GenerateDataKeyPairWithoutPlaintextResponse)
1043
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1044
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1045
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1046
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1047
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1048
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1049
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1050
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1051
+ end)
1052
+
913
1053
  api.add_operation(:generate_data_key_without_plaintext, Seahorse::Model::Operation.new.tap do |o|
914
1054
  o.name = "GenerateDataKeyWithoutPlaintext"
915
1055
  o.http_method = "POST"
@@ -979,6 +1119,24 @@ module Aws::KMS
979
1119
  o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
980
1120
  end)
981
1121
 
1122
+ api.add_operation(:get_public_key, Seahorse::Model::Operation.new.tap do |o|
1123
+ o.name = "GetPublicKey"
1124
+ o.http_method = "POST"
1125
+ o.http_request_uri = "/"
1126
+ o.input = Shapes::ShapeRef.new(shape: GetPublicKeyRequest)
1127
+ o.output = Shapes::ShapeRef.new(shape: GetPublicKeyResponse)
1128
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1129
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1130
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1131
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1132
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
1133
+ o.errors << Shapes::ShapeRef.new(shape: InvalidArnException)
1134
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1135
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1136
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1137
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1138
+ end)
1139
+
982
1140
  api.add_operation(:import_key_material, Seahorse::Model::Operation.new.tap do |o|
983
1141
  o.name = "ImportKeyMaterial"
984
1142
  o.http_method = "POST"
@@ -1127,6 +1285,7 @@ module Aws::KMS
1127
1285
  o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1128
1286
  o.errors << Shapes::ShapeRef.new(shape: InvalidCiphertextException)
1129
1287
  o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1288
+ o.errors << Shapes::ShapeRef.new(shape: IncorrectKeyException)
1130
1289
  o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1131
1290
  o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1132
1291
  o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
@@ -1176,6 +1335,22 @@ module Aws::KMS
1176
1335
  o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1177
1336
  end)
1178
1337
 
1338
+ api.add_operation(:sign, Seahorse::Model::Operation.new.tap do |o|
1339
+ o.name = "Sign"
1340
+ o.http_method = "POST"
1341
+ o.http_request_uri = "/"
1342
+ o.input = Shapes::ShapeRef.new(shape: SignRequest)
1343
+ o.output = Shapes::ShapeRef.new(shape: SignResponse)
1344
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1345
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1346
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1347
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1348
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1349
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1350
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1351
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1352
+ end)
1353
+
1179
1354
  api.add_operation(:tag_resource, Seahorse::Model::Operation.new.tap do |o|
1180
1355
  o.name = "TagResource"
1181
1356
  o.http_method = "POST"
@@ -1222,6 +1397,7 @@ module Aws::KMS
1222
1397
  o.input = Shapes::ShapeRef.new(shape: UpdateCustomKeyStoreRequest)
1223
1398
  o.output = Shapes::ShapeRef.new(shape: UpdateCustomKeyStoreResponse)
1224
1399
  o.errors << Shapes::ShapeRef.new(shape: CustomKeyStoreNotFoundException)
1400
+ o.errors << Shapes::ShapeRef.new(shape: CustomKeyStoreNameInUseException)
1225
1401
  o.errors << Shapes::ShapeRef.new(shape: CloudHsmClusterNotFoundException)
1226
1402
  o.errors << Shapes::ShapeRef.new(shape: CloudHsmClusterNotRelatedException)
1227
1403
  o.errors << Shapes::ShapeRef.new(shape: CustomKeyStoreInvalidStateException)
@@ -1242,6 +1418,23 @@ module Aws::KMS
1242
1418
  o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1243
1419
  o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1244
1420
  end)
1421
+
1422
+ api.add_operation(:verify, Seahorse::Model::Operation.new.tap do |o|
1423
+ o.name = "Verify"
1424
+ o.http_method = "POST"
1425
+ o.http_request_uri = "/"
1426
+ o.input = Shapes::ShapeRef.new(shape: VerifyRequest)
1427
+ o.output = Shapes::ShapeRef.new(shape: VerifyResponse)
1428
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1429
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1430
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1431
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1432
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1433
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1434
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1435
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1436
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidSignatureException)
1437
+ end)
1245
1438
  end
1246
1439
 
1247
1440
  end
@@ -218,6 +218,22 @@ module Aws::KMS
218
218
 
219
219
  end
220
220
 
221
+ class IncorrectKeyException < ServiceError
222
+
223
+ # @param [Seahorse::Client::RequestContext] context
224
+ # @param [String] message
225
+ # @param [Aws::KMS::Types::IncorrectKeyException] data
226
+ def initialize(context, message, data = Aws::EmptyStructure.new)
227
+ super(context, message, data)
228
+ end
229
+
230
+ # @return [String]
231
+ def message
232
+ @message || @data[:message]
233
+ end
234
+
235
+ end
236
+
221
237
  class IncorrectKeyMaterialException < ServiceError
222
238
 
223
239
  # @param [Seahorse::Client::RequestContext] context
@@ -394,6 +410,22 @@ module Aws::KMS
394
410
 
395
411
  end
396
412
 
413
+ class KMSInvalidSignatureException < ServiceError
414
+
415
+ # @param [Seahorse::Client::RequestContext] context
416
+ # @param [String] message
417
+ # @param [Aws::KMS::Types::KMSInvalidSignatureException] data
418
+ def initialize(context, message, data = Aws::EmptyStructure.new)
419
+ super(context, message, data)
420
+ end
421
+
422
+ # @return [String]
423
+ def message
424
+ @message || @data[:message]
425
+ end
426
+
427
+ end
428
+
397
429
  class KMSInvalidStateException < ServiceError
398
430
 
399
431
  # @param [Seahorse::Client::RequestContext] context
@@ -360,7 +360,7 @@ module Aws::KMS
360
360
  # key_id: "KeyIdType", # required
361
361
  # grantee_principal: "PrincipalIdType", # required
362
362
  # retiring_principal: "PrincipalIdType",
363
- # operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, CreateGrant, RetireGrant, DescribeKey
363
+ # operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext
364
364
  # constraints: {
365
365
  # encryption_context_subset: {
366
366
  # "EncryptionContextKey" => "EncryptionContextValue",
@@ -515,7 +515,8 @@ module Aws::KMS
515
515
  # {
516
516
  # policy: "PolicyType",
517
517
  # description: "DescriptionType",
518
- # key_usage: "ENCRYPT_DECRYPT", # accepts ENCRYPT_DECRYPT
518
+ # key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT
519
+ # customer_master_key_spec: "RSA_2048", # accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SYMMETRIC_DEFAULT
519
520
  # origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM
520
521
  # custom_key_store_id: "CustomKeyStoreIdType",
521
522
  # bypass_policy_lockout_safety_check: false,
@@ -571,28 +572,91 @@ module Aws::KMS
571
572
  # @return [String]
572
573
  #
573
574
  # @!attribute [rw] key_usage
574
- # The cryptographic operations for which you can use the CMK. The only
575
- # valid value is `ENCRYPT_DECRYPT`, which means you can use the CMK to
576
- # encrypt and decrypt data.
575
+ # Determines the cryptographic operations for which you can use the
576
+ # CMK. The default value is `ENCRYPT_DECRYPT`. This parameter is
577
+ # required only for asymmetric CMKs. You can't change the `KeyUsage`
578
+ # value after the CMK is created.
579
+ #
580
+ # Select only one valid value.
581
+ #
582
+ # * For symmetric CMKs, omit the parameter or specify
583
+ # `ENCRYPT_DECRYPT`.
584
+ #
585
+ # * For asymmetric CMKs with RSA key material, specify
586
+ # `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
587
+ #
588
+ # * For asymmetric CMKs with ECC key material, specify `SIGN_VERIFY`.
589
+ # @return [String]
590
+ #
591
+ # @!attribute [rw] customer_master_key_spec
592
+ # Specifies the type of CMK to create. The `CustomerMasterKeySpec`
593
+ # determines whether the CMK contains a symmetric key or an asymmetric
594
+ # key pair. It also determines the encryption algorithms or signing
595
+ # algorithms that the CMK supports. You can't change the
596
+ # `CustomerMasterKeySpec` after the CMK is created. To further
597
+ # restrict the algorithms that can be used with the CMK, use its key
598
+ # policy or IAM policy.
599
+ #
600
+ # For help with choosing a key spec for your CMK, see [Selecting a
601
+ # Customer Master Key Spec][1] in the *AWS Key Management Service
602
+ # Developer Guide*.
603
+ #
604
+ # The default value, `SYMMETRIC_DEFAULT`, creates a CMK with a 256-bit
605
+ # symmetric key.
606
+ #
607
+ # AWS KMS supports the following key specs for CMKs:
608
+ #
609
+ # * Symmetric key (default)
610
+ #
611
+ # * `SYMMETRIC_DEFAULT` (AES-256-GCM)
612
+ #
613
+ # ^
614
+ #
615
+ # * Asymmetric RSA key pairs
616
+ #
617
+ # * `RSA_2048`
618
+ #
619
+ # * `RSA_3072`
620
+ #
621
+ # * `RSA_4096`
622
+ #
623
+ # * Asymmetric NIST-recommended elliptic curve key pairs
624
+ #
625
+ # * `ECC_NIST_P256` (secp256r1)
626
+ #
627
+ # * `ECC_NIST_P384` (secp384r1)
628
+ #
629
+ # * `ECC_NIST_P521` (secp521r1)
630
+ #
631
+ # * Other asymmetric elliptic curve key pairs
632
+ #
633
+ # * `ECC_SECG_P256K1` (secp256k1), commonly used for
634
+ # cryptocurrencies.
635
+ #
636
+ # ^
637
+ #
638
+ #
639
+ #
640
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#cmk-key-spec
577
641
  # @return [String]
578
642
  #
579
643
  # @!attribute [rw] origin
580
644
  # The source of the key material for the CMK. You cannot change the
581
- # origin after you create the CMK.
582
- #
583
- # The default is `AWS_KMS`, which means AWS KMS creates the key
584
- # material in its own key store.
645
+ # origin after you create the CMK. The default is `AWS_KMS`, which
646
+ # means AWS KMS creates the key material.
585
647
  #
586
648
  # When the parameter value is `EXTERNAL`, AWS KMS creates a CMK
587
649
  # without key material so that you can import key material from your
588
650
  # existing key management infrastructure. For more information about
589
651
  # importing key material into AWS KMS, see [Importing Key Material][1]
590
- # in the *AWS Key Management Service Developer Guide*.
652
+ # in the *AWS Key Management Service Developer Guide*. This value is
653
+ # valid only for symmetric CMKs.
591
654
  #
592
655
  # When the parameter value is `AWS_CLOUDHSM`, AWS KMS creates the CMK
593
656
  # in an AWS KMS [custom key store][2] and creates its key material in
594
657
  # the associated AWS CloudHSM cluster. You must also use the
595
- # `CustomKeyStoreId` parameter to identify the custom key store.
658
+ # `CustomKeyStoreId` parameter to identify the custom key store. This
659
+ # value is valid only for symmetric CMKs.
596
660
  #
597
661
  #
598
662
  #
@@ -608,6 +672,9 @@ module Aws::KMS
608
672
  # associated with the custom key store must have at least two active
609
673
  # HSMs, each in a different Availability Zone in the Region.
610
674
  #
675
+ # This parameter is valid only for symmetric CMKs. You cannot create
676
+ # an asymmetric CMK in a custom key store.
677
+ #
611
678
  # To find the ID of a custom key store, use the
612
679
  # DescribeCustomKeyStores operation.
613
680
  #
@@ -648,12 +715,20 @@ module Aws::KMS
648
715
  #
649
716
  # @!attribute [rw] tags
650
717
  # One or more tags. Each tag consists of a tag key and a tag value.
651
- # Tag keys and tag values are both required, but tag values can be
652
- # empty (null) strings.
718
+ # Both the tag key and the tag value are required, but the tag value
719
+ # can be an empty (null) string.
720
+ #
721
+ # When you add tags to an AWS resource, AWS generates a cost
722
+ # allocation report with usage and costs aggregated by tags. For
723
+ # information about adding, changing, deleting and listing tags for
724
+ # CMKs, see [Tagging Keys][1].
725
+ #
726
+ # Use this parameter to tag the CMK when it is created. To add tags to
727
+ # an existing CMK, use the TagResource operation.
728
+ #
729
+ #
653
730
  #
654
- # Use this parameter to tag the CMK when it is created. Alternately,
655
- # you can omit this parameter and instead tag the CMK after it is
656
- # created using TagResource.
731
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
657
732
  # @return [Array<Types::Tag>]
658
733
  #
659
734
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKeyRequest AWS API Documentation
@@ -662,6 +737,7 @@ module Aws::KMS
662
737
  :policy,
663
738
  :description,
664
739
  :key_usage,
740
+ :customer_master_key_spec,
665
741
  :origin,
666
742
  :custom_key_store_id,
667
743
  :bypass_policy_lockout_safety_check,
@@ -862,6 +938,8 @@ module Aws::KMS
862
938
  # "EncryptionContextKey" => "EncryptionContextValue",
863
939
  # },
864
940
  # grant_tokens: ["GrantTokenType"],
941
+ # key_id: "KeyIdType",
942
+ # encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
865
943
  # }
866
944
  #
867
945
  # @!attribute [rw] ciphertext_blob
@@ -869,9 +947,20 @@ module Aws::KMS
869
947
  # @return [String]
870
948
  #
871
949
  # @!attribute [rw] encryption_context
872
- # The encryption context. If this was specified in the Encrypt
873
- # function, it must be specified here or the decryption operation will
874
- # fail. For more information, see [Encryption Context][1].
950
+ # Specifies the encryption context to use when decrypting the data. An
951
+ # encryption context is valid only for cryptographic operations with a
952
+ # symmetric CMK. The standard asymmetric encryption algorithms that
953
+ # AWS KMS uses do not support an encryption context.
954
+ #
955
+ # An *encryption context* is a collection of non-secret key-value
956
+ # pairs that represents additional authenticated data. When you use an
957
+ # encryption context to encrypt data, you must specify the same (an
958
+ # exact case-sensitive match) encryption context to decrypt the data.
959
+ # An encryption context is optional when encrypting with a symmetric
960
+ # CMK, but it is highly recommended.
961
+ #
962
+ # For more information, see [Encryption Context][1] in the *AWS Key
963
+ # Management Service Developer Guide*.
875
964
  #
876
965
  #
877
966
  #
@@ -889,30 +978,83 @@ module Aws::KMS
889
978
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
890
979
  # @return [Array<String>]
891
980
  #
981
+ # @!attribute [rw] key_id
982
+ # Specifies the customer master key (CMK) that AWS KMS will use to
983
+ # decrypt the ciphertext. Enter a key ID of the CMK that was used to
984
+ # encrypt the ciphertext.
985
+ #
986
+ # If you specify a `KeyId` value, the `Decrypt` operation succeeds
987
+ # only if the specified CMK was used to encrypt the ciphertext.
988
+ #
989
+ # This parameter is required only when the ciphertext was encrypted
990
+ # under an asymmetric CMK. Otherwise, AWS KMS uses the metadata that
991
+ # it adds to the ciphertext blob to determine which CMK was used to
992
+ # encrypt the ciphertext. However, you can use this parameter to
993
+ # ensure that a particular CMK (of any kind) is used to decrypt the
994
+ # ciphertext.
995
+ #
996
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
997
+ # name, or alias ARN. When using an alias name, prefix it with
998
+ # `"alias/"`.
999
+ #
1000
+ # For example:
1001
+ #
1002
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
1003
+ #
1004
+ # * Key ARN:
1005
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
1006
+ #
1007
+ # * Alias name: `alias/ExampleAlias`
1008
+ #
1009
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
1010
+ #
1011
+ # To get the key ID and key ARN for a CMK, use ListKeys or
1012
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
1013
+ # @return [String]
1014
+ #
1015
+ # @!attribute [rw] encryption_algorithm
1016
+ # Specifies the encryption algorithm that will be used to decrypt the
1017
+ # ciphertext. Specify the same algorithm that was used to encrypt the
1018
+ # data. If you specify a different algorithm, the `Decrypt` operation
1019
+ # fails.
1020
+ #
1021
+ # This parameter is required only when the ciphertext was encrypted
1022
+ # under an asymmetric CMK. The default value, `SYMMETRIC_DEFAULT`,
1023
+ # represents the only supported algorithm that is valid for symmetric
1024
+ # CMKs.
1025
+ # @return [String]
1026
+ #
892
1027
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DecryptRequest AWS API Documentation
893
1028
  #
894
1029
  class DecryptRequest < Struct.new(
895
1030
  :ciphertext_blob,
896
1031
  :encryption_context,
897
- :grant_tokens)
1032
+ :grant_tokens,
1033
+ :key_id,
1034
+ :encryption_algorithm)
898
1035
  include Aws::Structure
899
1036
  end
900
1037
 
901
1038
  # @!attribute [rw] key_id
902
- # ARN of the key used to perform the decryption. This value is
903
- # returned if no errors are encountered during the operation.
1039
+ # The ARN of the customer master key that was used to perform the
1040
+ # decryption.
904
1041
  # @return [String]
905
1042
  #
906
1043
  # @!attribute [rw] plaintext
907
1044
  # Decrypted plaintext data. When you use the HTTP API or the AWS CLI,
908
- # the value is Base64-encoded. Otherwise, it is not encoded.
1045
+ # the value is Base64-encoded. Otherwise, it is not Base64-encoded.
1046
+ # @return [String]
1047
+ #
1048
+ # @!attribute [rw] encryption_algorithm
1049
+ # The encryption algorithm that was used to decrypt the ciphertext.
909
1050
  # @return [String]
910
1051
  #
911
1052
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DecryptResponse AWS API Documentation
912
1053
  #
913
1054
  class DecryptResponse < Struct.new(
914
1055
  :key_id,
915
- :plaintext)
1056
+ :plaintext,
1057
+ :encryption_algorithm)
916
1058
  include Aws::Structure
917
1059
  end
918
1060
 
@@ -1186,7 +1328,9 @@ module Aws::KMS
1186
1328
  # }
1187
1329
  #
1188
1330
  # @!attribute [rw] key_id
1189
- # A unique identifier for the customer master key (CMK).
1331
+ # Identifies a symmetric customer master key (CMK). You cannot enable
1332
+ # automatic rotation of [asymmetric CMKs][1], CMKs with [imported key
1333
+ # material][2], or CMKs in a [custom key store][3].
1190
1334
  #
1191
1335
  # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
1192
1336
  #
@@ -1199,6 +1343,12 @@ module Aws::KMS
1199
1343
  #
1200
1344
  # To get the key ID and key ARN for a CMK, use ListKeys or
1201
1345
  # DescribeKey.
1346
+ #
1347
+ #
1348
+ #
1349
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks
1350
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1351
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1202
1352
  # @return [String]
1203
1353
  #
1204
1354
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKeyRotationRequest AWS API Documentation
@@ -1282,7 +1432,9 @@ module Aws::KMS
1282
1432
  # }
1283
1433
  #
1284
1434
  # @!attribute [rw] key_id
1285
- # A unique identifier for the customer master key (CMK).
1435
+ # Identifies a symmetric customer master key (CMK). You cannot enable
1436
+ # automatic rotation of asymmetric CMKs, CMKs with imported key
1437
+ # material, or CMKs in a [custom key store][1].
1286
1438
  #
1287
1439
  # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
1288
1440
  #
@@ -1295,6 +1447,10 @@ module Aws::KMS
1295
1447
  #
1296
1448
  # To get the key ID and key ARN for a CMK, use ListKeys or
1297
1449
  # DescribeKey.
1450
+ #
1451
+ #
1452
+ #
1453
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1298
1454
  # @return [String]
1299
1455
  #
1300
1456
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKeyRotationRequest AWS API Documentation
@@ -1314,6 +1470,7 @@ module Aws::KMS
1314
1470
  # "EncryptionContextKey" => "EncryptionContextValue",
1315
1471
  # },
1316
1472
  # grant_tokens: ["GrantTokenType"],
1473
+ # encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
1317
1474
  # }
1318
1475
  #
1319
1476
  # @!attribute [rw] key_id
@@ -1344,10 +1501,20 @@ module Aws::KMS
1344
1501
  # @return [String]
1345
1502
  #
1346
1503
  # @!attribute [rw] encryption_context
1347
- # Name-value pair that specifies the encryption context to be used for
1348
- # authenticated encryption. If used here, the same value must be
1349
- # supplied to the `Decrypt` API or decryption will fail. For more
1350
- # information, see [Encryption Context][1].
1504
+ # Specifies the encryption context that will be used to encrypt the
1505
+ # data. An encryption context is valid only for cryptographic
1506
+ # operations with a symmetric CMK. The standard asymmetric encryption
1507
+ # algorithms that AWS KMS uses do not support an encryption context.
1508
+ #
1509
+ # An *encryption context* is a collection of non-secret key-value
1510
+ # pairs that represents additional authenticated data. When you use an
1511
+ # encryption context to encrypt data, you must specify the same (an
1512
+ # exact case-sensitive match) encryption context to decrypt the data.
1513
+ # An encryption context is optional when encrypting with a symmetric
1514
+ # CMK, but it is highly recommended.
1515
+ #
1516
+ # For more information, see [Encryption Context][1] in the *AWS Key
1517
+ # Management Service Developer Guide*.
1351
1518
  #
1352
1519
  #
1353
1520
  #
@@ -1365,37 +1532,54 @@ module Aws::KMS
1365
1532
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
1366
1533
  # @return [Array<String>]
1367
1534
  #
1535
+ # @!attribute [rw] encryption_algorithm
1536
+ # Specifies the encryption algorithm that AWS KMS will use to encrypt
1537
+ # the plaintext message. The algorithm must be compatible with the CMK
1538
+ # that you specify.
1539
+ #
1540
+ # This parameter is required only for asymmetric CMKs. The default
1541
+ # value, `SYMMETRIC_DEFAULT`, is the algorithm used for symmetric
1542
+ # CMKs. If you are using an asymmetric CMK, we recommend
1543
+ # RSAES\_OAEP\_SHA\_256.
1544
+ # @return [String]
1545
+ #
1368
1546
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EncryptRequest AWS API Documentation
1369
1547
  #
1370
1548
  class EncryptRequest < Struct.new(
1371
1549
  :key_id,
1372
1550
  :plaintext,
1373
1551
  :encryption_context,
1374
- :grant_tokens)
1552
+ :grant_tokens,
1553
+ :encryption_algorithm)
1375
1554
  include Aws::Structure
1376
1555
  end
1377
1556
 
1378
1557
  # @!attribute [rw] ciphertext_blob
1379
1558
  # The encrypted plaintext. When you use the HTTP API or the AWS CLI,
1380
- # the value is Base64-encoded. Otherwise, it is not encoded.
1559
+ # the value is Base64-encoded. Otherwise, it is not Base64-encoded.
1381
1560
  # @return [String]
1382
1561
  #
1383
1562
  # @!attribute [rw] key_id
1384
1563
  # The ID of the key used during encryption.
1385
1564
  # @return [String]
1386
1565
  #
1566
+ # @!attribute [rw] encryption_algorithm
1567
+ # The encryption algorithm that was used to encrypt the plaintext.
1568
+ # @return [String]
1569
+ #
1387
1570
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EncryptResponse AWS API Documentation
1388
1571
  #
1389
1572
  class EncryptResponse < Struct.new(
1390
1573
  :ciphertext_blob,
1391
- :key_id)
1574
+ :key_id,
1575
+ :encryption_algorithm)
1392
1576
  include Aws::Structure
1393
1577
  end
1394
1578
 
1395
- # The request was rejected because the provided import token is expired.
1396
- # Use GetParametersForImport to get a new import token and public key,
1397
- # use the new public key to encrypt the key material, and then try the
1398
- # request again.
1579
+ # The request was rejected because the specified import token is
1580
+ # expired. Use GetParametersForImport to get a new import token and
1581
+ # public key, use the new public key to encrypt the key material, and
1582
+ # then try the request again.
1399
1583
  #
1400
1584
  # @!attribute [rw] message
1401
1585
  # @return [String]
@@ -1407,6 +1591,259 @@ module Aws::KMS
1407
1591
  include Aws::Structure
1408
1592
  end
1409
1593
 
1594
+ # @note When making an API call, you may pass GenerateDataKeyPairRequest
1595
+ # data as a hash:
1596
+ #
1597
+ # {
1598
+ # encryption_context: {
1599
+ # "EncryptionContextKey" => "EncryptionContextValue",
1600
+ # },
1601
+ # key_id: "KeyIdType", # required
1602
+ # key_pair_spec: "RSA_2048", # required, accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1
1603
+ # grant_tokens: ["GrantTokenType"],
1604
+ # }
1605
+ #
1606
+ # @!attribute [rw] encryption_context
1607
+ # Specifies the encryption context that will be used when encrypting
1608
+ # the private key in the data key pair.
1609
+ #
1610
+ # An *encryption context* is a collection of non-secret key-value
1611
+ # pairs that represents additional authenticated data. When you use an
1612
+ # encryption context to encrypt data, you must specify the same (an
1613
+ # exact case-sensitive match) encryption context to decrypt the data.
1614
+ # An encryption context is optional when encrypting with a symmetric
1615
+ # CMK, but it is highly recommended.
1616
+ #
1617
+ # For more information, see [Encryption Context][1] in the *AWS Key
1618
+ # Management Service Developer Guide*.
1619
+ #
1620
+ #
1621
+ #
1622
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
1623
+ # @return [Hash<String,String>]
1624
+ #
1625
+ # @!attribute [rw] key_id
1626
+ # Specifies the symmetric CMK that encrypts the private key in the
1627
+ # data key pair. You cannot specify an asymmetric CMKs.
1628
+ #
1629
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
1630
+ # name, or alias ARN. When using an alias name, prefix it with
1631
+ # `"alias/"`. To specify a CMK in a different AWS account, you must
1632
+ # use the key ARN or alias ARN.
1633
+ #
1634
+ # For example:
1635
+ #
1636
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
1637
+ #
1638
+ # * Key ARN:
1639
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
1640
+ #
1641
+ # * Alias name: `alias/ExampleAlias`
1642
+ #
1643
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
1644
+ #
1645
+ # To get the key ID and key ARN for a CMK, use ListKeys or
1646
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
1647
+ # @return [String]
1648
+ #
1649
+ # @!attribute [rw] key_pair_spec
1650
+ # Determines the type of data key pair that is generated.
1651
+ #
1652
+ # The AWS KMS rule that restricts the use of asymmetric RSA CMKs to
1653
+ # encrypt and decrypt or to sign and verify (but not both), and the
1654
+ # rule that permits you to use ECC CMKs only to sign and verify, are
1655
+ # not effective outside of AWS KMS.
1656
+ # @return [String]
1657
+ #
1658
+ # @!attribute [rw] grant_tokens
1659
+ # A list of grant tokens.
1660
+ #
1661
+ # For more information, see [Grant Tokens][1] in the *AWS Key
1662
+ # Management Service Developer Guide*.
1663
+ #
1664
+ #
1665
+ #
1666
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
1667
+ # @return [Array<String>]
1668
+ #
1669
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairRequest AWS API Documentation
1670
+ #
1671
+ class GenerateDataKeyPairRequest < Struct.new(
1672
+ :encryption_context,
1673
+ :key_id,
1674
+ :key_pair_spec,
1675
+ :grant_tokens)
1676
+ include Aws::Structure
1677
+ end
1678
+
1679
+ # @!attribute [rw] private_key_ciphertext_blob
1680
+ # The encrypted copy of the private key. When you use the HTTP API or
1681
+ # the AWS CLI, the value is Base64-encoded. Otherwise, it is not
1682
+ # Base64-encoded.
1683
+ # @return [String]
1684
+ #
1685
+ # @!attribute [rw] private_key_plaintext
1686
+ # The plaintext copy of the private key. When you use the HTTP API or
1687
+ # the AWS CLI, the value is Base64-encoded. Otherwise, it is not
1688
+ # Base64-encoded.
1689
+ # @return [String]
1690
+ #
1691
+ # @!attribute [rw] public_key
1692
+ # The public key (in plaintext).
1693
+ # @return [String]
1694
+ #
1695
+ # @!attribute [rw] key_id
1696
+ # The identifier of the CMK that encrypted the private key.
1697
+ # @return [String]
1698
+ #
1699
+ # @!attribute [rw] key_pair_spec
1700
+ # The type of data key pair that was generated.
1701
+ # @return [String]
1702
+ #
1703
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairResponse AWS API Documentation
1704
+ #
1705
+ class GenerateDataKeyPairResponse < Struct.new(
1706
+ :private_key_ciphertext_blob,
1707
+ :private_key_plaintext,
1708
+ :public_key,
1709
+ :key_id,
1710
+ :key_pair_spec)
1711
+ include Aws::Structure
1712
+ end
1713
+
1714
+ # @note When making an API call, you may pass GenerateDataKeyPairWithoutPlaintextRequest
1715
+ # data as a hash:
1716
+ #
1717
+ # {
1718
+ # encryption_context: {
1719
+ # "EncryptionContextKey" => "EncryptionContextValue",
1720
+ # },
1721
+ # key_id: "KeyIdType", # required
1722
+ # key_pair_spec: "RSA_2048", # required, accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1
1723
+ # grant_tokens: ["GrantTokenType"],
1724
+ # }
1725
+ #
1726
+ # @!attribute [rw] encryption_context
1727
+ # Specifies the encryption context that will be used when encrypting
1728
+ # the private key in the data key pair.
1729
+ #
1730
+ # An *encryption context* is a collection of non-secret key-value
1731
+ # pairs that represents additional authenticated data. When you use an
1732
+ # encryption context to encrypt data, you must specify the same (an
1733
+ # exact case-sensitive match) encryption context to decrypt the data.
1734
+ # An encryption context is optional when encrypting with a symmetric
1735
+ # CMK, but it is highly recommended.
1736
+ #
1737
+ # For more information, see [Encryption Context][1] in the *AWS Key
1738
+ # Management Service Developer Guide*.
1739
+ #
1740
+ #
1741
+ #
1742
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
1743
+ # @return [Hash<String,String>]
1744
+ #
1745
+ # @!attribute [rw] key_id
1746
+ # Specifies the CMK that encrypts the private key in the data key
1747
+ # pair. You must specify a symmetric CMK. You cannot use an asymmetric
1748
+ # CMK.
1749
+ #
1750
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
1751
+ # name, or alias ARN. When using an alias name, prefix it with
1752
+ # `"alias/"`.
1753
+ #
1754
+ # For example:
1755
+ #
1756
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
1757
+ #
1758
+ # * Key ARN:
1759
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
1760
+ #
1761
+ # * Alias name: `alias/ExampleAlias`
1762
+ #
1763
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
1764
+ #
1765
+ # To get the key ID and key ARN for a CMK, use ListKeys or
1766
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
1767
+ # @return [String]
1768
+ #
1769
+ # @!attribute [rw] key_pair_spec
1770
+ # Determines the type of data key pair that is generated.
1771
+ #
1772
+ # The AWS KMS rule that restricts the use of asymmetric RSA CMKs to
1773
+ # encrypt and decrypt or to sign and verify (but not both), and the
1774
+ # rule that permits you to use ECC CMKs only to sign and verify, are
1775
+ # not effective outside of AWS KMS.
1776
+ # @return [String]
1777
+ #
1778
+ # @!attribute [rw] grant_tokens
1779
+ # A list of grant tokens.
1780
+ #
1781
+ # For more information, see [Grant Tokens][1] in the *AWS Key
1782
+ # Management Service Developer Guide*.
1783
+ #
1784
+ #
1785
+ #
1786
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
1787
+ # @return [Array<String>]
1788
+ #
1789
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairWithoutPlaintextRequest AWS API Documentation
1790
+ #
1791
+ class GenerateDataKeyPairWithoutPlaintextRequest < Struct.new(
1792
+ :encryption_context,
1793
+ :key_id,
1794
+ :key_pair_spec,
1795
+ :grant_tokens)
1796
+ include Aws::Structure
1797
+ end
1798
+
1799
+ # @!attribute [rw] private_key_ciphertext_blob
1800
+ # The encrypted copy of the private key. When you use the HTTP API or
1801
+ # the AWS CLI, the value is Base64-encoded. Otherwise, it is not
1802
+ # Base64-encoded.
1803
+ # @return [String]
1804
+ #
1805
+ # @!attribute [rw] public_key
1806
+ # The public key (in plaintext).
1807
+ # @return [String]
1808
+ #
1809
+ # @!attribute [rw] key_id
1810
+ # Specifies the CMK that encrypted the private key in the data key
1811
+ # pair. You must specify a symmetric CMK. You cannot use an asymmetric
1812
+ # CMK.
1813
+ #
1814
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
1815
+ # name, or alias ARN. When using an alias name, prefix it with
1816
+ # `"alias/"`.
1817
+ #
1818
+ # For example:
1819
+ #
1820
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
1821
+ #
1822
+ # * Key ARN:
1823
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
1824
+ #
1825
+ # * Alias name: `alias/ExampleAlias`
1826
+ #
1827
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
1828
+ #
1829
+ # To get the key ID and key ARN for a CMK, use ListKeys or
1830
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
1831
+ # @return [String]
1832
+ #
1833
+ # @!attribute [rw] key_pair_spec
1834
+ # The type of data key pair that was generated.
1835
+ # @return [String]
1836
+ #
1837
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairWithoutPlaintextResponse AWS API Documentation
1838
+ #
1839
+ class GenerateDataKeyPairWithoutPlaintextResponse < Struct.new(
1840
+ :private_key_ciphertext_blob,
1841
+ :public_key,
1842
+ :key_id,
1843
+ :key_pair_spec)
1844
+ include Aws::Structure
1845
+ end
1846
+
1410
1847
  # @note When making an API call, you may pass GenerateDataKeyRequest
1411
1848
  # data as a hash:
1412
1849
  #
@@ -1421,7 +1858,7 @@ module Aws::KMS
1421
1858
  # }
1422
1859
  #
1423
1860
  # @!attribute [rw] key_id
1424
- # An identifier for the CMK that encrypts the data key.
1861
+ # Identifies the symmetric CMK that encrypts the data key.
1425
1862
  #
1426
1863
  # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
1427
1864
  # name, or alias ARN. When using an alias name, prefix it with
@@ -1444,8 +1881,15 @@ module Aws::KMS
1444
1881
  # @return [String]
1445
1882
  #
1446
1883
  # @!attribute [rw] encryption_context
1447
- # A set of key-value pairs that represents additional authenticated
1448
- # data.
1884
+ # Specifies the encryption context that will be used when encrypting
1885
+ # the data key.
1886
+ #
1887
+ # An *encryption context* is a collection of non-secret key-value
1888
+ # pairs that represents additional authenticated data. When you use an
1889
+ # encryption context to encrypt data, you must specify the same (an
1890
+ # exact case-sensitive match) encryption context to decrypt the data.
1891
+ # An encryption context is optional when encrypting with a symmetric
1892
+ # CMK, but it is highly recommended.
1449
1893
  #
1450
1894
  # For more information, see [Encryption Context][1] in the *AWS Key
1451
1895
  # Management Service Developer Guide*.
@@ -1456,15 +1900,22 @@ module Aws::KMS
1456
1900
  # @return [Hash<String,String>]
1457
1901
  #
1458
1902
  # @!attribute [rw] number_of_bytes
1459
- # The length of the data key in bytes. For example, use the value 64
1460
- # to generate a 512-bit data key (64 bytes is 512 bits). For common
1461
- # key lengths (128-bit and 256-bit symmetric keys), we recommend that
1462
- # you use the `KeySpec` field instead of this one.
1903
+ # Specifies the length of the data key in bytes. For example, use the
1904
+ # value 64 to generate a 512-bit data key (64 bytes is 512 bits). For
1905
+ # 128-bit (16-byte) and 256-bit (32-byte) data keys, use the `KeySpec`
1906
+ # parameter.
1907
+ #
1908
+ # You must specify either the `KeySpec` or the `NumberOfBytes`
1909
+ # parameter (but not both) in every `GenerateDataKey` request.
1463
1910
  # @return [Integer]
1464
1911
  #
1465
1912
  # @!attribute [rw] key_spec
1466
- # The length of the data key. Use `AES_128` to generate a 128-bit
1467
- # symmetric key, or `AES_256` to generate a 256-bit symmetric key.
1913
+ # Specifies the length of the data key. Use `AES_128` to generate a
1914
+ # 128-bit symmetric key, or `AES_256` to generate a 256-bit symmetric
1915
+ # key.
1916
+ #
1917
+ # You must specify either the `KeySpec` or the `NumberOfBytes`
1918
+ # parameter (but not both) in every `GenerateDataKey` request.
1468
1919
  # @return [String]
1469
1920
  #
1470
1921
  # @!attribute [rw] grant_tokens
@@ -1491,14 +1942,15 @@ module Aws::KMS
1491
1942
 
1492
1943
  # @!attribute [rw] ciphertext_blob
1493
1944
  # The encrypted copy of the data key. When you use the HTTP API or the
1494
- # AWS CLI, the value is Base64-encoded. Otherwise, it is not encoded.
1945
+ # AWS CLI, the value is Base64-encoded. Otherwise, it is not
1946
+ # Base64-encoded.
1495
1947
  # @return [String]
1496
1948
  #
1497
1949
  # @!attribute [rw] plaintext
1498
1950
  # The plaintext data key. When you use the HTTP API or the AWS CLI,
1499
- # the value is Base64-encoded. Otherwise, it is not encoded. Use this
1500
- # data key to encrypt your data outside of KMS. Then, remove it from
1501
- # memory as soon as possible.
1951
+ # the value is Base64-encoded. Otherwise, it is not Base64-encoded.
1952
+ # Use this data key to encrypt your data outside of KMS. Then, remove
1953
+ # it from memory as soon as possible.
1502
1954
  # @return [String]
1503
1955
  #
1504
1956
  # @!attribute [rw] key_id
@@ -1528,8 +1980,8 @@ module Aws::KMS
1528
1980
  # }
1529
1981
  #
1530
1982
  # @!attribute [rw] key_id
1531
- # The identifier of the customer master key (CMK) that encrypts the
1532
- # data key.
1983
+ # The identifier of the symmetric customer master key (CMK) that
1984
+ # encrypts the data key.
1533
1985
  #
1534
1986
  # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
1535
1987
  # name, or alias ARN. When using an alias name, prefix it with
@@ -1552,8 +2004,15 @@ module Aws::KMS
1552
2004
  # @return [String]
1553
2005
  #
1554
2006
  # @!attribute [rw] encryption_context
1555
- # A set of key-value pairs that represents additional authenticated
1556
- # data.
2007
+ # Specifies the encryption context that will be used when encrypting
2008
+ # the data key.
2009
+ #
2010
+ # An *encryption context* is a collection of non-secret key-value
2011
+ # pairs that represents additional authenticated data. When you use an
2012
+ # encryption context to encrypt data, you must specify the same (an
2013
+ # exact case-sensitive match) encryption context to decrypt the data.
2014
+ # An encryption context is optional when encrypting with a symmetric
2015
+ # CMK, but it is highly recommended.
1557
2016
  #
1558
2017
  # For more information, see [Encryption Context][1] in the *AWS Key
1559
2018
  # Management Service Developer Guide*.
@@ -1599,7 +2058,7 @@ module Aws::KMS
1599
2058
 
1600
2059
  # @!attribute [rw] ciphertext_blob
1601
2060
  # The encrypted data key. When you use the HTTP API or the AWS CLI,
1602
- # the value is Base64-encoded. Otherwise, it is not encoded.
2061
+ # the value is Base64-encoded. Otherwise, it is not Base64-encoded.
1603
2062
  # @return [String]
1604
2063
  #
1605
2064
  # @!attribute [rw] key_id
@@ -1646,7 +2105,7 @@ module Aws::KMS
1646
2105
 
1647
2106
  # @!attribute [rw] plaintext
1648
2107
  # The random byte string. When you use the HTTP API or the AWS CLI,
1649
- # the value is Base64-encoded. Otherwise, it is not encoded.
2108
+ # the value is Base64-encoded. Otherwise, it is not Base64-encoded.
1650
2109
  # @return [String]
1651
2110
  #
1652
2111
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandomResponse AWS API Documentation
@@ -1756,8 +2215,8 @@ module Aws::KMS
1756
2215
  # }
1757
2216
  #
1758
2217
  # @!attribute [rw] key_id
1759
- # The identifier of the CMK into which you will import key material.
1760
- # The CMK's `Origin` must be `EXTERNAL`.
2218
+ # The identifier of the symmetric CMK into which you will import key
2219
+ # material. The `Origin` of the CMK must be `EXTERNAL`.
1761
2220
  #
1762
2221
  # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
1763
2222
  #
@@ -1803,29 +2262,140 @@ module Aws::KMS
1803
2262
  # `GetParametersForImport` request.
1804
2263
  # @return [String]
1805
2264
  #
1806
- # @!attribute [rw] import_token
1807
- # The import token to send in a subsequent ImportKeyMaterial request.
2265
+ # @!attribute [rw] import_token
2266
+ # The import token to send in a subsequent ImportKeyMaterial request.
2267
+ # @return [String]
2268
+ #
2269
+ # @!attribute [rw] public_key
2270
+ # The public key to use to encrypt the key material before importing
2271
+ # it with ImportKeyMaterial.
2272
+ # @return [String]
2273
+ #
2274
+ # @!attribute [rw] parameters_valid_to
2275
+ # The time at which the import token and public key are no longer
2276
+ # valid. After this time, you cannot use them to make an
2277
+ # ImportKeyMaterial request and you must send another
2278
+ # `GetParametersForImport` request to get new ones.
2279
+ # @return [Time]
2280
+ #
2281
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetParametersForImportResponse AWS API Documentation
2282
+ #
2283
+ class GetParametersForImportResponse < Struct.new(
2284
+ :key_id,
2285
+ :import_token,
2286
+ :public_key,
2287
+ :parameters_valid_to)
2288
+ include Aws::Structure
2289
+ end
2290
+
2291
+ # @note When making an API call, you may pass GetPublicKeyRequest
2292
+ # data as a hash:
2293
+ #
2294
+ # {
2295
+ # key_id: "KeyIdType", # required
2296
+ # grant_tokens: ["GrantTokenType"],
2297
+ # }
2298
+ #
2299
+ # @!attribute [rw] key_id
2300
+ # Identifies the asymmetric CMK that includes the public key.
2301
+ #
2302
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
2303
+ # name, or alias ARN. When using an alias name, prefix it with
2304
+ # `"alias/"`. To specify a CMK in a different AWS account, you must
2305
+ # use the key ARN or alias ARN.
2306
+ #
2307
+ # For example:
2308
+ #
2309
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
2310
+ #
2311
+ # * Key ARN:
2312
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
2313
+ #
2314
+ # * Alias name: `alias/ExampleAlias`
2315
+ #
2316
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
2317
+ #
2318
+ # To get the key ID and key ARN for a CMK, use ListKeys or
2319
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
2320
+ # @return [String]
2321
+ #
2322
+ # @!attribute [rw] grant_tokens
2323
+ # A list of grant tokens.
2324
+ #
2325
+ # For more information, see [Grant Tokens][1] in the *AWS Key
2326
+ # Management Service Developer Guide*.
2327
+ #
2328
+ #
2329
+ #
2330
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
2331
+ # @return [Array<String>]
2332
+ #
2333
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKeyRequest AWS API Documentation
2334
+ #
2335
+ class GetPublicKeyRequest < Struct.new(
2336
+ :key_id,
2337
+ :grant_tokens)
2338
+ include Aws::Structure
2339
+ end
2340
+
2341
+ # @!attribute [rw] key_id
2342
+ # The identifier of the asymmetric CMK from which the public key was
2343
+ # downloaded.
2344
+ # @return [String]
2345
+ #
2346
+ # @!attribute [rw] public_key
2347
+ # The exported public key.
2348
+ #
2349
+ # This value is returned as a binary [Distinguished Encoding Rules][1]
2350
+ # (DER)-encoded object. To decode it, use an ASN.1 parsing tool, such
2351
+ # as [OpenSSL asn1parse][2].
2352
+ #
2353
+ #
2354
+ #
2355
+ # [1]: https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
2356
+ # [2]: https://www.openssl.org/docs/man1.0.2/man1/asn1parse.html
1808
2357
  # @return [String]
1809
2358
  #
1810
- # @!attribute [rw] public_key
1811
- # The public key to use to encrypt the key material before importing
1812
- # it with ImportKeyMaterial.
2359
+ # @!attribute [rw] customer_master_key_spec
2360
+ # The type of the of the public key that was downloaded.
1813
2361
  # @return [String]
1814
2362
  #
1815
- # @!attribute [rw] parameters_valid_to
1816
- # The time at which the import token and public key are no longer
1817
- # valid. After this time, you cannot use them to make an
1818
- # ImportKeyMaterial request and you must send another
1819
- # `GetParametersForImport` request to get new ones.
1820
- # @return [Time]
2363
+ # @!attribute [rw] key_usage
2364
+ # The permitted use of the public key. Valid values are
2365
+ # `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
1821
2366
  #
1822
- # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetParametersForImportResponse AWS API Documentation
2367
+ # This information is critical. If a public key with `SIGN_VERIFY` key
2368
+ # usage encrypts data outside of AWS KMS, the ciphertext cannot be
2369
+ # decrypted.
2370
+ # @return [String]
1823
2371
  #
1824
- class GetParametersForImportResponse < Struct.new(
2372
+ # @!attribute [rw] encryption_algorithms
2373
+ # The encryption algorithms that AWS KMS supports for this key.
2374
+ #
2375
+ # This information is critical. If a public key encrypts data outside
2376
+ # of AWS KMS by using an unsupported encryption algorithm, the
2377
+ # ciphertext cannot be decrypted.
2378
+ #
2379
+ # This field appears in the response only when the `KeyUsage` of the
2380
+ # public key is `ENCRYPT_DECRYPT`.
2381
+ # @return [Array<String>]
2382
+ #
2383
+ # @!attribute [rw] signing_algorithms
2384
+ # The signing algorithms that AWS KMS supports for this key.
2385
+ #
2386
+ # This field appears in the response only when the `KeyUsage` of the
2387
+ # public key is `SIGN_VERIFY`.
2388
+ # @return [Array<String>]
2389
+ #
2390
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKeyResponse AWS API Documentation
2391
+ #
2392
+ class GetPublicKeyResponse < Struct.new(
1825
2393
  :key_id,
1826
- :import_token,
1827
2394
  :public_key,
1828
- :parameters_valid_to)
2395
+ :customer_master_key_spec,
2396
+ :key_usage,
2397
+ :encryption_algorithms,
2398
+ :signing_algorithms)
1829
2399
  include Aws::Structure
1830
2400
  end
1831
2401
 
@@ -1974,8 +2544,10 @@ module Aws::KMS
1974
2544
  # }
1975
2545
  #
1976
2546
  # @!attribute [rw] key_id
1977
- # The identifier of the CMK to import the key material into. The
1978
- # CMK's `Origin` must be `EXTERNAL`.
2547
+ # The identifier of the symmetric CMK that receives the imported key
2548
+ # material. The CMK's `Origin` must be `EXTERNAL`. This must be the
2549
+ # same CMK specified in the `KeyID` parameter of the corresponding
2550
+ # GetParametersForImport request.
1979
2551
  #
1980
2552
  # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
1981
2553
  #
@@ -1998,10 +2570,10 @@ module Aws::KMS
1998
2570
  # @return [String]
1999
2571
  #
2000
2572
  # @!attribute [rw] encrypted_key_material
2001
- # The encrypted key material to import. It must be encrypted with the
2002
- # public key that you received in the response to a previous
2003
- # GetParametersForImport request, using the wrapping algorithm that
2004
- # you specified in that request.
2573
+ # The encrypted key material to import. The key material must be
2574
+ # encrypted with the public wrapping key that GetParametersForImport
2575
+ # returned, using the wrapping algorithm that you specified in the
2576
+ # same `GetParametersForImport` request.
2005
2577
  # @return [String]
2006
2578
  #
2007
2579
  # @!attribute [rw] valid_to
@@ -2035,9 +2607,24 @@ module Aws::KMS
2035
2607
  #
2036
2608
  class ImportKeyMaterialResponse < Aws::EmptyStructure; end
2037
2609
 
2038
- # The request was rejected because the provided key material is invalid
2039
- # or is not the same key material that was previously imported into this
2040
- # customer master key (CMK).
2610
+ # The request was rejected because the specified CMK cannot decrypt the
2611
+ # data. The `KeyId` in a Decrypt request and the `SourceKeyId` in a
2612
+ # ReEncrypt request must identify the same CMK that was used to encrypt
2613
+ # the ciphertext.
2614
+ #
2615
+ # @!attribute [rw] message
2616
+ # @return [String]
2617
+ #
2618
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/IncorrectKeyException AWS API Documentation
2619
+ #
2620
+ class IncorrectKeyException < Struct.new(
2621
+ :message)
2622
+ include Aws::Structure
2623
+ end
2624
+
2625
+ # The request was rejected because the key material in the request is,
2626
+ # expired, invalid, or is not the same key material that was previously
2627
+ # imported into this customer master key (CMK).
2041
2628
  #
2042
2629
  # @!attribute [rw] message
2043
2630
  # @return [String]
@@ -2096,10 +2683,13 @@ module Aws::KMS
2096
2683
  include Aws::Structure
2097
2684
  end
2098
2685
 
2099
- # The request was rejected because the specified ciphertext, or
2100
- # additional authenticated data incorporated into the ciphertext, such
2101
- # as the encryption context, is corrupted, missing, or otherwise
2102
- # invalid.
2686
+ # From the Decrypt or ReEncrypt operation, the request was rejected
2687
+ # because the specified ciphertext, or additional authenticated data
2688
+ # incorporated into the ciphertext, such as the encryption context, is
2689
+ # corrupted, missing, or otherwise invalid.
2690
+ #
2691
+ # From the ImportKeyMaterial operation, the request was rejected because
2692
+ # AWS KMS could not decrypt the encrypted (wrapped) key material.
2103
2693
  #
2104
2694
  # @!attribute [rw] message
2105
2695
  # @return [String]
@@ -2149,8 +2739,22 @@ module Aws::KMS
2149
2739
  include Aws::Structure
2150
2740
  end
2151
2741
 
2152
- # The request was rejected because the specified `KeySpec` value is not
2153
- # valid.
2742
+ # The request was rejected for one of the following reasons:
2743
+ #
2744
+ # * The `KeyUsage` value of the CMK is incompatible with the API
2745
+ # operation.
2746
+ #
2747
+ # * The encryption algorithm or signing algorithm specified for the
2748
+ # operation is incompatible with the type of key material in the CMK
2749
+ # `(CustomerMasterKeySpec`).
2750
+ #
2751
+ # For encrypting, decrypting, re-encrypting, and generating data keys,
2752
+ # the `KeyUsage` must be `ENCRYPT_DECRYPT`. For signing and verifying,
2753
+ # the `KeyUsage` must be `SIGN_VERIFY`. To find the `KeyUsage` of a CMK,
2754
+ # use the DescribeKey operation.
2755
+ #
2756
+ # To find the encryption or signing algorithms supported for a
2757
+ # particular CMK, use the DescribeKey operation.
2154
2758
  #
2155
2759
  # @!attribute [rw] message
2156
2760
  # @return [String]
@@ -2188,12 +2792,27 @@ module Aws::KMS
2188
2792
  include Aws::Structure
2189
2793
  end
2190
2794
 
2795
+ # The request was rejected because the signature verification failed.
2796
+ # Signature verification fails when it cannot confirm that signature was
2797
+ # produced by signing the specified message with the specified CMK and
2798
+ # signing algorithm.
2799
+ #
2800
+ # @!attribute [rw] message
2801
+ # @return [String]
2802
+ #
2803
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/KMSInvalidSignatureException AWS API Documentation
2804
+ #
2805
+ class KMSInvalidSignatureException < Struct.new(
2806
+ :message)
2807
+ include Aws::Structure
2808
+ end
2809
+
2191
2810
  # The request was rejected because the state of the specified resource
2192
2811
  # is not valid for this request.
2193
2812
  #
2194
2813
  # For more information about how key state affects the use of a CMK, see
2195
- # [How Key State Affects Use of a Customer Master Key][1] in the *AWS
2196
- # Key Management Service Developer Guide*.
2814
+ # [How Key State Affects Use of a Customer Master Key][1] in the <i>
2815
+ # <i>AWS Key Management Service Developer Guide</i> </i>.
2197
2816
  #
2198
2817
  #
2199
2818
  #
@@ -2264,9 +2883,7 @@ module Aws::KMS
2264
2883
  # @return [String]
2265
2884
  #
2266
2885
  # @!attribute [rw] key_usage
2267
- # The cryptographic operations for which you can use the CMK. The only
2268
- # valid value is `ENCRYPT_DECRYPT`, which means you can use the CMK to
2269
- # encrypt and decrypt data.
2886
+ # The cryptographic operations for which you can use the CMK.
2270
2887
  # @return [String]
2271
2888
  #
2272
2889
  # @!attribute [rw] key_state
@@ -2342,6 +2959,26 @@ module Aws::KMS
2342
2959
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys
2343
2960
  # @return [String]
2344
2961
  #
2962
+ # @!attribute [rw] customer_master_key_spec
2963
+ # Describes the type of key material in the CMK.
2964
+ # @return [String]
2965
+ #
2966
+ # @!attribute [rw] encryption_algorithms
2967
+ # A list of encryption algorithms that the CMK supports. You cannot
2968
+ # use the CMK with other encryption algorithms within AWS KMS.
2969
+ #
2970
+ # This field appears only when the `KeyUsage` of the CMK is
2971
+ # `ENCRYPT_DECRYPT`.
2972
+ # @return [Array<String>]
2973
+ #
2974
+ # @!attribute [rw] signing_algorithms
2975
+ # A list of signing algorithms that the CMK supports. You cannot use
2976
+ # the CMK with other signing algorithms within AWS KMS.
2977
+ #
2978
+ # This field appears only when the `KeyUsage` of the CMK is
2979
+ # `SIGN_VERIFY`.
2980
+ # @return [Array<String>]
2981
+ #
2345
2982
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/KeyMetadata AWS API Documentation
2346
2983
  #
2347
2984
  class KeyMetadata < Struct.new(
@@ -2359,12 +2996,15 @@ module Aws::KMS
2359
2996
  :custom_key_store_id,
2360
2997
  :cloud_hsm_cluster_id,
2361
2998
  :expiration_model,
2362
- :key_manager)
2999
+ :key_manager,
3000
+ :customer_master_key_spec,
3001
+ :encryption_algorithms,
3002
+ :signing_algorithms)
2363
3003
  include Aws::Structure
2364
3004
  end
2365
3005
 
2366
3006
  # The request was rejected because the specified CMK was not available.
2367
- # The request can be retried.
3007
+ # You can retry the request.
2368
3008
  #
2369
3009
  # @!attribute [rw] message
2370
3010
  # @return [String]
@@ -2929,10 +3569,13 @@ module Aws::KMS
2929
3569
  # source_encryption_context: {
2930
3570
  # "EncryptionContextKey" => "EncryptionContextValue",
2931
3571
  # },
3572
+ # source_key_id: "KeyIdType",
2932
3573
  # destination_key_id: "KeyIdType", # required
2933
3574
  # destination_encryption_context: {
2934
3575
  # "EncryptionContextKey" => "EncryptionContextValue",
2935
3576
  # },
3577
+ # source_encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
3578
+ # destination_encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
2936
3579
  # grant_tokens: ["GrantTokenType"],
2937
3580
  # }
2938
3581
  #
@@ -2941,12 +3584,64 @@ module Aws::KMS
2941
3584
  # @return [String]
2942
3585
  #
2943
3586
  # @!attribute [rw] source_encryption_context
2944
- # Encryption context used to encrypt and decrypt the data specified in
2945
- # the `CiphertextBlob` parameter.
3587
+ # Specifies the encryption context to use to decrypt the ciphertext.
3588
+ # Enter the same encryption context that was used to encrypt the
3589
+ # ciphertext.
3590
+ #
3591
+ # An *encryption context* is a collection of non-secret key-value
3592
+ # pairs that represents additional authenticated data. When you use an
3593
+ # encryption context to encrypt data, you must specify the same (an
3594
+ # exact case-sensitive match) encryption context to decrypt the data.
3595
+ # An encryption context is optional when encrypting with a symmetric
3596
+ # CMK, but it is highly recommended.
3597
+ #
3598
+ # For more information, see [Encryption Context][1] in the *AWS Key
3599
+ # Management Service Developer Guide*.
3600
+ #
3601
+ #
3602
+ #
3603
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
2946
3604
  # @return [Hash<String,String>]
2947
3605
  #
3606
+ # @!attribute [rw] source_key_id
3607
+ # A unique identifier for the CMK that is used to decrypt the
3608
+ # ciphertext before it reencrypts it using the destination CMK.
3609
+ #
3610
+ # This parameter is required only when the ciphertext was encrypted
3611
+ # under an asymmetric CMK. Otherwise, AWS KMS uses the metadata that
3612
+ # it adds to the ciphertext blob to determine which CMK was used to
3613
+ # encrypt the ciphertext. However, you can use this parameter to
3614
+ # ensure that a particular CMK (of any kind) is used to decrypt the
3615
+ # ciphertext before it is reencrypted.
3616
+ #
3617
+ # If you specify a `KeyId` value, the decrypt part of the `ReEncrypt`
3618
+ # operation succeeds only if the specified CMK was used to encrypt the
3619
+ # ciphertext.
3620
+ #
3621
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
3622
+ # name, or alias ARN. When using an alias name, prefix it with
3623
+ # `"alias/"`.
3624
+ #
3625
+ # For example:
3626
+ #
3627
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
3628
+ #
3629
+ # * Key ARN:
3630
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
3631
+ #
3632
+ # * Alias name: `alias/ExampleAlias`
3633
+ #
3634
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
3635
+ #
3636
+ # To get the key ID and key ARN for a CMK, use ListKeys or
3637
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
3638
+ # @return [String]
3639
+ #
2948
3640
  # @!attribute [rw] destination_key_id
2949
3641
  # A unique identifier for the CMK that is used to reencrypt the data.
3642
+ # Specify a symmetric or asymmetric CMK with a `KeyUsage` value of
3643
+ # `ENCRYPT_DECRYPT`. To find the `KeyUsage` value of a CMK, use the
3644
+ # DescribeKey operation.
2950
3645
  #
2951
3646
  # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
2952
3647
  # name, or alias ARN. When using an alias name, prefix it with
@@ -2969,9 +3664,51 @@ module Aws::KMS
2969
3664
  # @return [String]
2970
3665
  #
2971
3666
  # @!attribute [rw] destination_encryption_context
2972
- # Encryption context to use when the data is reencrypted.
3667
+ # Specifies that encryption context to use when the reencrypting the
3668
+ # data.
3669
+ #
3670
+ # A destination encryption context is valid only when the destination
3671
+ # CMK is a symmetric CMK. The standard ciphertext format for
3672
+ # asymmetric CMKs does not include fields for metadata.
3673
+ #
3674
+ # An *encryption context* is a collection of non-secret key-value
3675
+ # pairs that represents additional authenticated data. When you use an
3676
+ # encryption context to encrypt data, you must specify the same (an
3677
+ # exact case-sensitive match) encryption context to decrypt the data.
3678
+ # An encryption context is optional when encrypting with a symmetric
3679
+ # CMK, but it is highly recommended.
3680
+ #
3681
+ # For more information, see [Encryption Context][1] in the *AWS Key
3682
+ # Management Service Developer Guide*.
3683
+ #
3684
+ #
3685
+ #
3686
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
2973
3687
  # @return [Hash<String,String>]
2974
3688
  #
3689
+ # @!attribute [rw] source_encryption_algorithm
3690
+ # Specifies the encryption algorithm that AWS KMS will use to decrypt
3691
+ # the ciphertext before it is reencrypted. The default value,
3692
+ # `SYMMETRIC_DEFAULT`, represents the algorithm used for symmetric
3693
+ # CMKs.
3694
+ #
3695
+ # Specify the same algorithm that was used to encrypt the ciphertext.
3696
+ # If you specify a different algorithm, the decrypt attempt fails.
3697
+ #
3698
+ # This parameter is required only when the ciphertext was encrypted
3699
+ # under an asymmetric CMK.
3700
+ # @return [String]
3701
+ #
3702
+ # @!attribute [rw] destination_encryption_algorithm
3703
+ # Specifies the encryption algorithm that AWS KMS will use to reecrypt
3704
+ # the data after it has decrypted it. The default value,
3705
+ # `SYMMETRIC_DEFAULT`, represents the encryption algorithm used for
3706
+ # symmetric CMKs.
3707
+ #
3708
+ # This parameter is required only when the destination CMK is an
3709
+ # asymmetric CMK.
3710
+ # @return [String]
3711
+ #
2975
3712
  # @!attribute [rw] grant_tokens
2976
3713
  # A list of grant tokens.
2977
3714
  #
@@ -2988,15 +3725,18 @@ module Aws::KMS
2988
3725
  class ReEncryptRequest < Struct.new(
2989
3726
  :ciphertext_blob,
2990
3727
  :source_encryption_context,
3728
+ :source_key_id,
2991
3729
  :destination_key_id,
2992
3730
  :destination_encryption_context,
3731
+ :source_encryption_algorithm,
3732
+ :destination_encryption_algorithm,
2993
3733
  :grant_tokens)
2994
3734
  include Aws::Structure
2995
3735
  end
2996
3736
 
2997
3737
  # @!attribute [rw] ciphertext_blob
2998
3738
  # The reencrypted data. When you use the HTTP API or the AWS CLI, the
2999
- # value is Base64-encoded. Otherwise, it is not encoded.
3739
+ # value is Base64-encoded. Otherwise, it is not Base64-encoded.
3000
3740
  # @return [String]
3001
3741
  #
3002
3742
  # @!attribute [rw] source_key_id
@@ -3007,12 +3747,23 @@ module Aws::KMS
3007
3747
  # Unique identifier of the CMK used to reencrypt the data.
3008
3748
  # @return [String]
3009
3749
  #
3750
+ # @!attribute [rw] source_encryption_algorithm
3751
+ # The encryption algorithm that was used to decrypt the ciphertext
3752
+ # before it was reencrypted.
3753
+ # @return [String]
3754
+ #
3755
+ # @!attribute [rw] destination_encryption_algorithm
3756
+ # The encryption algorithm that was used to reencrypt the data.
3757
+ # @return [String]
3758
+ #
3010
3759
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReEncryptResponse AWS API Documentation
3011
3760
  #
3012
3761
  class ReEncryptResponse < Struct.new(
3013
3762
  :ciphertext_blob,
3014
3763
  :source_key_id,
3015
- :key_id)
3764
+ :key_id,
3765
+ :source_encryption_algorithm,
3766
+ :destination_encryption_algorithm)
3016
3767
  include Aws::Structure
3017
3768
  end
3018
3769
 
@@ -3151,6 +3902,108 @@ module Aws::KMS
3151
3902
  include Aws::Structure
3152
3903
  end
3153
3904
 
3905
+ # @note When making an API call, you may pass SignRequest
3906
+ # data as a hash:
3907
+ #
3908
+ # {
3909
+ # key_id: "KeyIdType", # required
3910
+ # message: "data", # required
3911
+ # message_type: "RAW", # accepts RAW, DIGEST
3912
+ # grant_tokens: ["GrantTokenType"],
3913
+ # signing_algorithm: "RSASSA_PSS_SHA_256", # required, accepts RSASSA_PSS_SHA_256, RSASSA_PSS_SHA_384, RSASSA_PSS_SHA_512, RSASSA_PKCS1_V1_5_SHA_256, RSASSA_PKCS1_V1_5_SHA_384, RSASSA_PKCS1_V1_5_SHA_512, ECDSA_SHA_256, ECDSA_SHA_384, ECDSA_SHA_512
3914
+ # }
3915
+ #
3916
+ # @!attribute [rw] key_id
3917
+ # Identifies an asymmetric CMK. AWS KMS uses the private key in the
3918
+ # asymmetric CMK to sign the message. The `KeyUsage` type of the CMK
3919
+ # must be `SIGN_VERIFY`. To find the `KeyUsage` of a CMK, use the
3920
+ # DescribeKey operation.
3921
+ #
3922
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
3923
+ # name, or alias ARN. When using an alias name, prefix it with
3924
+ # `"alias/"`. To specify a CMK in a different AWS account, you must
3925
+ # use the key ARN or alias ARN.
3926
+ #
3927
+ # For example:
3928
+ #
3929
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
3930
+ #
3931
+ # * Key ARN:
3932
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
3933
+ #
3934
+ # * Alias name: `alias/ExampleAlias`
3935
+ #
3936
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
3937
+ #
3938
+ # To get the key ID and key ARN for a CMK, use ListKeys or
3939
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
3940
+ # @return [String]
3941
+ #
3942
+ # @!attribute [rw] message
3943
+ # Specifies the message or message digest to sign. Messages can be
3944
+ # 0-4096 bytes. To sign a larger message, provide the message digest.
3945
+ #
3946
+ # If you provide a message, AWS KMS generates a hash digest of the
3947
+ # message and then signs it.
3948
+ # @return [String]
3949
+ #
3950
+ # @!attribute [rw] message_type
3951
+ # Tells AWS KMS whether the value of the `Message` parameter is a
3952
+ # message or message digest. To indicate a message, enter `RAW`. To
3953
+ # indicate a message digest, enter `DIGEST`.
3954
+ # @return [String]
3955
+ #
3956
+ # @!attribute [rw] grant_tokens
3957
+ # A list of grant tokens.
3958
+ #
3959
+ # For more information, see [Grant Tokens][1] in the *AWS Key
3960
+ # Management Service Developer Guide*.
3961
+ #
3962
+ #
3963
+ #
3964
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
3965
+ # @return [Array<String>]
3966
+ #
3967
+ # @!attribute [rw] signing_algorithm
3968
+ # Specifies the signing algorithm to use when signing the message.
3969
+ #
3970
+ # Choose an algorithm that is compatible with the type and size of the
3971
+ # specified asymmetric CMK.
3972
+ # @return [String]
3973
+ #
3974
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/SignRequest AWS API Documentation
3975
+ #
3976
+ class SignRequest < Struct.new(
3977
+ :key_id,
3978
+ :message,
3979
+ :message_type,
3980
+ :grant_tokens,
3981
+ :signing_algorithm)
3982
+ include Aws::Structure
3983
+ end
3984
+
3985
+ # @!attribute [rw] key_id
3986
+ # The Amazon Resource Name (ARN) of the asymmetric CMK that was used
3987
+ # to sign the message.
3988
+ # @return [String]
3989
+ #
3990
+ # @!attribute [rw] signature
3991
+ # The cryptographic signature that was generated for the message.
3992
+ # @return [String]
3993
+ #
3994
+ # @!attribute [rw] signing_algorithm
3995
+ # The signing algorithm that was used to sign the message.
3996
+ # @return [String]
3997
+ #
3998
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/SignResponse AWS API Documentation
3999
+ #
4000
+ class SignResponse < Struct.new(
4001
+ :key_id,
4002
+ :signature,
4003
+ :signing_algorithm)
4004
+ include Aws::Structure
4005
+ end
4006
+
3154
4007
  # A key-value pair. A tag consists of a tag key and a tag value. Tag
3155
4008
  # keys and tag values are both required, but tag values can be empty
3156
4009
  # (null) strings.
@@ -3298,15 +4151,20 @@ module Aws::KMS
3298
4151
  # }
3299
4152
  #
3300
4153
  # @!attribute [rw] alias_name
3301
- # Specifies the name of the alias to change. This value must begin
4154
+ # Identifies the alias that is changing its CMK. This value must begin
3302
4155
  # with `alias/` followed by the alias name, such as
3303
- # `alias/ExampleAlias`.
4156
+ # `alias/ExampleAlias`. You cannot use UpdateAlias to change the alias
4157
+ # name.
3304
4158
  # @return [String]
3305
4159
  #
3306
4160
  # @!attribute [rw] target_key_id
3307
- # Unique identifier of the customer master key (CMK) to be mapped to
3308
- # the alias. When the update operation completes, the alias will point
3309
- # to this CMK.
4161
+ # Identifies the CMK to associate with the alias. When the update
4162
+ # operation completes, the alias will point to this CMK.
4163
+ #
4164
+ # The CMK must be in the same AWS account and Region as the alias.
4165
+ # Also, the new target CMK must be the same type as the current target
4166
+ # CMK (both symmetric or both asymmetric) and they must have the same
4167
+ # key usage.
3310
4168
  #
3311
4169
  # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
3312
4170
  #
@@ -3431,5 +4289,116 @@ module Aws::KMS
3431
4289
  include Aws::Structure
3432
4290
  end
3433
4291
 
4292
+ # @note When making an API call, you may pass VerifyRequest
4293
+ # data as a hash:
4294
+ #
4295
+ # {
4296
+ # key_id: "KeyIdType", # required
4297
+ # message: "data", # required
4298
+ # message_type: "RAW", # accepts RAW, DIGEST
4299
+ # signature: "data", # required
4300
+ # signing_algorithm: "RSASSA_PSS_SHA_256", # required, accepts RSASSA_PSS_SHA_256, RSASSA_PSS_SHA_384, RSASSA_PSS_SHA_512, RSASSA_PKCS1_V1_5_SHA_256, RSASSA_PKCS1_V1_5_SHA_384, RSASSA_PKCS1_V1_5_SHA_512, ECDSA_SHA_256, ECDSA_SHA_384, ECDSA_SHA_512
4301
+ # grant_tokens: ["GrantTokenType"],
4302
+ # }
4303
+ #
4304
+ # @!attribute [rw] key_id
4305
+ # Identifies the asymmetric CMK that will be used to verify the
4306
+ # signature. This must be the same CMK that was used to generate the
4307
+ # signature. If you specify a different CMK, the signature
4308
+ # verification fails.
4309
+ #
4310
+ # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
4311
+ # name, or alias ARN. When using an alias name, prefix it with
4312
+ # `"alias/"`. To specify a CMK in a different AWS account, you must
4313
+ # use the key ARN or alias ARN.
4314
+ #
4315
+ # For example:
4316
+ #
4317
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
4318
+ #
4319
+ # * Key ARN:
4320
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
4321
+ #
4322
+ # * Alias name: `alias/ExampleAlias`
4323
+ #
4324
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
4325
+ #
4326
+ # To get the key ID and key ARN for a CMK, use ListKeys or
4327
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
4328
+ # @return [String]
4329
+ #
4330
+ # @!attribute [rw] message
4331
+ # Specifies the message that was signed, or a hash digest of that
4332
+ # message. Messages can be 0-4096 bytes. To verify a larger message,
4333
+ # provide a hash digest of the message.
4334
+ #
4335
+ # If the digest of the message specified here is different from the
4336
+ # message digest that was signed, the signature verification fails.
4337
+ # @return [String]
4338
+ #
4339
+ # @!attribute [rw] message_type
4340
+ # Tells AWS KMS whether the value of the `Message` parameter is a
4341
+ # message or message digest. To indicate a message, enter `RAW`. To
4342
+ # indicate a message digest, enter `DIGEST`.
4343
+ # @return [String]
4344
+ #
4345
+ # @!attribute [rw] signature
4346
+ # The signature that the `Sign` operation generated.
4347
+ # @return [String]
4348
+ #
4349
+ # @!attribute [rw] signing_algorithm
4350
+ # The signing algorithm that was used to sign the message. If you
4351
+ # submit a different algorithm, the signature verification fails.
4352
+ # @return [String]
4353
+ #
4354
+ # @!attribute [rw] grant_tokens
4355
+ # A list of grant tokens.
4356
+ #
4357
+ # For more information, see [Grant Tokens][1] in the *AWS Key
4358
+ # Management Service Developer Guide*.
4359
+ #
4360
+ #
4361
+ #
4362
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
4363
+ # @return [Array<String>]
4364
+ #
4365
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/VerifyRequest AWS API Documentation
4366
+ #
4367
+ class VerifyRequest < Struct.new(
4368
+ :key_id,
4369
+ :message,
4370
+ :message_type,
4371
+ :signature,
4372
+ :signing_algorithm,
4373
+ :grant_tokens)
4374
+ include Aws::Structure
4375
+ end
4376
+
4377
+ # @!attribute [rw] key_id
4378
+ # The unique identifier for the asymmetric CMK that was used to verify
4379
+ # the signature.
4380
+ # @return [String]
4381
+ #
4382
+ # @!attribute [rw] signature_valid
4383
+ # A Boolean value that indicates whether the signature was verified. A
4384
+ # value of `True` indicates that the `Signature` was produced by
4385
+ # signing the `Message` with the specified `KeyID` and
4386
+ # `SigningAlgorithm.` If the signature is not verified, the `Verify`
4387
+ # operation fails with a `KMSInvalidSignatureException` exception.
4388
+ # @return [Boolean]
4389
+ #
4390
+ # @!attribute [rw] signing_algorithm
4391
+ # The signing algorithm that was used to verify the signature.
4392
+ # @return [String]
4393
+ #
4394
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/VerifyResponse AWS API Documentation
4395
+ #
4396
+ class VerifyResponse < Struct.new(
4397
+ :key_id,
4398
+ :signature_valid,
4399
+ :signing_algorithm)
4400
+ include Aws::Structure
4401
+ end
4402
+
3434
4403
  end
3435
4404
  end