aws-sdk-core 3.203.0 → 3.209.1

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-defaults.rb +4 -1
  5. data/lib/aws-sdk-core/assume_role_credentials.rb +12 -5
  6. data/lib/aws-sdk-core/assume_role_web_identity_credentials.rb +13 -7
  7. data/lib/aws-sdk-core/client_side_monitoring.rb +9 -0
  8. data/lib/aws-sdk-core/credential_provider_chain.rb +9 -2
  9. data/lib/aws-sdk-core/credentials.rb +13 -6
  10. data/lib/aws-sdk-core/endpoints/endpoint.rb +3 -1
  11. data/lib/aws-sdk-core/endpoints.rb +6 -3
  12. data/lib/aws-sdk-core/log.rb +10 -0
  13. data/lib/aws-sdk-core/plugins/credentials_configuration.rb +7 -3
  14. data/lib/aws-sdk-core/plugins/regional_endpoint.rb +1 -0
  15. data/lib/aws-sdk-core/plugins/user_agent.rb +17 -8
  16. data/lib/aws-sdk-core/plugins.rb +39 -0
  17. data/lib/aws-sdk-core/process_credentials.rb +2 -1
  18. data/lib/aws-sdk-core/resources.rb +8 -0
  19. data/lib/aws-sdk-core/rpc_v2/handler.rb +5 -1
  20. data/lib/aws-sdk-core/shared_config.rb +3 -1
  21. data/lib/aws-sdk-core/shared_credentials.rb +0 -7
  22. data/lib/aws-sdk-core/sso_credentials.rb +2 -1
  23. data/lib/aws-sdk-core/stubbing.rb +22 -0
  24. data/lib/aws-sdk-core.rb +82 -102
  25. data/lib/aws-sdk-sso/client.rb +17 -7
  26. data/lib/aws-sdk-sso/client_api.rb +1 -0
  27. data/lib/aws-sdk-sso/endpoints.rb +4 -16
  28. data/lib/aws-sdk-sso/plugins/endpoints.rb +18 -6
  29. data/lib/aws-sdk-sso/types.rb +1 -0
  30. data/lib/aws-sdk-sso.rb +15 -11
  31. data/lib/aws-sdk-ssooidc/client.rb +17 -7
  32. data/lib/aws-sdk-ssooidc/client_api.rb +1 -0
  33. data/lib/aws-sdk-ssooidc/endpoints.rb +4 -16
  34. data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +18 -6
  35. data/lib/aws-sdk-ssooidc/types.rb +1 -0
  36. data/lib/aws-sdk-ssooidc.rb +15 -11
  37. data/lib/aws-sdk-sts/client.rb +17 -7
  38. data/lib/aws-sdk-sts/client_api.rb +1 -0
  39. data/lib/aws-sdk-sts/customizations.rb +5 -1
  40. data/lib/aws-sdk-sts/endpoints.rb +8 -32
  41. data/lib/aws-sdk-sts/plugins/endpoints.rb +18 -6
  42. data/lib/aws-sdk-sts/types.rb +1 -0
  43. data/lib/aws-sdk-sts.rb +15 -11
  44. data/lib/seahorse/client/net_http/connection_pool.rb +8 -2
  45. data/lib/seahorse/client/plugins/net_http.rb +9 -0
  46. metadata +7 -2
data/lib/aws-sdk-core.rb CHANGED
@@ -3,115 +3,80 @@
3
3
  require 'aws-partitions'
4
4
  require 'seahorse'
5
5
  require 'jmespath'
6
+ require 'aws-sigv4'
6
7
 
7
8
  require_relative 'aws-sdk-core/deprecations'
8
-
9
- # credential providers
10
- require_relative 'aws-sdk-core/credential_provider'
11
- require_relative 'aws-sdk-core/refreshing_credentials'
12
- require_relative 'aws-sdk-core/assume_role_credentials'
13
- require_relative 'aws-sdk-core/assume_role_web_identity_credentials'
14
- require_relative 'aws-sdk-core/credentials'
15
- require_relative 'aws-sdk-core/credential_provider_chain'
16
- require_relative 'aws-sdk-core/ecs_credentials'
17
- require_relative 'aws-sdk-core/instance_profile_credentials'
18
- require_relative 'aws-sdk-core/shared_credentials'
19
- require_relative 'aws-sdk-core/process_credentials'
20
- require_relative 'aws-sdk-core/sso_credentials'
21
-
22
- # tokens and token providers
23
- require_relative 'aws-sdk-core/token'
24
- require_relative 'aws-sdk-core/token_provider'
25
- require_relative 'aws-sdk-core/static_token_provider'
26
- require_relative 'aws-sdk-core/refreshing_token'
27
- require_relative 'aws-sdk-core/sso_token_provider'
28
- require_relative 'aws-sdk-core/token_provider_chain'
29
- require_relative 'aws-sdk-core/plugins/bearer_authorization'
30
-
31
- # client modules
32
- require_relative 'aws-sdk-core/client_stubs'
33
- require_relative 'aws-sdk-core/async_client_stubs'
34
- require_relative 'aws-sdk-core/eager_loader'
35
- require_relative 'aws-sdk-core/errors'
36
- require_relative 'aws-sdk-core/pageable_response'
37
- require_relative 'aws-sdk-core/pager'
38
- require_relative 'aws-sdk-core/param_converter'
39
- require_relative 'aws-sdk-core/param_validator'
40
- require_relative 'aws-sdk-core/shared_config'
41
- require_relative 'aws-sdk-core/structure'
42
- require_relative 'aws-sdk-core/type_builder'
43
- require_relative 'aws-sdk-core/util'
44
-
45
- # resource classes
46
- require_relative 'aws-sdk-core/resources/collection'
47
-
48
- # logging
49
- require_relative 'aws-sdk-core/log/formatter'
50
- require_relative 'aws-sdk-core/log/param_filter'
51
- require_relative 'aws-sdk-core/log/param_formatter'
52
-
53
- # stubbing
54
- require_relative 'aws-sdk-core/stubbing/empty_stub'
55
- require_relative 'aws-sdk-core/stubbing/data_applicator'
56
- require_relative 'aws-sdk-core/stubbing/stub_data'
57
- require_relative 'aws-sdk-core/stubbing/xml_error'
58
-
59
- # stubbing protocols
60
- require_relative 'aws-sdk-core/stubbing/protocols/json'
61
- require_relative 'aws-sdk-core/stubbing/protocols/rest'
62
- require_relative 'aws-sdk-core/stubbing/protocols/rest_json'
63
- require_relative 'aws-sdk-core/stubbing/protocols/rest_xml'
64
- require_relative 'aws-sdk-core/stubbing/protocols/query'
65
- require_relative 'aws-sdk-core/stubbing/protocols/ec2'
66
- require_relative 'aws-sdk-core/stubbing/protocols/rpc_v2'
67
- require_relative 'aws-sdk-core/stubbing/protocols/api_gateway'
68
-
69
- # protocols
70
- require_relative 'aws-sdk-core/error_handler'
71
- require_relative 'aws-sdk-core/rest'
72
- require_relative 'aws-sdk-core/xml'
73
- require_relative 'aws-sdk-core/json'
74
- require_relative 'aws-sdk-core/query'
75
- require_relative 'aws-sdk-core/rpc_v2'
76
-
77
- # event stream
78
- require_relative 'aws-sdk-core/binary'
79
- require_relative 'aws-sdk-core/event_emitter'
80
-
81
- # endpoint discovery
82
- require_relative 'aws-sdk-core/endpoint_cache'
83
-
84
- # client metrics / telemetry
85
- require_relative 'aws-sdk-core/client_side_monitoring/request_metrics'
86
- require_relative 'aws-sdk-core/client_side_monitoring/publisher'
87
- require_relative 'aws-sdk-core/telemetry'
88
-
89
- # utilities
90
- require_relative 'aws-sdk-core/arn'
91
- require_relative 'aws-sdk-core/arn_parser'
92
- require_relative 'aws-sdk-core/ec2_metadata'
93
- require_relative 'aws-sdk-core/lru_cache'
94
-
95
- # dynamic endpoints
96
- require_relative 'aws-sdk-core/endpoints'
97
- require_relative 'aws-sdk-core/plugins/signature_v4'
98
-
99
9
  # defaults
100
10
  require_relative 'aws-defaults'
101
11
 
102
- # plugins
103
- # loaded through building STS or SSO ..
104
-
105
- # aws-sdk-sts is included to support Aws::AssumeRoleCredentials
106
- require_relative 'aws-sdk-sts'
107
-
108
- # aws-sdk-sso is included to support Aws::SSOCredentials
109
- require_relative 'aws-sdk-sso'
110
- require_relative 'aws-sdk-ssooidc'
111
-
112
12
  module Aws
113
13
 
114
- CORE_GEM_VERSION = File.read(File.expand_path('../../VERSION', __FILE__)).strip
14
+ autoload :IniParser, 'aws-sdk-core/ini_parser'
15
+
16
+ # Credentials and credentials providers
17
+ autoload :Credentials, 'aws-sdk-core/credentials'
18
+ autoload :CredentialProvider, 'aws-sdk-core/credential_provider'
19
+ autoload :RefreshingCredentials, 'aws-sdk-core/refreshing_credentials'
20
+ autoload :AssumeRoleCredentials, 'aws-sdk-core/assume_role_credentials'
21
+ autoload :AssumeRoleWebIdentityCredentials, 'aws-sdk-core/assume_role_web_identity_credentials'
22
+ autoload :CredentialProviderChain, 'aws-sdk-core/credential_provider_chain'
23
+ autoload :ECSCredentials, 'aws-sdk-core/ecs_credentials'
24
+ autoload :InstanceProfileCredentials, 'aws-sdk-core/instance_profile_credentials'
25
+ autoload :SharedCredentials, 'aws-sdk-core/shared_credentials'
26
+ autoload :ProcessCredentials, 'aws-sdk-core/process_credentials'
27
+ autoload :SSOCredentials, 'aws-sdk-core/sso_credentials'
28
+
29
+
30
+ # tokens and token providers
31
+ autoload :Token, 'aws-sdk-core/token'
32
+ autoload :TokenProvider, 'aws-sdk-core/token_provider'
33
+ autoload :StaticTokenProvider, 'aws-sdk-core/static_token_provider'
34
+ autoload :RefreshingToken, 'aws-sdk-core/refreshing_token'
35
+ autoload :SSOTokenProvider, 'aws-sdk-core/sso_token_provider'
36
+ autoload :TokenProviderChain, 'aws-sdk-core/token_provider_chain'
37
+
38
+ # client modules
39
+ autoload :ClientStubs, 'aws-sdk-core/client_stubs'
40
+ autoload :AsyncClientStubs, 'aws-sdk-core/async_client_stubs'
41
+ autoload :EagerLoader, 'aws-sdk-core/eager_loader'
42
+ autoload :Errors, 'aws-sdk-core/errors'
43
+ autoload :PageableResponse, 'aws-sdk-core/pageable_response'
44
+ autoload :Pager, 'aws-sdk-core/pager'
45
+ autoload :ParamConverter, 'aws-sdk-core/param_converter'
46
+ autoload :ParamValidator, 'aws-sdk-core/param_validator'
47
+ autoload :SharedConfig, 'aws-sdk-core/shared_config'
48
+ autoload :Structure, 'aws-sdk-core/structure'
49
+ autoload :EmptyStructure, 'aws-sdk-core/structure'
50
+ autoload :TypeBuilder, 'aws-sdk-core/type_builder'
51
+ autoload :Util, 'aws-sdk-core/util'
52
+
53
+ # protocols
54
+ autoload :ErrorHandler, 'aws-sdk-core/error_handler'
55
+ autoload :Rest, 'aws-sdk-core/rest'
56
+ autoload :Xml, 'aws-sdk-core/xml'
57
+ autoload :Json, 'aws-sdk-core/json'
58
+ autoload :Query, 'aws-sdk-core/query'
59
+ autoload :RpcV2, 'aws-sdk-core/rpc_v2'
60
+
61
+ # event stream
62
+ autoload :Binary, 'aws-sdk-core/binary'
63
+ autoload :EventEmitter, 'aws-sdk-core/event_emitter'
64
+
65
+ # endpoint discovery
66
+ autoload :EndpointCache, 'aws-sdk-core/endpoint_cache'
67
+
68
+ autoload :Telemetry, 'aws-sdk-core/telemetry'
69
+
70
+ # utilities
71
+ autoload :ARN, 'aws-sdk-core/arn'
72
+ autoload :ARNParser, 'aws-sdk-core/arn_parser'
73
+ autoload :EC2Metadata, 'aws-sdk-core/ec2_metadata'
74
+ autoload :LRUCache, 'aws-sdk-core/lru_cache'
75
+
76
+ # dynamic endpoints
77
+ autoload :Endpoints, 'aws-sdk-core/endpoints'
78
+
79
+ CORE_GEM_VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip
115
80
 
116
81
  @config = {}
117
82
 
@@ -195,3 +160,18 @@ module Aws
195
160
 
196
161
  end
197
162
  end
163
+
164
+ # Setup additional autoloads/modules
165
+ require_relative 'aws-sdk-core/client_side_monitoring'
166
+ require_relative 'aws-sdk-core/log'
167
+ require_relative 'aws-sdk-core/plugins'
168
+ require_relative 'aws-sdk-core/resources'
169
+ require_relative 'aws-sdk-core/stubbing'
170
+ require_relative 'aws-sdk-core/waiters'
171
+
172
+ # aws-sdk-sts is included to support Aws::AssumeRoleCredentials
173
+ require_relative 'aws-sdk-sts'
174
+
175
+ # aws-sdk-sso is included to support Aws::SSOCredentials
176
+ require_relative 'aws-sdk-sso'
177
+ require_relative 'aws-sdk-ssooidc'
@@ -36,8 +36,6 @@ require 'aws-sdk-core/plugins/telemetry.rb'
36
36
  require 'aws-sdk-core/plugins/sign.rb'
37
37
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
38
38
 
39
- Aws::Plugins::GlobalConfiguration.add_identifier(:sso)
40
-
41
39
  module Aws::SSO
42
40
  # An API client for SSO. To construct a client, you need to configure a `:region` and `:credentials`.
43
41
  #
@@ -130,13 +128,15 @@ module Aws::SSO
130
128
  # locations will be searched for credentials:
131
129
  #
132
130
  # * `Aws.config[:credentials]`
133
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
134
- # * 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']
135
135
  # * `~/.aws/credentials`
136
136
  # * `~/.aws/config`
137
137
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
138
138
  # are very aggressive. Construct and pass an instance of
139
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
139
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
140
140
  # enable retries and extended timeouts. Instance profile credential
141
141
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
142
142
  # to true.
@@ -155,6 +155,8 @@ module Aws::SSO
155
155
  #
156
156
  # @option options [String] :access_key_id
157
157
  #
158
+ # @option options [String] :account_id
159
+ #
158
160
  # @option options [Boolean] :active_endpoint_cache (false)
159
161
  # When set to `true`, a thread polling for endpoints will be running in
160
162
  # the background every 60 secs (default). Defaults to `false`.
@@ -369,7 +371,9 @@ module Aws::SSO
369
371
  # sending the request.
370
372
  #
371
373
  # @option options [Aws::SSO::EndpointProvider] :endpoint_provider
372
- # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SSO::EndpointParameters`
374
+ # The endpoint provider used to resolve endpoints. Any object that responds to
375
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
376
+ # `Aws::SSO::EndpointParameters`.
373
377
  #
374
378
  # @option options [Float] :http_continue_timeout (1)
375
379
  # The number of seconds to wait for a 100-continue response before sending the
@@ -425,6 +429,12 @@ module Aws::SSO
425
429
  # @option options [String] :ssl_ca_store
426
430
  # Sets the X509::Store to verify peer certificate.
427
431
  #
432
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
433
+ # Sets a client certificate when creating http connections.
434
+ #
435
+ # @option options [OpenSSL::PKey] :ssl_key
436
+ # Sets a client key when creating http connections.
437
+ #
428
438
  # @option options [Float] :ssl_timeout
429
439
  # Sets the SSL timeout in seconds
430
440
  #
@@ -659,7 +669,7 @@ module Aws::SSO
659
669
  tracer: tracer
660
670
  )
661
671
  context[:gem_name] = 'aws-sdk-core'
662
- context[:gem_version] = '3.203.0'
672
+ context[:gem_version] = '3.209.1'
663
673
  Seahorse::Client::Request.new(handlers, context)
664
674
  end
665
675
 
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  module Aws::SSO
11
12
  # @api private
12
13
  module ClientApi
@@ -14,56 +14,44 @@ module Aws::SSO
14
14
 
15
15
  class GetRoleCredentials
16
16
  def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
17
  Aws::SSO::EndpointParameters.new(
21
18
  region: context.config.region,
22
19
  use_dual_stack: context.config.use_dualstack_endpoint,
23
20
  use_fips: context.config.use_fips_endpoint,
24
- endpoint: endpoint,
21
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
25
22
  )
26
23
  end
27
24
  end
28
25
 
29
26
  class ListAccountRoles
30
27
  def self.build(context)
31
- unless context.config.regional_endpoint
32
- endpoint = context.config.endpoint.to_s
33
- end
34
28
  Aws::SSO::EndpointParameters.new(
35
29
  region: context.config.region,
36
30
  use_dual_stack: context.config.use_dualstack_endpoint,
37
31
  use_fips: context.config.use_fips_endpoint,
38
- endpoint: endpoint,
32
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
39
33
  )
40
34
  end
41
35
  end
42
36
 
43
37
  class ListAccounts
44
38
  def self.build(context)
45
- unless context.config.regional_endpoint
46
- endpoint = context.config.endpoint.to_s
47
- end
48
39
  Aws::SSO::EndpointParameters.new(
49
40
  region: context.config.region,
50
41
  use_dual_stack: context.config.use_dualstack_endpoint,
51
42
  use_fips: context.config.use_fips_endpoint,
52
- endpoint: endpoint,
43
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
53
44
  )
54
45
  end
55
46
  end
56
47
 
57
48
  class Logout
58
49
  def self.build(context)
59
- unless context.config.regional_endpoint
60
- endpoint = context.config.endpoint.to_s
61
- end
62
50
  Aws::SSO::EndpointParameters.new(
63
51
  region: context.config.region,
64
52
  use_dual_stack: context.config.use_dualstack_endpoint,
65
53
  use_fips: context.config.use_fips_endpoint,
66
- endpoint: endpoint,
54
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
67
55
  )
68
56
  end
69
57
  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
 
@@ -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
@@ -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.203.0'
59
+ GEM_VERSION = '3.209.1'
58
60
 
59
61
  end
62
+
63
+ require_relative 'aws-sdk-sso/customizations'
@@ -36,8 +36,6 @@ require 'aws-sdk-core/plugins/telemetry.rb'
36
36
  require 'aws-sdk-core/plugins/sign.rb'
37
37
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
38
38
 
39
- Aws::Plugins::GlobalConfiguration.add_identifier(:ssooidc)
40
-
41
39
  module Aws::SSOOIDC
42
40
  # An API client for SSOOIDC. To construct a client, you need to configure a `:region` and `:credentials`.
43
41
  #
@@ -130,13 +128,15 @@ module Aws::SSOOIDC
130
128
  # locations will be searched for credentials:
131
129
  #
132
130
  # * `Aws.config[:credentials]`
133
- # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
134
- # * 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']
135
135
  # * `~/.aws/credentials`
136
136
  # * `~/.aws/config`
137
137
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
138
138
  # are very aggressive. Construct and pass an instance of
139
- # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
139
+ # `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
140
140
  # enable retries and extended timeouts. Instance profile credential
141
141
  # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
142
142
  # to true.
@@ -155,6 +155,8 @@ module Aws::SSOOIDC
155
155
  #
156
156
  # @option options [String] :access_key_id
157
157
  #
158
+ # @option options [String] :account_id
159
+ #
158
160
  # @option options [Boolean] :active_endpoint_cache (false)
159
161
  # When set to `true`, a thread polling for endpoints will be running in
160
162
  # the background every 60 secs (default). Defaults to `false`.
@@ -369,7 +371,9 @@ module Aws::SSOOIDC
369
371
  # sending the request.
370
372
  #
371
373
  # @option options [Aws::SSOOIDC::EndpointProvider] :endpoint_provider
372
- # 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`
374
+ # The endpoint provider used to resolve endpoints. Any object that responds to
375
+ # `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
376
+ # `Aws::SSOOIDC::EndpointParameters`.
373
377
  #
374
378
  # @option options [Float] :http_continue_timeout (1)
375
379
  # The number of seconds to wait for a 100-continue response before sending the
@@ -425,6 +429,12 @@ module Aws::SSOOIDC
425
429
  # @option options [String] :ssl_ca_store
426
430
  # Sets the X509::Store to verify peer certificate.
427
431
  #
432
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
433
+ # Sets a client certificate when creating http connections.
434
+ #
435
+ # @option options [OpenSSL::PKey] :ssl_key
436
+ # Sets a client key when creating http connections.
437
+ #
428
438
  # @option options [Float] :ssl_timeout
429
439
  # Sets the SSL timeout in seconds
430
440
  #
@@ -1012,7 +1022,7 @@ module Aws::SSOOIDC
1012
1022
  tracer: tracer
1013
1023
  )
1014
1024
  context[:gem_name] = 'aws-sdk-core'
1015
- context[:gem_version] = '3.203.0'
1025
+ context[:gem_version] = '3.209.1'
1016
1026
  Seahorse::Client::Request.new(handlers, context)
1017
1027
  end
1018
1028
 
@@ -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
@@ -14,56 +14,44 @@ module Aws::SSOOIDC
14
14
 
15
15
  class CreateToken
16
16
  def self.build(context)
17
- unless context.config.regional_endpoint
18
- endpoint = context.config.endpoint.to_s
19
- end
20
17
  Aws::SSOOIDC::EndpointParameters.new(
21
18
  region: context.config.region,
22
19
  use_dual_stack: context.config.use_dualstack_endpoint,
23
20
  use_fips: context.config.use_fips_endpoint,
24
- endpoint: endpoint,
21
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
25
22
  )
26
23
  end
27
24
  end
28
25
 
29
26
  class CreateTokenWithIAM
30
27
  def self.build(context)
31
- unless context.config.regional_endpoint
32
- endpoint = context.config.endpoint.to_s
33
- end
34
28
  Aws::SSOOIDC::EndpointParameters.new(
35
29
  region: context.config.region,
36
30
  use_dual_stack: context.config.use_dualstack_endpoint,
37
31
  use_fips: context.config.use_fips_endpoint,
38
- endpoint: endpoint,
32
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
39
33
  )
40
34
  end
41
35
  end
42
36
 
43
37
  class RegisterClient
44
38
  def self.build(context)
45
- unless context.config.regional_endpoint
46
- endpoint = context.config.endpoint.to_s
47
- end
48
39
  Aws::SSOOIDC::EndpointParameters.new(
49
40
  region: context.config.region,
50
41
  use_dual_stack: context.config.use_dualstack_endpoint,
51
42
  use_fips: context.config.use_fips_endpoint,
52
- endpoint: endpoint,
43
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
53
44
  )
54
45
  end
55
46
  end
56
47
 
57
48
  class StartDeviceAuthorization
58
49
  def self.build(context)
59
- unless context.config.regional_endpoint
60
- endpoint = context.config.endpoint.to_s
61
- end
62
50
  Aws::SSOOIDC::EndpointParameters.new(
63
51
  region: context.config.region,
64
52
  use_dual_stack: context.config.use_dualstack_endpoint,
65
53
  use_fips: context.config.use_fips_endpoint,
66
- endpoint: endpoint,
54
+ endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
67
55
  )
68
56
  end
69
57
  end
@@ -15,11 +15,11 @@ module Aws::SSOOIDC
15
15
  :endpoint_provider,
16
16
  doc_type: 'Aws::SSOOIDC::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::SSOOIDC::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::SSOOIDC::EndpointParameters`.
22
+ DOCS
23
23
  Aws::SSOOIDC::EndpointProvider.new
24
24
  end
25
25
 
@@ -40,11 +40,23 @@ module Aws::SSOOIDC
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
@@ -821,3 +821,4 @@ module Aws::SSOOIDC
821
821
 
822
822
  end
823
823
  end
824
+
@@ -13,16 +13,7 @@ unless Module.const_defined?(:Aws)
13
13
  require 'aws-sigv4'
14
14
  end
15
15
 
16
- require_relative 'aws-sdk-ssooidc/types'
17
- require_relative 'aws-sdk-ssooidc/client_api'
18
- require_relative 'aws-sdk-ssooidc/plugins/endpoints.rb'
19
- require_relative 'aws-sdk-ssooidc/client'
20
- require_relative 'aws-sdk-ssooidc/errors'
21
- require_relative 'aws-sdk-ssooidc/resource'
22
- require_relative 'aws-sdk-ssooidc/endpoint_parameters'
23
- require_relative 'aws-sdk-ssooidc/endpoint_provider'
24
- require_relative 'aws-sdk-ssooidc/endpoints'
25
- require_relative 'aws-sdk-ssooidc/customizations'
16
+ Aws::Plugins::GlobalConfiguration.add_identifier(:ssooidc)
26
17
 
27
18
  # This module provides support for AWS SSO OIDC. This module is available in the
28
19
  # `aws-sdk-core` gem.
@@ -53,7 +44,20 @@ require_relative 'aws-sdk-ssooidc/customizations'
53
44
  #
54
45
  # @!group service
55
46
  module Aws::SSOOIDC
47
+ autoload :Types, 'aws-sdk-ssooidc/types'
48
+ autoload :ClientApi, 'aws-sdk-ssooidc/client_api'
49
+ module Plugins
50
+ autoload :Endpoints, 'aws-sdk-ssooidc/plugins/endpoints.rb'
51
+ end
52
+ autoload :Client, 'aws-sdk-ssooidc/client'
53
+ autoload :Errors, 'aws-sdk-ssooidc/errors'
54
+ autoload :Resource, 'aws-sdk-ssooidc/resource'
55
+ autoload :EndpointParameters, 'aws-sdk-ssooidc/endpoint_parameters'
56
+ autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
+ autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
56
58
 
57
- GEM_VERSION = '3.203.0'
59
+ GEM_VERSION = '3.209.1'
58
60
 
59
61
  end
62
+
63
+ require_relative 'aws-sdk-ssooidc/customizations'