aws-sdk-kms 1.88.0 → 1.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +85 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-kms/client.rb +856 -589
- data/lib/aws-sdk-kms/client_api.rb +38 -4
- data/lib/aws-sdk-kms/endpoint_parameters.rb +9 -6
- data/lib/aws-sdk-kms/endpoint_provider.rb +13 -17
- data/lib/aws-sdk-kms/endpoints.rb +2 -740
- data/lib/aws-sdk-kms/plugins/endpoints.rb +19 -118
- data/lib/aws-sdk-kms/types.rb +491 -212
- data/lib/aws-sdk-kms.rb +15 -11
- data/sig/client.rbs +36 -13
- data/sig/resource.rbs +4 -0
- data/sig/types.rbs +40 -12
- metadata +6 -9
@@ -7,6 +7,7 @@
|
|
7
7
|
#
|
8
8
|
# WARNING ABOUT GENERATED CODE
|
9
9
|
|
10
|
+
|
10
11
|
module Aws::KMS
|
11
12
|
# @api private
|
12
13
|
module ClientApi
|
@@ -21,6 +22,8 @@ module Aws::KMS
|
|
21
22
|
AlreadyExistsException = Shapes::StructureShape.new(name: 'AlreadyExistsException')
|
22
23
|
ArnType = Shapes::StringShape.new(name: 'ArnType')
|
23
24
|
AttestationDocumentType = Shapes::BlobShape.new(name: 'AttestationDocumentType')
|
25
|
+
BackingKeyIdResponseType = Shapes::StringShape.new(name: 'BackingKeyIdResponseType')
|
26
|
+
BackingKeyIdType = Shapes::StringShape.new(name: 'BackingKeyIdType')
|
24
27
|
BooleanType = Shapes::BooleanShape.new(name: 'BooleanType')
|
25
28
|
CancelKeyDeletionRequest = Shapes::StructureShape.new(name: 'CancelKeyDeletionRequest')
|
26
29
|
CancelKeyDeletionResponse = Shapes::StructureShape.new(name: 'CancelKeyDeletionResponse')
|
@@ -62,6 +65,7 @@ module Aws::KMS
|
|
62
65
|
DeleteCustomKeyStoreRequest = Shapes::StructureShape.new(name: 'DeleteCustomKeyStoreRequest')
|
63
66
|
DeleteCustomKeyStoreResponse = Shapes::StructureShape.new(name: 'DeleteCustomKeyStoreResponse')
|
64
67
|
DeleteImportedKeyMaterialRequest = Shapes::StructureShape.new(name: 'DeleteImportedKeyMaterialRequest')
|
68
|
+
DeleteImportedKeyMaterialResponse = Shapes::StructureShape.new(name: 'DeleteImportedKeyMaterialResponse')
|
65
69
|
DependencyTimeoutException = Shapes::StructureShape.new(name: 'DependencyTimeoutException')
|
66
70
|
DeriveSharedSecretRequest = Shapes::StructureShape.new(name: 'DeriveSharedSecretRequest')
|
67
71
|
DeriveSharedSecretResponse = Shapes::StructureShape.new(name: 'DeriveSharedSecretResponse')
|
@@ -119,6 +123,9 @@ module Aws::KMS
|
|
119
123
|
GrantTokenType = Shapes::StringShape.new(name: 'GrantTokenType')
|
120
124
|
ImportKeyMaterialRequest = Shapes::StructureShape.new(name: 'ImportKeyMaterialRequest')
|
121
125
|
ImportKeyMaterialResponse = Shapes::StructureShape.new(name: 'ImportKeyMaterialResponse')
|
126
|
+
ImportState = Shapes::StringShape.new(name: 'ImportState')
|
127
|
+
ImportType = Shapes::StringShape.new(name: 'ImportType')
|
128
|
+
IncludeKeyMaterial = Shapes::StringShape.new(name: 'IncludeKeyMaterial')
|
122
129
|
IncorrectKeyException = Shapes::StructureShape.new(name: 'IncorrectKeyException')
|
123
130
|
IncorrectKeyMaterialException = Shapes::StructureShape.new(name: 'IncorrectKeyMaterialException')
|
124
131
|
IncorrectTrustAnchorException = Shapes::StructureShape.new(name: 'IncorrectTrustAnchorException')
|
@@ -141,6 +148,8 @@ module Aws::KMS
|
|
141
148
|
KeyList = Shapes::ListShape.new(name: 'KeyList')
|
142
149
|
KeyListEntry = Shapes::StructureShape.new(name: 'KeyListEntry')
|
143
150
|
KeyManagerType = Shapes::StringShape.new(name: 'KeyManagerType')
|
151
|
+
KeyMaterialDescriptionType = Shapes::StringShape.new(name: 'KeyMaterialDescriptionType')
|
152
|
+
KeyMaterialState = Shapes::StringShape.new(name: 'KeyMaterialState')
|
144
153
|
KeyMetadata = Shapes::StructureShape.new(name: 'KeyMetadata')
|
145
154
|
KeySpec = Shapes::StringShape.new(name: 'KeySpec')
|
146
155
|
KeyState = Shapes::StringShape.new(name: 'KeyState')
|
@@ -323,7 +332,7 @@ module Aws::KMS
|
|
323
332
|
CreateKeyRequest.add_member(:policy, Shapes::ShapeRef.new(shape: PolicyType, location_name: "Policy"))
|
324
333
|
CreateKeyRequest.add_member(:description, Shapes::ShapeRef.new(shape: DescriptionType, location_name: "Description"))
|
325
334
|
CreateKeyRequest.add_member(:key_usage, Shapes::ShapeRef.new(shape: KeyUsageType, location_name: "KeyUsage"))
|
326
|
-
CreateKeyRequest.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, deprecated: true, location_name: "CustomerMasterKeySpec", metadata: {"deprecatedMessage"=>"This parameter has been deprecated. Instead, use the KeySpec parameter."}))
|
335
|
+
CreateKeyRequest.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, deprecated: true, location_name: "CustomerMasterKeySpec", metadata: {"deprecatedMessage" => "This parameter has been deprecated. Instead, use the KeySpec parameter."}))
|
327
336
|
CreateKeyRequest.add_member(:key_spec, Shapes::ShapeRef.new(shape: KeySpec, location_name: "KeySpec"))
|
328
337
|
CreateKeyRequest.add_member(:origin, Shapes::ShapeRef.new(shape: OriginType, location_name: "Origin"))
|
329
338
|
CreateKeyRequest.add_member(:custom_key_store_id, Shapes::ShapeRef.new(shape: CustomKeyStoreIdType, location_name: "CustomKeyStoreId"))
|
@@ -374,6 +383,7 @@ module Aws::KMS
|
|
374
383
|
DecryptResponse.add_member(:plaintext, Shapes::ShapeRef.new(shape: PlaintextType, location_name: "Plaintext"))
|
375
384
|
DecryptResponse.add_member(:encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "EncryptionAlgorithm"))
|
376
385
|
DecryptResponse.add_member(:ciphertext_for_recipient, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextForRecipient"))
|
386
|
+
DecryptResponse.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
377
387
|
DecryptResponse.struct_class = Types::DecryptResponse
|
378
388
|
|
379
389
|
DeleteAliasRequest.add_member(:alias_name, Shapes::ShapeRef.new(shape: AliasNameType, required: true, location_name: "AliasName"))
|
@@ -385,8 +395,13 @@ module Aws::KMS
|
|
385
395
|
DeleteCustomKeyStoreResponse.struct_class = Types::DeleteCustomKeyStoreResponse
|
386
396
|
|
387
397
|
DeleteImportedKeyMaterialRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
|
398
|
+
DeleteImportedKeyMaterialRequest.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
388
399
|
DeleteImportedKeyMaterialRequest.struct_class = Types::DeleteImportedKeyMaterialRequest
|
389
400
|
|
401
|
+
DeleteImportedKeyMaterialResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
402
|
+
DeleteImportedKeyMaterialResponse.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdResponseType, location_name: "KeyMaterialId"))
|
403
|
+
DeleteImportedKeyMaterialResponse.struct_class = Types::DeleteImportedKeyMaterialResponse
|
404
|
+
|
390
405
|
DependencyTimeoutException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
|
391
406
|
DependencyTimeoutException.struct_class = Types::DependencyTimeoutException
|
392
407
|
|
@@ -482,6 +497,7 @@ module Aws::KMS
|
|
482
497
|
GenerateDataKeyPairResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
483
498
|
GenerateDataKeyPairResponse.add_member(:key_pair_spec, Shapes::ShapeRef.new(shape: DataKeyPairSpec, location_name: "KeyPairSpec"))
|
484
499
|
GenerateDataKeyPairResponse.add_member(:ciphertext_for_recipient, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextForRecipient"))
|
500
|
+
GenerateDataKeyPairResponse.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
485
501
|
GenerateDataKeyPairResponse.struct_class = Types::GenerateDataKeyPairResponse
|
486
502
|
|
487
503
|
GenerateDataKeyPairWithoutPlaintextRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
|
@@ -495,6 +511,7 @@ module Aws::KMS
|
|
495
511
|
GenerateDataKeyPairWithoutPlaintextResponse.add_member(:public_key, Shapes::ShapeRef.new(shape: PublicKeyType, location_name: "PublicKey"))
|
496
512
|
GenerateDataKeyPairWithoutPlaintextResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
497
513
|
GenerateDataKeyPairWithoutPlaintextResponse.add_member(:key_pair_spec, Shapes::ShapeRef.new(shape: DataKeyPairSpec, location_name: "KeyPairSpec"))
|
514
|
+
GenerateDataKeyPairWithoutPlaintextResponse.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
498
515
|
GenerateDataKeyPairWithoutPlaintextResponse.struct_class = Types::GenerateDataKeyPairWithoutPlaintextResponse
|
499
516
|
|
500
517
|
GenerateDataKeyRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
|
@@ -510,6 +527,7 @@ module Aws::KMS
|
|
510
527
|
GenerateDataKeyResponse.add_member(:plaintext, Shapes::ShapeRef.new(shape: PlaintextType, location_name: "Plaintext"))
|
511
528
|
GenerateDataKeyResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
512
529
|
GenerateDataKeyResponse.add_member(:ciphertext_for_recipient, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextForRecipient"))
|
530
|
+
GenerateDataKeyResponse.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
513
531
|
GenerateDataKeyResponse.struct_class = Types::GenerateDataKeyResponse
|
514
532
|
|
515
533
|
GenerateDataKeyWithoutPlaintextRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
|
@@ -522,6 +540,7 @@ module Aws::KMS
|
|
522
540
|
|
523
541
|
GenerateDataKeyWithoutPlaintextResponse.add_member(:ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextBlob"))
|
524
542
|
GenerateDataKeyWithoutPlaintextResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
543
|
+
GenerateDataKeyWithoutPlaintextResponse.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
525
544
|
GenerateDataKeyWithoutPlaintextResponse.struct_class = Types::GenerateDataKeyWithoutPlaintextResponse
|
526
545
|
|
527
546
|
GenerateMacRequest.add_member(:message, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Message"))
|
@@ -580,7 +599,7 @@ module Aws::KMS
|
|
580
599
|
|
581
600
|
GetPublicKeyResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
582
601
|
GetPublicKeyResponse.add_member(:public_key, Shapes::ShapeRef.new(shape: PublicKeyType, location_name: "PublicKey"))
|
583
|
-
GetPublicKeyResponse.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, deprecated: true, location_name: "CustomerMasterKeySpec", metadata: {"deprecatedMessage"=>"This field has been deprecated. Instead, use the KeySpec field."}))
|
602
|
+
GetPublicKeyResponse.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, deprecated: true, location_name: "CustomerMasterKeySpec", metadata: {"deprecatedMessage" => "This field has been deprecated. Instead, use the KeySpec field."}))
|
584
603
|
GetPublicKeyResponse.add_member(:key_spec, Shapes::ShapeRef.new(shape: KeySpec, location_name: "KeySpec"))
|
585
604
|
GetPublicKeyResponse.add_member(:key_usage, Shapes::ShapeRef.new(shape: KeyUsageType, location_name: "KeyUsage"))
|
586
605
|
GetPublicKeyResponse.add_member(:encryption_algorithms, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpecList, location_name: "EncryptionAlgorithms"))
|
@@ -614,8 +633,13 @@ module Aws::KMS
|
|
614
633
|
ImportKeyMaterialRequest.add_member(:encrypted_key_material, Shapes::ShapeRef.new(shape: CiphertextType, required: true, location_name: "EncryptedKeyMaterial"))
|
615
634
|
ImportKeyMaterialRequest.add_member(:valid_to, Shapes::ShapeRef.new(shape: DateType, location_name: "ValidTo"))
|
616
635
|
ImportKeyMaterialRequest.add_member(:expiration_model, Shapes::ShapeRef.new(shape: ExpirationModelType, location_name: "ExpirationModel"))
|
636
|
+
ImportKeyMaterialRequest.add_member(:import_type, Shapes::ShapeRef.new(shape: ImportType, location_name: "ImportType"))
|
637
|
+
ImportKeyMaterialRequest.add_member(:key_material_description, Shapes::ShapeRef.new(shape: KeyMaterialDescriptionType, location_name: "KeyMaterialDescription"))
|
638
|
+
ImportKeyMaterialRequest.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
617
639
|
ImportKeyMaterialRequest.struct_class = Types::ImportKeyMaterialRequest
|
618
640
|
|
641
|
+
ImportKeyMaterialResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
642
|
+
ImportKeyMaterialResponse.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
619
643
|
ImportKeyMaterialResponse.struct_class = Types::ImportKeyMaterialResponse
|
620
644
|
|
621
645
|
IncorrectKeyException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
|
@@ -686,7 +710,7 @@ module Aws::KMS
|
|
686
710
|
KeyMetadata.add_member(:cloud_hsm_cluster_id, Shapes::ShapeRef.new(shape: CloudHsmClusterIdType, location_name: "CloudHsmClusterId"))
|
687
711
|
KeyMetadata.add_member(:expiration_model, Shapes::ShapeRef.new(shape: ExpirationModelType, location_name: "ExpirationModel"))
|
688
712
|
KeyMetadata.add_member(:key_manager, Shapes::ShapeRef.new(shape: KeyManagerType, location_name: "KeyManager"))
|
689
|
-
KeyMetadata.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, deprecated: true, location_name: "CustomerMasterKeySpec", metadata: {"deprecatedMessage"=>"This field has been deprecated. Instead, use the KeySpec field."}))
|
713
|
+
KeyMetadata.add_member(:customer_master_key_spec, Shapes::ShapeRef.new(shape: CustomerMasterKeySpec, deprecated: true, location_name: "CustomerMasterKeySpec", metadata: {"deprecatedMessage" => "This field has been deprecated. Instead, use the KeySpec field."}))
|
690
714
|
KeyMetadata.add_member(:key_spec, Shapes::ShapeRef.new(shape: KeySpec, location_name: "KeySpec"))
|
691
715
|
KeyMetadata.add_member(:encryption_algorithms, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpecList, location_name: "EncryptionAlgorithms"))
|
692
716
|
KeyMetadata.add_member(:signing_algorithms, Shapes::ShapeRef.new(shape: SigningAlgorithmSpecList, location_name: "SigningAlgorithms"))
|
@@ -696,6 +720,7 @@ module Aws::KMS
|
|
696
720
|
KeyMetadata.add_member(:pending_deletion_window_in_days, Shapes::ShapeRef.new(shape: PendingWindowInDaysType, location_name: "PendingDeletionWindowInDays"))
|
697
721
|
KeyMetadata.add_member(:mac_algorithms, Shapes::ShapeRef.new(shape: MacAlgorithmSpecList, location_name: "MacAlgorithms"))
|
698
722
|
KeyMetadata.add_member(:xks_key_configuration, Shapes::ShapeRef.new(shape: XksKeyConfigurationType, location_name: "XksKeyConfiguration"))
|
723
|
+
KeyMetadata.add_member(:current_key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "CurrentKeyMaterialId"))
|
699
724
|
KeyMetadata.struct_class = Types::KeyMetadata
|
700
725
|
|
701
726
|
KeyUnavailableException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessageType, location_name: "message"))
|
@@ -737,6 +762,7 @@ module Aws::KMS
|
|
737
762
|
ListKeyPoliciesResponse.struct_class = Types::ListKeyPoliciesResponse
|
738
763
|
|
739
764
|
ListKeyRotationsRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
|
765
|
+
ListKeyRotationsRequest.add_member(:include_key_material, Shapes::ShapeRef.new(shape: IncludeKeyMaterial, location_name: "IncludeKeyMaterial"))
|
740
766
|
ListKeyRotationsRequest.add_member(:limit, Shapes::ShapeRef.new(shape: LimitType, location_name: "Limit"))
|
741
767
|
ListKeyRotationsRequest.add_member(:marker, Shapes::ShapeRef.new(shape: MarkerType, location_name: "Marker"))
|
742
768
|
ListKeyRotationsRequest.struct_class = Types::ListKeyRotationsRequest
|
@@ -813,6 +839,8 @@ module Aws::KMS
|
|
813
839
|
ReEncryptResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
814
840
|
ReEncryptResponse.add_member(:source_encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "SourceEncryptionAlgorithm"))
|
815
841
|
ReEncryptResponse.add_member(:destination_encryption_algorithm, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpec, location_name: "DestinationEncryptionAlgorithm"))
|
842
|
+
ReEncryptResponse.add_member(:source_key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "SourceKeyMaterialId"))
|
843
|
+
ReEncryptResponse.add_member(:destination_key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "DestinationKeyMaterialId"))
|
816
844
|
ReEncryptResponse.struct_class = Types::ReEncryptResponse
|
817
845
|
|
818
846
|
RecipientInfo.add_member(:key_encryption_algorithm, Shapes::ShapeRef.new(shape: KeyEncryptionMechanism, location_name: "KeyEncryptionAlgorithm"))
|
@@ -852,6 +880,12 @@ module Aws::KMS
|
|
852
880
|
RotationsList.member = Shapes::ShapeRef.new(shape: RotationsListEntry)
|
853
881
|
|
854
882
|
RotationsListEntry.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
883
|
+
RotationsListEntry.add_member(:key_material_id, Shapes::ShapeRef.new(shape: BackingKeyIdType, location_name: "KeyMaterialId"))
|
884
|
+
RotationsListEntry.add_member(:key_material_description, Shapes::ShapeRef.new(shape: KeyMaterialDescriptionType, location_name: "KeyMaterialDescription"))
|
885
|
+
RotationsListEntry.add_member(:import_state, Shapes::ShapeRef.new(shape: ImportState, location_name: "ImportState"))
|
886
|
+
RotationsListEntry.add_member(:key_material_state, Shapes::ShapeRef.new(shape: KeyMaterialState, location_name: "KeyMaterialState"))
|
887
|
+
RotationsListEntry.add_member(:expiration_model, Shapes::ShapeRef.new(shape: ExpirationModelType, location_name: "ExpirationModel"))
|
888
|
+
RotationsListEntry.add_member(:valid_to, Shapes::ShapeRef.new(shape: DateType, location_name: "ValidTo"))
|
855
889
|
RotationsListEntry.add_member(:rotation_date, Shapes::ShapeRef.new(shape: DateType, location_name: "RotationDate"))
|
856
890
|
RotationsListEntry.add_member(:rotation_type, Shapes::ShapeRef.new(shape: RotationType, location_name: "RotationType"))
|
857
891
|
RotationsListEntry.struct_class = Types::RotationsListEntry
|
@@ -1178,7 +1212,7 @@ module Aws::KMS
|
|
1178
1212
|
o.http_method = "POST"
|
1179
1213
|
o.http_request_uri = "/"
|
1180
1214
|
o.input = Shapes::ShapeRef.new(shape: DeleteImportedKeyMaterialRequest)
|
1181
|
-
o.output = Shapes::ShapeRef.new(shape:
|
1215
|
+
o.output = Shapes::ShapeRef.new(shape: DeleteImportedKeyMaterialResponse)
|
1182
1216
|
o.errors << Shapes::ShapeRef.new(shape: InvalidArnException)
|
1183
1217
|
o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
|
1184
1218
|
o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
|
@@ -52,15 +52,18 @@ module Aws::KMS
|
|
52
52
|
self[:region] = options[:region]
|
53
53
|
self[:use_dual_stack] = options[:use_dual_stack]
|
54
54
|
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
|
-
if self[:use_dual_stack].nil?
|
56
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
57
|
-
end
|
58
55
|
self[:use_fips] = options[:use_fips]
|
59
56
|
self[:use_fips] = false if self[:use_fips].nil?
|
60
|
-
if self[:use_fips].nil?
|
61
|
-
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
62
|
-
end
|
63
57
|
self[:endpoint] = options[:endpoint]
|
64
58
|
end
|
59
|
+
|
60
|
+
def self.create(config, options={})
|
61
|
+
new({
|
62
|
+
region: config.region,
|
63
|
+
use_dual_stack: config.use_dualstack_endpoint,
|
64
|
+
use_fips: config.use_fips_endpoint,
|
65
|
+
endpoint: (config.endpoint.to_s unless config.regional_endpoint),
|
66
|
+
}.merge(options))
|
67
|
+
end
|
65
68
|
end
|
66
69
|
end
|
@@ -10,40 +10,36 @@
|
|
10
10
|
module Aws::KMS
|
11
11
|
class EndpointProvider
|
12
12
|
def resolve_endpoint(parameters)
|
13
|
-
|
14
|
-
|
15
|
-
use_fips = parameters.use_fips
|
16
|
-
endpoint = parameters.endpoint
|
17
|
-
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
13
|
+
if Aws::Endpoints::Matchers.set?(parameters.endpoint)
|
14
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
19
15
|
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
16
|
end
|
21
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
22
18
|
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
19
|
end
|
24
|
-
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
20
|
+
return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
|
25
21
|
end
|
26
|
-
if Aws::Endpoints::Matchers.set?(region)
|
27
|
-
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
if Aws::Endpoints::Matchers.set?(parameters.region)
|
23
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
|
24
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
29
25
|
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
-
return Aws::Endpoints::Endpoint.new(url: "https://kms-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
26
|
+
return Aws::Endpoints::Endpoint.new(url: "https://kms-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
27
|
end
|
32
28
|
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
29
|
end
|
34
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
30
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
35
31
|
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
36
|
-
return Aws::Endpoints::Endpoint.new(url: "https://kms-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
32
|
+
return Aws::Endpoints::Endpoint.new(url: "https://kms-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
37
33
|
end
|
38
34
|
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
39
35
|
end
|
40
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
36
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
41
37
|
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
42
|
-
return Aws::Endpoints::Endpoint.new(url: "https://kms.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
38
|
+
return Aws::Endpoints::Endpoint.new(url: "https://kms.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
43
39
|
end
|
44
40
|
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
45
41
|
end
|
46
|
-
return Aws::Endpoints::Endpoint.new(url: "https://kms.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://kms.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
47
43
|
end
|
48
44
|
end
|
49
45
|
raise ArgumentError, "Invalid Configuration: Missing Region"
|