aws-sdk-kms 1.23.0 → 1.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-kms.rb +1 -1
- data/lib/aws-sdk-kms/client.rb +1687 -372
- data/lib/aws-sdk-kms/client_api.rb +193 -0
- data/lib/aws-sdk-kms/errors.rb +32 -0
- data/lib/aws-sdk-kms/types.rb +1132 -118
- metadata +4 -4
@@ -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
|
data/lib/aws-sdk-kms/errors.rb
CHANGED
@@ -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
|
data/lib/aws-sdk-kms/types.rb
CHANGED
@@ -324,6 +324,9 @@ module Aws::KMS
|
|
324
324
|
# in the specified AWS CloudHSM cluster. AWS KMS logs into the cluster
|
325
325
|
# as this user to manage key material on your behalf.
|
326
326
|
#
|
327
|
+
# The password must be a string of 7 to 32 characters. Its value is
|
328
|
+
# case sensitive.
|
329
|
+
#
|
327
330
|
# This parameter tells AWS KMS the `kmsuser` account password; it does
|
328
331
|
# not change the password in the AWS CloudHSM cluster.
|
329
332
|
#
|
@@ -360,7 +363,7 @@ module Aws::KMS
|
|
360
363
|
# key_id: "KeyIdType", # required
|
361
364
|
# grantee_principal: "PrincipalIdType", # required
|
362
365
|
# retiring_principal: "PrincipalIdType",
|
363
|
-
# operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, CreateGrant, RetireGrant, DescribeKey
|
366
|
+
# operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext
|
364
367
|
# constraints: {
|
365
368
|
# encryption_context_subset: {
|
366
369
|
# "EncryptionContextKey" => "EncryptionContextValue",
|
@@ -515,7 +518,8 @@ module Aws::KMS
|
|
515
518
|
# {
|
516
519
|
# policy: "PolicyType",
|
517
520
|
# description: "DescriptionType",
|
518
|
-
# key_usage: "
|
521
|
+
# key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT
|
522
|
+
# 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
523
|
# origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM
|
520
524
|
# custom_key_store_id: "CustomKeyStoreIdType",
|
521
525
|
# bypass_policy_lockout_safety_check: false,
|
@@ -554,7 +558,7 @@ module Aws::KMS
|
|
554
558
|
# policy to the CMK. For more information, see [Default Key Policy][3]
|
555
559
|
# in the *AWS Key Management Service Developer Guide*.
|
556
560
|
#
|
557
|
-
# The key policy size
|
561
|
+
# The key policy size quota is 32 kilobytes (32768 bytes).
|
558
562
|
#
|
559
563
|
#
|
560
564
|
#
|
@@ -571,28 +575,101 @@ module Aws::KMS
|
|
571
575
|
# @return [String]
|
572
576
|
#
|
573
577
|
# @!attribute [rw] key_usage
|
574
|
-
#
|
575
|
-
#
|
576
|
-
#
|
578
|
+
# Determines the cryptographic operations for which you can use the
|
579
|
+
# CMK. The default value is `ENCRYPT_DECRYPT`. This parameter is
|
580
|
+
# required only for asymmetric CMKs. You can't change the `KeyUsage`
|
581
|
+
# value after the CMK is created.
|
582
|
+
#
|
583
|
+
# Select only one valid value.
|
584
|
+
#
|
585
|
+
# * For symmetric CMKs, omit the parameter or specify
|
586
|
+
# `ENCRYPT_DECRYPT`.
|
587
|
+
#
|
588
|
+
# * For asymmetric CMKs with RSA key material, specify
|
589
|
+
# `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
|
590
|
+
#
|
591
|
+
# * For asymmetric CMKs with ECC key material, specify `SIGN_VERIFY`.
|
592
|
+
# @return [String]
|
593
|
+
#
|
594
|
+
# @!attribute [rw] customer_master_key_spec
|
595
|
+
# Specifies the type of CMK to create. The default value,
|
596
|
+
# `SYMMETRIC_DEFAULT`, creates a CMK with a 256-bit symmetric key for
|
597
|
+
# encryption and decryption. For help choosing a key spec for your
|
598
|
+
# CMK, see [How to Choose Your CMK Configuration][1] in the *AWS Key
|
599
|
+
# Management Service Developer Guide*.
|
600
|
+
#
|
601
|
+
# The `CustomerMasterKeySpec` determines whether the CMK contains a
|
602
|
+
# symmetric key or an asymmetric key pair. It also determines the
|
603
|
+
# encryption algorithms or signing algorithms that the CMK supports.
|
604
|
+
# You can't change the `CustomerMasterKeySpec` after the CMK is
|
605
|
+
# created. To further restrict the algorithms that can be used with
|
606
|
+
# the CMK, use a condition key in its key policy or IAM policy. For
|
607
|
+
# more information, see [kms:EncryptionAlgorithm][2] or [kms:Signing
|
608
|
+
# Algorithm][3] in the *AWS Key Management Service Developer Guide*.
|
609
|
+
#
|
610
|
+
# [AWS services that are integrated with AWS KMS][4] use symmetric
|
611
|
+
# CMKs to protect your data. These services do not support asymmetric
|
612
|
+
# CMKs. For help determining whether a CMK is symmetric or asymmetric,
|
613
|
+
# see [Identifying Symmetric and Asymmetric CMKs][5] in the *AWS Key
|
614
|
+
# Management Service Developer Guide*.
|
615
|
+
#
|
616
|
+
# AWS KMS supports the following key specs for CMKs:
|
617
|
+
#
|
618
|
+
# * Symmetric key (default)
|
619
|
+
#
|
620
|
+
# * `SYMMETRIC_DEFAULT` (AES-256-GCM)
|
621
|
+
#
|
622
|
+
# ^
|
623
|
+
#
|
624
|
+
# * Asymmetric RSA key pairs
|
625
|
+
#
|
626
|
+
# * `RSA_2048`
|
627
|
+
#
|
628
|
+
# * `RSA_3072`
|
629
|
+
#
|
630
|
+
# * `RSA_4096`
|
631
|
+
#
|
632
|
+
# * Asymmetric NIST-recommended elliptic curve key pairs
|
633
|
+
#
|
634
|
+
# * `ECC_NIST_P256` (secp256r1)
|
635
|
+
#
|
636
|
+
# * `ECC_NIST_P384` (secp384r1)
|
637
|
+
#
|
638
|
+
# * `ECC_NIST_P521` (secp521r1)
|
639
|
+
#
|
640
|
+
# * Other asymmetric elliptic curve key pairs
|
641
|
+
#
|
642
|
+
# * `ECC_SECG_P256K1` (secp256k1), commonly used for
|
643
|
+
# cryptocurrencies.
|
644
|
+
#
|
645
|
+
# ^
|
646
|
+
#
|
647
|
+
#
|
648
|
+
#
|
649
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html
|
650
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm
|
651
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-signing-algorithm
|
652
|
+
# [4]: http://aws.amazon.com/kms/features/#AWS_Service_Integration
|
653
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html
|
577
654
|
# @return [String]
|
578
655
|
#
|
579
656
|
# @!attribute [rw] origin
|
580
657
|
# 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.
|
658
|
+
# origin after you create the CMK. The default is `AWS_KMS`, which
|
659
|
+
# means AWS KMS creates the key material.
|
585
660
|
#
|
586
661
|
# When the parameter value is `EXTERNAL`, AWS KMS creates a CMK
|
587
662
|
# without key material so that you can import key material from your
|
588
663
|
# existing key management infrastructure. For more information about
|
589
664
|
# importing key material into AWS KMS, see [Importing Key Material][1]
|
590
|
-
# in the *AWS Key Management Service Developer Guide*.
|
665
|
+
# in the *AWS Key Management Service Developer Guide*. This value is
|
666
|
+
# valid only for symmetric CMKs.
|
591
667
|
#
|
592
668
|
# When the parameter value is `AWS_CLOUDHSM`, AWS KMS creates the CMK
|
593
669
|
# in an AWS KMS [custom key store][2] and creates its key material in
|
594
670
|
# the associated AWS CloudHSM cluster. You must also use the
|
595
|
-
# `CustomKeyStoreId` parameter to identify the custom key store.
|
671
|
+
# `CustomKeyStoreId` parameter to identify the custom key store. This
|
672
|
+
# value is valid only for symmetric CMKs.
|
596
673
|
#
|
597
674
|
#
|
598
675
|
#
|
@@ -608,6 +685,9 @@ module Aws::KMS
|
|
608
685
|
# associated with the custom key store must have at least two active
|
609
686
|
# HSMs, each in a different Availability Zone in the Region.
|
610
687
|
#
|
688
|
+
# This parameter is valid only for symmetric CMKs. You cannot create
|
689
|
+
# an asymmetric CMK in a custom key store.
|
690
|
+
#
|
611
691
|
# To find the ID of a custom key store, use the
|
612
692
|
# DescribeCustomKeyStores operation.
|
613
693
|
#
|
@@ -648,12 +728,20 @@ module Aws::KMS
|
|
648
728
|
#
|
649
729
|
# @!attribute [rw] tags
|
650
730
|
# One or more tags. Each tag consists of a tag key and a tag value.
|
651
|
-
#
|
652
|
-
# empty (null)
|
731
|
+
# Both the tag key and the tag value are required, but the tag value
|
732
|
+
# can be an empty (null) string.
|
733
|
+
#
|
734
|
+
# When you add tags to an AWS resource, AWS generates a cost
|
735
|
+
# allocation report with usage and costs aggregated by tags. For
|
736
|
+
# information about adding, changing, deleting and listing tags for
|
737
|
+
# CMKs, see [Tagging Keys][1].
|
738
|
+
#
|
739
|
+
# Use this parameter to tag the CMK when it is created. To add tags to
|
740
|
+
# an existing CMK, use the TagResource operation.
|
741
|
+
#
|
742
|
+
#
|
653
743
|
#
|
654
|
-
#
|
655
|
-
# you can omit this parameter and instead tag the CMK after it is
|
656
|
-
# created using TagResource.
|
744
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
|
657
745
|
# @return [Array<Types::Tag>]
|
658
746
|
#
|
659
747
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKeyRequest AWS API Documentation
|
@@ -662,6 +750,7 @@ module Aws::KMS
|
|
662
750
|
:policy,
|
663
751
|
:description,
|
664
752
|
:key_usage,
|
753
|
+
:customer_master_key_spec,
|
665
754
|
:origin,
|
666
755
|
:custom_key_store_id,
|
667
756
|
:bypass_policy_lockout_safety_check,
|
@@ -791,9 +880,10 @@ module Aws::KMS
|
|
791
880
|
# AWS CloudHSM cluster is active and contains at least one active HSM.
|
792
881
|
#
|
793
882
|
# A value of `FAILED` indicates that an attempt to connect was
|
794
|
-
# unsuccessful.
|
795
|
-
#
|
796
|
-
#
|
883
|
+
# unsuccessful. The `ConnectionErrorCode` field in the response
|
884
|
+
# indicates the cause of the failure. For help resolving a connection
|
885
|
+
# failure, see [Troubleshooting a Custom Key Store][1] in the *AWS Key
|
886
|
+
# Management Service Developer Guide*.
|
797
887
|
#
|
798
888
|
#
|
799
889
|
#
|
@@ -801,7 +891,12 @@ module Aws::KMS
|
|
801
891
|
# @return [String]
|
802
892
|
#
|
803
893
|
# @!attribute [rw] connection_error_code
|
804
|
-
# Describes the connection error.
|
894
|
+
# Describes the connection error. This field appears in the response
|
895
|
+
# only when the `ConnectionState` is `FAILED`. For help resolving
|
896
|
+
# these errors, see [How to Fix a Connection Failure][1] in *AWS Key
|
897
|
+
# Management Service Developer Guide*.
|
898
|
+
#
|
899
|
+
# Valid values are:
|
805
900
|
#
|
806
901
|
# * `CLUSTER_NOT_FOUND` - AWS KMS cannot find the AWS CloudHSM cluster
|
807
902
|
# with the specified cluster ID.
|
@@ -817,7 +912,10 @@ module Aws::KMS
|
|
817
912
|
# again.
|
818
913
|
#
|
819
914
|
# * `INVALID_CREDENTIALS` - AWS KMS does not have the correct password
|
820
|
-
# for the `kmsuser` crypto user in the AWS CloudHSM cluster.
|
915
|
+
# for the `kmsuser` crypto user in the AWS CloudHSM cluster. Before
|
916
|
+
# you can connect your custom key store to its AWS CloudHSM cluster,
|
917
|
+
# you must change the `kmsuser` account password and update the key
|
918
|
+
# store password value for the custom key store.
|
821
919
|
#
|
822
920
|
# * `NETWORK_ERRORS` - Network errors are preventing AWS KMS from
|
823
921
|
# connecting to the custom key store.
|
@@ -826,14 +924,28 @@ module Aws::KMS
|
|
826
924
|
# associated AWS CloudHSM cluster due to too many failed password
|
827
925
|
# attempts. Before you can connect your custom key store to its AWS
|
828
926
|
# CloudHSM cluster, you must change the `kmsuser` account password
|
829
|
-
# and update the password value for the custom key store.
|
927
|
+
# and update the key store password value for the custom key store.
|
830
928
|
#
|
831
|
-
#
|
832
|
-
#
|
929
|
+
# * `USER_LOGGED_IN` - The `kmsuser` CU account is logged into the the
|
930
|
+
# associated AWS CloudHSM cluster. This prevents AWS KMS from
|
931
|
+
# rotating the `kmsuser` account password and logging into the
|
932
|
+
# cluster. Before you can connect your custom key store to its AWS
|
933
|
+
# CloudHSM cluster, you must log the `kmsuser` CU out of the
|
934
|
+
# cluster. If you changed the `kmsuser` password to log into the
|
935
|
+
# cluster, you must also and update the key store password value for
|
936
|
+
# the custom key store. For help, see [How to Log Out and
|
937
|
+
# Reconnect][2] in the *AWS Key Management Service Developer Guide*.
|
833
938
|
#
|
939
|
+
# * `USER_NOT_FOUND` - AWS KMS cannot find a `kmsuser` CU account in
|
940
|
+
# the associated AWS CloudHSM cluster. Before you can connect your
|
941
|
+
# custom key store to its AWS CloudHSM cluster, you must create a
|
942
|
+
# `kmsuser` CU account in the cluster, and then update the key store
|
943
|
+
# password value for the custom key store.
|
834
944
|
#
|
835
945
|
#
|
836
|
-
#
|
946
|
+
#
|
947
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed
|
948
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#login-kmsuser-2
|
837
949
|
# @return [String]
|
838
950
|
#
|
839
951
|
# @!attribute [rw] creation_date
|
@@ -862,6 +974,8 @@ module Aws::KMS
|
|
862
974
|
# "EncryptionContextKey" => "EncryptionContextValue",
|
863
975
|
# },
|
864
976
|
# grant_tokens: ["GrantTokenType"],
|
977
|
+
# key_id: "KeyIdType",
|
978
|
+
# encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
|
865
979
|
# }
|
866
980
|
#
|
867
981
|
# @!attribute [rw] ciphertext_blob
|
@@ -869,9 +983,20 @@ module Aws::KMS
|
|
869
983
|
# @return [String]
|
870
984
|
#
|
871
985
|
# @!attribute [rw] encryption_context
|
872
|
-
#
|
873
|
-
#
|
874
|
-
#
|
986
|
+
# Specifies the encryption context to use when decrypting the data. An
|
987
|
+
# encryption context is valid only for cryptographic operations with a
|
988
|
+
# symmetric CMK. The standard asymmetric encryption algorithms that
|
989
|
+
# AWS KMS uses do not support an encryption context.
|
990
|
+
#
|
991
|
+
# An *encryption context* is a collection of non-secret key-value
|
992
|
+
# pairs that represents additional authenticated data. When you use an
|
993
|
+
# encryption context to encrypt data, you must specify the same (an
|
994
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
995
|
+
# An encryption context is optional when encrypting with a symmetric
|
996
|
+
# CMK, but it is highly recommended.
|
997
|
+
#
|
998
|
+
# For more information, see [Encryption Context][1] in the *AWS Key
|
999
|
+
# Management Service Developer Guide*.
|
875
1000
|
#
|
876
1001
|
#
|
877
1002
|
#
|
@@ -889,30 +1014,83 @@ module Aws::KMS
|
|
889
1014
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
|
890
1015
|
# @return [Array<String>]
|
891
1016
|
#
|
1017
|
+
# @!attribute [rw] key_id
|
1018
|
+
# Specifies the customer master key (CMK) that AWS KMS will use to
|
1019
|
+
# decrypt the ciphertext. Enter a key ID of the CMK that was used to
|
1020
|
+
# encrypt the ciphertext.
|
1021
|
+
#
|
1022
|
+
# If you specify a `KeyId` value, the `Decrypt` operation succeeds
|
1023
|
+
# only if the specified CMK was used to encrypt the ciphertext.
|
1024
|
+
#
|
1025
|
+
# This parameter is required only when the ciphertext was encrypted
|
1026
|
+
# under an asymmetric CMK. Otherwise, AWS KMS uses the metadata that
|
1027
|
+
# it adds to the ciphertext blob to determine which CMK was used to
|
1028
|
+
# encrypt the ciphertext. However, you can use this parameter to
|
1029
|
+
# ensure that a particular CMK (of any kind) is used to decrypt the
|
1030
|
+
# ciphertext.
|
1031
|
+
#
|
1032
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
1033
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
1034
|
+
# `"alias/"`.
|
1035
|
+
#
|
1036
|
+
# For example:
|
1037
|
+
#
|
1038
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
1039
|
+
#
|
1040
|
+
# * Key ARN:
|
1041
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
1042
|
+
#
|
1043
|
+
# * Alias name: `alias/ExampleAlias`
|
1044
|
+
#
|
1045
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
1046
|
+
#
|
1047
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
1048
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
1049
|
+
# @return [String]
|
1050
|
+
#
|
1051
|
+
# @!attribute [rw] encryption_algorithm
|
1052
|
+
# Specifies the encryption algorithm that will be used to decrypt the
|
1053
|
+
# ciphertext. Specify the same algorithm that was used to encrypt the
|
1054
|
+
# data. If you specify a different algorithm, the `Decrypt` operation
|
1055
|
+
# fails.
|
1056
|
+
#
|
1057
|
+
# This parameter is required only when the ciphertext was encrypted
|
1058
|
+
# under an asymmetric CMK. The default value, `SYMMETRIC_DEFAULT`,
|
1059
|
+
# represents the only supported algorithm that is valid for symmetric
|
1060
|
+
# CMKs.
|
1061
|
+
# @return [String]
|
1062
|
+
#
|
892
1063
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DecryptRequest AWS API Documentation
|
893
1064
|
#
|
894
1065
|
class DecryptRequest < Struct.new(
|
895
1066
|
:ciphertext_blob,
|
896
1067
|
:encryption_context,
|
897
|
-
:grant_tokens
|
1068
|
+
:grant_tokens,
|
1069
|
+
:key_id,
|
1070
|
+
:encryption_algorithm)
|
898
1071
|
include Aws::Structure
|
899
1072
|
end
|
900
1073
|
|
901
1074
|
# @!attribute [rw] key_id
|
902
|
-
# ARN of the key used to perform the
|
903
|
-
#
|
1075
|
+
# The ARN of the customer master key that was used to perform the
|
1076
|
+
# decryption.
|
904
1077
|
# @return [String]
|
905
1078
|
#
|
906
1079
|
# @!attribute [rw] plaintext
|
907
1080
|
# Decrypted plaintext data. When you use the HTTP API or the AWS CLI,
|
908
|
-
# the value is Base64-encoded. Otherwise, it is not encoded.
|
1081
|
+
# the value is Base64-encoded. Otherwise, it is not Base64-encoded.
|
1082
|
+
# @return [String]
|
1083
|
+
#
|
1084
|
+
# @!attribute [rw] encryption_algorithm
|
1085
|
+
# The encryption algorithm that was used to decrypt the ciphertext.
|
909
1086
|
# @return [String]
|
910
1087
|
#
|
911
1088
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DecryptResponse AWS API Documentation
|
912
1089
|
#
|
913
1090
|
class DecryptResponse < Struct.new(
|
914
1091
|
:key_id,
|
915
|
-
:plaintext
|
1092
|
+
:plaintext,
|
1093
|
+
:encryption_algorithm)
|
916
1094
|
include Aws::Structure
|
917
1095
|
end
|
918
1096
|
|
@@ -1186,7 +1364,9 @@ module Aws::KMS
|
|
1186
1364
|
# }
|
1187
1365
|
#
|
1188
1366
|
# @!attribute [rw] key_id
|
1189
|
-
#
|
1367
|
+
# Identifies a symmetric customer master key (CMK). You cannot enable
|
1368
|
+
# automatic rotation of [asymmetric CMKs][1], CMKs with [imported key
|
1369
|
+
# material][2], or CMKs in a [custom key store][3].
|
1190
1370
|
#
|
1191
1371
|
# Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
|
1192
1372
|
#
|
@@ -1199,6 +1379,12 @@ module Aws::KMS
|
|
1199
1379
|
#
|
1200
1380
|
# To get the key ID and key ARN for a CMK, use ListKeys or
|
1201
1381
|
# DescribeKey.
|
1382
|
+
#
|
1383
|
+
#
|
1384
|
+
#
|
1385
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks
|
1386
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
|
1387
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
1202
1388
|
# @return [String]
|
1203
1389
|
#
|
1204
1390
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKeyRotationRequest AWS API Documentation
|
@@ -1282,7 +1468,9 @@ module Aws::KMS
|
|
1282
1468
|
# }
|
1283
1469
|
#
|
1284
1470
|
# @!attribute [rw] key_id
|
1285
|
-
#
|
1471
|
+
# Identifies a symmetric customer master key (CMK). You cannot enable
|
1472
|
+
# automatic rotation of asymmetric CMKs, CMKs with imported key
|
1473
|
+
# material, or CMKs in a [custom key store][1].
|
1286
1474
|
#
|
1287
1475
|
# Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
|
1288
1476
|
#
|
@@ -1295,6 +1483,10 @@ module Aws::KMS
|
|
1295
1483
|
#
|
1296
1484
|
# To get the key ID and key ARN for a CMK, use ListKeys or
|
1297
1485
|
# DescribeKey.
|
1486
|
+
#
|
1487
|
+
#
|
1488
|
+
#
|
1489
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
1298
1490
|
# @return [String]
|
1299
1491
|
#
|
1300
1492
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKeyRotationRequest AWS API Documentation
|
@@ -1314,6 +1506,7 @@ module Aws::KMS
|
|
1314
1506
|
# "EncryptionContextKey" => "EncryptionContextValue",
|
1315
1507
|
# },
|
1316
1508
|
# grant_tokens: ["GrantTokenType"],
|
1509
|
+
# encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
|
1317
1510
|
# }
|
1318
1511
|
#
|
1319
1512
|
# @!attribute [rw] key_id
|
@@ -1344,10 +1537,20 @@ module Aws::KMS
|
|
1344
1537
|
# @return [String]
|
1345
1538
|
#
|
1346
1539
|
# @!attribute [rw] encryption_context
|
1347
|
-
#
|
1348
|
-
#
|
1349
|
-
#
|
1350
|
-
#
|
1540
|
+
# Specifies the encryption context that will be used to encrypt the
|
1541
|
+
# data. An encryption context is valid only for cryptographic
|
1542
|
+
# operations with a symmetric CMK. The standard asymmetric encryption
|
1543
|
+
# algorithms that AWS KMS uses do not support an encryption context.
|
1544
|
+
#
|
1545
|
+
# An *encryption context* is a collection of non-secret key-value
|
1546
|
+
# pairs that represents additional authenticated data. When you use an
|
1547
|
+
# encryption context to encrypt data, you must specify the same (an
|
1548
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
1549
|
+
# An encryption context is optional when encrypting with a symmetric
|
1550
|
+
# CMK, but it is highly recommended.
|
1551
|
+
#
|
1552
|
+
# For more information, see [Encryption Context][1] in the *AWS Key
|
1553
|
+
# Management Service Developer Guide*.
|
1351
1554
|
#
|
1352
1555
|
#
|
1353
1556
|
#
|
@@ -1365,37 +1568,54 @@ module Aws::KMS
|
|
1365
1568
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
|
1366
1569
|
# @return [Array<String>]
|
1367
1570
|
#
|
1571
|
+
# @!attribute [rw] encryption_algorithm
|
1572
|
+
# Specifies the encryption algorithm that AWS KMS will use to encrypt
|
1573
|
+
# the plaintext message. The algorithm must be compatible with the CMK
|
1574
|
+
# that you specify.
|
1575
|
+
#
|
1576
|
+
# This parameter is required only for asymmetric CMKs. The default
|
1577
|
+
# value, `SYMMETRIC_DEFAULT`, is the algorithm used for symmetric
|
1578
|
+
# CMKs. If you are using an asymmetric CMK, we recommend
|
1579
|
+
# RSAES\_OAEP\_SHA\_256.
|
1580
|
+
# @return [String]
|
1581
|
+
#
|
1368
1582
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EncryptRequest AWS API Documentation
|
1369
1583
|
#
|
1370
1584
|
class EncryptRequest < Struct.new(
|
1371
1585
|
:key_id,
|
1372
1586
|
:plaintext,
|
1373
1587
|
:encryption_context,
|
1374
|
-
:grant_tokens
|
1588
|
+
:grant_tokens,
|
1589
|
+
:encryption_algorithm)
|
1375
1590
|
include Aws::Structure
|
1376
1591
|
end
|
1377
1592
|
|
1378
1593
|
# @!attribute [rw] ciphertext_blob
|
1379
1594
|
# The encrypted plaintext. When you use the HTTP API or the AWS CLI,
|
1380
|
-
# the value is Base64-encoded. Otherwise, it is not encoded.
|
1595
|
+
# the value is Base64-encoded. Otherwise, it is not Base64-encoded.
|
1381
1596
|
# @return [String]
|
1382
1597
|
#
|
1383
1598
|
# @!attribute [rw] key_id
|
1384
1599
|
# The ID of the key used during encryption.
|
1385
1600
|
# @return [String]
|
1386
1601
|
#
|
1602
|
+
# @!attribute [rw] encryption_algorithm
|
1603
|
+
# The encryption algorithm that was used to encrypt the plaintext.
|
1604
|
+
# @return [String]
|
1605
|
+
#
|
1387
1606
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EncryptResponse AWS API Documentation
|
1388
1607
|
#
|
1389
1608
|
class EncryptResponse < Struct.new(
|
1390
1609
|
:ciphertext_blob,
|
1391
|
-
:key_id
|
1610
|
+
:key_id,
|
1611
|
+
:encryption_algorithm)
|
1392
1612
|
include Aws::Structure
|
1393
1613
|
end
|
1394
1614
|
|
1395
|
-
# The request was rejected because the
|
1396
|
-
# Use GetParametersForImport to get a new import token and
|
1397
|
-
# use the new public key to encrypt the key material, and
|
1398
|
-
# request again.
|
1615
|
+
# The request was rejected because the specified import token is
|
1616
|
+
# expired. Use GetParametersForImport to get a new import token and
|
1617
|
+
# public key, use the new public key to encrypt the key material, and
|
1618
|
+
# then try the request again.
|
1399
1619
|
#
|
1400
1620
|
# @!attribute [rw] message
|
1401
1621
|
# @return [String]
|
@@ -1407,6 +1627,259 @@ module Aws::KMS
|
|
1407
1627
|
include Aws::Structure
|
1408
1628
|
end
|
1409
1629
|
|
1630
|
+
# @note When making an API call, you may pass GenerateDataKeyPairRequest
|
1631
|
+
# data as a hash:
|
1632
|
+
#
|
1633
|
+
# {
|
1634
|
+
# encryption_context: {
|
1635
|
+
# "EncryptionContextKey" => "EncryptionContextValue",
|
1636
|
+
# },
|
1637
|
+
# key_id: "KeyIdType", # required
|
1638
|
+
# 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
|
1639
|
+
# grant_tokens: ["GrantTokenType"],
|
1640
|
+
# }
|
1641
|
+
#
|
1642
|
+
# @!attribute [rw] encryption_context
|
1643
|
+
# Specifies the encryption context that will be used when encrypting
|
1644
|
+
# the private key in the data key pair.
|
1645
|
+
#
|
1646
|
+
# An *encryption context* is a collection of non-secret key-value
|
1647
|
+
# pairs that represents additional authenticated data. When you use an
|
1648
|
+
# encryption context to encrypt data, you must specify the same (an
|
1649
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
1650
|
+
# An encryption context is optional when encrypting with a symmetric
|
1651
|
+
# CMK, but it is highly recommended.
|
1652
|
+
#
|
1653
|
+
# For more information, see [Encryption Context][1] in the *AWS Key
|
1654
|
+
# Management Service Developer Guide*.
|
1655
|
+
#
|
1656
|
+
#
|
1657
|
+
#
|
1658
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
|
1659
|
+
# @return [Hash<String,String>]
|
1660
|
+
#
|
1661
|
+
# @!attribute [rw] key_id
|
1662
|
+
# Specifies the symmetric CMK that encrypts the private key in the
|
1663
|
+
# data key pair. You cannot specify an asymmetric CMKs.
|
1664
|
+
#
|
1665
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
1666
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
1667
|
+
# `"alias/"`. To specify a CMK in a different AWS account, you must
|
1668
|
+
# use the key ARN or alias ARN.
|
1669
|
+
#
|
1670
|
+
# For example:
|
1671
|
+
#
|
1672
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
1673
|
+
#
|
1674
|
+
# * Key ARN:
|
1675
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
1676
|
+
#
|
1677
|
+
# * Alias name: `alias/ExampleAlias`
|
1678
|
+
#
|
1679
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
1680
|
+
#
|
1681
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
1682
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
1683
|
+
# @return [String]
|
1684
|
+
#
|
1685
|
+
# @!attribute [rw] key_pair_spec
|
1686
|
+
# Determines the type of data key pair that is generated.
|
1687
|
+
#
|
1688
|
+
# The AWS KMS rule that restricts the use of asymmetric RSA CMKs to
|
1689
|
+
# encrypt and decrypt or to sign and verify (but not both), and the
|
1690
|
+
# rule that permits you to use ECC CMKs only to sign and verify, are
|
1691
|
+
# not effective outside of AWS KMS.
|
1692
|
+
# @return [String]
|
1693
|
+
#
|
1694
|
+
# @!attribute [rw] grant_tokens
|
1695
|
+
# A list of grant tokens.
|
1696
|
+
#
|
1697
|
+
# For more information, see [Grant Tokens][1] in the *AWS Key
|
1698
|
+
# Management Service Developer Guide*.
|
1699
|
+
#
|
1700
|
+
#
|
1701
|
+
#
|
1702
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
|
1703
|
+
# @return [Array<String>]
|
1704
|
+
#
|
1705
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairRequest AWS API Documentation
|
1706
|
+
#
|
1707
|
+
class GenerateDataKeyPairRequest < Struct.new(
|
1708
|
+
:encryption_context,
|
1709
|
+
:key_id,
|
1710
|
+
:key_pair_spec,
|
1711
|
+
:grant_tokens)
|
1712
|
+
include Aws::Structure
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
# @!attribute [rw] private_key_ciphertext_blob
|
1716
|
+
# The encrypted copy of the private key. When you use the HTTP API or
|
1717
|
+
# the AWS CLI, the value is Base64-encoded. Otherwise, it is not
|
1718
|
+
# Base64-encoded.
|
1719
|
+
# @return [String]
|
1720
|
+
#
|
1721
|
+
# @!attribute [rw] private_key_plaintext
|
1722
|
+
# The plaintext copy of the private key. When you use the HTTP API or
|
1723
|
+
# the AWS CLI, the value is Base64-encoded. Otherwise, it is not
|
1724
|
+
# Base64-encoded.
|
1725
|
+
# @return [String]
|
1726
|
+
#
|
1727
|
+
# @!attribute [rw] public_key
|
1728
|
+
# The public key (in plaintext).
|
1729
|
+
# @return [String]
|
1730
|
+
#
|
1731
|
+
# @!attribute [rw] key_id
|
1732
|
+
# The identifier of the CMK that encrypted the private key.
|
1733
|
+
# @return [String]
|
1734
|
+
#
|
1735
|
+
# @!attribute [rw] key_pair_spec
|
1736
|
+
# The type of data key pair that was generated.
|
1737
|
+
# @return [String]
|
1738
|
+
#
|
1739
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairResponse AWS API Documentation
|
1740
|
+
#
|
1741
|
+
class GenerateDataKeyPairResponse < Struct.new(
|
1742
|
+
:private_key_ciphertext_blob,
|
1743
|
+
:private_key_plaintext,
|
1744
|
+
:public_key,
|
1745
|
+
:key_id,
|
1746
|
+
:key_pair_spec)
|
1747
|
+
include Aws::Structure
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
# @note When making an API call, you may pass GenerateDataKeyPairWithoutPlaintextRequest
|
1751
|
+
# data as a hash:
|
1752
|
+
#
|
1753
|
+
# {
|
1754
|
+
# encryption_context: {
|
1755
|
+
# "EncryptionContextKey" => "EncryptionContextValue",
|
1756
|
+
# },
|
1757
|
+
# key_id: "KeyIdType", # required
|
1758
|
+
# 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
|
1759
|
+
# grant_tokens: ["GrantTokenType"],
|
1760
|
+
# }
|
1761
|
+
#
|
1762
|
+
# @!attribute [rw] encryption_context
|
1763
|
+
# Specifies the encryption context that will be used when encrypting
|
1764
|
+
# the private key in the data key pair.
|
1765
|
+
#
|
1766
|
+
# An *encryption context* is a collection of non-secret key-value
|
1767
|
+
# pairs that represents additional authenticated data. When you use an
|
1768
|
+
# encryption context to encrypt data, you must specify the same (an
|
1769
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
1770
|
+
# An encryption context is optional when encrypting with a symmetric
|
1771
|
+
# CMK, but it is highly recommended.
|
1772
|
+
#
|
1773
|
+
# For more information, see [Encryption Context][1] in the *AWS Key
|
1774
|
+
# Management Service Developer Guide*.
|
1775
|
+
#
|
1776
|
+
#
|
1777
|
+
#
|
1778
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
|
1779
|
+
# @return [Hash<String,String>]
|
1780
|
+
#
|
1781
|
+
# @!attribute [rw] key_id
|
1782
|
+
# Specifies the CMK that encrypts the private key in the data key
|
1783
|
+
# pair. You must specify a symmetric CMK. You cannot use an asymmetric
|
1784
|
+
# CMK. To get the type of your CMK, use the DescribeKey operation.
|
1785
|
+
#
|
1786
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
1787
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
1788
|
+
# `"alias/"`.
|
1789
|
+
#
|
1790
|
+
# For example:
|
1791
|
+
#
|
1792
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
1793
|
+
#
|
1794
|
+
# * Key ARN:
|
1795
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
1796
|
+
#
|
1797
|
+
# * Alias name: `alias/ExampleAlias`
|
1798
|
+
#
|
1799
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
1800
|
+
#
|
1801
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
1802
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
1803
|
+
# @return [String]
|
1804
|
+
#
|
1805
|
+
# @!attribute [rw] key_pair_spec
|
1806
|
+
# Determines the type of data key pair that is generated.
|
1807
|
+
#
|
1808
|
+
# The AWS KMS rule that restricts the use of asymmetric RSA CMKs to
|
1809
|
+
# encrypt and decrypt or to sign and verify (but not both), and the
|
1810
|
+
# rule that permits you to use ECC CMKs only to sign and verify, are
|
1811
|
+
# not effective outside of AWS KMS.
|
1812
|
+
# @return [String]
|
1813
|
+
#
|
1814
|
+
# @!attribute [rw] grant_tokens
|
1815
|
+
# A list of grant tokens.
|
1816
|
+
#
|
1817
|
+
# For more information, see [Grant Tokens][1] in the *AWS Key
|
1818
|
+
# Management Service Developer Guide*.
|
1819
|
+
#
|
1820
|
+
#
|
1821
|
+
#
|
1822
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
|
1823
|
+
# @return [Array<String>]
|
1824
|
+
#
|
1825
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairWithoutPlaintextRequest AWS API Documentation
|
1826
|
+
#
|
1827
|
+
class GenerateDataKeyPairWithoutPlaintextRequest < Struct.new(
|
1828
|
+
:encryption_context,
|
1829
|
+
:key_id,
|
1830
|
+
:key_pair_spec,
|
1831
|
+
:grant_tokens)
|
1832
|
+
include Aws::Structure
|
1833
|
+
end
|
1834
|
+
|
1835
|
+
# @!attribute [rw] private_key_ciphertext_blob
|
1836
|
+
# The encrypted copy of the private key. When you use the HTTP API or
|
1837
|
+
# the AWS CLI, the value is Base64-encoded. Otherwise, it is not
|
1838
|
+
# Base64-encoded.
|
1839
|
+
# @return [String]
|
1840
|
+
#
|
1841
|
+
# @!attribute [rw] public_key
|
1842
|
+
# The public key (in plaintext).
|
1843
|
+
# @return [String]
|
1844
|
+
#
|
1845
|
+
# @!attribute [rw] key_id
|
1846
|
+
# Specifies the CMK that encrypted the private key in the data key
|
1847
|
+
# pair. You must specify a symmetric CMK. You cannot use an asymmetric
|
1848
|
+
# CMK. To get the type of your CMK, use the DescribeKey operation.
|
1849
|
+
#
|
1850
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
1851
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
1852
|
+
# `"alias/"`.
|
1853
|
+
#
|
1854
|
+
# For example:
|
1855
|
+
#
|
1856
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
1857
|
+
#
|
1858
|
+
# * Key ARN:
|
1859
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
1860
|
+
#
|
1861
|
+
# * Alias name: `alias/ExampleAlias`
|
1862
|
+
#
|
1863
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
1864
|
+
#
|
1865
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
1866
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
1867
|
+
# @return [String]
|
1868
|
+
#
|
1869
|
+
# @!attribute [rw] key_pair_spec
|
1870
|
+
# The type of data key pair that was generated.
|
1871
|
+
# @return [String]
|
1872
|
+
#
|
1873
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairWithoutPlaintextResponse AWS API Documentation
|
1874
|
+
#
|
1875
|
+
class GenerateDataKeyPairWithoutPlaintextResponse < Struct.new(
|
1876
|
+
:private_key_ciphertext_blob,
|
1877
|
+
:public_key,
|
1878
|
+
:key_id,
|
1879
|
+
:key_pair_spec)
|
1880
|
+
include Aws::Structure
|
1881
|
+
end
|
1882
|
+
|
1410
1883
|
# @note When making an API call, you may pass GenerateDataKeyRequest
|
1411
1884
|
# data as a hash:
|
1412
1885
|
#
|
@@ -1421,7 +1894,7 @@ module Aws::KMS
|
|
1421
1894
|
# }
|
1422
1895
|
#
|
1423
1896
|
# @!attribute [rw] key_id
|
1424
|
-
#
|
1897
|
+
# Identifies the symmetric CMK that encrypts the data key.
|
1425
1898
|
#
|
1426
1899
|
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
1427
1900
|
# name, or alias ARN. When using an alias name, prefix it with
|
@@ -1444,8 +1917,15 @@ module Aws::KMS
|
|
1444
1917
|
# @return [String]
|
1445
1918
|
#
|
1446
1919
|
# @!attribute [rw] encryption_context
|
1447
|
-
#
|
1448
|
-
# data.
|
1920
|
+
# Specifies the encryption context that will be used when encrypting
|
1921
|
+
# the data key.
|
1922
|
+
#
|
1923
|
+
# An *encryption context* is a collection of non-secret key-value
|
1924
|
+
# pairs that represents additional authenticated data. When you use an
|
1925
|
+
# encryption context to encrypt data, you must specify the same (an
|
1926
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
1927
|
+
# An encryption context is optional when encrypting with a symmetric
|
1928
|
+
# CMK, but it is highly recommended.
|
1449
1929
|
#
|
1450
1930
|
# For more information, see [Encryption Context][1] in the *AWS Key
|
1451
1931
|
# Management Service Developer Guide*.
|
@@ -1456,15 +1936,22 @@ module Aws::KMS
|
|
1456
1936
|
# @return [Hash<String,String>]
|
1457
1937
|
#
|
1458
1938
|
# @!attribute [rw] number_of_bytes
|
1459
|
-
#
|
1460
|
-
# to generate a 512-bit data key (64 bytes is 512 bits). For
|
1461
|
-
#
|
1462
|
-
#
|
1939
|
+
# Specifies the length of the data key in bytes. For example, use the
|
1940
|
+
# value 64 to generate a 512-bit data key (64 bytes is 512 bits). For
|
1941
|
+
# 128-bit (16-byte) and 256-bit (32-byte) data keys, use the `KeySpec`
|
1942
|
+
# parameter.
|
1943
|
+
#
|
1944
|
+
# You must specify either the `KeySpec` or the `NumberOfBytes`
|
1945
|
+
# parameter (but not both) in every `GenerateDataKey` request.
|
1463
1946
|
# @return [Integer]
|
1464
1947
|
#
|
1465
1948
|
# @!attribute [rw] key_spec
|
1466
|
-
#
|
1467
|
-
# symmetric key, or `AES_256` to generate a 256-bit symmetric
|
1949
|
+
# Specifies the length of the data key. Use `AES_128` to generate a
|
1950
|
+
# 128-bit symmetric key, or `AES_256` to generate a 256-bit symmetric
|
1951
|
+
# key.
|
1952
|
+
#
|
1953
|
+
# You must specify either the `KeySpec` or the `NumberOfBytes`
|
1954
|
+
# parameter (but not both) in every `GenerateDataKey` request.
|
1468
1955
|
# @return [String]
|
1469
1956
|
#
|
1470
1957
|
# @!attribute [rw] grant_tokens
|
@@ -1491,14 +1978,15 @@ module Aws::KMS
|
|
1491
1978
|
|
1492
1979
|
# @!attribute [rw] ciphertext_blob
|
1493
1980
|
# 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
|
1981
|
+
# AWS CLI, the value is Base64-encoded. Otherwise, it is not
|
1982
|
+
# Base64-encoded.
|
1495
1983
|
# @return [String]
|
1496
1984
|
#
|
1497
1985
|
# @!attribute [rw] plaintext
|
1498
1986
|
# 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.
|
1500
|
-
# data key to encrypt your data outside of KMS. Then, remove
|
1501
|
-
# memory as soon as possible.
|
1987
|
+
# the value is Base64-encoded. Otherwise, it is not Base64-encoded.
|
1988
|
+
# Use this data key to encrypt your data outside of KMS. Then, remove
|
1989
|
+
# it from memory as soon as possible.
|
1502
1990
|
# @return [String]
|
1503
1991
|
#
|
1504
1992
|
# @!attribute [rw] key_id
|
@@ -1528,8 +2016,8 @@ module Aws::KMS
|
|
1528
2016
|
# }
|
1529
2017
|
#
|
1530
2018
|
# @!attribute [rw] key_id
|
1531
|
-
# The identifier of the customer master key (CMK) that
|
1532
|
-
# data key.
|
2019
|
+
# The identifier of the symmetric customer master key (CMK) that
|
2020
|
+
# encrypts the data key.
|
1533
2021
|
#
|
1534
2022
|
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
1535
2023
|
# name, or alias ARN. When using an alias name, prefix it with
|
@@ -1552,8 +2040,15 @@ module Aws::KMS
|
|
1552
2040
|
# @return [String]
|
1553
2041
|
#
|
1554
2042
|
# @!attribute [rw] encryption_context
|
1555
|
-
#
|
1556
|
-
# data.
|
2043
|
+
# Specifies the encryption context that will be used when encrypting
|
2044
|
+
# the data key.
|
2045
|
+
#
|
2046
|
+
# An *encryption context* is a collection of non-secret key-value
|
2047
|
+
# pairs that represents additional authenticated data. When you use an
|
2048
|
+
# encryption context to encrypt data, you must specify the same (an
|
2049
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
2050
|
+
# An encryption context is optional when encrypting with a symmetric
|
2051
|
+
# CMK, but it is highly recommended.
|
1557
2052
|
#
|
1558
2053
|
# For more information, see [Encryption Context][1] in the *AWS Key
|
1559
2054
|
# Management Service Developer Guide*.
|
@@ -1599,7 +2094,7 @@ module Aws::KMS
|
|
1599
2094
|
|
1600
2095
|
# @!attribute [rw] ciphertext_blob
|
1601
2096
|
# 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.
|
2097
|
+
# the value is Base64-encoded. Otherwise, it is not Base64-encoded.
|
1603
2098
|
# @return [String]
|
1604
2099
|
#
|
1605
2100
|
# @!attribute [rw] key_id
|
@@ -1646,7 +2141,7 @@ module Aws::KMS
|
|
1646
2141
|
|
1647
2142
|
# @!attribute [rw] plaintext
|
1648
2143
|
# 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.
|
2144
|
+
# the value is Base64-encoded. Otherwise, it is not Base64-encoded.
|
1650
2145
|
# @return [String]
|
1651
2146
|
#
|
1652
2147
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandomResponse AWS API Documentation
|
@@ -1756,8 +2251,8 @@ module Aws::KMS
|
|
1756
2251
|
# }
|
1757
2252
|
#
|
1758
2253
|
# @!attribute [rw] key_id
|
1759
|
-
# The identifier of the CMK into which you will import key
|
1760
|
-
# The
|
2254
|
+
# The identifier of the symmetric CMK into which you will import key
|
2255
|
+
# material. The `Origin` of the CMK must be `EXTERNAL`.
|
1761
2256
|
#
|
1762
2257
|
# Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
|
1763
2258
|
#
|
@@ -1803,29 +2298,140 @@ module Aws::KMS
|
|
1803
2298
|
# `GetParametersForImport` request.
|
1804
2299
|
# @return [String]
|
1805
2300
|
#
|
1806
|
-
# @!attribute [rw] import_token
|
1807
|
-
# The import token to send in a subsequent ImportKeyMaterial request.
|
2301
|
+
# @!attribute [rw] import_token
|
2302
|
+
# The import token to send in a subsequent ImportKeyMaterial request.
|
2303
|
+
# @return [String]
|
2304
|
+
#
|
2305
|
+
# @!attribute [rw] public_key
|
2306
|
+
# The public key to use to encrypt the key material before importing
|
2307
|
+
# it with ImportKeyMaterial.
|
2308
|
+
# @return [String]
|
2309
|
+
#
|
2310
|
+
# @!attribute [rw] parameters_valid_to
|
2311
|
+
# The time at which the import token and public key are no longer
|
2312
|
+
# valid. After this time, you cannot use them to make an
|
2313
|
+
# ImportKeyMaterial request and you must send another
|
2314
|
+
# `GetParametersForImport` request to get new ones.
|
2315
|
+
# @return [Time]
|
2316
|
+
#
|
2317
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetParametersForImportResponse AWS API Documentation
|
2318
|
+
#
|
2319
|
+
class GetParametersForImportResponse < Struct.new(
|
2320
|
+
:key_id,
|
2321
|
+
:import_token,
|
2322
|
+
:public_key,
|
2323
|
+
:parameters_valid_to)
|
2324
|
+
include Aws::Structure
|
2325
|
+
end
|
2326
|
+
|
2327
|
+
# @note When making an API call, you may pass GetPublicKeyRequest
|
2328
|
+
# data as a hash:
|
2329
|
+
#
|
2330
|
+
# {
|
2331
|
+
# key_id: "KeyIdType", # required
|
2332
|
+
# grant_tokens: ["GrantTokenType"],
|
2333
|
+
# }
|
2334
|
+
#
|
2335
|
+
# @!attribute [rw] key_id
|
2336
|
+
# Identifies the asymmetric CMK that includes the public key.
|
2337
|
+
#
|
2338
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
2339
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
2340
|
+
# `"alias/"`. To specify a CMK in a different AWS account, you must
|
2341
|
+
# use the key ARN or alias ARN.
|
2342
|
+
#
|
2343
|
+
# For example:
|
2344
|
+
#
|
2345
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
2346
|
+
#
|
2347
|
+
# * Key ARN:
|
2348
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
2349
|
+
#
|
2350
|
+
# * Alias name: `alias/ExampleAlias`
|
2351
|
+
#
|
2352
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
2353
|
+
#
|
2354
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
2355
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
2356
|
+
# @return [String]
|
2357
|
+
#
|
2358
|
+
# @!attribute [rw] grant_tokens
|
2359
|
+
# A list of grant tokens.
|
2360
|
+
#
|
2361
|
+
# For more information, see [Grant Tokens][1] in the *AWS Key
|
2362
|
+
# Management Service Developer Guide*.
|
2363
|
+
#
|
2364
|
+
#
|
2365
|
+
#
|
2366
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
|
2367
|
+
# @return [Array<String>]
|
2368
|
+
#
|
2369
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKeyRequest AWS API Documentation
|
2370
|
+
#
|
2371
|
+
class GetPublicKeyRequest < Struct.new(
|
2372
|
+
:key_id,
|
2373
|
+
:grant_tokens)
|
2374
|
+
include Aws::Structure
|
2375
|
+
end
|
2376
|
+
|
2377
|
+
# @!attribute [rw] key_id
|
2378
|
+
# The identifier of the asymmetric CMK from which the public key was
|
2379
|
+
# downloaded.
|
2380
|
+
# @return [String]
|
2381
|
+
#
|
2382
|
+
# @!attribute [rw] public_key
|
2383
|
+
# The exported public key.
|
2384
|
+
#
|
2385
|
+
# This value is returned as a binary [Distinguished Encoding Rules][1]
|
2386
|
+
# (DER)-encoded object. To decode it, use an ASN.1 parsing tool, such
|
2387
|
+
# as [OpenSSL asn1parse][2].
|
2388
|
+
#
|
2389
|
+
#
|
2390
|
+
#
|
2391
|
+
# [1]: https://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
|
2392
|
+
# [2]: https://www.openssl.org/docs/man1.0.2/man1/asn1parse.html
|
1808
2393
|
# @return [String]
|
1809
2394
|
#
|
1810
|
-
# @!attribute [rw]
|
1811
|
-
# The
|
1812
|
-
# it with ImportKeyMaterial.
|
2395
|
+
# @!attribute [rw] customer_master_key_spec
|
2396
|
+
# The type of the of the public key that was downloaded.
|
1813
2397
|
# @return [String]
|
1814
2398
|
#
|
1815
|
-
# @!attribute [rw]
|
1816
|
-
# The
|
1817
|
-
#
|
1818
|
-
# ImportKeyMaterial request and you must send another
|
1819
|
-
# `GetParametersForImport` request to get new ones.
|
1820
|
-
# @return [Time]
|
2399
|
+
# @!attribute [rw] key_usage
|
2400
|
+
# The permitted use of the public key. Valid values are
|
2401
|
+
# `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
|
1821
2402
|
#
|
1822
|
-
#
|
2403
|
+
# This information is critical. If a public key with `SIGN_VERIFY` key
|
2404
|
+
# usage encrypts data outside of AWS KMS, the ciphertext cannot be
|
2405
|
+
# decrypted.
|
2406
|
+
# @return [String]
|
1823
2407
|
#
|
1824
|
-
|
2408
|
+
# @!attribute [rw] encryption_algorithms
|
2409
|
+
# The encryption algorithms that AWS KMS supports for this key.
|
2410
|
+
#
|
2411
|
+
# This information is critical. If a public key encrypts data outside
|
2412
|
+
# of AWS KMS by using an unsupported encryption algorithm, the
|
2413
|
+
# ciphertext cannot be decrypted.
|
2414
|
+
#
|
2415
|
+
# This field appears in the response only when the `KeyUsage` of the
|
2416
|
+
# public key is `ENCRYPT_DECRYPT`.
|
2417
|
+
# @return [Array<String>]
|
2418
|
+
#
|
2419
|
+
# @!attribute [rw] signing_algorithms
|
2420
|
+
# The signing algorithms that AWS KMS supports for this key.
|
2421
|
+
#
|
2422
|
+
# This field appears in the response only when the `KeyUsage` of the
|
2423
|
+
# public key is `SIGN_VERIFY`.
|
2424
|
+
# @return [Array<String>]
|
2425
|
+
#
|
2426
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKeyResponse AWS API Documentation
|
2427
|
+
#
|
2428
|
+
class GetPublicKeyResponse < Struct.new(
|
1825
2429
|
:key_id,
|
1826
|
-
:import_token,
|
1827
2430
|
:public_key,
|
1828
|
-
:
|
2431
|
+
:customer_master_key_spec,
|
2432
|
+
:key_usage,
|
2433
|
+
:encryption_algorithms,
|
2434
|
+
:signing_algorithms)
|
1829
2435
|
include Aws::Structure
|
1830
2436
|
end
|
1831
2437
|
|
@@ -1974,8 +2580,10 @@ module Aws::KMS
|
|
1974
2580
|
# }
|
1975
2581
|
#
|
1976
2582
|
# @!attribute [rw] key_id
|
1977
|
-
# The identifier of the CMK
|
1978
|
-
# CMK's `Origin` must be `EXTERNAL`.
|
2583
|
+
# The identifier of the symmetric CMK that receives the imported key
|
2584
|
+
# material. The CMK's `Origin` must be `EXTERNAL`. This must be the
|
2585
|
+
# same CMK specified in the `KeyID` parameter of the corresponding
|
2586
|
+
# GetParametersForImport request.
|
1979
2587
|
#
|
1980
2588
|
# Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
|
1981
2589
|
#
|
@@ -1998,10 +2606,10 @@ module Aws::KMS
|
|
1998
2606
|
# @return [String]
|
1999
2607
|
#
|
2000
2608
|
# @!attribute [rw] encrypted_key_material
|
2001
|
-
# The encrypted key material to import.
|
2002
|
-
#
|
2003
|
-
#
|
2004
|
-
#
|
2609
|
+
# The encrypted key material to import. The key material must be
|
2610
|
+
# encrypted with the public wrapping key that GetParametersForImport
|
2611
|
+
# returned, using the wrapping algorithm that you specified in the
|
2612
|
+
# same `GetParametersForImport` request.
|
2005
2613
|
# @return [String]
|
2006
2614
|
#
|
2007
2615
|
# @!attribute [rw] valid_to
|
@@ -2035,9 +2643,24 @@ module Aws::KMS
|
|
2035
2643
|
#
|
2036
2644
|
class ImportKeyMaterialResponse < Aws::EmptyStructure; end
|
2037
2645
|
|
2038
|
-
# The request was rejected because the
|
2039
|
-
#
|
2040
|
-
#
|
2646
|
+
# The request was rejected because the specified CMK cannot decrypt the
|
2647
|
+
# data. The `KeyId` in a Decrypt request and the `SourceKeyId` in a
|
2648
|
+
# ReEncrypt request must identify the same CMK that was used to encrypt
|
2649
|
+
# the ciphertext.
|
2650
|
+
#
|
2651
|
+
# @!attribute [rw] message
|
2652
|
+
# @return [String]
|
2653
|
+
#
|
2654
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/IncorrectKeyException AWS API Documentation
|
2655
|
+
#
|
2656
|
+
class IncorrectKeyException < Struct.new(
|
2657
|
+
:message)
|
2658
|
+
include Aws::Structure
|
2659
|
+
end
|
2660
|
+
|
2661
|
+
# The request was rejected because the key material in the request is,
|
2662
|
+
# expired, invalid, or is not the same key material that was previously
|
2663
|
+
# imported into this customer master key (CMK).
|
2041
2664
|
#
|
2042
2665
|
# @!attribute [rw] message
|
2043
2666
|
# @return [String]
|
@@ -2096,10 +2719,13 @@ module Aws::KMS
|
|
2096
2719
|
include Aws::Structure
|
2097
2720
|
end
|
2098
2721
|
|
2099
|
-
#
|
2100
|
-
#
|
2101
|
-
# as the encryption context, is
|
2102
|
-
# invalid.
|
2722
|
+
# From the Decrypt or ReEncrypt operation, the request was rejected
|
2723
|
+
# because the specified ciphertext, or additional authenticated data
|
2724
|
+
# incorporated into the ciphertext, such as the encryption context, is
|
2725
|
+
# corrupted, missing, or otherwise invalid.
|
2726
|
+
#
|
2727
|
+
# From the ImportKeyMaterial operation, the request was rejected because
|
2728
|
+
# AWS KMS could not decrypt the encrypted (wrapped) key material.
|
2103
2729
|
#
|
2104
2730
|
# @!attribute [rw] message
|
2105
2731
|
# @return [String]
|
@@ -2149,8 +2775,22 @@ module Aws::KMS
|
|
2149
2775
|
include Aws::Structure
|
2150
2776
|
end
|
2151
2777
|
|
2152
|
-
# The request was rejected
|
2153
|
-
#
|
2778
|
+
# The request was rejected for one of the following reasons:
|
2779
|
+
#
|
2780
|
+
# * The `KeyUsage` value of the CMK is incompatible with the API
|
2781
|
+
# operation.
|
2782
|
+
#
|
2783
|
+
# * The encryption algorithm or signing algorithm specified for the
|
2784
|
+
# operation is incompatible with the type of key material in the CMK
|
2785
|
+
# `(CustomerMasterKeySpec`).
|
2786
|
+
#
|
2787
|
+
# For encrypting, decrypting, re-encrypting, and generating data keys,
|
2788
|
+
# the `KeyUsage` must be `ENCRYPT_DECRYPT`. For signing and verifying,
|
2789
|
+
# the `KeyUsage` must be `SIGN_VERIFY`. To find the `KeyUsage` of a CMK,
|
2790
|
+
# use the DescribeKey operation.
|
2791
|
+
#
|
2792
|
+
# To find the encryption or signing algorithms supported for a
|
2793
|
+
# particular CMK, use the DescribeKey operation.
|
2154
2794
|
#
|
2155
2795
|
# @!attribute [rw] message
|
2156
2796
|
# @return [String]
|
@@ -2188,12 +2828,27 @@ module Aws::KMS
|
|
2188
2828
|
include Aws::Structure
|
2189
2829
|
end
|
2190
2830
|
|
2831
|
+
# The request was rejected because the signature verification failed.
|
2832
|
+
# Signature verification fails when it cannot confirm that signature was
|
2833
|
+
# produced by signing the specified message with the specified CMK and
|
2834
|
+
# signing algorithm.
|
2835
|
+
#
|
2836
|
+
# @!attribute [rw] message
|
2837
|
+
# @return [String]
|
2838
|
+
#
|
2839
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/KMSInvalidSignatureException AWS API Documentation
|
2840
|
+
#
|
2841
|
+
class KMSInvalidSignatureException < Struct.new(
|
2842
|
+
:message)
|
2843
|
+
include Aws::Structure
|
2844
|
+
end
|
2845
|
+
|
2191
2846
|
# The request was rejected because the state of the specified resource
|
2192
2847
|
# is not valid for this request.
|
2193
2848
|
#
|
2194
2849
|
# 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
|
2196
|
-
# Key Management Service Developer Guide
|
2850
|
+
# [How Key State Affects Use of a Customer Master Key][1] in the <i>
|
2851
|
+
# <i>AWS Key Management Service Developer Guide</i> </i>.
|
2197
2852
|
#
|
2198
2853
|
#
|
2199
2854
|
#
|
@@ -2264,9 +2919,7 @@ module Aws::KMS
|
|
2264
2919
|
# @return [String]
|
2265
2920
|
#
|
2266
2921
|
# @!attribute [rw] key_usage
|
2267
|
-
# The cryptographic operations for which you can use the CMK.
|
2268
|
-
# valid value is `ENCRYPT_DECRYPT`, which means you can use the CMK to
|
2269
|
-
# encrypt and decrypt data.
|
2922
|
+
# The cryptographic operations for which you can use the CMK.
|
2270
2923
|
# @return [String]
|
2271
2924
|
#
|
2272
2925
|
# @!attribute [rw] key_state
|
@@ -2342,6 +2995,26 @@ module Aws::KMS
|
|
2342
2995
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys
|
2343
2996
|
# @return [String]
|
2344
2997
|
#
|
2998
|
+
# @!attribute [rw] customer_master_key_spec
|
2999
|
+
# Describes the type of key material in the CMK.
|
3000
|
+
# @return [String]
|
3001
|
+
#
|
3002
|
+
# @!attribute [rw] encryption_algorithms
|
3003
|
+
# A list of encryption algorithms that the CMK supports. You cannot
|
3004
|
+
# use the CMK with other encryption algorithms within AWS KMS.
|
3005
|
+
#
|
3006
|
+
# This field appears only when the `KeyUsage` of the CMK is
|
3007
|
+
# `ENCRYPT_DECRYPT`.
|
3008
|
+
# @return [Array<String>]
|
3009
|
+
#
|
3010
|
+
# @!attribute [rw] signing_algorithms
|
3011
|
+
# A list of signing algorithms that the CMK supports. You cannot use
|
3012
|
+
# the CMK with other signing algorithms within AWS KMS.
|
3013
|
+
#
|
3014
|
+
# This field appears only when the `KeyUsage` of the CMK is
|
3015
|
+
# `SIGN_VERIFY`.
|
3016
|
+
# @return [Array<String>]
|
3017
|
+
#
|
2345
3018
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/KeyMetadata AWS API Documentation
|
2346
3019
|
#
|
2347
3020
|
class KeyMetadata < Struct.new(
|
@@ -2359,12 +3032,15 @@ module Aws::KMS
|
|
2359
3032
|
:custom_key_store_id,
|
2360
3033
|
:cloud_hsm_cluster_id,
|
2361
3034
|
:expiration_model,
|
2362
|
-
:key_manager
|
3035
|
+
:key_manager,
|
3036
|
+
:customer_master_key_spec,
|
3037
|
+
:encryption_algorithms,
|
3038
|
+
:signing_algorithms)
|
2363
3039
|
include Aws::Structure
|
2364
3040
|
end
|
2365
3041
|
|
2366
3042
|
# The request was rejected because the specified CMK was not available.
|
2367
|
-
#
|
3043
|
+
# You can retry the request.
|
2368
3044
|
#
|
2369
3045
|
# @!attribute [rw] message
|
2370
3046
|
# @return [String]
|
@@ -2376,8 +3052,8 @@ module Aws::KMS
|
|
2376
3052
|
include Aws::Structure
|
2377
3053
|
end
|
2378
3054
|
|
2379
|
-
# The request was rejected because a
|
2380
|
-
# information, see [
|
3055
|
+
# The request was rejected because a quota was exceeded. For more
|
3056
|
+
# information, see [Quotas][1] in the *AWS Key Management Service
|
2381
3057
|
# Developer Guide*.
|
2382
3058
|
#
|
2383
3059
|
#
|
@@ -2881,12 +3557,15 @@ module Aws::KMS
|
|
2881
3557
|
# visible][2] in the *AWS Identity and Access Management User
|
2882
3558
|
# Guide*.
|
2883
3559
|
#
|
2884
|
-
# The key policy
|
3560
|
+
# The key policy cannot exceed 32 kilobytes (32768 bytes). For more
|
3561
|
+
# information, see [Resource Quotas][3] in the *AWS Key Management
|
3562
|
+
# Service Developer Guide*.
|
2885
3563
|
#
|
2886
3564
|
#
|
2887
3565
|
#
|
2888
3566
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
|
2889
3567
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
|
3568
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/resource-limits.html
|
2890
3569
|
# @return [String]
|
2891
3570
|
#
|
2892
3571
|
# @!attribute [rw] bypass_policy_lockout_safety_check
|
@@ -2929,10 +3608,13 @@ module Aws::KMS
|
|
2929
3608
|
# source_encryption_context: {
|
2930
3609
|
# "EncryptionContextKey" => "EncryptionContextValue",
|
2931
3610
|
# },
|
3611
|
+
# source_key_id: "KeyIdType",
|
2932
3612
|
# destination_key_id: "KeyIdType", # required
|
2933
3613
|
# destination_encryption_context: {
|
2934
3614
|
# "EncryptionContextKey" => "EncryptionContextValue",
|
2935
3615
|
# },
|
3616
|
+
# source_encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
|
3617
|
+
# destination_encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256
|
2936
3618
|
# grant_tokens: ["GrantTokenType"],
|
2937
3619
|
# }
|
2938
3620
|
#
|
@@ -2941,12 +3623,64 @@ module Aws::KMS
|
|
2941
3623
|
# @return [String]
|
2942
3624
|
#
|
2943
3625
|
# @!attribute [rw] source_encryption_context
|
2944
|
-
#
|
2945
|
-
# the
|
3626
|
+
# Specifies the encryption context to use to decrypt the ciphertext.
|
3627
|
+
# Enter the same encryption context that was used to encrypt the
|
3628
|
+
# ciphertext.
|
3629
|
+
#
|
3630
|
+
# An *encryption context* is a collection of non-secret key-value
|
3631
|
+
# pairs that represents additional authenticated data. When you use an
|
3632
|
+
# encryption context to encrypt data, you must specify the same (an
|
3633
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
3634
|
+
# An encryption context is optional when encrypting with a symmetric
|
3635
|
+
# CMK, but it is highly recommended.
|
3636
|
+
#
|
3637
|
+
# For more information, see [Encryption Context][1] in the *AWS Key
|
3638
|
+
# Management Service Developer Guide*.
|
3639
|
+
#
|
3640
|
+
#
|
3641
|
+
#
|
3642
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
|
2946
3643
|
# @return [Hash<String,String>]
|
2947
3644
|
#
|
3645
|
+
# @!attribute [rw] source_key_id
|
3646
|
+
# A unique identifier for the CMK that is used to decrypt the
|
3647
|
+
# ciphertext before it reencrypts it using the destination CMK.
|
3648
|
+
#
|
3649
|
+
# This parameter is required only when the ciphertext was encrypted
|
3650
|
+
# under an asymmetric CMK. Otherwise, AWS KMS uses the metadata that
|
3651
|
+
# it adds to the ciphertext blob to determine which CMK was used to
|
3652
|
+
# encrypt the ciphertext. However, you can use this parameter to
|
3653
|
+
# ensure that a particular CMK (of any kind) is used to decrypt the
|
3654
|
+
# ciphertext before it is reencrypted.
|
3655
|
+
#
|
3656
|
+
# If you specify a `KeyId` value, the decrypt part of the `ReEncrypt`
|
3657
|
+
# operation succeeds only if the specified CMK was used to encrypt the
|
3658
|
+
# ciphertext.
|
3659
|
+
#
|
3660
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
3661
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
3662
|
+
# `"alias/"`.
|
3663
|
+
#
|
3664
|
+
# For example:
|
3665
|
+
#
|
3666
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
3667
|
+
#
|
3668
|
+
# * Key ARN:
|
3669
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
3670
|
+
#
|
3671
|
+
# * Alias name: `alias/ExampleAlias`
|
3672
|
+
#
|
3673
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
3674
|
+
#
|
3675
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
3676
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
3677
|
+
# @return [String]
|
3678
|
+
#
|
2948
3679
|
# @!attribute [rw] destination_key_id
|
2949
3680
|
# A unique identifier for the CMK that is used to reencrypt the data.
|
3681
|
+
# Specify a symmetric or asymmetric CMK with a `KeyUsage` value of
|
3682
|
+
# `ENCRYPT_DECRYPT`. To find the `KeyUsage` value of a CMK, use the
|
3683
|
+
# DescribeKey operation.
|
2950
3684
|
#
|
2951
3685
|
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
2952
3686
|
# name, or alias ARN. When using an alias name, prefix it with
|
@@ -2969,9 +3703,51 @@ module Aws::KMS
|
|
2969
3703
|
# @return [String]
|
2970
3704
|
#
|
2971
3705
|
# @!attribute [rw] destination_encryption_context
|
2972
|
-
#
|
3706
|
+
# Specifies that encryption context to use when the reencrypting the
|
3707
|
+
# data.
|
3708
|
+
#
|
3709
|
+
# A destination encryption context is valid only when the destination
|
3710
|
+
# CMK is a symmetric CMK. The standard ciphertext format for
|
3711
|
+
# asymmetric CMKs does not include fields for metadata.
|
3712
|
+
#
|
3713
|
+
# An *encryption context* is a collection of non-secret key-value
|
3714
|
+
# pairs that represents additional authenticated data. When you use an
|
3715
|
+
# encryption context to encrypt data, you must specify the same (an
|
3716
|
+
# exact case-sensitive match) encryption context to decrypt the data.
|
3717
|
+
# An encryption context is optional when encrypting with a symmetric
|
3718
|
+
# CMK, but it is highly recommended.
|
3719
|
+
#
|
3720
|
+
# For more information, see [Encryption Context][1] in the *AWS Key
|
3721
|
+
# Management Service Developer Guide*.
|
3722
|
+
#
|
3723
|
+
#
|
3724
|
+
#
|
3725
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
|
2973
3726
|
# @return [Hash<String,String>]
|
2974
3727
|
#
|
3728
|
+
# @!attribute [rw] source_encryption_algorithm
|
3729
|
+
# Specifies the encryption algorithm that AWS KMS will use to decrypt
|
3730
|
+
# the ciphertext before it is reencrypted. The default value,
|
3731
|
+
# `SYMMETRIC_DEFAULT`, represents the algorithm used for symmetric
|
3732
|
+
# CMKs.
|
3733
|
+
#
|
3734
|
+
# Specify the same algorithm that was used to encrypt the ciphertext.
|
3735
|
+
# If you specify a different algorithm, the decrypt attempt fails.
|
3736
|
+
#
|
3737
|
+
# This parameter is required only when the ciphertext was encrypted
|
3738
|
+
# under an asymmetric CMK.
|
3739
|
+
# @return [String]
|
3740
|
+
#
|
3741
|
+
# @!attribute [rw] destination_encryption_algorithm
|
3742
|
+
# Specifies the encryption algorithm that AWS KMS will use to reecrypt
|
3743
|
+
# the data after it has decrypted it. The default value,
|
3744
|
+
# `SYMMETRIC_DEFAULT`, represents the encryption algorithm used for
|
3745
|
+
# symmetric CMKs.
|
3746
|
+
#
|
3747
|
+
# This parameter is required only when the destination CMK is an
|
3748
|
+
# asymmetric CMK.
|
3749
|
+
# @return [String]
|
3750
|
+
#
|
2975
3751
|
# @!attribute [rw] grant_tokens
|
2976
3752
|
# A list of grant tokens.
|
2977
3753
|
#
|
@@ -2988,15 +3764,18 @@ module Aws::KMS
|
|
2988
3764
|
class ReEncryptRequest < Struct.new(
|
2989
3765
|
:ciphertext_blob,
|
2990
3766
|
:source_encryption_context,
|
3767
|
+
:source_key_id,
|
2991
3768
|
:destination_key_id,
|
2992
3769
|
:destination_encryption_context,
|
3770
|
+
:source_encryption_algorithm,
|
3771
|
+
:destination_encryption_algorithm,
|
2993
3772
|
:grant_tokens)
|
2994
3773
|
include Aws::Structure
|
2995
3774
|
end
|
2996
3775
|
|
2997
3776
|
# @!attribute [rw] ciphertext_blob
|
2998
3777
|
# The reencrypted data. When you use the HTTP API or the AWS CLI, the
|
2999
|
-
# value is Base64-encoded. Otherwise, it is not encoded.
|
3778
|
+
# value is Base64-encoded. Otherwise, it is not Base64-encoded.
|
3000
3779
|
# @return [String]
|
3001
3780
|
#
|
3002
3781
|
# @!attribute [rw] source_key_id
|
@@ -3007,12 +3786,23 @@ module Aws::KMS
|
|
3007
3786
|
# Unique identifier of the CMK used to reencrypt the data.
|
3008
3787
|
# @return [String]
|
3009
3788
|
#
|
3789
|
+
# @!attribute [rw] source_encryption_algorithm
|
3790
|
+
# The encryption algorithm that was used to decrypt the ciphertext
|
3791
|
+
# before it was reencrypted.
|
3792
|
+
# @return [String]
|
3793
|
+
#
|
3794
|
+
# @!attribute [rw] destination_encryption_algorithm
|
3795
|
+
# The encryption algorithm that was used to reencrypt the data.
|
3796
|
+
# @return [String]
|
3797
|
+
#
|
3010
3798
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReEncryptResponse AWS API Documentation
|
3011
3799
|
#
|
3012
3800
|
class ReEncryptResponse < Struct.new(
|
3013
3801
|
:ciphertext_blob,
|
3014
3802
|
:source_key_id,
|
3015
|
-
:key_id
|
3803
|
+
:key_id,
|
3804
|
+
:source_encryption_algorithm,
|
3805
|
+
:destination_encryption_algorithm)
|
3016
3806
|
include Aws::Structure
|
3017
3807
|
end
|
3018
3808
|
|
@@ -3151,6 +3941,108 @@ module Aws::KMS
|
|
3151
3941
|
include Aws::Structure
|
3152
3942
|
end
|
3153
3943
|
|
3944
|
+
# @note When making an API call, you may pass SignRequest
|
3945
|
+
# data as a hash:
|
3946
|
+
#
|
3947
|
+
# {
|
3948
|
+
# key_id: "KeyIdType", # required
|
3949
|
+
# message: "data", # required
|
3950
|
+
# message_type: "RAW", # accepts RAW, DIGEST
|
3951
|
+
# grant_tokens: ["GrantTokenType"],
|
3952
|
+
# 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
|
3953
|
+
# }
|
3954
|
+
#
|
3955
|
+
# @!attribute [rw] key_id
|
3956
|
+
# Identifies an asymmetric CMK. AWS KMS uses the private key in the
|
3957
|
+
# asymmetric CMK to sign the message. The `KeyUsage` type of the CMK
|
3958
|
+
# must be `SIGN_VERIFY`. To find the `KeyUsage` of a CMK, use the
|
3959
|
+
# DescribeKey operation.
|
3960
|
+
#
|
3961
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
3962
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
3963
|
+
# `"alias/"`. To specify a CMK in a different AWS account, you must
|
3964
|
+
# use the key ARN or alias ARN.
|
3965
|
+
#
|
3966
|
+
# For example:
|
3967
|
+
#
|
3968
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
3969
|
+
#
|
3970
|
+
# * Key ARN:
|
3971
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
3972
|
+
#
|
3973
|
+
# * Alias name: `alias/ExampleAlias`
|
3974
|
+
#
|
3975
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
3976
|
+
#
|
3977
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
3978
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
3979
|
+
# @return [String]
|
3980
|
+
#
|
3981
|
+
# @!attribute [rw] message
|
3982
|
+
# Specifies the message or message digest to sign. Messages can be
|
3983
|
+
# 0-4096 bytes. To sign a larger message, provide the message digest.
|
3984
|
+
#
|
3985
|
+
# If you provide a message, AWS KMS generates a hash digest of the
|
3986
|
+
# message and then signs it.
|
3987
|
+
# @return [String]
|
3988
|
+
#
|
3989
|
+
# @!attribute [rw] message_type
|
3990
|
+
# Tells AWS KMS whether the value of the `Message` parameter is a
|
3991
|
+
# message or message digest. To indicate a message, enter `RAW`. To
|
3992
|
+
# indicate a message digest, enter `DIGEST`.
|
3993
|
+
# @return [String]
|
3994
|
+
#
|
3995
|
+
# @!attribute [rw] grant_tokens
|
3996
|
+
# A list of grant tokens.
|
3997
|
+
#
|
3998
|
+
# For more information, see [Grant Tokens][1] in the *AWS Key
|
3999
|
+
# Management Service Developer Guide*.
|
4000
|
+
#
|
4001
|
+
#
|
4002
|
+
#
|
4003
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
|
4004
|
+
# @return [Array<String>]
|
4005
|
+
#
|
4006
|
+
# @!attribute [rw] signing_algorithm
|
4007
|
+
# Specifies the signing algorithm to use when signing the message.
|
4008
|
+
#
|
4009
|
+
# Choose an algorithm that is compatible with the type and size of the
|
4010
|
+
# specified asymmetric CMK.
|
4011
|
+
# @return [String]
|
4012
|
+
#
|
4013
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/SignRequest AWS API Documentation
|
4014
|
+
#
|
4015
|
+
class SignRequest < Struct.new(
|
4016
|
+
:key_id,
|
4017
|
+
:message,
|
4018
|
+
:message_type,
|
4019
|
+
:grant_tokens,
|
4020
|
+
:signing_algorithm)
|
4021
|
+
include Aws::Structure
|
4022
|
+
end
|
4023
|
+
|
4024
|
+
# @!attribute [rw] key_id
|
4025
|
+
# The Amazon Resource Name (ARN) of the asymmetric CMK that was used
|
4026
|
+
# to sign the message.
|
4027
|
+
# @return [String]
|
4028
|
+
#
|
4029
|
+
# @!attribute [rw] signature
|
4030
|
+
# The cryptographic signature that was generated for the message.
|
4031
|
+
# @return [String]
|
4032
|
+
#
|
4033
|
+
# @!attribute [rw] signing_algorithm
|
4034
|
+
# The signing algorithm that was used to sign the message.
|
4035
|
+
# @return [String]
|
4036
|
+
#
|
4037
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/SignResponse AWS API Documentation
|
4038
|
+
#
|
4039
|
+
class SignResponse < Struct.new(
|
4040
|
+
:key_id,
|
4041
|
+
:signature,
|
4042
|
+
:signing_algorithm)
|
4043
|
+
include Aws::Structure
|
4044
|
+
end
|
4045
|
+
|
3154
4046
|
# A key-value pair. A tag consists of a tag key and a tag value. Tag
|
3155
4047
|
# keys and tag values are both required, but tag values can be empty
|
3156
4048
|
# (null) strings.
|
@@ -3298,15 +4190,20 @@ module Aws::KMS
|
|
3298
4190
|
# }
|
3299
4191
|
#
|
3300
4192
|
# @!attribute [rw] alias_name
|
3301
|
-
#
|
4193
|
+
# Identifies the alias that is changing its CMK. This value must begin
|
3302
4194
|
# with `alias/` followed by the alias name, such as
|
3303
|
-
# `alias/ExampleAlias`.
|
4195
|
+
# `alias/ExampleAlias`. You cannot use UpdateAlias to change the alias
|
4196
|
+
# name.
|
3304
4197
|
# @return [String]
|
3305
4198
|
#
|
3306
4199
|
# @!attribute [rw] target_key_id
|
3307
|
-
#
|
3308
|
-
#
|
3309
|
-
#
|
4200
|
+
# Identifies the CMK to associate with the alias. When the update
|
4201
|
+
# operation completes, the alias will point to this CMK.
|
4202
|
+
#
|
4203
|
+
# The CMK must be in the same AWS account and Region as the alias.
|
4204
|
+
# Also, the new target CMK must be the same type as the current target
|
4205
|
+
# CMK (both symmetric or both asymmetric) and they must have the same
|
4206
|
+
# key usage.
|
3310
4207
|
#
|
3311
4208
|
# Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
|
3312
4209
|
#
|
@@ -3431,5 +4328,122 @@ module Aws::KMS
|
|
3431
4328
|
include Aws::Structure
|
3432
4329
|
end
|
3433
4330
|
|
4331
|
+
# @note When making an API call, you may pass VerifyRequest
|
4332
|
+
# data as a hash:
|
4333
|
+
#
|
4334
|
+
# {
|
4335
|
+
# key_id: "KeyIdType", # required
|
4336
|
+
# message: "data", # required
|
4337
|
+
# message_type: "RAW", # accepts RAW, DIGEST
|
4338
|
+
# signature: "data", # required
|
4339
|
+
# 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
|
4340
|
+
# grant_tokens: ["GrantTokenType"],
|
4341
|
+
# }
|
4342
|
+
#
|
4343
|
+
# @!attribute [rw] key_id
|
4344
|
+
# Identifies the asymmetric CMK that will be used to verify the
|
4345
|
+
# signature. This must be the same CMK that was used to generate the
|
4346
|
+
# signature. If you specify a different CMK, the signature
|
4347
|
+
# verification fails.
|
4348
|
+
#
|
4349
|
+
# To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
|
4350
|
+
# name, or alias ARN. When using an alias name, prefix it with
|
4351
|
+
# `"alias/"`. To specify a CMK in a different AWS account, you must
|
4352
|
+
# use the key ARN or alias ARN.
|
4353
|
+
#
|
4354
|
+
# For example:
|
4355
|
+
#
|
4356
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
4357
|
+
#
|
4358
|
+
# * Key ARN:
|
4359
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
4360
|
+
#
|
4361
|
+
# * Alias name: `alias/ExampleAlias`
|
4362
|
+
#
|
4363
|
+
# * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
|
4364
|
+
#
|
4365
|
+
# To get the key ID and key ARN for a CMK, use ListKeys or
|
4366
|
+
# DescribeKey. To get the alias name and alias ARN, use ListAliases.
|
4367
|
+
# @return [String]
|
4368
|
+
#
|
4369
|
+
# @!attribute [rw] message
|
4370
|
+
# Specifies the message that was signed. You can submit a raw message
|
4371
|
+
# of up to 4096 bytes, or a hash digest of the message. If you submit
|
4372
|
+
# a digest, use the `MessageType` parameter with a value of `DIGEST`.
|
4373
|
+
#
|
4374
|
+
# If the message specified here is different from the message that was
|
4375
|
+
# signed, the signature verification fails. A message and its hash
|
4376
|
+
# digest are considered to be the same message.
|
4377
|
+
# @return [String]
|
4378
|
+
#
|
4379
|
+
# @!attribute [rw] message_type
|
4380
|
+
# Tells AWS KMS whether the value of the `Message` parameter is a
|
4381
|
+
# message or message digest. The default value, RAW, indicates a
|
4382
|
+
# message. To indicate a message digest, enter `DIGEST`.
|
4383
|
+
#
|
4384
|
+
# Use the `DIGEST` value only when the value of the `Message`
|
4385
|
+
# parameter is a message digest. If you use the `DIGEST` value with a
|
4386
|
+
# raw message, the security of the verification operation can be
|
4387
|
+
# compromised.
|
4388
|
+
# @return [String]
|
4389
|
+
#
|
4390
|
+
# @!attribute [rw] signature
|
4391
|
+
# The signature that the `Sign` operation generated.
|
4392
|
+
# @return [String]
|
4393
|
+
#
|
4394
|
+
# @!attribute [rw] signing_algorithm
|
4395
|
+
# The signing algorithm that was used to sign the message. If you
|
4396
|
+
# submit a different algorithm, the signature verification fails.
|
4397
|
+
# @return [String]
|
4398
|
+
#
|
4399
|
+
# @!attribute [rw] grant_tokens
|
4400
|
+
# A list of grant tokens.
|
4401
|
+
#
|
4402
|
+
# For more information, see [Grant Tokens][1] in the *AWS Key
|
4403
|
+
# Management Service Developer Guide*.
|
4404
|
+
#
|
4405
|
+
#
|
4406
|
+
#
|
4407
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
|
4408
|
+
# @return [Array<String>]
|
4409
|
+
#
|
4410
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/VerifyRequest AWS API Documentation
|
4411
|
+
#
|
4412
|
+
class VerifyRequest < Struct.new(
|
4413
|
+
:key_id,
|
4414
|
+
:message,
|
4415
|
+
:message_type,
|
4416
|
+
:signature,
|
4417
|
+
:signing_algorithm,
|
4418
|
+
:grant_tokens)
|
4419
|
+
include Aws::Structure
|
4420
|
+
end
|
4421
|
+
|
4422
|
+
# @!attribute [rw] key_id
|
4423
|
+
# The unique identifier for the asymmetric CMK that was used to verify
|
4424
|
+
# the signature.
|
4425
|
+
# @return [String]
|
4426
|
+
#
|
4427
|
+
# @!attribute [rw] signature_valid
|
4428
|
+
# A Boolean value that indicates whether the signature was verified. A
|
4429
|
+
# value of `True` indicates that the `Signature` was produced by
|
4430
|
+
# signing the `Message` with the specified `KeyID` and
|
4431
|
+
# `SigningAlgorithm.` If the signature is not verified, the `Verify`
|
4432
|
+
# operation fails with a `KMSInvalidSignatureException` exception.
|
4433
|
+
# @return [Boolean]
|
4434
|
+
#
|
4435
|
+
# @!attribute [rw] signing_algorithm
|
4436
|
+
# The signing algorithm that was used to verify the signature.
|
4437
|
+
# @return [String]
|
4438
|
+
#
|
4439
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/VerifyResponse AWS API Documentation
|
4440
|
+
#
|
4441
|
+
class VerifyResponse < Struct.new(
|
4442
|
+
:key_id,
|
4443
|
+
:signature_valid,
|
4444
|
+
:signing_algorithm)
|
4445
|
+
include Aws::Structure
|
4446
|
+
end
|
4447
|
+
|
3434
4448
|
end
|
3435
4449
|
end
|