aws-sdk-core 3.201.2 → 3.226.2

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 (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +324 -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 +13 -5
  8. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +14 -7
  9. data/lib/aws-sdk-core/cbor/decoder.rb +0 -2
  10. data/lib/aws-sdk-core/cbor/encoder.rb +2 -2
  11. data/lib/aws-sdk-core/cbor.rb +3 -56
  12. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  13. data/lib/aws-sdk-core/client_stubs.rb +29 -55
  14. data/lib/aws-sdk-core/credential_provider.rb +4 -0
  15. data/lib/aws-sdk-core/credential_provider_chain.rb +35 -8
  16. data/lib/aws-sdk-core/credentials.rb +19 -6
  17. data/lib/aws-sdk-core/ecs_credentials.rb +1 -0
  18. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  19. data/lib/aws-sdk-core/endpoints/matchers.rb +3 -9
  20. data/lib/aws-sdk-core/endpoints.rb +13 -3
  21. data/lib/aws-sdk-core/error_handler.rb +5 -0
  22. data/lib/aws-sdk-core/errors.rb +2 -2
  23. data/lib/aws-sdk-core/event_emitter.rb +1 -1
  24. data/lib/aws-sdk-core/instance_profile_credentials.rb +1 -0
  25. data/lib/aws-sdk-core/json/error_handler.rb +14 -3
  26. data/lib/aws-sdk-core/json/handler.rb +1 -0
  27. data/lib/aws-sdk-core/log/param_formatter.rb +7 -3
  28. data/lib/aws-sdk-core/log.rb +10 -0
  29. data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +332 -170
  30. data/lib/aws-sdk-core/plugins/client_metrics_plugin.rb +0 -1
  31. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
  32. data/lib/aws-sdk-core/plugins/endpoint_pattern.rb +40 -32
  33. data/lib/aws-sdk-core/plugins/http_checksum.rb +2 -8
  34. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +44 -24
  35. data/lib/aws-sdk-core/plugins/sign.rb +18 -5
  36. data/lib/aws-sdk-core/plugins/stub_responses.rb +52 -9
  37. data/lib/aws-sdk-core/plugins/telemetry.rb +75 -0
  38. data/lib/aws-sdk-core/plugins/user_agent.rb +48 -9
  39. data/lib/aws-sdk-core/plugins.rb +39 -0
  40. data/lib/aws-sdk-core/process_credentials.rb +3 -2
  41. data/lib/aws-sdk-core/resources.rb +8 -0
  42. data/lib/aws-sdk-core/rest/request/headers.rb +3 -3
  43. data/lib/aws-sdk-core/rpc_v2/builder.rb +1 -1
  44. data/lib/aws-sdk-core/{cbor → rpc_v2}/cbor_engine.rb +4 -5
  45. data/lib/aws-sdk-core/rpc_v2/content_type_handler.rb +3 -1
  46. data/lib/aws-sdk-core/rpc_v2/error_handler.rb +27 -16
  47. data/lib/aws-sdk-core/rpc_v2/handler.rb +7 -2
  48. data/lib/aws-sdk-core/rpc_v2/parser.rb +9 -1
  49. data/lib/aws-sdk-core/rpc_v2.rb +65 -2
  50. data/lib/aws-sdk-core/shared_config.rb +77 -22
  51. data/lib/aws-sdk-core/shared_credentials.rb +1 -7
  52. data/lib/aws-sdk-core/sso_credentials.rb +4 -1
  53. data/lib/aws-sdk-core/stubbing/protocols/ec2.rb +12 -11
  54. data/lib/aws-sdk-core/stubbing/protocols/json.rb +11 -10
  55. data/lib/aws-sdk-core/stubbing/protocols/query.rb +7 -6
  56. data/lib/aws-sdk-core/stubbing/protocols/rest.rb +2 -1
  57. data/lib/aws-sdk-core/stubbing/protocols/rest_json.rb +9 -8
  58. data/lib/aws-sdk-core/stubbing/protocols/rest_xml.rb +6 -5
  59. data/lib/aws-sdk-core/stubbing/protocols/rpc_v2.rb +13 -15
  60. data/lib/aws-sdk-core/stubbing.rb +22 -0
  61. data/lib/aws-sdk-core/telemetry/base.rb +177 -0
  62. data/lib/aws-sdk-core/telemetry/no_op.rb +70 -0
  63. data/lib/aws-sdk-core/telemetry/otel.rb +235 -0
  64. data/lib/aws-sdk-core/telemetry/span_kind.rb +22 -0
  65. data/lib/aws-sdk-core/telemetry/span_status.rb +59 -0
  66. data/lib/aws-sdk-core/telemetry.rb +78 -0
  67. data/lib/aws-sdk-core/util.rb +2 -1
  68. data/lib/aws-sdk-core/waiters/poller.rb +9 -4
  69. data/lib/aws-sdk-core/xml/error_handler.rb +3 -1
  70. data/lib/aws-sdk-core.rb +82 -112
  71. data/lib/aws-sdk-sso/client.rb +86 -37
  72. data/lib/aws-sdk-sso/client_api.rb +1 -0
  73. data/lib/aws-sdk-sso/endpoint_parameters.rb +9 -6
  74. data/lib/aws-sdk-sso/endpoint_provider.rb +14 -18
  75. data/lib/aws-sdk-sso/endpoints.rb +2 -54
  76. data/lib/aws-sdk-sso/plugins/endpoints.rb +19 -20
  77. data/lib/aws-sdk-sso/types.rb +1 -0
  78. data/lib/aws-sdk-sso.rb +15 -11
  79. data/lib/aws-sdk-ssooidc/client.rb +123 -57
  80. data/lib/aws-sdk-ssooidc/client_api.rb +7 -0
  81. data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +9 -6
  82. data/lib/aws-sdk-ssooidc/endpoint_provider.rb +14 -18
  83. data/lib/aws-sdk-ssooidc/endpoints.rb +2 -54
  84. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +19 -20
  85. data/lib/aws-sdk-ssooidc/types.rb +49 -16
  86. data/lib/aws-sdk-ssooidc.rb +15 -11
  87. data/lib/aws-sdk-sts/client.rb +294 -89
  88. data/lib/aws-sdk-sts/client_api.rb +34 -8
  89. data/lib/aws-sdk-sts/customizations.rb +5 -1
  90. data/lib/aws-sdk-sts/endpoint_parameters.rb +10 -9
  91. data/lib/aws-sdk-sts/endpoint_provider.rb +50 -55
  92. data/lib/aws-sdk-sts/endpoints.rb +2 -118
  93. data/lib/aws-sdk-sts/errors.rb +15 -0
  94. data/lib/aws-sdk-sts/plugins/endpoints.rb +19 -28
  95. data/lib/aws-sdk-sts/types.rb +171 -28
  96. data/lib/aws-sdk-sts.rb +15 -11
  97. data/lib/seahorse/client/async_base.rb +4 -5
  98. data/lib/seahorse/client/base.rb +0 -14
  99. data/lib/seahorse/client/h2/connection.rb +18 -28
  100. data/lib/seahorse/client/h2/handler.rb +13 -3
  101. data/lib/seahorse/client/http/response.rb +1 -1
  102. data/lib/seahorse/client/net_http/connection_pool.rb +12 -3
  103. data/lib/seahorse/client/net_http/handler.rb +21 -9
  104. data/lib/seahorse/client/networking_error.rb +1 -1
  105. data/lib/seahorse/client/plugins/h2.rb +4 -4
  106. data/lib/seahorse/client/plugins/net_http.rb +9 -0
  107. data/lib/seahorse/client/request_context.rb +8 -1
  108. data/lib/seahorse/client/response.rb +2 -0
  109. data/lib/seahorse/util.rb +2 -1
  110. data/sig/aws-sdk-core/async_client_stubs.rbs +21 -0
  111. data/sig/aws-sdk-core/telemetry/base.rbs +46 -0
  112. data/sig/aws-sdk-core/telemetry/otel.rbs +22 -0
  113. data/sig/aws-sdk-core/telemetry/span_kind.rbs +15 -0
  114. data/sig/aws-sdk-core/telemetry/span_status.rbs +24 -0
  115. data/sig/seahorse/client/async_base.rbs +18 -0
  116. metadata +61 -19
@@ -12,61 +12,9 @@ module Aws::SSO
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class GetRoleCredentials
16
- def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
- Aws::SSO::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 ListAccountRoles
30
- def self.build(context)
31
- unless context.config.regional_endpoint
32
- endpoint = context.config.endpoint.to_s
33
- end
34
- Aws::SSO::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 ListAccounts
44
- def self.build(context)
45
- unless context.config.regional_endpoint
46
- endpoint = context.config.endpoint.to_s
47
- end
48
- Aws::SSO::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::SSO::EndpointParameters.create(context.config)
55
18
  end
56
-
57
- class Logout
58
- def self.build(context)
59
- unless context.config.regional_endpoint
60
- endpoint = context.config.endpoint.to_s
61
- end
62
- Aws::SSO::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
@@ -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.201.2'
59
+ GEM_VERSION = '3.226.2'
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,6 +82,7 @@ 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)
@@ -128,13 +128,15 @@ module Aws::SSOOIDC
128
128
  # locations will be searched for credentials:
129
129
  #
130
130
  # * `Aws.config[:credentials]`
131
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
132
- # * 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']
133
135
  # * `~/.aws/credentials`
134
136
  # * `~/.aws/config`
135
137
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
136
138
  # are very aggressive. Construct and pass an instance of
137
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
139
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
138
140
  # enable retries and extended timeouts. Instance profile credential
139
141
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
140
142
  # to true.
@@ -153,6 +155,8 @@ module Aws::SSOOIDC
153
155
  #
154
156
  # @option options [String] :access_key_id
155
157
  #
158
+ # @option options [String] :account_id
159
+ #
156
160
  # @option options [Boolean] :active_endpoint_cache (false)
157
161
  # When set to `true`, a thread polling for endpoints will be running in
158
162
  # the background every 60 secs (default). Defaults to `false`.
@@ -196,8 +200,7 @@ module Aws::SSOOIDC
196
200
  # accepted modes and the configuration defaults that are included.
197
201
  #
198
202
  # @option options [Boolean] :disable_host_prefix_injection (false)
199
- # Set to true to disable SDK automatically adding host prefix
200
- # to default service endpoint when available.
203
+ # When `true`, the SDK will not prepend the modeled host prefix to the endpoint.
201
204
  #
202
205
  # @option options [Boolean] :disable_request_compression (false)
203
206
  # When set to 'true' the request body will not be compressed
@@ -253,11 +256,34 @@ module Aws::SSOOIDC
253
256
  # Used when loading credentials from the shared credentials file
254
257
  # at HOME/.aws/credentials. When not specified, 'default' is used.
255
258
  #
259
+ # @option options [String] :request_checksum_calculation ("when_supported")
260
+ # Determines when a checksum will be calculated for request payloads. Values are:
261
+ #
262
+ # * `when_supported` - (default) When set, a checksum will be
263
+ # calculated for all request payloads of operations modeled with the
264
+ # `httpChecksum` trait where `requestChecksumRequired` is `true` and/or a
265
+ # `requestAlgorithmMember` is modeled.
266
+ # * `when_required` - When set, a checksum will only be calculated for
267
+ # request payloads of operations modeled with the `httpChecksum` trait where
268
+ # `requestChecksumRequired` is `true` or where a `requestAlgorithmMember`
269
+ # is modeled and supplied.
270
+ #
256
271
  # @option options [Integer] :request_min_compression_size_bytes (10240)
257
272
  # The minimum size in bytes that triggers compression for request
258
273
  # bodies. The value must be non-negative integer value between 0
259
274
  # and 10485780 bytes inclusive.
260
275
  #
276
+ # @option options [String] :response_checksum_validation ("when_supported")
277
+ # Determines when checksum validation will be performed on response payloads. Values are:
278
+ #
279
+ # * `when_supported` - (default) When set, checksum validation is performed on all
280
+ # response payloads of operations modeled with the `httpChecksum` trait where
281
+ # `responseAlgorithms` is modeled, except when no modeled checksum algorithms
282
+ # are supported.
283
+ # * `when_required` - When set, checksum validation is not performed on
284
+ # response payloads of operations unless the checksum algorithm is supported and
285
+ # the `requestValidationModeMember` member is set to `ENABLED`.
286
+ #
261
287
  # @option options [Proc] :retry_backoff
262
288
  # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
263
289
  # This option is only used in the `legacy` retry mode.
@@ -330,6 +356,16 @@ module Aws::SSOOIDC
330
356
  # ** Please note ** When response stubbing is enabled, no HTTP
331
357
  # requests are made, and retries are disabled.
332
358
  #
359
+ # @option options [Aws::Telemetry::TelemetryProviderBase] :telemetry_provider (Aws::Telemetry::NoOpTelemetryProvider)
360
+ # Allows you to provide a telemetry provider, which is used to
361
+ # emit telemetry data. By default, uses `NoOpTelemetryProvider` which
362
+ # will not record or emit any telemetry data. The SDK supports the
363
+ # following telemetry providers:
364
+ #
365
+ # * OpenTelemetry (OTel) - To use the OTel provider, install and require the
366
+ # `opentelemetry-sdk` gem and then, pass in an instance of a
367
+ # `Aws::Telemetry::OTelProvider` for telemetry provider.
368
+ #
333
369
  # @option options [Aws::TokenProvider] :token_provider
334
370
  # A Bearer Token Provider. This can be an instance of any one of the
335
371
  # following classes:
@@ -357,7 +393,9 @@ module Aws::SSOOIDC
357
393
  # sending the request.
358
394
  #
359
395
  # @option options [Aws::SSOOIDC::EndpointProvider] :endpoint_provider
360
- # 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`
396
+ # The endpoint provider used to resolve endpoints. Any object that responds to
397
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
398
+ # `Aws::SSOOIDC::EndpointParameters`.
361
399
  #
362
400
  # @option options [Float] :http_continue_timeout (1)
363
401
  # The number of seconds to wait for a 100-continue response before sending the
@@ -413,6 +451,12 @@ module Aws::SSOOIDC
413
451
  # @option options [String] :ssl_ca_store
414
452
  # Sets the X509::Store to verify peer certificate.
415
453
  #
454
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
455
+ # Sets a client certificate when creating http connections.
456
+ #
457
+ # @option options [OpenSSL::PKey] :ssl_key
458
+ # Sets a client key when creating http connections.
459
+ #
416
460
  # @option options [Float] :ssl_timeout
417
461
  # Sets the SSL timeout in seconds
418
462
  #
@@ -427,7 +471,7 @@ module Aws::SSOOIDC
427
471
 
428
472
  # Creates and returns access and refresh tokens for clients that are
429
473
  # authenticated using client secrets. The access token can be used to
430
- # fetch short-term credentials for the assigned AWS accounts or to
474
+ # fetch short-lived credentials for the assigned AWS accounts or to
431
475
  # access application APIs using `bearer` authentication.
432
476
  #
433
477
  # @option params [required, String] :client_id
@@ -439,30 +483,28 @@ module Aws::SSOOIDC
439
483
  # the persisted result of the RegisterClient API.
440
484
  #
441
485
  # @option params [required, String] :grant_type
442
- # Supports the following OAuth grant types: Device Code and Refresh
443
- # Token. Specify either of the following values, depending on the grant
444
- # type that you want:
486
+ # Supports the following OAuth grant types: Authorization Code, Device
487
+ # Code, and Refresh Token. Specify one of the following values,
488
+ # depending on the grant type that you want:
489
+ #
490
+ # * Authorization Code - `authorization_code`
445
491
  #
446
492
  # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
447
493
  #
448
494
  # * Refresh Token - `refresh_token`
449
495
  #
450
- # For information about how to obtain the device code, see the
451
- # StartDeviceAuthorization topic.
452
- #
453
496
  # @option params [String] :device_code
454
497
  # Used only when calling this API for the Device Code grant type. This
455
- # short-term code is used to identify this authorization request. This
498
+ # short-lived code is used to identify this authorization request. This
456
499
  # comes from the result of the StartDeviceAuthorization API.
457
500
  #
458
501
  # @option params [String] :code
459
502
  # Used only when calling this API for the Authorization Code grant type.
460
- # The short-term code is used to identify this authorization request.
461
- # This grant type is currently unsupported for the CreateToken API.
503
+ # The short-lived code is used to identify this authorization request.
462
504
  #
463
505
  # @option params [String] :refresh_token
464
506
  # Used only when calling this API for the Refresh Token grant type. This
465
- # token is used to refresh short-term tokens, such as the access token,
507
+ # token is used to refresh short-lived tokens, such as the access token,
466
508
  # that might expire.
467
509
  #
468
510
  # For more information about the features and limitations of the current
@@ -568,7 +610,7 @@ module Aws::SSOOIDC
568
610
 
569
611
  # Creates and returns access and refresh tokens for clients and
570
612
  # applications that are authenticated using IAM entities. The access
571
- # token can be used to fetch short-term credentials for the assigned
613
+ # token can be used to fetch short-lived credentials for the assigned
572
614
  # Amazon Web Services accounts or to access application APIs using
573
615
  # `bearer` authentication.
574
616
  #
@@ -591,14 +633,14 @@ module Aws::SSOOIDC
591
633
  #
592
634
  # @option params [String] :code
593
635
  # Used only when calling this API for the Authorization Code grant type.
594
- # This short-term code is used to identify this authorization request.
636
+ # This short-lived code is used to identify this authorization request.
595
637
  # The code is obtained through a redirect from IAM Identity Center to a
596
638
  # redirect URI persisted in the Authorization Code GrantOptions for the
597
639
  # application.
598
640
  #
599
641
  # @option params [String] :refresh_token
600
642
  # Used only when calling this API for the Refresh Token grant type. This
601
- # token is used to refresh short-term tokens, such as the access token,
643
+ # token is used to refresh short-lived tokens, such as the access token,
602
644
  # that might expire.
603
645
  #
604
646
  # For more information about the features and limitations of the current
@@ -665,6 +707,7 @@ module Aws::SSOOIDC
665
707
  # * {Types::CreateTokenWithIAMResponse#id_token #id_token} => String
666
708
  # * {Types::CreateTokenWithIAMResponse#issued_token_type #issued_token_type} => String
667
709
  # * {Types::CreateTokenWithIAMResponse#scope #scope} => Array&lt;String&gt;
710
+ # * {Types::CreateTokenWithIAMResponse#aws_additional_details #aws_additional_details} => Types::AwsAdditionalDetails
668
711
  #
669
712
  #
670
713
  # @example Example: Call OAuth/OIDC /token endpoint for Authorization Code grant with IAM authentication
@@ -684,6 +727,9 @@ module Aws::SSOOIDC
684
727
  # resp.to_h outputs the following:
685
728
  # {
686
729
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
730
+ # aws_additional_details: {
731
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
732
+ # },
687
733
  # expires_in: 1579729529,
688
734
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
689
735
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -729,6 +775,9 @@ module Aws::SSOOIDC
729
775
  # resp.to_h outputs the following:
730
776
  # {
731
777
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
778
+ # aws_additional_details: {
779
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
780
+ # },
732
781
  # expires_in: 1579729529,
733
782
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsInN0czphdWRpdF9jb250ZXh0IjoiRVhBTVBMRUFVRElUQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.Xyah6qbk78qThzJ41iFU2yfGuRqqtKXHrJYwQ8L9Ip0",
734
783
  # issued_token_type: "urn:ietf:params:oauth:token-type:refresh_token",
@@ -754,6 +803,9 @@ module Aws::SSOOIDC
754
803
  # resp.to_h outputs the following:
755
804
  # {
756
805
  # access_token: "aoal-YigITUDiNX1xZwOMXM5MxOWDL0E0jg9P6_C_jKQPxS_SKCP6f0kh1Up4g7TtvQqkMnD-GJiU_S1gvug6SrggAkc0:MGYCMQD3IatVjV7jAJU91kK3PkS/SfA2wtgWzOgZWDOR7sDGN9t0phCZz5It/aes/3C1Zj0CMQCKWOgRaiz6AIhza3DSXQNMLjRKXC8F8ceCsHlgYLMZ7hZidEXAMPLEACCESSTOKEN",
806
+ # aws_additional_details: {
807
+ # identity_context: "EXAMPLEIDENTITYCONTEXT",
808
+ # },
757
809
  # expires_in: 1579729529,
758
810
  # id_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhd3M6aWRlbnRpdHlfc3RvcmVfaWQiOiJkLTMzMzMzMzMzMzMiLCJzdWIiOiI3MzA0NDhmMi1lMGExLTcwYTctYzk1NC0wMDAwMDAwMDAwMDAiLCJhd3M6aW5zdGFuY2VfYWNjb3VudCI6IjExMTExMTExMTExMSIsInN0czppZGVudGl0eV9jb250ZXh0IjoiRVhBTVBMRUlERU5USVRZQ09OVEVYVCIsImlzcyI6Imh0dHBzOi8vaWRlbnRpdHljZW50ZXIuYW1hem9uYXdzLmNvbS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmlkZW50aXR5X3N0b3JlX2FybiI6ImFybjphd3M6aWRlbnRpdHlzdG9yZTo6MTExMTExMTExMTExOmlkZW50aXR5c3RvcmUvZC0zMzMzMzMzMzMzIiwiYXVkIjoiYXJuOmF3czpzc286OjEyMzQ1Njc4OTAxMjphcHBsaWNhdGlvbi9zc29pbnMtMTExMTExMTExMTExL2FwbC0yMjIyMjIyMjIyMjIiLCJhd3M6aW5zdGFuY2VfYXJuIjoiYXJuOmF3czpzc286OjppbnN0YW5jZS9zc29pbnMtMTExMTExMTExMTExIiwiYXdzOmNyZWRlbnRpYWxfaWQiOiJfWlIyTjZhVkJqMjdGUEtheWpfcEtwVjc3QVBERl80MXB4ZXRfWWpJdUpONlVJR2RBdkpFWEFNUExFQ1JFRElEIiwiYXV0aF90aW1lIjoiMjAyMC0wMS0yMlQxMjo0NToyOVoiLCJleHAiOjE1Nzk3Mjk1MjksImlhdCI6MTU3OTcyNTkyOX0.5SYiW1kMsuUr7nna-l5tlakM0GNbMHvIM2_n0QD23jM",
759
811
  # issued_token_type: "urn:ietf:params:oauth:token-type:access_token",
@@ -791,6 +843,7 @@ module Aws::SSOOIDC
791
843
  # resp.issued_token_type #=> String
792
844
  # resp.scope #=> Array
793
845
  # resp.scope[0] #=> String
846
+ # resp.aws_additional_details.identity_context #=> String
794
847
  #
795
848
  # @see http://docs.aws.amazon.com/goto/WebAPI/sso-oidc-2019-06-10/CreateTokenWithIAM AWS API Documentation
796
849
  #
@@ -801,9 +854,10 @@ module Aws::SSOOIDC
801
854
  req.send_request(options)
802
855
  end
803
856
 
804
- # Registers a client with IAM Identity Center. This allows clients to
805
- # initiate device authorization. The output should be persisted for
806
- # reuse through many authentication requests.
857
+ # Registers a public client with IAM Identity Center. This allows
858
+ # clients to perform authorization using the authorization
859
+ # code grant with Proof Key for Code Exchange (PKCE) or the device
860
+ # code grant.
807
861
  #
808
862
  # @option params [required, String] :client_name
809
863
  # The friendly name of the client.
@@ -825,7 +879,14 @@ module Aws::SSOOIDC
825
879
  # @option params [Array<String>] :grant_types
826
880
  # The list of OAuth 2.0 grant types that are defined by the client. This
827
881
  # list is used to restrict the token granting flows available to the
828
- # client.
882
+ # client. Supports the following OAuth 2.0 grant types: Authorization
883
+ # Code, Device Code, and Refresh Token.
884
+ #
885
+ # * Authorization Code - `authorization_code`
886
+ #
887
+ # * Device Code - `urn:ietf:params:oauth:grant-type:device_code`
888
+ #
889
+ # * Refresh Token - `refresh_token`
829
890
  #
830
891
  # @option params [String] :issuer_url
831
892
  # The IAM Identity Center Issuer URL associated with an instance of IAM
@@ -952,8 +1013,8 @@ module Aws::SSOOIDC
952
1013
  # expires_in: 1579729529,
953
1014
  # interval: 1,
954
1015
  # user_code: "makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
955
- # verification_uri: "https://device.sso.us-west-2.amazonaws.com",
956
- # verification_uri_complete: "https://device.sso.us-west-2.amazonaws.com?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
1016
+ # verification_uri: "https://directory-alias-example.awsapps.com/start/#/device",
1017
+ # verification_uri_complete: "https://directory-alias-example.awsapps.com/start/#/device?user_code=makdfsk83yJraWQiOiJrZXktMTU2Njk2sImFsZyI6IkhTMzIn0EXAMPLEUSERCODE",
957
1018
  # }
958
1019
  #
959
1020
  # @example Request syntax with placeholder values
@@ -988,14 +1049,19 @@ module Aws::SSOOIDC
988
1049
  # @api private
989
1050
  def build_request(operation_name, params = {})
990
1051
  handlers = @handlers.for(operation_name)
1052
+ tracer = config.telemetry_provider.tracer_provider.tracer(
1053
+ Aws::Telemetry.module_to_tracer_name('Aws::SSOOIDC')
1054
+ )
991
1055
  context = Seahorse::Client::RequestContext.new(
992
1056
  operation_name: operation_name,
993
1057
  operation: config.api.operation(operation_name),
994
1058
  client: self,
995
1059
  params: params,
996
- config: config)
1060
+ config: config,
1061
+ tracer: tracer
1062
+ )
997
1063
  context[:gem_name] = 'aws-sdk-core'
998
- context[:gem_version] = '3.201.2'
1064
+ context[:gem_version] = '3.226.2'
999
1065
  Seahorse::Client::Request.new(handlers, context)
1000
1066
  end
1001
1067
 
@@ -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
@@ -19,6 +20,7 @@ module Aws::SSOOIDC
19
20
  Assertion = Shapes::StringShape.new(name: 'Assertion')
20
21
  AuthCode = Shapes::StringShape.new(name: 'AuthCode')
21
22
  AuthorizationPendingException = Shapes::StructureShape.new(name: 'AuthorizationPendingException')
23
+ AwsAdditionalDetails = Shapes::StructureShape.new(name: 'AwsAdditionalDetails')
22
24
  ClientId = Shapes::StringShape.new(name: 'ClientId')
23
25
  ClientName = Shapes::StringShape.new(name: 'ClientName')
24
26
  ClientSecret = Shapes::StringShape.new(name: 'ClientSecret')
@@ -36,6 +38,7 @@ module Aws::SSOOIDC
36
38
  GrantType = Shapes::StringShape.new(name: 'GrantType')
37
39
  GrantTypes = Shapes::ListShape.new(name: 'GrantTypes')
38
40
  IdToken = Shapes::StringShape.new(name: 'IdToken')
41
+ IdentityContext = Shapes::StringShape.new(name: 'IdentityContext')
39
42
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
40
43
  IntervalInSeconds = Shapes::IntegerShape.new(name: 'IntervalInSeconds')
41
44
  InvalidClientException = Shapes::StructureShape.new(name: 'InvalidClientException')
@@ -73,6 +76,9 @@ module Aws::SSOOIDC
73
76
  AuthorizationPendingException.add_member(:error_description, Shapes::ShapeRef.new(shape: ErrorDescription, location_name: "error_description"))
74
77
  AuthorizationPendingException.struct_class = Types::AuthorizationPendingException
75
78
 
79
+ AwsAdditionalDetails.add_member(:identity_context, Shapes::ShapeRef.new(shape: IdentityContext, location_name: "identityContext"))
80
+ AwsAdditionalDetails.struct_class = Types::AwsAdditionalDetails
81
+
76
82
  CreateTokenRequest.add_member(:client_id, Shapes::ShapeRef.new(shape: ClientId, required: true, location_name: "clientId"))
77
83
  CreateTokenRequest.add_member(:client_secret, Shapes::ShapeRef.new(shape: ClientSecret, required: true, location_name: "clientSecret"))
78
84
  CreateTokenRequest.add_member(:grant_type, Shapes::ShapeRef.new(shape: GrantType, required: true, location_name: "grantType"))
@@ -111,6 +117,7 @@ module Aws::SSOOIDC
111
117
  CreateTokenWithIAMResponse.add_member(:id_token, Shapes::ShapeRef.new(shape: IdToken, location_name: "idToken"))
112
118
  CreateTokenWithIAMResponse.add_member(:issued_token_type, Shapes::ShapeRef.new(shape: TokenTypeURI, location_name: "issuedTokenType"))
113
119
  CreateTokenWithIAMResponse.add_member(:scope, Shapes::ShapeRef.new(shape: Scopes, location_name: "scope"))
120
+ CreateTokenWithIAMResponse.add_member(:aws_additional_details, Shapes::ShapeRef.new(shape: AwsAdditionalDetails, location_name: "awsAdditionalDetails"))
114
121
  CreateTokenWithIAMResponse.struct_class = Types::CreateTokenWithIAMResponse
115
122
 
116
123
  ExpiredTokenException.add_member(:error, Shapes::ShapeRef.new(shape: Error, location_name: "error"))
@@ -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