aws-sdk-core 3.209.0 → 3.210.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cbf3fb8d557c18ef98cb12c924876b126d1c40c8083272ed6158f09dec546ff
4
- data.tar.gz: 71df7fb600ffe30f3d1544e046987c79858da533cc55934a191206a51faf75f0
3
+ metadata.gz: 76363f1349adc61b88e879efab4d38e965f416da75d819575e8bd1f81a2260d1
4
+ data.tar.gz: e9c8c07d912cc51bd4a0a19dca27263e2efc9f553280b81710db280101e6901a
5
5
  SHA512:
6
- metadata.gz: 8cb22377219db802f75554b3080f176c81cbc32598cce60dffff9dd7ae7b589a176ad24db24554e9556b86fc8fadd8536e1440d5fc8efed5ced4e982509afd54
7
- data.tar.gz: eae2b08f3eba9a632426cffefbecdfddf2b60355227a02850053566c13caa899bf0eaf7f5d19d1d213024486f64a30fd86936f74e904fd8da7ca927f45255114
6
+ metadata.gz: a2b2155fa24f865908843d89c30b40f93aeaa5fb4ec314082b3413d98f387ee169c5a81c0bf6d10a2afd9522b8d616e87568811a2736c2a32664034b8555a11b
7
+ data.tar.gz: f5c59bf455b3f8d7cfe6ddeb977f8502bfba42f85a4b2fdc1ab47d043b5cc6921bcca8444a5941b0e0c2d50bdbe208d477f03c0ea0ca2928af62e841debd3784
data/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.210.0 (2024-10-18)
5
+ ------------------
6
+
7
+ * Feature - Updated Aws::STS::Client with the latest API changes.
8
+
9
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
10
+
11
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
12
+
13
+ * Feature - reduce memory usage by not using legacy endpoint data unless required.
14
+
15
+ 3.209.1 (2024-09-25)
16
+ ------------------
17
+
18
+ * Issue - Add all core plugins to autoloads.
19
+
4
20
  3.209.0 (2024-09-24)
5
21
  ------------------
6
22
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.209.0
1
+ 3.210.0
@@ -62,23 +62,22 @@ module Aws
62
62
  private
63
63
 
64
64
  def refresh
65
- c = @client.assume_role(@assume_role_params)
66
- creds = c.credentials
67
- account_id =
68
- begin
69
- ARNParser.parse(c.assumed_role_user.arn).account_id
70
- rescue Aws::Errors::InvalidARNError
71
- nil
72
- end
65
+ resp = @client.assume_role(@assume_role_params)
66
+ creds = resp.credentials
73
67
  @credentials = Credentials.new(
74
68
  creds.access_key_id,
75
69
  creds.secret_access_key,
76
70
  creds.session_token,
77
- account_id: account_id
71
+ account_id: parse_account_id(resp)
78
72
  )
79
73
  @expiration = creds.expiration
80
74
  end
81
75
 
76
+ def parse_account_id(resp)
77
+ arn = resp.assumed_role_user&.arn
78
+ ARNParser.parse(arn).account_id if ARNParser.arn?(arn)
79
+ end
80
+
82
81
  class << self
83
82
 
84
83
  # @api private
@@ -73,19 +73,13 @@ module Aws
73
73
  # read from token file everytime it refreshes
74
74
  @assume_role_web_identity_params[:web_identity_token] = _token_from_file(@token_file)
75
75
 
76
- c = @client.assume_role_with_web_identity(@assume_role_web_identity_params)
77
- creds = c.credentials
78
- account_id =
79
- begin
80
- ARNParser.parse(c.assumed_role_user.arn).account_id
81
- rescue Aws::Errors::InvalidARNError
82
- nil
83
- end
76
+ resp = @client.assume_role_with_web_identity(@assume_role_web_identity_params)
77
+ creds = resp.credentials
84
78
  @credentials = Credentials.new(
85
79
  creds.access_key_id,
86
80
  creds.secret_access_key,
87
81
  creds.session_token,
88
- account_id: account_id
82
+ account_id: parse_account_id(resp)
89
83
  )
90
84
  @expiration = creds.expiration
91
85
  end
@@ -101,6 +95,11 @@ module Aws
101
95
  Base64.strict_encode64(SecureRandom.uuid)
102
96
  end
103
97
 
98
+ def parse_account_id(resp)
99
+ arn = resp.assumed_role_user&.arn
100
+ ARNParser.parse(arn).account_id if ARNParser.arn?(arn)
101
+ end
102
+
104
103
  class << self
105
104
 
106
105
  # @api private
@@ -94,14 +94,7 @@ module Aws
94
94
 
95
95
  # aws.partition(value: string) Option<Partition>
96
96
  def self.aws_partition(value)
97
- partition =
98
- Aws::Partitions.find { |p| p.region?(value) } ||
99
- Aws::Partitions.find { |p| value.match(p.region_regex) } ||
100
- Aws::Partitions.find { |p| p.name == 'aws' }
101
-
102
- return nil unless partition
103
-
104
- partition.metadata
97
+ Aws::Partitions::Metadata.partition(value)
105
98
  end
106
99
 
107
100
  # aws.parseArn(value: string) Option<ARN>
@@ -20,7 +20,7 @@ a default `:region` is searched for in the following locations:
20
20
  * `ENV['AWS_DEFAULT_REGION']`
21
21
  * `~/.aws/credentials`
22
22
  * `~/.aws/config`
23
- DOCS
23
+ DOCS
24
24
  resolve_region(cfg)
25
25
  end
26
26
 
@@ -35,7 +35,7 @@ in the following locations:
35
35
  * `Aws.config[:sigv4a_signing_region_set]`
36
36
  * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
37
37
  * `~/.aws/config`
38
- DOCS
38
+ DOCS
39
39
  resolve_sigv4a_signing_region_set(cfg)
40
40
  end
41
41
 
@@ -44,7 +44,7 @@ in the following locations:
44
44
  docstring: <<-DOCS) do |cfg|
45
45
  When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
46
46
  will be used if available.
47
- DOCS
47
+ DOCS
48
48
  resolve_use_dualstack_endpoint(cfg)
49
49
  end
50
50
 
@@ -54,7 +54,7 @@ will be used if available.
54
54
  When set to `true`, fips compatible endpoints will be used if available.
55
55
  When a `fips` region is used, the region is normalized and this config
56
56
  is set to `true`.
57
- DOCS
57
+ DOCS
58
58
  resolve_use_fips_endpoint(cfg)
59
59
  end
60
60
 
@@ -67,7 +67,7 @@ is set to `true`.
67
67
  docstring: <<-DOCS) do |cfg|
68
68
  Setting to true disables use of endpoint URLs provided via environment
69
69
  variables and the shared configuration file.
70
- DOCS
70
+ DOCS
71
71
  resolve_ignore_configured_endpoint_urls(cfg)
72
72
  end
73
73
 
@@ -75,7 +75,7 @@ variables and the shared configuration file.
75
75
  The client endpoint is normally constructed from the `:region`
76
76
  option. You should only configure an `:endpoint` when connecting
77
77
  to test or custom endpoints. This should be a valid HTTP(S) URI.
78
- DOCS
78
+ DOCS
79
79
  resolve_endpoint(cfg)
80
80
  end
81
81
 
@@ -83,6 +83,9 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
83
83
  region = client.config.region
84
84
  raise Errors::MissingRegionError if region.nil? || region == ''
85
85
 
86
+ # resolve a default endpoint to preserve legacy behavior
87
+ initialize_default_endpoint(client) if client.config.endpoint.nil?
88
+
86
89
  region_set = client.config.sigv4a_signing_region_set
87
90
  return if region_set.nil?
88
91
  raise Errors::InvalidRegionSetError unless region_set.is_a?(Array)
@@ -93,6 +96,39 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
93
96
  client.config.sigv4a_signing_region_set = region_set
94
97
  end
95
98
 
99
+ private
100
+
101
+ def initialize_default_endpoint(client)
102
+ client_module = Object.const_get(client.class.name.rpartition('::').first)
103
+ param_class = client_module.const_get(:EndpointParameters)
104
+ endpoint_provider = client.config.endpoint_provider
105
+ params = param_class.create(client.config)
106
+ endpoint = endpoint_provider.resolve_endpoint(params)
107
+ client.config.endpoint = endpoint.url
108
+ rescue ArgumentError, NameError
109
+ # fallback to legacy
110
+ client.config.endpoint = resolve_legacy_endpoint(client.config)
111
+ end
112
+
113
+ # set a default endpoint in config using legacy (endpoints.json) resolver
114
+ def resolve_legacy_endpoint(cfg)
115
+ endpoint_prefix = cfg.api.metadata['endpointPrefix']
116
+ if cfg.respond_to?(:sts_regional_endpoints)
117
+ sts_regional = cfg.sts_regional_endpoints
118
+ end
119
+
120
+ endpoint = Aws::Partitions::EndpointProvider.resolve(
121
+ cfg.region,
122
+ endpoint_prefix,
123
+ sts_regional,
124
+ {
125
+ dualstack: cfg.use_dualstack_endpoint,
126
+ fips: cfg.use_fips_endpoint
127
+ }
128
+ )
129
+ URI(endpoint)
130
+ end
131
+
96
132
  class << self
97
133
  private
98
134
 
@@ -150,7 +186,8 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
150
186
  # that a custom endpoint has NOT been configured by the user
151
187
  cfg.override_config(:regional_endpoint, true)
152
188
 
153
- resolve_legacy_endpoint(cfg)
189
+ # a default endpoint is resolved in after_initialize
190
+ nil
154
191
  end
155
192
 
156
193
  # get a custom configured endpoint from ENV or configuration
@@ -205,24 +242,6 @@ to test or custom endpoints. This should be a valid HTTP(S) URI.
205
242
  cfg.override_config(:region, new_region)
206
243
  end
207
244
  end
208
-
209
- # set a default endpoint in config using legacy (endpoints.json) resolver
210
- def resolve_legacy_endpoint(cfg)
211
- endpoint_prefix = cfg.api.metadata['endpointPrefix']
212
- if cfg.respond_to?(:sts_regional_endpoints)
213
- sts_regional = cfg.sts_regional_endpoints
214
- end
215
-
216
- Aws::Partitions::EndpointProvider.resolve(
217
- cfg.region,
218
- endpoint_prefix,
219
- sts_regional,
220
- {
221
- dualstack: cfg.use_dualstack_endpoint,
222
- fips: cfg.use_fips_endpoint
223
- }
224
- )
225
- end
226
245
  end
227
246
  end
228
247
  end
@@ -3,9 +3,37 @@
3
3
  module Aws
4
4
  # setup autoloading for Plugins
5
5
  # Most plugins are required explicitly from service clients
6
+ # but users may reference them outside of client usage.
6
7
  module Plugins
8
+ autoload :ApiKey, 'aws-sdk-core/plugins/api_key'
7
9
  autoload :BearerAuthorization, 'aws-sdk-core/plugins/bearer_authorization'
8
- autoload :SignatureV4, 'aws-sdk-core/plugins/signature_v4'
10
+ autoload :ChecksumAlgorithm, 'aws-sdk-core/plugins/checksum_algorithm'
11
+ autoload :ClientMetricsPlugin, 'aws-sdk-core/plugins/client_metrics_plugin'
12
+ autoload :ClientMetricsSendPlugin, 'aws-sdk-core/plugins/client_metrics_send_plugin'
13
+ autoload :CredentialsConfiguration, 'aws-sdk-core/plugins/credentials_configuration'
14
+ autoload :DefaultsMode, 'aws-sdk-core/plugins/defaults_mode'
15
+ autoload :EndpointDiscovery, 'aws-sdk-core/plugins/endpoint_discovery'
16
+ autoload :EndpointPattern, 'aws-sdk-core/plugins/endpoint_pattern'
17
+ autoload :EventStreamConfiguration, 'aws-sdk-core/plugins/event_stream_configuration'
9
18
  autoload :GlobalConfiguration, 'aws-sdk-core/plugins/global_configuration'
19
+ autoload :HelpfulSocketErrors, 'aws-sdk-core/plugins/helpful_socket_errors'
20
+ autoload :HttpChecksum, 'aws-sdk-core/plugins/http_checksum'
21
+ autoload :IdempotencyToken, 'aws-sdk-core/plugins/idempotency_token'
22
+ autoload :InvocationId, 'aws-sdk-core/plugins/invocation_id'
23
+ autoload :JsonvalueConverter, 'aws-sdk-core/plugins/jsonvalue_converter'
24
+ autoload :Logging, 'aws-sdk-core/plugins/logging'
25
+ autoload :ParamConverter, 'aws-sdk-core/plugins/param_converter'
26
+ autoload :ParamValidator, 'aws-sdk-core/plugins/param_validator'
27
+ autoload :RecursionDetection, 'aws-sdk-core/plugins/recursion_detection'
28
+ autoload :RegionalEndpoint, 'aws-sdk-core/plugins/regional_endpoint'
29
+ autoload :RequestCompression, 'aws-sdk-core/plugins/request_compression'
30
+ autoload :ResponsePaging, 'aws-sdk-core/plugins/response_paging'
31
+ autoload :RetryErrors, 'aws-sdk-core/plugins/retry_errors'
32
+ autoload :Sign, 'aws-sdk-core/plugins/sign'
33
+ autoload :SignatureV4, 'aws-sdk-core/plugins/signature_v4'
34
+ autoload :StubResponses, 'aws-sdk-core/plugins/stub_responses'
35
+ autoload :Telemetry, 'aws-sdk-core/plugins/telemetry'
36
+ autoload :TransferEncoding, 'aws-sdk-core/plugins/transfer_encoding'
37
+ autoload :UserAgent, 'aws-sdk-core/plugins/user_agent'
10
38
  end
11
39
  end
data/lib/aws-sdk-core.rb CHANGED
@@ -3,6 +3,7 @@
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
  # defaults
@@ -669,7 +669,7 @@ module Aws::SSO
669
669
  tracer: tracer
670
670
  )
671
671
  context[:gem_name] = 'aws-sdk-core'
672
- context[:gem_version] = '3.209.0'
672
+ context[:gem_version] = '3.210.0'
673
673
  Seahorse::Client::Request.new(handlers, context)
674
674
  end
675
675
 
@@ -52,15 +52,18 @@ module Aws::SSO
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
@@ -12,49 +12,9 @@ module Aws::SSO
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class GetRoleCredentials
16
- def self.build(context)
17
- Aws::SSO::EndpointParameters.new(
18
- region: context.config.region,
19
- use_dual_stack: context.config.use_dualstack_endpoint,
20
- use_fips: context.config.use_fips_endpoint,
21
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
22
- )
23
- end
24
- end
25
-
26
- class ListAccountRoles
27
- def self.build(context)
28
- Aws::SSO::EndpointParameters.new(
29
- region: context.config.region,
30
- use_dual_stack: context.config.use_dualstack_endpoint,
31
- use_fips: context.config.use_fips_endpoint,
32
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
33
- )
34
- end
35
- end
36
15
 
37
- class ListAccounts
38
- def self.build(context)
39
- Aws::SSO::EndpointParameters.new(
40
- region: context.config.region,
41
- use_dual_stack: context.config.use_dualstack_endpoint,
42
- use_fips: context.config.use_fips_endpoint,
43
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
44
- )
45
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::SSO::EndpointParameters.create(context.config)
46
18
  end
47
-
48
- class Logout
49
- def self.build(context)
50
- Aws::SSO::EndpointParameters.new(
51
- region: context.config.region,
52
- use_dual_stack: context.config.use_dualstack_endpoint,
53
- use_fips: context.config.use_fips_endpoint,
54
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
55
- )
56
- end
57
- end
58
-
59
19
  end
60
20
  end
@@ -27,7 +27,7 @@ The endpoint provider used to resolve endpoints. Any object that responds to
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
@@ -67,19 +67,6 @@ The endpoint provider used to resolve endpoints. Any object that responds to
67
67
  context.http_request.headers[key] = value
68
68
  end
69
69
  end
70
-
71
- def parameters_for_operation(context)
72
- case context.operation_name
73
- when :get_role_credentials
74
- Aws::SSO::Endpoints::GetRoleCredentials.build(context)
75
- when :list_account_roles
76
- Aws::SSO::Endpoints::ListAccountRoles.build(context)
77
- when :list_accounts
78
- Aws::SSO::Endpoints::ListAccounts.build(context)
79
- when :logout
80
- Aws::SSO::Endpoints::Logout.build(context)
81
- end
82
- end
83
70
  end
84
71
 
85
72
  def add_handlers(handlers, _config)
data/lib/aws-sdk-sso.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::SSO
56
56
  autoload :EndpointProvider, 'aws-sdk-sso/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sso/endpoints'
58
58
 
59
- GEM_VERSION = '3.209.0'
59
+ GEM_VERSION = '3.210.0'
60
60
 
61
61
  end
62
62
 
@@ -1022,7 +1022,7 @@ module Aws::SSOOIDC
1022
1022
  tracer: tracer
1023
1023
  )
1024
1024
  context[:gem_name] = 'aws-sdk-core'
1025
- context[:gem_version] = '3.209.0'
1025
+ context[:gem_version] = '3.210.0'
1026
1026
  Seahorse::Client::Request.new(handlers, context)
1027
1027
  end
1028
1028
 
@@ -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
@@ -12,49 +12,9 @@ module Aws::SSOOIDC
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class CreateToken
16
- def self.build(context)
17
- Aws::SSOOIDC::EndpointParameters.new(
18
- region: context.config.region,
19
- use_dual_stack: context.config.use_dualstack_endpoint,
20
- use_fips: context.config.use_fips_endpoint,
21
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
22
- )
23
- end
24
- end
25
-
26
- class CreateTokenWithIAM
27
- def self.build(context)
28
- Aws::SSOOIDC::EndpointParameters.new(
29
- region: context.config.region,
30
- use_dual_stack: context.config.use_dualstack_endpoint,
31
- use_fips: context.config.use_fips_endpoint,
32
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
33
- )
34
- end
35
- end
36
15
 
37
- class RegisterClient
38
- def self.build(context)
39
- Aws::SSOOIDC::EndpointParameters.new(
40
- region: context.config.region,
41
- use_dual_stack: context.config.use_dualstack_endpoint,
42
- use_fips: context.config.use_fips_endpoint,
43
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
44
- )
45
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::SSOOIDC::EndpointParameters.create(context.config)
46
18
  end
47
-
48
- class StartDeviceAuthorization
49
- def self.build(context)
50
- Aws::SSOOIDC::EndpointParameters.new(
51
- region: context.config.region,
52
- use_dual_stack: context.config.use_dualstack_endpoint,
53
- use_fips: context.config.use_fips_endpoint,
54
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
55
- )
56
- end
57
- end
58
-
59
19
  end
60
20
  end
@@ -27,7 +27,7 @@ The endpoint provider used to resolve endpoints. Any object that responds to
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::SSOOIDC::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
@@ -67,19 +67,6 @@ The endpoint provider used to resolve endpoints. Any object that responds to
67
67
  context.http_request.headers[key] = value
68
68
  end
69
69
  end
70
-
71
- def parameters_for_operation(context)
72
- case context.operation_name
73
- when :create_token
74
- Aws::SSOOIDC::Endpoints::CreateToken.build(context)
75
- when :create_token_with_iam
76
- Aws::SSOOIDC::Endpoints::CreateTokenWithIAM.build(context)
77
- when :register_client
78
- Aws::SSOOIDC::Endpoints::RegisterClient.build(context)
79
- when :start_device_authorization
80
- Aws::SSOOIDC::Endpoints::StartDeviceAuthorization.build(context)
81
- end
82
- end
83
70
  end
84
71
 
85
72
  def add_handlers(handlers, _config)
@@ -56,7 +56,7 @@ module Aws::SSOOIDC
56
56
  autoload :EndpointProvider, 'aws-sdk-ssooidc/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-ssooidc/endpoints'
58
58
 
59
- GEM_VERSION = '3.209.0'
59
+ GEM_VERSION = '3.210.0'
60
60
 
61
61
  end
62
62
 
@@ -2416,7 +2416,7 @@ module Aws::STS
2416
2416
  tracer: tracer
2417
2417
  )
2418
2418
  context[:gem_name] = 'aws-sdk-core'
2419
- context[:gem_version] = '3.209.0'
2419
+ context[:gem_version] = '3.210.0'
2420
2420
  Seahorse::Client::Request.new(handlers, context)
2421
2421
  end
2422
2422
 
@@ -59,20 +59,21 @@ module Aws::STS
59
59
  self[:region] = options[:region]
60
60
  self[:use_dual_stack] = options[:use_dual_stack]
61
61
  self[:use_dual_stack] = false if self[:use_dual_stack].nil?
62
- if self[:use_dual_stack].nil?
63
- raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
64
- end
65
62
  self[:use_fips] = options[:use_fips]
66
63
  self[:use_fips] = false if self[:use_fips].nil?
67
- if self[:use_fips].nil?
68
- raise ArgumentError, "Missing required EndpointParameter: :use_fips"
69
- end
70
64
  self[:endpoint] = options[:endpoint]
71
65
  self[:use_global_endpoint] = options[:use_global_endpoint]
72
66
  self[:use_global_endpoint] = false if self[:use_global_endpoint].nil?
73
- if self[:use_global_endpoint].nil?
74
- raise ArgumentError, "Missing required EndpointParameter: :use_global_endpoint"
75
- end
67
+ end
68
+
69
+ def self.create(config, options={})
70
+ new({
71
+ region: config.region,
72
+ use_dual_stack: config.use_dualstack_endpoint,
73
+ use_fips: config.use_fips_endpoint,
74
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
75
+ use_global_endpoint: config.sts_regional_endpoints == 'legacy',
76
+ }.merge(options))
76
77
  end
77
78
  end
78
79
  end
@@ -12,101 +12,9 @@ module Aws::STS
12
12
  # @api private
13
13
  module Endpoints
14
14
 
15
- class AssumeRole
16
- def self.build(context)
17
- Aws::STS::EndpointParameters.new(
18
- region: context.config.region,
19
- use_dual_stack: context.config.use_dualstack_endpoint,
20
- use_fips: context.config.use_fips_endpoint,
21
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
22
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
23
- )
24
- end
25
- end
26
-
27
- class AssumeRoleWithSAML
28
- def self.build(context)
29
- Aws::STS::EndpointParameters.new(
30
- region: context.config.region,
31
- use_dual_stack: context.config.use_dualstack_endpoint,
32
- use_fips: context.config.use_fips_endpoint,
33
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
34
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
35
- )
36
- end
37
- end
38
-
39
- class AssumeRoleWithWebIdentity
40
- def self.build(context)
41
- Aws::STS::EndpointParameters.new(
42
- region: context.config.region,
43
- use_dual_stack: context.config.use_dualstack_endpoint,
44
- use_fips: context.config.use_fips_endpoint,
45
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
46
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
47
- )
48
- end
49
- end
50
-
51
- class DecodeAuthorizationMessage
52
- def self.build(context)
53
- Aws::STS::EndpointParameters.new(
54
- region: context.config.region,
55
- use_dual_stack: context.config.use_dualstack_endpoint,
56
- use_fips: context.config.use_fips_endpoint,
57
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
58
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
59
- )
60
- end
61
- end
62
15
 
63
- class GetAccessKeyInfo
64
- def self.build(context)
65
- Aws::STS::EndpointParameters.new(
66
- region: context.config.region,
67
- use_dual_stack: context.config.use_dualstack_endpoint,
68
- use_fips: context.config.use_fips_endpoint,
69
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
70
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
71
- )
72
- end
16
+ def self.parameters_for_operation(context)
17
+ Aws::STS::EndpointParameters.create(context.config)
73
18
  end
74
-
75
- class GetCallerIdentity
76
- def self.build(context)
77
- Aws::STS::EndpointParameters.new(
78
- region: context.config.region,
79
- use_dual_stack: context.config.use_dualstack_endpoint,
80
- use_fips: context.config.use_fips_endpoint,
81
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
82
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
83
- )
84
- end
85
- end
86
-
87
- class GetFederationToken
88
- def self.build(context)
89
- Aws::STS::EndpointParameters.new(
90
- region: context.config.region,
91
- use_dual_stack: context.config.use_dualstack_endpoint,
92
- use_fips: context.config.use_fips_endpoint,
93
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
94
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
95
- )
96
- end
97
- end
98
-
99
- class GetSessionToken
100
- def self.build(context)
101
- Aws::STS::EndpointParameters.new(
102
- region: context.config.region,
103
- use_dual_stack: context.config.use_dualstack_endpoint,
104
- use_fips: context.config.use_fips_endpoint,
105
- endpoint: context.config.regional_endpoint ? nil : context.config.endpoint.to_s,
106
- use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
107
- )
108
- end
109
- end
110
-
111
19
  end
112
20
  end
@@ -27,7 +27,7 @@ The endpoint provider used to resolve endpoints. Any object that responds to
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::STS::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
@@ -67,27 +67,6 @@ The endpoint provider used to resolve endpoints. Any object that responds to
67
67
  context.http_request.headers[key] = value
68
68
  end
69
69
  end
70
-
71
- def parameters_for_operation(context)
72
- case context.operation_name
73
- when :assume_role
74
- Aws::STS::Endpoints::AssumeRole.build(context)
75
- when :assume_role_with_saml
76
- Aws::STS::Endpoints::AssumeRoleWithSAML.build(context)
77
- when :assume_role_with_web_identity
78
- Aws::STS::Endpoints::AssumeRoleWithWebIdentity.build(context)
79
- when :decode_authorization_message
80
- Aws::STS::Endpoints::DecodeAuthorizationMessage.build(context)
81
- when :get_access_key_info
82
- Aws::STS::Endpoints::GetAccessKeyInfo.build(context)
83
- when :get_caller_identity
84
- Aws::STS::Endpoints::GetCallerIdentity.build(context)
85
- when :get_federation_token
86
- Aws::STS::Endpoints::GetFederationToken.build(context)
87
- when :get_session_token
88
- Aws::STS::Endpoints::GetSessionToken.build(context)
89
- end
90
- end
91
70
  end
92
71
 
93
72
  def add_handlers(handlers, _config)
data/lib/aws-sdk-sts.rb CHANGED
@@ -56,7 +56,7 @@ module Aws::STS
56
56
  autoload :EndpointProvider, 'aws-sdk-sts/endpoint_provider'
57
57
  autoload :Endpoints, 'aws-sdk-sts/endpoints'
58
58
 
59
- GEM_VERSION = '3.209.0'
59
+ GEM_VERSION = '3.210.0'
60
60
 
61
61
  end
62
62
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.209.0
4
+ version: 3.210.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-24 00:00:00.000000000 Z
11
+ date: 2024-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '1'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 1.651.0
42
+ version: 1.992.0
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '1'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 1.651.0
52
+ version: 1.992.0
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: aws-sigv4
55
55
  requirement: !ruby/object:Gem::Requirement