aws-sdk-kms 1.52.0 → 1.72.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 +103 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-kms/client.rb +3617 -1262
- data/lib/aws-sdk-kms/client_api.rb +246 -7
- data/lib/aws-sdk-kms/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-kms/endpoint_provider.rb +54 -0
- data/lib/aws-sdk-kms/endpoints.rb +716 -0
- data/lib/aws-sdk-kms/errors.rb +224 -0
- data/lib/aws-sdk-kms/plugins/endpoints.rb +168 -0
- data/lib/aws-sdk-kms/types.rb +2211 -970
- data/lib/aws-sdk-kms.rb +5 -1
- metadata +8 -4
data/lib/aws-sdk-kms/errors.rb
CHANGED
@@ -39,6 +39,7 @@ module Aws::KMS
|
|
39
39
|
# * {CustomKeyStoreNotFoundException}
|
40
40
|
# * {DependencyTimeoutException}
|
41
41
|
# * {DisabledException}
|
42
|
+
# * {DryRunOperationException}
|
42
43
|
# * {ExpiredImportTokenException}
|
43
44
|
# * {IncorrectKeyException}
|
44
45
|
# * {IncorrectKeyMaterialException}
|
@@ -52,6 +53,7 @@ module Aws::KMS
|
|
52
53
|
# * {InvalidKeyUsageException}
|
53
54
|
# * {InvalidMarkerException}
|
54
55
|
# * {KMSInternalException}
|
56
|
+
# * {KMSInvalidMacException}
|
55
57
|
# * {KMSInvalidSignatureException}
|
56
58
|
# * {KMSInvalidStateException}
|
57
59
|
# * {KeyUnavailableException}
|
@@ -60,6 +62,18 @@ module Aws::KMS
|
|
60
62
|
# * {NotFoundException}
|
61
63
|
# * {TagException}
|
62
64
|
# * {UnsupportedOperationException}
|
65
|
+
# * {XksKeyAlreadyInUseException}
|
66
|
+
# * {XksKeyInvalidConfigurationException}
|
67
|
+
# * {XksKeyNotFoundException}
|
68
|
+
# * {XksProxyIncorrectAuthenticationCredentialException}
|
69
|
+
# * {XksProxyInvalidConfigurationException}
|
70
|
+
# * {XksProxyInvalidResponseException}
|
71
|
+
# * {XksProxyUriEndpointInUseException}
|
72
|
+
# * {XksProxyUriInUseException}
|
73
|
+
# * {XksProxyUriUnreachableException}
|
74
|
+
# * {XksProxyVpcEndpointServiceInUseException}
|
75
|
+
# * {XksProxyVpcEndpointServiceInvalidConfigurationException}
|
76
|
+
# * {XksProxyVpcEndpointServiceNotFoundException}
|
63
77
|
#
|
64
78
|
# Additionally, error classes are dynamically generated for service errors based on the error code
|
65
79
|
# if they are not defined above.
|
@@ -247,6 +261,21 @@ module Aws::KMS
|
|
247
261
|
end
|
248
262
|
end
|
249
263
|
|
264
|
+
class DryRunOperationException < ServiceError
|
265
|
+
|
266
|
+
# @param [Seahorse::Client::RequestContext] context
|
267
|
+
# @param [String] message
|
268
|
+
# @param [Aws::KMS::Types::DryRunOperationException] data
|
269
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
270
|
+
super(context, message, data)
|
271
|
+
end
|
272
|
+
|
273
|
+
# @return [String]
|
274
|
+
def message
|
275
|
+
@message || @data[:message]
|
276
|
+
end
|
277
|
+
end
|
278
|
+
|
250
279
|
class ExpiredImportTokenException < ServiceError
|
251
280
|
|
252
281
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -442,6 +471,21 @@ module Aws::KMS
|
|
442
471
|
end
|
443
472
|
end
|
444
473
|
|
474
|
+
class KMSInvalidMacException < ServiceError
|
475
|
+
|
476
|
+
# @param [Seahorse::Client::RequestContext] context
|
477
|
+
# @param [String] message
|
478
|
+
# @param [Aws::KMS::Types::KMSInvalidMacException] data
|
479
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
480
|
+
super(context, message, data)
|
481
|
+
end
|
482
|
+
|
483
|
+
# @return [String]
|
484
|
+
def message
|
485
|
+
@message || @data[:message]
|
486
|
+
end
|
487
|
+
end
|
488
|
+
|
445
489
|
class KMSInvalidSignatureException < ServiceError
|
446
490
|
|
447
491
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -562,5 +606,185 @@ module Aws::KMS
|
|
562
606
|
end
|
563
607
|
end
|
564
608
|
|
609
|
+
class XksKeyAlreadyInUseException < ServiceError
|
610
|
+
|
611
|
+
# @param [Seahorse::Client::RequestContext] context
|
612
|
+
# @param [String] message
|
613
|
+
# @param [Aws::KMS::Types::XksKeyAlreadyInUseException] data
|
614
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
615
|
+
super(context, message, data)
|
616
|
+
end
|
617
|
+
|
618
|
+
# @return [String]
|
619
|
+
def message
|
620
|
+
@message || @data[:message]
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
class XksKeyInvalidConfigurationException < ServiceError
|
625
|
+
|
626
|
+
# @param [Seahorse::Client::RequestContext] context
|
627
|
+
# @param [String] message
|
628
|
+
# @param [Aws::KMS::Types::XksKeyInvalidConfigurationException] data
|
629
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
630
|
+
super(context, message, data)
|
631
|
+
end
|
632
|
+
|
633
|
+
# @return [String]
|
634
|
+
def message
|
635
|
+
@message || @data[:message]
|
636
|
+
end
|
637
|
+
end
|
638
|
+
|
639
|
+
class XksKeyNotFoundException < ServiceError
|
640
|
+
|
641
|
+
# @param [Seahorse::Client::RequestContext] context
|
642
|
+
# @param [String] message
|
643
|
+
# @param [Aws::KMS::Types::XksKeyNotFoundException] data
|
644
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
645
|
+
super(context, message, data)
|
646
|
+
end
|
647
|
+
|
648
|
+
# @return [String]
|
649
|
+
def message
|
650
|
+
@message || @data[:message]
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
654
|
+
class XksProxyIncorrectAuthenticationCredentialException < ServiceError
|
655
|
+
|
656
|
+
# @param [Seahorse::Client::RequestContext] context
|
657
|
+
# @param [String] message
|
658
|
+
# @param [Aws::KMS::Types::XksProxyIncorrectAuthenticationCredentialException] data
|
659
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
660
|
+
super(context, message, data)
|
661
|
+
end
|
662
|
+
|
663
|
+
# @return [String]
|
664
|
+
def message
|
665
|
+
@message || @data[:message]
|
666
|
+
end
|
667
|
+
end
|
668
|
+
|
669
|
+
class XksProxyInvalidConfigurationException < ServiceError
|
670
|
+
|
671
|
+
# @param [Seahorse::Client::RequestContext] context
|
672
|
+
# @param [String] message
|
673
|
+
# @param [Aws::KMS::Types::XksProxyInvalidConfigurationException] data
|
674
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
675
|
+
super(context, message, data)
|
676
|
+
end
|
677
|
+
|
678
|
+
# @return [String]
|
679
|
+
def message
|
680
|
+
@message || @data[:message]
|
681
|
+
end
|
682
|
+
end
|
683
|
+
|
684
|
+
class XksProxyInvalidResponseException < ServiceError
|
685
|
+
|
686
|
+
# @param [Seahorse::Client::RequestContext] context
|
687
|
+
# @param [String] message
|
688
|
+
# @param [Aws::KMS::Types::XksProxyInvalidResponseException] data
|
689
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
690
|
+
super(context, message, data)
|
691
|
+
end
|
692
|
+
|
693
|
+
# @return [String]
|
694
|
+
def message
|
695
|
+
@message || @data[:message]
|
696
|
+
end
|
697
|
+
end
|
698
|
+
|
699
|
+
class XksProxyUriEndpointInUseException < ServiceError
|
700
|
+
|
701
|
+
# @param [Seahorse::Client::RequestContext] context
|
702
|
+
# @param [String] message
|
703
|
+
# @param [Aws::KMS::Types::XksProxyUriEndpointInUseException] data
|
704
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
705
|
+
super(context, message, data)
|
706
|
+
end
|
707
|
+
|
708
|
+
# @return [String]
|
709
|
+
def message
|
710
|
+
@message || @data[:message]
|
711
|
+
end
|
712
|
+
end
|
713
|
+
|
714
|
+
class XksProxyUriInUseException < ServiceError
|
715
|
+
|
716
|
+
# @param [Seahorse::Client::RequestContext] context
|
717
|
+
# @param [String] message
|
718
|
+
# @param [Aws::KMS::Types::XksProxyUriInUseException] data
|
719
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
720
|
+
super(context, message, data)
|
721
|
+
end
|
722
|
+
|
723
|
+
# @return [String]
|
724
|
+
def message
|
725
|
+
@message || @data[:message]
|
726
|
+
end
|
727
|
+
end
|
728
|
+
|
729
|
+
class XksProxyUriUnreachableException < ServiceError
|
730
|
+
|
731
|
+
# @param [Seahorse::Client::RequestContext] context
|
732
|
+
# @param [String] message
|
733
|
+
# @param [Aws::KMS::Types::XksProxyUriUnreachableException] data
|
734
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
735
|
+
super(context, message, data)
|
736
|
+
end
|
737
|
+
|
738
|
+
# @return [String]
|
739
|
+
def message
|
740
|
+
@message || @data[:message]
|
741
|
+
end
|
742
|
+
end
|
743
|
+
|
744
|
+
class XksProxyVpcEndpointServiceInUseException < ServiceError
|
745
|
+
|
746
|
+
# @param [Seahorse::Client::RequestContext] context
|
747
|
+
# @param [String] message
|
748
|
+
# @param [Aws::KMS::Types::XksProxyVpcEndpointServiceInUseException] data
|
749
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
750
|
+
super(context, message, data)
|
751
|
+
end
|
752
|
+
|
753
|
+
# @return [String]
|
754
|
+
def message
|
755
|
+
@message || @data[:message]
|
756
|
+
end
|
757
|
+
end
|
758
|
+
|
759
|
+
class XksProxyVpcEndpointServiceInvalidConfigurationException < ServiceError
|
760
|
+
|
761
|
+
# @param [Seahorse::Client::RequestContext] context
|
762
|
+
# @param [String] message
|
763
|
+
# @param [Aws::KMS::Types::XksProxyVpcEndpointServiceInvalidConfigurationException] data
|
764
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
765
|
+
super(context, message, data)
|
766
|
+
end
|
767
|
+
|
768
|
+
# @return [String]
|
769
|
+
def message
|
770
|
+
@message || @data[:message]
|
771
|
+
end
|
772
|
+
end
|
773
|
+
|
774
|
+
class XksProxyVpcEndpointServiceNotFoundException < ServiceError
|
775
|
+
|
776
|
+
# @param [Seahorse::Client::RequestContext] context
|
777
|
+
# @param [String] message
|
778
|
+
# @param [Aws::KMS::Types::XksProxyVpcEndpointServiceNotFoundException] data
|
779
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
780
|
+
super(context, message, data)
|
781
|
+
end
|
782
|
+
|
783
|
+
# @return [String]
|
784
|
+
def message
|
785
|
+
@message || @data[:message]
|
786
|
+
end
|
787
|
+
end
|
788
|
+
|
565
789
|
end
|
566
790
|
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::KMS
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::KMS::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::KMS::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::KMS::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :cancel_key_deletion
|
60
|
+
Aws::KMS::Endpoints::CancelKeyDeletion.build(context)
|
61
|
+
when :connect_custom_key_store
|
62
|
+
Aws::KMS::Endpoints::ConnectCustomKeyStore.build(context)
|
63
|
+
when :create_alias
|
64
|
+
Aws::KMS::Endpoints::CreateAlias.build(context)
|
65
|
+
when :create_custom_key_store
|
66
|
+
Aws::KMS::Endpoints::CreateCustomKeyStore.build(context)
|
67
|
+
when :create_grant
|
68
|
+
Aws::KMS::Endpoints::CreateGrant.build(context)
|
69
|
+
when :create_key
|
70
|
+
Aws::KMS::Endpoints::CreateKey.build(context)
|
71
|
+
when :decrypt
|
72
|
+
Aws::KMS::Endpoints::Decrypt.build(context)
|
73
|
+
when :delete_alias
|
74
|
+
Aws::KMS::Endpoints::DeleteAlias.build(context)
|
75
|
+
when :delete_custom_key_store
|
76
|
+
Aws::KMS::Endpoints::DeleteCustomKeyStore.build(context)
|
77
|
+
when :delete_imported_key_material
|
78
|
+
Aws::KMS::Endpoints::DeleteImportedKeyMaterial.build(context)
|
79
|
+
when :describe_custom_key_stores
|
80
|
+
Aws::KMS::Endpoints::DescribeCustomKeyStores.build(context)
|
81
|
+
when :describe_key
|
82
|
+
Aws::KMS::Endpoints::DescribeKey.build(context)
|
83
|
+
when :disable_key
|
84
|
+
Aws::KMS::Endpoints::DisableKey.build(context)
|
85
|
+
when :disable_key_rotation
|
86
|
+
Aws::KMS::Endpoints::DisableKeyRotation.build(context)
|
87
|
+
when :disconnect_custom_key_store
|
88
|
+
Aws::KMS::Endpoints::DisconnectCustomKeyStore.build(context)
|
89
|
+
when :enable_key
|
90
|
+
Aws::KMS::Endpoints::EnableKey.build(context)
|
91
|
+
when :enable_key_rotation
|
92
|
+
Aws::KMS::Endpoints::EnableKeyRotation.build(context)
|
93
|
+
when :encrypt
|
94
|
+
Aws::KMS::Endpoints::Encrypt.build(context)
|
95
|
+
when :generate_data_key
|
96
|
+
Aws::KMS::Endpoints::GenerateDataKey.build(context)
|
97
|
+
when :generate_data_key_pair
|
98
|
+
Aws::KMS::Endpoints::GenerateDataKeyPair.build(context)
|
99
|
+
when :generate_data_key_pair_without_plaintext
|
100
|
+
Aws::KMS::Endpoints::GenerateDataKeyPairWithoutPlaintext.build(context)
|
101
|
+
when :generate_data_key_without_plaintext
|
102
|
+
Aws::KMS::Endpoints::GenerateDataKeyWithoutPlaintext.build(context)
|
103
|
+
when :generate_mac
|
104
|
+
Aws::KMS::Endpoints::GenerateMac.build(context)
|
105
|
+
when :generate_random
|
106
|
+
Aws::KMS::Endpoints::GenerateRandom.build(context)
|
107
|
+
when :get_key_policy
|
108
|
+
Aws::KMS::Endpoints::GetKeyPolicy.build(context)
|
109
|
+
when :get_key_rotation_status
|
110
|
+
Aws::KMS::Endpoints::GetKeyRotationStatus.build(context)
|
111
|
+
when :get_parameters_for_import
|
112
|
+
Aws::KMS::Endpoints::GetParametersForImport.build(context)
|
113
|
+
when :get_public_key
|
114
|
+
Aws::KMS::Endpoints::GetPublicKey.build(context)
|
115
|
+
when :import_key_material
|
116
|
+
Aws::KMS::Endpoints::ImportKeyMaterial.build(context)
|
117
|
+
when :list_aliases
|
118
|
+
Aws::KMS::Endpoints::ListAliases.build(context)
|
119
|
+
when :list_grants
|
120
|
+
Aws::KMS::Endpoints::ListGrants.build(context)
|
121
|
+
when :list_key_policies
|
122
|
+
Aws::KMS::Endpoints::ListKeyPolicies.build(context)
|
123
|
+
when :list_keys
|
124
|
+
Aws::KMS::Endpoints::ListKeys.build(context)
|
125
|
+
when :list_resource_tags
|
126
|
+
Aws::KMS::Endpoints::ListResourceTags.build(context)
|
127
|
+
when :list_retirable_grants
|
128
|
+
Aws::KMS::Endpoints::ListRetirableGrants.build(context)
|
129
|
+
when :put_key_policy
|
130
|
+
Aws::KMS::Endpoints::PutKeyPolicy.build(context)
|
131
|
+
when :re_encrypt
|
132
|
+
Aws::KMS::Endpoints::ReEncrypt.build(context)
|
133
|
+
when :replicate_key
|
134
|
+
Aws::KMS::Endpoints::ReplicateKey.build(context)
|
135
|
+
when :retire_grant
|
136
|
+
Aws::KMS::Endpoints::RetireGrant.build(context)
|
137
|
+
when :revoke_grant
|
138
|
+
Aws::KMS::Endpoints::RevokeGrant.build(context)
|
139
|
+
when :schedule_key_deletion
|
140
|
+
Aws::KMS::Endpoints::ScheduleKeyDeletion.build(context)
|
141
|
+
when :sign
|
142
|
+
Aws::KMS::Endpoints::Sign.build(context)
|
143
|
+
when :tag_resource
|
144
|
+
Aws::KMS::Endpoints::TagResource.build(context)
|
145
|
+
when :untag_resource
|
146
|
+
Aws::KMS::Endpoints::UntagResource.build(context)
|
147
|
+
when :update_alias
|
148
|
+
Aws::KMS::Endpoints::UpdateAlias.build(context)
|
149
|
+
when :update_custom_key_store
|
150
|
+
Aws::KMS::Endpoints::UpdateCustomKeyStore.build(context)
|
151
|
+
when :update_key_description
|
152
|
+
Aws::KMS::Endpoints::UpdateKeyDescription.build(context)
|
153
|
+
when :update_primary_region
|
154
|
+
Aws::KMS::Endpoints::UpdatePrimaryRegion.build(context)
|
155
|
+
when :verify
|
156
|
+
Aws::KMS::Endpoints::Verify.build(context)
|
157
|
+
when :verify_mac
|
158
|
+
Aws::KMS::Endpoints::VerifyMac.build(context)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def add_handlers(handlers, _config)
|
164
|
+
handlers.add(Handler, step: :build, priority: 75)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|