aws-sdk-core 3.197.0 → 3.220.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.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +297 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults/default_configuration.rb +1 -2
  5. data/lib/aws-defaults.rb +4 -1
  6. data/lib/aws-sdk-core/arn.rb +1 -3
  7. data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
  8. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
  9. data/lib/aws-sdk-core/binary/decode_handler.rb +3 -4
  10. data/lib/aws-sdk-core/binary/encode_handler.rb +1 -1
  11. data/lib/aws-sdk-core/binary/event_stream_decoder.rb +1 -0
  12. data/lib/aws-sdk-core/binary/event_stream_encoder.rb +4 -3
  13. data/lib/aws-sdk-core/cbor/decoder.rb +308 -0
  14. data/lib/aws-sdk-core/cbor/encoder.rb +243 -0
  15. data/lib/aws-sdk-core/cbor.rb +53 -0
  16. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  17. data/lib/aws-sdk-core/client_stubs.rb +8 -7
  18. data/lib/aws-sdk-core/credential_provider_chain.rb +13 -6
  19. data/lib/aws-sdk-core/credentials.rb +13 -6
  20. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  21. data/lib/aws-sdk-core/endpoints/matchers.rb +6 -9
  22. data/lib/aws-sdk-core/endpoints.rb +74 -18
  23. data/lib/aws-sdk-core/error_handler.rb +41 -0
  24. data/lib/aws-sdk-core/errors.rb +9 -0
  25. data/lib/aws-sdk-core/json/error_handler.rb +8 -9
  26. data/lib/aws-sdk-core/json/handler.rb +6 -6
  27. data/lib/aws-sdk-core/json/json_engine.rb +3 -1
  28. data/lib/aws-sdk-core/json/oj_engine.rb +7 -1
  29. data/lib/aws-sdk-core/json/parser.rb +2 -0
  30. data/lib/aws-sdk-core/json.rb +43 -14
  31. data/lib/aws-sdk-core/log/param_filter.rb +2 -2
  32. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  33. data/lib/aws-sdk-core/log.rb +10 -0
  34. data/lib/aws-sdk-core/param_validator.rb +1 -1
  35. data/lib/aws-sdk-core/plugins/bearer_authorization.rb +2 -0
  36. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -169
  37. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
  38. data/lib/aws-sdk-core/plugins/global_configuration.rb +8 -9
  39. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  40. data/lib/aws-sdk-core/plugins/protocols/api_gateway.rb +3 -1
  41. data/lib/aws-sdk-core/plugins/protocols/ec2.rb +2 -24
  42. data/lib/aws-sdk-core/plugins/protocols/json_rpc.rb +6 -8
  43. data/lib/aws-sdk-core/plugins/protocols/query.rb +4 -2
  44. data/lib/aws-sdk-core/plugins/protocols/rest_json.rb +4 -3
  45. data/lib/aws-sdk-core/plugins/protocols/rest_xml.rb +5 -1
  46. data/lib/aws-sdk-core/plugins/protocols/rpc_v2.rb +17 -0
  47. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +74 -25
  48. data/lib/aws-sdk-core/plugins/retry_errors.rb +0 -1
  49. data/lib/aws-sdk-core/plugins/sign.rb +13 -11
  50. data/lib/aws-sdk-core/plugins/signature_v2.rb +2 -1
  51. data/lib/aws-sdk-core/plugins/signature_v4.rb +2 -1
  52. data/lib/aws-sdk-core/plugins/stub_responses.rb +29 -2
  53. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  54. data/lib/aws-sdk-core/plugins/transfer_encoding.rb +16 -9
  55. data/lib/aws-sdk-core/plugins/user_agent.rb +26 -8
  56. data/lib/aws-sdk-core/plugins.rb +39 -0
  57. data/lib/aws-sdk-core/process_credentials.rb +47 -28
  58. data/lib/aws-sdk-core/query/ec2_handler.rb +27 -0
  59. data/lib/aws-sdk-core/query/handler.rb +4 -4
  60. data/lib/aws-sdk-core/query.rb +2 -1
  61. data/lib/aws-sdk-core/resources.rb +8 -0
  62. data/lib/aws-sdk-core/rest/{request/content_type.rb → content_type_handler.rb} +1 -1
  63. data/lib/aws-sdk-core/rest/handler.rb +3 -4
  64. data/lib/aws-sdk-core/rest/request/endpoint.rb +3 -1
  65. data/lib/aws-sdk-core/rest/request/headers.rb +2 -2
  66. data/lib/aws-sdk-core/rest.rb +1 -1
  67. data/lib/aws-sdk-core/rpc_v2/builder.rb +62 -0
  68. data/lib/aws-sdk-core/rpc_v2/cbor_engine.rb +18 -0
  69. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +47 -0
  70. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +85 -0
  71. data/lib/aws-sdk-core/rpc_v2/handler.rb +79 -0
  72. data/lib/aws-sdk-core/rpc_v2/parser.rb +90 -0
  73. data/lib/aws-sdk-core/rpc_v2.rb +69 -0
  74. data/lib/aws-sdk-core/shared_config.rb +7 -2
  75. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  76. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  77. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  78. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  79. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  80. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  81. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  82. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  83. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +39 -0
  84. data/lib/aws-sdk-core/stubbing.rb +22 -0
  85. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  86. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  87. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  88. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  89. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  90. data/lib/aws-sdk-core/telemetry.rb +78 -0
  91. data/lib/aws-sdk-core/waiters/poller.rb +9 -4
  92. data/lib/aws-sdk-core/xml/error_handler.rb +11 -37
  93. data/lib/aws-sdk-core/xml/parser.rb +2 -6
  94. data/lib/aws-sdk-core.rb +82 -108
  95. data/lib/aws-sdk-sso/client.rb +99 -37
  96. data/lib/aws-sdk-sso/client_api.rb +7 -0
  97. data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
  98. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  99. data/lib/aws-sdk-sso/endpoints.rb +2 -54
  100. data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
  101. data/lib/aws-sdk-sso/types.rb +1 -0
  102. data/lib/aws-sdk-sso.rb +15 -11
  103. data/lib/aws-sdk-ssooidc/client.rb +123 -55
  104. data/lib/aws-sdk-ssooidc/client_api.rb +5 -0
  105. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
  106. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  107. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
  108. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
  109. data/lib/aws-sdk-ssooidc/types.rb +21 -15
  110. data/lib/aws-sdk-ssooidc.rb +15 -11
  111. data/lib/aws-sdk-sts/client.rb +307 -89
  112. data/lib/aws-sdk-sts/client_api.rb +28 -2
  113. data/lib/aws-sdk-sts/customizations.rb +5 -1
  114. data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
  115. data/lib/aws-sdk-sts/endpoint_provider.rb +33 -38
  116. data/lib/aws-sdk-sts/endpoints.rb +2 -118
  117. data/lib/aws-sdk-sts/errors.rb +16 -0
  118. data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
  119. data/lib/aws-sdk-sts/types.rb +171 -28
  120. data/lib/aws-sdk-sts.rb +15 -11
  121. data/lib/seahorse/client/base.rb +17 -7
  122. data/lib/seahorse/client/h2/handler.rb +13 -3
  123. data/lib/seahorse/client/handler.rb +1 -1
  124. data/lib/seahorse/client/net_http/connection_pool.rb +10 -2
  125. data/lib/seahorse/client/net_http/handler.rb +21 -9
  126. data/lib/seahorse/client/plugins/endpoint.rb +0 -1
  127. data/lib/seahorse/client/plugins/net_http.rb +9 -0
  128. data/lib/seahorse/client/request_context.rb +8 -1
  129. data/lib/seahorse/client/response.rb +2 -0
  130. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  131. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  132. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  133. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  134. metadata +62 -18
  135. /data/lib/aws-sdk-core/xml/parser/{engines/libxml.rb → libxml_engine.rb} +0 -0
  136. /data/lib/aws-sdk-core/xml/parser/{engines/nokogiri.rb → nokogiri_engine.rb} +0 -0
  137. /data/lib/aws-sdk-core/xml/parser/{engines/oga.rb → oga_engine.rb} +0 -0
  138. /data/lib/aws-sdk-core/xml/parser/{engines/ox.rb → ox_engine.rb} +0 -0
  139. /data/lib/aws-sdk-core/xml/parser/{engines/rexml.rb → rexml_engine.rb} +0 -0
@@ -15,11 +15,11 @@ module Aws::SSO
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::SSO::EndpointProvider',
17
17
  rbs_type: 'untyped',
18
- docstring: 'The endpoint provider used to resolve endpoints. Any '\
19
- 'object that responds to `#resolve_endpoint(parameters)` '\
20
- 'where `parameters` is a Struct similar to '\
21
- '`Aws::SSO::EndpointParameters`'
22
- ) do |cfg|
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::SSO::EndpointParameters`.
22
+ DOCS
23
23
  Aws::SSO::EndpointProvider.new
24
24
  end
25
25
 
@@ -27,7 +27,7 @@ module Aws::SSO
27
27
  class Handler < Seahorse::Client::Handler
28
28
  def call(context)
29
29
  unless context[:discovered_endpoint]
30
- params = parameters_for_operation(context)
30
+ params = Aws::SSO::Endpoints.parameters_for_operation(context)
31
31
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
32
 
33
33
  context.http_request.endpoint = endpoint.url
@@ -40,11 +40,23 @@ module Aws::SSO
40
40
  context[:auth_scheme] =
41
41
  Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
42
 
43
- @handler.call(context)
43
+ with_metrics(context) { @handler.call(context) }
44
44
  end
45
45
 
46
46
  private
47
47
 
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
48
60
  def apply_endpoint_headers(context, headers)
49
61
  headers.each do |key, values|
50
62
  value = values
@@ -55,19 +67,6 @@ module Aws::SSO
55
67
  context.http_request.headers[key] = value
56
68
  end
57
69
  end
58
-
59
- def parameters_for_operation(context)
60
- case context.operation_name
61
- when :get_role_credentials
62
- Aws::SSO::Endpoints::GetRoleCredentials.build(context)
63
- when :list_account_roles
64
- Aws::SSO::Endpoints::ListAccountRoles.build(context)
65
- when :list_accounts
66
- Aws::SSO::Endpoints::ListAccounts.build(context)
67
- when :logout
68
- Aws::SSO::Endpoints::Logout.build(context)
69
- end
70
- end
71
70
  end
72
71
 
73
72
  def add_handlers(handlers, _config)
@@ -315,3 +315,4 @@ module Aws::SSO
315
315
 
316
316
  end
317
317
  end
318
+
data/lib/aws-sdk-sso.rb CHANGED
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
13
13
  require 'aws-sigv4'
14
14
  end
15
15
 
16
- require_relative 'aws-sdk-sso/types'
17
- require_relative 'aws-sdk-sso/client_api'
18
- require_relative 'aws-sdk-sso/plugins/endpoints.rb'
19
- require_relative 'aws-sdk-sso/client'
20
- require_relative 'aws-sdk-sso/errors'
21
- require_relative 'aws-sdk-sso/resource'
22
- require_relative 'aws-sdk-sso/endpoint_parameters'
23
- require_relative 'aws-sdk-sso/endpoint_provider'
24
- require_relative 'aws-sdk-sso/endpoints'
25
- require_relative 'aws-sdk-sso/customizations'
16
+ Aws::Plugins::GlobalConfiguration.add_identifier(:sso)
26
17
 
27
18
  # This module provides support for AWS Single Sign-On. This module is available in the
28
19
  # `aws-sdk-core` gem.
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-sso/customizations'
53
44
  #
54
45
  # @!group service
55
46
  module Aws::SSO
47
+ autoload :Types, 'aws-sdk-sso/types'
48
+ autoload :ClientApi, 'aws-sdk-sso/client_api'
49
+ module Plugins
50
+ autoload :Endpoints, 'aws-sdk-sso/plugins/endpoints.rb'
51
+ end
52
+ autoload :Client, 'aws-sdk-sso/client'
53
+ autoload :Errors, 'aws-sdk-sso/errors'
54
+ autoload :Resource, 'aws-sdk-sso/resource'
55
+ autoload :EndpointParameters, 'aws-sdk-sso/endpoint_parameters'
56
+ autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
+ autoload :Endpoints, 'aws-sdk-sso/endpoints'
56
58
 
57
- GEM_VERSION = '3.197.0'
59
+ GEM_VERSION = '3.220.0'
58
60
 
59
61
  end
62
+
63
+ require_relative 'aws-sdk-sso/customizations'
@@ -7,35 +7,34 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
- require 'seahorse/client/plugins/content_length.rb'
11
- require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
- require 'aws-sdk-core/plugins/logging.rb'
13
- require 'aws-sdk-core/plugins/param_converter.rb'
14
- require 'aws-sdk-core/plugins/param_validator.rb'
15
- require 'aws-sdk-core/plugins/user_agent.rb'
16
- require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
- require 'aws-sdk-core/plugins/retry_errors.rb'
18
- require 'aws-sdk-core/plugins/global_configuration.rb'
19
- require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
- require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
- require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
- require 'aws-sdk-core/plugins/response_paging.rb'
23
- require 'aws-sdk-core/plugins/stub_responses.rb'
24
- require 'aws-sdk-core/plugins/idempotency_token.rb'
25
- require 'aws-sdk-core/plugins/invocation_id.rb'
26
- require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
27
- require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
28
- require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
29
- require 'aws-sdk-core/plugins/transfer_encoding.rb'
30
- require 'aws-sdk-core/plugins/http_checksum.rb'
31
- require 'aws-sdk-core/plugins/checksum_algorithm.rb'
32
- require 'aws-sdk-core/plugins/request_compression.rb'
33
- require 'aws-sdk-core/plugins/defaults_mode.rb'
34
- require 'aws-sdk-core/plugins/recursion_detection.rb'
35
- require 'aws-sdk-core/plugins/sign.rb'
36
- require 'aws-sdk-core/plugins/protocols/rest_json.rb'
37
-
38
- Aws::Plugins::GlobalConfiguration.add_identifier(:ssooidc)
10
+ require 'seahorse/client/plugins/content_length'
11
+ require 'aws-sdk-core/plugins/credentials_configuration'
12
+ require 'aws-sdk-core/plugins/logging'
13
+ require 'aws-sdk-core/plugins/param_converter'
14
+ require 'aws-sdk-core/plugins/param_validator'
15
+ require 'aws-sdk-core/plugins/user_agent'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors'
17
+ require 'aws-sdk-core/plugins/retry_errors'
18
+ require 'aws-sdk-core/plugins/global_configuration'
19
+ require 'aws-sdk-core/plugins/regional_endpoint'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern'
22
+ require 'aws-sdk-core/plugins/response_paging'
23
+ require 'aws-sdk-core/plugins/stub_responses'
24
+ require 'aws-sdk-core/plugins/idempotency_token'
25
+ require 'aws-sdk-core/plugins/invocation_id'
26
+ require 'aws-sdk-core/plugins/jsonvalue_converter'
27
+ require 'aws-sdk-core/plugins/client_metrics_plugin'
28
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin'
29
+ require 'aws-sdk-core/plugins/transfer_encoding'
30
+ require 'aws-sdk-core/plugins/http_checksum'
31
+ require 'aws-sdk-core/plugins/checksum_algorithm'
32
+ require 'aws-sdk-core/plugins/request_compression'
33
+ require 'aws-sdk-core/plugins/defaults_mode'
34
+ require 'aws-sdk-core/plugins/recursion_detection'
35
+ require 'aws-sdk-core/plugins/telemetry'
36
+ require 'aws-sdk-core/plugins/sign'
37
+ require 'aws-sdk-core/plugins/protocols/rest_json'
39
38
 
40
39
  module Aws::SSOOIDC
41
40
  # An API client for SSOOIDC. To construct a client, you need to configure a `:region` and `:credentials`.
@@ -83,12 +82,18 @@ module Aws::SSOOIDC
83
82
  add_plugin(Aws::Plugins::RequestCompression)
84
83
  add_plugin(Aws::Plugins::DefaultsMode)
85
84
  add_plugin(Aws::Plugins::RecursionDetection)
85
+ add_plugin(Aws::Plugins::Telemetry)
86
86
  add_plugin(Aws::Plugins::Sign)
87
87
  add_plugin(Aws::Plugins::Protocols::RestJson)
88
88
  add_plugin(Aws::SSOOIDC::Plugins::Endpoints)
89
89
 
90
90
  # @overload initialize(options)
91
91
  # @param [Hash] options
92
+ #
93
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
94
+ # A list of plugins to apply to the client. Each plugin is either a
95
+ # class name or an instance of a plugin class.
96
+ #
92
97
  # @option options [required, Aws::CredentialProvider] :credentials
93
98
  # Your AWS credentials. This can be an instance of any one of the
94
99
  # following classes:
@@ -123,13 +128,15 @@ module Aws::SSOOIDC
123
128
  # locations will be searched for credentials:
124
129
  #
125
130
  # * `Aws.config[:credentials]`
126
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
127
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
131
+ # * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
132
+ # `:account_id` options.
133
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
134
+ # ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
128
135
  # * `~/.aws/credentials`
129
136
  # * `~/.aws/config`
130
137
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
131
138
  # are very aggressive. Construct and pass an instance of
132
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
139
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
133
140
  # enable retries and extended timeouts. Instance profile credential
134
141
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
135
142
  # to true.
@@ -148,6 +155,8 @@ module Aws::SSOOIDC
148
155
  #
149
156
  # @option options [String] :access_key_id
150
157
  #
158
+ # @option options [String] :account_id
159
+ #
151
160
  # @option options [Boolean] :active_endpoint_cache (false)
152
161
  # When set to `true`, a thread polling for endpoints will be running in
153
162
  # the background every 60 secs (default). Defaults to `false`.
@@ -209,7 +218,6 @@ module Aws::SSOOIDC
209
218
  # 'https://example.com'
210
219
  # 'http://example.com:123'
211
220
  #
212
- #
213
221
  # @option options [Integer] :endpoint_cache_max_entries (1000)
214
222
  # Used for the maximum size limit of the LRU cache storing endpoints data
215
223
  # for endpoint discovery enabled operations. Defaults to 1000.
@@ -249,11 +257,34 @@ module Aws::SSOOIDC
249
257
  # Used when loading credentials from the shared credentials file
250
258
  # at HOME/.aws/credentials. When not specified, 'default' is used.
251
259
  #
260
+ # @option options [String] :request_checksum_calculation ("when_supported")
261
+ # Determines when a checksum will be calculated for request payloads. Values are:
262
+ #
263
+ # * `when_supported` - (default) When set, a checksum will be
264
+ # calculated for all request payloads of operations modeled with the
265
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
266
+ # `requestAlgorithmMember` is modeled.
267
+ # * `when_required` - When set, a checksum will only be calculated for
268
+ # request payloads of operations modeled with the `httpChecksum` trait where
269
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
270
+ # is modeled and supplied.
271
+ #
252
272
  # @option options [Integer] :request_min_compression_size_bytes (10240)
253
273
  # The minimum size in bytes that triggers compression for request
254
274
  # bodies. The value must be non-negative integer value between 0
255
275
  # and 10485780 bytes inclusive.
256
276
  #
277
+ # @option options [String] :response_checksum_validation ("when_supported")
278
+ # Determines when checksum validation will be performed on response payloads. Values are:
279
+ #
280
+ # * `when_supported` - (default) When set, checksum validation is performed on all
281
+ # response payloads of operations modeled with the `httpChecksum` trait where
282
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
283
+ # are supported.
284
+ # * `when_required` - When set, checksum validation is not performed on
285
+ # response payloads of operations unless the checksum algorithm is supported and
286
+ # the `requestValidationModeMember` member is set to `ENABLED`.
287
+ #
257
288
  # @option options [Proc] :retry_backoff
258
289
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
259
290
  # This option is only used in the `legacy` retry mode.
@@ -298,7 +329,6 @@ module Aws::SSOOIDC
298
329
  # throttling. This is a provisional mode that may change behavior
299
330
  # in the future.
300
331
  #
301
- #
302
332
  # @option options [String] :sdk_ua_app_id
303
333
  # A unique and opaque application ID that is appended to the
304
334
  # User-Agent header as app/sdk_ua_app_id. It should have a
@@ -309,6 +339,15 @@ module Aws::SSOOIDC
309
339
  #
310
340
  # @option options [String] :session_token
311
341
  #
342
+ # @option options [Array] :sigv4a_signing_region_set
343
+ # A list of regions that should be signed with SigV4a signing. When
344
+ # not passed, a default `:sigv4a_signing_region_set` is searched for
345
+ # in the following locations:
346
+ #
347
+ # * `Aws.config[:sigv4a_signing_region_set]`
348
+ # * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
349
+ # * `~/.aws/config`
350
+ #
312
351
  # @option options [Boolean] :stub_responses (false)
313
352
  # Causes the client to return stubbed responses. By default
314
353
  # fake responses are generated and returned. You can specify
@@ -318,6 +357,16 @@ module Aws::SSOOIDC
318
357
  # ** Please note ** When response stubbing is enabled, no HTTP
319
358
  # requests are made, and retries are disabled.
320
359
  #
360
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
361
+ # Allows you to provide a telemetry provider, which is used to
362
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
363
+ # will not record or emit any telemetry data. The SDK supports the
364
+ # following telemetry providers:
365
+ #
366
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
367
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
368
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
369
+ #
321
370
  # @option options [Aws::TokenProvider] :token_provider
322
371
  # A Bearer Token Provider. This can be an instance of any one of the
323
372
  # following classes:
@@ -345,7 +394,9 @@ module Aws::SSOOIDC
345
394
  # sending the request.
346
395
  #
347
396
  # @option options [Aws::SSOOIDC::EndpointProvider] :endpoint_provider
348
- # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SSOOIDC::EndpointParameters`
397
+ # The endpoint provider used to resolve endpoints. Any object that responds to
398
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
399
+ # `Aws::SSOOIDC::EndpointParameters`.
349
400
  #
350
401
  # @option options [Float] :http_continue_timeout (1)
351
402
  # The number of seconds to wait for a 100-continue response before sending the
@@ -401,6 +452,12 @@ module Aws::SSOOIDC
401
452
  # @option options [String] :ssl_ca_store
402
453
  # Sets the X509::Store to verify peer certificate.
403
454
  #
455
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
456
+ # Sets a client certificate when creating http connections.
457
+ #
458
+ # @option options [OpenSSL::PKey] :ssl_key
459
+ # Sets a client key when creating http connections.
460
+ #
404
461
  # @option options [Float] :ssl_timeout
405
462
  # Sets the SSL timeout in seconds
406
463
  #
@@ -415,7 +472,7 @@ module Aws::SSOOIDC
415
472
 
416
473
  # Creates and returns access and refresh tokens for clients that are
417
474
  # authenticated using client secrets. The access token can be used to
418
- # fetch short-term credentials for the assigned AWS accounts or to
475
+ # fetch short-lived credentials for the assigned AWS accounts or to
419
476
  # access application APIs using `bearer` authentication.
420
477
  #
421
478
  # @option params [required, String] :client_id
@@ -427,30 +484,28 @@ module Aws::SSOOIDC
427
484
  # the persisted result of the RegisterClient API.
428
485
  #
429
486
  # @option params [required, String] :grant_type
430
- # Supports the following OAuth grant types: Device Code and Refresh
431
- # Token. Specify either of the following values, depending on the grant
432
- # type that you want:
487
+ # Supports the following OAuth grant types: Authorization Code, Device
488
+ # Code, and Refresh Token. Specify one of the following values,
489
+ # depending on the grant type that you want:
490
+ #
491
+ # * Authorization Code - `authorization_code`
433
492
  #
434
493
  # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
435
494
  #
436
495
  # * Refresh Token - `refresh_token`
437
496
  #
438
- # For information about how to obtain the device code, see the
439
- # StartDeviceAuthorization topic.
440
- #
441
497
  # @option params [String] :device_code
442
498
  # Used only when calling this API for the Device Code grant type. This
443
- # short-term code is used to identify this authorization request. This
499
+ # short-lived code is used to identify this authorization request. This
444
500
  # comes from the result of the StartDeviceAuthorization API.
445
501
  #
446
502
  # @option params [String] :code
447
503
  # Used only when calling this API for the Authorization Code grant type.
448
- # The short-term code is used to identify this authorization request.
449
- # This grant type is currently unsupported for the CreateToken API.
504
+ # The short-lived code is used to identify this authorization request.
450
505
  #
451
506
  # @option params [String] :refresh_token
452
507
  # Used only when calling this API for the Refresh Token grant type. This
453
- # token is used to refresh short-term tokens, such as the access token,
508
+ # token is used to refresh short-lived tokens, such as the access token,
454
509
  # that might expire.
455
510
  #
456
511
  # For more information about the features and limitations of the current
@@ -556,7 +611,7 @@ module Aws::SSOOIDC
556
611
 
557
612
  # Creates and returns access and refresh tokens for clients and
558
613
  # applications that are authenticated using IAM entities. The access
559
- # token can be used to fetch short-term credentials for the assigned
614
+ # token can be used to fetch short-lived credentials for the assigned
560
615
  # Amazon Web Services accounts or to access application APIs using
561
616
  # `bearer` authentication.
562
617
  #
@@ -579,14 +634,14 @@ module Aws::SSOOIDC
579
634
  #
580
635
  # @option params [String] :code
581
636
  # Used only when calling this API for the Authorization Code grant type.
582
- # This short-term code is used to identify this authorization request.
637
+ # This short-lived code is used to identify this authorization request.
583
638
  # The code is obtained through a redirect from IAM Identity Center to a
584
639
  # redirect URI persisted in the Authorization Code GrantOptions for the
585
640
  # application.
586
641
  #
587
642
  # @option params [String] :refresh_token
588
643
  # Used only when calling this API for the Refresh Token grant type. This
589
- # token is used to refresh short-term tokens, such as the access token,
644
+ # token is used to refresh short-lived tokens, such as the access token,
590
645
  # that might expire.
591
646
  #
592
647
  # For more information about the features and limitations of the current
@@ -789,9 +844,10 @@ module Aws::SSOOIDC
789
844
  req.send_request(options)
790
845
  end
791
846
 
792
- # Registers a client with IAM Identity Center. This allows clients to
793
- # initiate device authorization. The output should be persisted for
794
- # reuse through many authentication requests.
847
+ # Registers a public client with IAM Identity Center. This allows
848
+ # clients to perform authorization using the authorization
849
+ # code grant with Proof Key for Code Exchange (PKCE) or the device
850
+ # code grant.
795
851
  #
796
852
  # @option params [required, String] :client_name
797
853
  # The friendly name of the client.
@@ -813,7 +869,14 @@ module Aws::SSOOIDC
813
869
  # @option params [Array<String>] :grant_types
814
870
  # The list of OAuth 2.0 grant types that are defined by the client. This
815
871
  # list is used to restrict the token granting flows available to the
816
- # client.
872
+ # client. Supports the following OAuth 2.0 grant types: Authorization
873
+ # Code, Device Code, and Refresh Token.
874
+ #
875
+ # * Authorization Code - `authorization_code`
876
+ #
877
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
878
+ #
879
+ # * Refresh Token - `refresh_token`
817
880
  #
818
881
  # @option params [String] :issuer_url
819
882
  # The IAM Identity Center Issuer URL associated with an instance of IAM
@@ -976,14 +1039,19 @@ module Aws::SSOOIDC
976
1039
  # @api private
977
1040
  def build_request(operation_name, params = {})
978
1041
  handlers = @handlers.for(operation_name)
1042
+ tracer = config.telemetry_provider.tracer_provider.tracer(
1043
+ Aws::Telemetry.module_to_tracer_name('Aws::SSOOIDC')
1044
+ )
979
1045
  context = Seahorse::Client::RequestContext.new(
980
1046
  operation_name: operation_name,
981
1047
  operation: config.api.operation(operation_name),
982
1048
  client: self,
983
1049
  params: params,
984
- config: config)
1050
+ config: config,
1051
+ tracer: tracer
1052
+ )
985
1053
  context[:gem_name] = 'aws-sdk-core'
986
- context[:gem_version] = '3.197.0'
1054
+ context[:gem_version] = '3.220.0'
987
1055
  Seahorse::Client::Request.new(handlers, context)
988
1056
  end
989
1057
 
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  module Aws::SSOOIDC
11
12
  # @api private
12
13
  module ClientApi
@@ -207,6 +208,7 @@ module Aws::SSOOIDC
207
208
 
208
209
  api.metadata = {
209
210
  "apiVersion" => "2019-06-10",
211
+ "auth" => ["aws.auth#sigv4"],
210
212
  "endpointPrefix" => "oidc",
211
213
  "jsonVersion" => "1.1",
212
214
  "protocol" => "rest-json",
@@ -224,6 +226,7 @@ module Aws::SSOOIDC
224
226
  o.http_method = "POST"
225
227
  o.http_request_uri = "/token"
226
228
  o['authtype'] = "none"
229
+ o['auth'] = ["smithy.api#noAuth"]
227
230
  o.input = Shapes::ShapeRef.new(shape: CreateTokenRequest)
228
231
  o.output = Shapes::ShapeRef.new(shape: CreateTokenResponse)
229
232
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -264,6 +267,7 @@ module Aws::SSOOIDC
264
267
  o.http_method = "POST"
265
268
  o.http_request_uri = "/client/register"
266
269
  o['authtype'] = "none"
270
+ o['auth'] = ["smithy.api#noAuth"]
267
271
  o.input = Shapes::ShapeRef.new(shape: RegisterClientRequest)
268
272
  o.output = Shapes::ShapeRef.new(shape: RegisterClientResponse)
269
273
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -279,6 +283,7 @@ module Aws::SSOOIDC
279
283
  o.http_method = "POST"
280
284
  o.http_request_uri = "/device_authorization"
281
285
  o['authtype'] = "none"
286
+ o['auth'] = ["smithy.api#noAuth"]
282
287
  o.input = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationRequest)
283
288
  o.output = Shapes::ShapeRef.new(shape: StartDeviceAuthorizationResponse)
284
289
  o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
@@ -52,15 +52,18 @@ module Aws::SSOOIDC
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,43 +10,39 @@
10
10
  module Aws::SSOOIDC
11
11
  class EndpointProvider
12
12
  def resolve_endpoint(parameters)
13
- region = parameters.region
14
- use_dual_stack = parameters.use_dual_stack
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://oidc-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
26
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-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
32
  if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
37
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.amazonaws.com", headers: {}, properties: {})
33
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
38
34
  end
39
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
35
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
36
  end
41
37
  raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
38
  end
43
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
39
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
44
40
  if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
45
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
41
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
42
  end
47
43
  raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
48
44
  end
49
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
45
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
50
46
  end
51
47
  end
52
48
  raise ArgumentError, "Invalid Configuration: Missing Region"
@@ -12,61 +12,9 @@ module Aws::SSOOIDC
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class CreateToken
16
- def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
- Aws::SSOOIDC::EndpointParameters.new(
21
- region: context.config.region,
22
- use_dual_stack: context.config.use_dualstack_endpoint,
23
- use_fips: context.config.use_fips_endpoint,
24
- endpoint: endpoint,
25
- )
26
- end
27
- end
28
-
29
- class CreateTokenWithIAM
30
- def self.build(context)
31
- unless context.config.regional_endpoint
32
- endpoint = context.config.endpoint.to_s
33
- end
34
- Aws::SSOOIDC::EndpointParameters.new(
35
- region: context.config.region,
36
- use_dual_stack: context.config.use_dualstack_endpoint,
37
- use_fips: context.config.use_fips_endpoint,
38
- endpoint: endpoint,
39
- )
40
- end
41
- end
42
15
 
43
- class RegisterClient
44
- def self.build(context)
45
- unless context.config.regional_endpoint
46
- endpoint = context.config.endpoint.to_s
47
- end
48
- Aws::SSOOIDC::EndpointParameters.new(
49
- region: context.config.region,
50
- use_dual_stack: context.config.use_dualstack_endpoint,
51
- use_fips: context.config.use_fips_endpoint,
52
- endpoint: endpoint,
53
- )
54
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::SSOOIDC::EndpointParameters.create(context.config)
55
18
  end
56
-
57
- class StartDeviceAuthorization
58
- def self.build(context)
59
- unless context.config.regional_endpoint
60
- endpoint = context.config.endpoint.to_s
61
- end
62
- Aws::SSOOIDC::EndpointParameters.new(
63
- region: context.config.region,
64
- use_dual_stack: context.config.use_dualstack_endpoint,
65
- use_fips: context.config.use_fips_endpoint,
66
- endpoint: endpoint,
67
- )
68
- end
69
- end
70
-
71
19
  end
72
20
  end