aws-sdk-kms 1.53.0 → 1.56.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -90,6 +90,8 @@ module Aws::KMS
90
90
  GenerateDataKeyResponse = Shapes::StructureShape.new(name: 'GenerateDataKeyResponse')
91
91
  GenerateDataKeyWithoutPlaintextRequest = Shapes::StructureShape.new(name: 'GenerateDataKeyWithoutPlaintextRequest')
92
92
  GenerateDataKeyWithoutPlaintextResponse = Shapes::StructureShape.new(name: 'GenerateDataKeyWithoutPlaintextResponse')
93
+ GenerateMacRequest = Shapes::StructureShape.new(name: 'GenerateMacRequest')
94
+ GenerateMacResponse = Shapes::StructureShape.new(name: 'GenerateMacResponse')
93
95
  GenerateRandomRequest = Shapes::StructureShape.new(name: 'GenerateRandomRequest')
94
96
  GenerateRandomResponse = Shapes::StructureShape.new(name: 'GenerateRandomResponse')
95
97
  GetKeyPolicyRequest = Shapes::StructureShape.new(name: 'GetKeyPolicyRequest')
@@ -123,6 +125,7 @@ module Aws::KMS
123
125
  InvalidKeyUsageException = Shapes::StructureShape.new(name: 'InvalidKeyUsageException')
124
126
  InvalidMarkerException = Shapes::StructureShape.new(name: 'InvalidMarkerException')
125
127
  KMSInternalException = Shapes::StructureShape.new(name: 'KMSInternalException')
128
+ KMSInvalidMacException = Shapes::StructureShape.new(name: 'KMSInvalidMacException')
126
129
  KMSInvalidSignatureException = Shapes::StructureShape.new(name: 'KMSInvalidSignatureException')
127
130
  KMSInvalidStateException = Shapes::StructureShape.new(name: 'KMSInvalidStateException')
128
131
  KeyIdType = Shapes::StringShape.new(name: 'KeyIdType')
@@ -148,6 +151,8 @@ module Aws::KMS
148
151
  ListResourceTagsRequest = Shapes::StructureShape.new(name: 'ListResourceTagsRequest')
149
152
  ListResourceTagsResponse = Shapes::StructureShape.new(name: 'ListResourceTagsResponse')
150
153
  ListRetirableGrantsRequest = Shapes::StructureShape.new(name: 'ListRetirableGrantsRequest')
154
+ MacAlgorithmSpec = Shapes::StringShape.new(name: 'MacAlgorithmSpec')
155
+ MacAlgorithmSpecList = Shapes::ListShape.new(name: 'MacAlgorithmSpecList')
151
156
  MalformedPolicyDocumentException = Shapes::StructureShape.new(name: 'MalformedPolicyDocumentException')
152
157
  MarkerType = Shapes::StringShape.new(name: 'MarkerType')
153
158
  MessageType = Shapes::StringShape.new(name: 'MessageType')
@@ -195,6 +200,8 @@ module Aws::KMS
195
200
  UpdateCustomKeyStoreResponse = Shapes::StructureShape.new(name: 'UpdateCustomKeyStoreResponse')
196
201
  UpdateKeyDescriptionRequest = Shapes::StructureShape.new(name: 'UpdateKeyDescriptionRequest')
197
202
  UpdatePrimaryRegionRequest = Shapes::StructureShape.new(name: 'UpdatePrimaryRegionRequest')
203
+ VerifyMacRequest = Shapes::StructureShape.new(name: 'VerifyMacRequest')
204
+ VerifyMacResponse = Shapes::StructureShape.new(name: 'VerifyMacResponse')
198
205
  VerifyRequest = Shapes::StructureShape.new(name: 'VerifyRequest')
199
206
  VerifyResponse = Shapes::StructureShape.new(name: 'VerifyResponse')
200
207
  WrappingKeySpec = Shapes::StringShape.new(name: 'WrappingKeySpec')
@@ -433,6 +440,17 @@ module Aws::KMS
433
440
  GenerateDataKeyWithoutPlaintextResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
434
441
  GenerateDataKeyWithoutPlaintextResponse.struct_class = Types::GenerateDataKeyWithoutPlaintextResponse
435
442
 
443
+ GenerateMacRequest.add_member(:message, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Message"))
444
+ GenerateMacRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
445
+ GenerateMacRequest.add_member(:mac_algorithm, Shapes::ShapeRef.new(shape: MacAlgorithmSpec, required: true, location_name: "MacAlgorithm"))
446
+ GenerateMacRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
447
+ GenerateMacRequest.struct_class = Types::GenerateMacRequest
448
+
449
+ GenerateMacResponse.add_member(:mac, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "Mac"))
450
+ GenerateMacResponse.add_member(:mac_algorithm, Shapes::ShapeRef.new(shape: MacAlgorithmSpec, location_name: "MacAlgorithm"))
451
+ GenerateMacResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
452
+ GenerateMacResponse.struct_class = Types::GenerateMacResponse
453
+
436
454
  GenerateRandomRequest.add_member(:number_of_bytes, Shapes::ShapeRef.new(shape: NumberOfBytesType, location_name: "NumberOfBytes"))
437
455
  GenerateRandomRequest.add_member(:custom_key_store_id, Shapes::ShapeRef.new(shape: CustomKeyStoreIdType, location_name: "CustomKeyStoreId"))
438
456
  GenerateRandomRequest.struct_class = Types::GenerateRandomRequest
@@ -543,6 +561,9 @@ module Aws::KMS
543
561
  KMSInternalException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
544
562
  KMSInternalException.struct_class = Types::KMSInternalException
545
563
 
564
+ KMSInvalidMacException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
565
+ KMSInvalidMacException.struct_class = Types::KMSInvalidMacException
566
+
546
567
  KMSInvalidSignatureException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
547
568
  KMSInvalidSignatureException.struct_class = Types::KMSInvalidSignatureException
548
569
 
@@ -577,6 +598,7 @@ module Aws::KMS
577
598
  KeyMetadata.add_member(:multi_region, Shapes::ShapeRef.new(shape: NullableBooleanType, location_name: "MultiRegion"))
578
599
  KeyMetadata.add_member(:multi_region_configuration, Shapes::ShapeRef.new(shape: MultiRegionConfiguration, location_name: "MultiRegionConfiguration"))
579
600
  KeyMetadata.add_member(:pending_deletion_window_in_days, Shapes::ShapeRef.new(shape: PendingWindowInDaysType, location_name: "PendingDeletionWindowInDays"))
601
+ KeyMetadata.add_member(:mac_algorithms, Shapes::ShapeRef.new(shape: MacAlgorithmSpecList, location_name: "MacAlgorithms"))
580
602
  KeyMetadata.struct_class = Types::KeyMetadata
581
603
 
582
604
  KeyUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
@@ -641,6 +663,8 @@ module Aws::KMS
641
663
  ListRetirableGrantsRequest.add_member(:retiring_principal, Shapes::ShapeRef.new(shape: PrincipalIdType, required: true, location_name: "RetiringPrincipal"))
642
664
  ListRetirableGrantsRequest.struct_class = Types::ListRetirableGrantsRequest
643
665
 
666
+ MacAlgorithmSpecList.member = Shapes::ShapeRef.new(shape: MacAlgorithmSpec)
667
+
644
668
  MalformedPolicyDocumentException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
645
669
  MalformedPolicyDocumentException.struct_class = Types::MalformedPolicyDocumentException
646
670
 
@@ -771,6 +795,18 @@ module Aws::KMS
771
795
  UpdatePrimaryRegionRequest.add_member(:primary_region, Shapes::ShapeRef.new(shape: RegionType, required: true, location_name: "PrimaryRegion"))
772
796
  UpdatePrimaryRegionRequest.struct_class = Types::UpdatePrimaryRegionRequest
773
797
 
798
+ VerifyMacRequest.add_member(:message, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Message"))
799
+ VerifyMacRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
800
+ VerifyMacRequest.add_member(:mac_algorithm, Shapes::ShapeRef.new(shape: MacAlgorithmSpec, required: true, location_name: "MacAlgorithm"))
801
+ VerifyMacRequest.add_member(:mac, Shapes::ShapeRef.new(shape: CiphertextType, required: true, location_name: "Mac"))
802
+ VerifyMacRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
803
+ VerifyMacRequest.struct_class = Types::VerifyMacRequest
804
+
805
+ VerifyMacResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
806
+ VerifyMacResponse.add_member(:mac_valid, Shapes::ShapeRef.new(shape: BooleanType, location_name: "MacValid"))
807
+ VerifyMacResponse.add_member(:mac_algorithm, Shapes::ShapeRef.new(shape: MacAlgorithmSpec, location_name: "MacAlgorithm"))
808
+ VerifyMacResponse.struct_class = Types::VerifyMacResponse
809
+
774
810
  VerifyRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
775
811
  VerifyRequest.add_member(:message, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Message"))
776
812
  VerifyRequest.add_member(:message_type, Shapes::ShapeRef.new(shape: MessageType, location_name: "MessageType"))
@@ -1122,6 +1158,21 @@ module Aws::KMS
1122
1158
  o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1123
1159
  end)
1124
1160
 
1161
+ api.add_operation(:generate_mac, Seahorse::Model::Operation.new.tap do |o|
1162
+ o.name = "GenerateMac"
1163
+ o.http_method = "POST"
1164
+ o.http_request_uri = "/"
1165
+ o.input = Shapes::ShapeRef.new(shape: GenerateMacRequest)
1166
+ o.output = Shapes::ShapeRef.new(shape: GenerateMacResponse)
1167
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1168
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1169
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1170
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1171
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1172
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1173
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1174
+ end)
1175
+
1125
1176
  api.add_operation(:generate_random, Seahorse::Model::Operation.new.tap do |o|
1126
1177
  o.name = "GenerateRandom"
1127
1178
  o.http_method = "POST"
@@ -1525,6 +1576,22 @@ module Aws::KMS
1525
1576
  o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1526
1577
  o.errors << Shapes::ShapeRef.new(shape: KMSInvalidSignatureException)
1527
1578
  end)
1579
+
1580
+ api.add_operation(:verify_mac, Seahorse::Model::Operation.new.tap do |o|
1581
+ o.name = "VerifyMac"
1582
+ o.http_method = "POST"
1583
+ o.http_request_uri = "/"
1584
+ o.input = Shapes::ShapeRef.new(shape: VerifyMacRequest)
1585
+ o.output = Shapes::ShapeRef.new(shape: VerifyMacResponse)
1586
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1587
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1588
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1589
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1590
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1591
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1592
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidMacException)
1593
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1594
+ end)
1528
1595
  end
1529
1596
 
1530
1597
  end
@@ -52,6 +52,7 @@ module Aws::KMS
52
52
  # * {InvalidKeyUsageException}
53
53
  # * {InvalidMarkerException}
54
54
  # * {KMSInternalException}
55
+ # * {KMSInvalidMacException}
55
56
  # * {KMSInvalidSignatureException}
56
57
  # * {KMSInvalidStateException}
57
58
  # * {KeyUnavailableException}
@@ -442,6 +443,21 @@ module Aws::KMS
442
443
  end
443
444
  end
444
445
 
446
+ class KMSInvalidMacException < ServiceError
447
+
448
+ # @param [Seahorse::Client::RequestContext] context
449
+ # @param [String] message
450
+ # @param [Aws::KMS::Types::KMSInvalidMacException] data
451
+ def initialize(context, message, data = Aws::EmptyStructure.new)
452
+ super(context, message, data)
453
+ end
454
+
455
+ # @return [String]
456
+ def message
457
+ @message || @data[:message]
458
+ end
459
+ end
460
+
445
461
  class KMSInvalidSignatureException < ServiceError
446
462
 
447
463
  # @param [Seahorse::Client::RequestContext] context