aws-sdk-core 3.178.0 → 3.185.1

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: 9b0103607b2d6036806605dea30ea78169454607d046e0d492141f78503f5bd0
4
- data.tar.gz: 8886536501b3cf7aee0d37dc2b4cdefd24d8c7ecdbcae9dca1f03734e94296ed
3
+ metadata.gz: a871c58d68eb4fb29e8cbaa37367987ed2c060127ddddd433235ae50b43030f5
4
+ data.tar.gz: f7697299235319ae5cb27f2251d2650960e68358d30ea90199bcc4709ef6bd81
5
5
  SHA512:
6
- metadata.gz: 90e1f00ccb15c3e7777ab4cf3df3977dc0a99b0ca243482bab2953ec602dc18bcdb2a4fa69616a535ba68080821509721b5512fe2f4f05717d0f1aeb38c927ff
7
- data.tar.gz: 305ea810a3456b951112fd30e749f8c2feca93c0975efa241fc202131b9e597c396ffcf956551dc27cd7a07d85d2b50b2fd8440047903583523f0211e3d4f60e
6
+ metadata.gz: 2e2f2575b51ecc6cebcb91657b12e88241cb7b51a635fa48057f7f54b540cee470d0eef5c20dc5da4e0c8f9c4f967133c3a100824c2e274978131ee86ab69c5e
7
+ data.tar.gz: 2dd958969ee80dbde1b6fe9c151f5508301593ad87703ebbb0a4b700e57110ad88e3a1103a56bc70cb5cdfe2965eb0fbb27ee35d38adfa45e664a958546ddb7e
data/CHANGELOG.md CHANGED
@@ -1,6 +1,75 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 3.185.1 (2023-10-05)
5
+ ------------------
6
+
7
+ * Issue - Ignore `__type` when deserializing Unions.
8
+
9
+ 3.185.0 (2023-10-02)
10
+ ------------------
11
+
12
+ * Feature - Updated Aws::STS::Client with the latest API changes.
13
+
14
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
15
+
16
+ 3.184.0 (2023-09-27)
17
+ ------------------
18
+
19
+ * Feature - Change the `ServiceError` data member from read only to read/write.
20
+
21
+ 3.183.1 (2023-09-25)
22
+ ------------------
23
+
24
+ * Issue - Remove value inspection from param validation errors.
25
+
26
+ 3.183.0 (2023-09-20)
27
+ ------------------
28
+
29
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
30
+
31
+ 3.182.0 (2023-09-19)
32
+ ------------------
33
+
34
+ * Feature - Updated Aws::SSOOIDC::Client with the latest API changes.
35
+
36
+ * Feature - Updated Aws::SSO::Client with the latest API changes.
37
+
38
+ 3.181.1 (2023-09-14)
39
+ ------------------
40
+
41
+ * Issue - Fix host label validation in endpoint matchers.
42
+
43
+ 3.181.0 (2023-08-22)
44
+ ------------------
45
+
46
+ * Feature - Add support for `on_chunk_received` callback.
47
+
48
+ 3.180.3 (2023-08-09)
49
+ ------------------
50
+
51
+ * Issue - Add support for sso-session names with whitespace configured by the CLI `aws sso configure` command (#2895).
52
+
53
+ 3.180.2 (2023-08-07)
54
+ ------------------
55
+
56
+ * Issue - Fix parsing of ini files with mixes of blank properties and nested configurations.
57
+
58
+ 3.180.1 (2023-07-31)
59
+ ------------------
60
+
61
+ * Issue - Remove checksums from default stubs (#2888).
62
+
63
+ 3.180.0 (2023-07-25)
64
+ ------------------
65
+
66
+ * Feature - Updated Aws::STS::Client with the latest API changes.
67
+
68
+ 3.179.0 (2023-07-24)
69
+ ------------------
70
+
71
+ * Feature - Add `checksum_validated` method to response.
72
+
4
73
  3.178.0 (2023-07-11)
5
74
  ------------------
6
75
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.178.0
1
+ 3.185.1
@@ -79,11 +79,11 @@ module Aws
79
79
  return false if value.empty?
80
80
 
81
81
  if allow_sub_domains
82
- labels = value.split('.')
82
+ labels = value.split('.', -1)
83
83
  return labels.all? { |l| valid_host_label?(l) }
84
84
  end
85
85
 
86
- value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/
86
+ !!(value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?<!-)\z/)
87
87
  end
88
88
 
89
89
  # AWS
@@ -114,13 +114,17 @@ module Aws
114
114
 
115
115
  # aws.isVirtualHostableS3Bucket(value: string, allowSubDomains: bool) bool
116
116
  def self.aws_virtual_hostable_s3_bucket?(value, allow_sub_domains = false)
117
- !!(value.size < 64 &&
118
- # regular naming rules
119
- value =~ /^[a-z0-9][a-z0-9\-#{'.' if allow_sub_domains}]+[a-z0-9]$/ &&
120
- # not IP address
121
- value !~ /(\d+\.){3}\d+/ &&
122
- # no dash and hyphen together
123
- value !~ /[.-]{2}/)
117
+ return false if value.empty?
118
+
119
+ if allow_sub_domains
120
+ labels = value.split('.', -1)
121
+ return labels.all? { |l| aws_virtual_hostable_s3_bucket?(l) }
122
+ end
123
+
124
+ # must be between 3 and 63 characters long, no uppercase
125
+ value =~ /\A(?!-)[a-z0-9-]{3,63}(?<!-)\z/ &&
126
+ # not an IP address
127
+ value !~ /(\d+\.){3}\d+/
124
128
  end
125
129
  end
126
130
  end
@@ -30,7 +30,7 @@ module Aws
30
30
  attr_reader :context
31
31
 
32
32
  # @return [Aws::Structure]
33
- attr_reader :data
33
+ attr_accessor :data
34
34
 
35
35
  class << self
36
36
 
@@ -8,6 +8,8 @@ module Aws
8
8
  def ini_parse(raw)
9
9
  current_profile = nil
10
10
  current_prefix = nil
11
+ item = nil
12
+ previous_item = nil
11
13
  raw.lines.inject({}) do |acc, line|
12
14
  line = line.split(/^|\s;/).first # remove comments
13
15
  profile = line.match(/^\[([^\[\]]+)\]\s*(#.+)?$/) unless line.nil?
@@ -17,11 +19,16 @@ module Aws
17
19
  current_profile = named_profile[1] if named_profile
18
20
  elsif current_profile
19
21
  unless line.nil?
20
- item = line.match(/^(.+?)\s*=\s*([^\s].*?)\s*$/)
22
+ previous_item = item
23
+ item = line.match(/^(.+?)\s*=\s*(.+?)\s*$/)
21
24
  prefix = line.match(/^(.+?)\s*=\s*$/)
22
25
  end
23
26
  if item && item[1].match(/^\s+/)
24
27
  # Need to add lines to a nested configuration.
28
+ if current_prefix.nil? && previous_item[2].strip.empty?
29
+ current_prefix = previous_item[1]
30
+ acc[current_profile][current_prefix] = {}
31
+ end
25
32
  inner_item = line.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/)
26
33
  acc[current_profile] ||= {}
27
34
  acc[current_profile][current_prefix] ||= {}
@@ -28,7 +28,7 @@ module Aws
28
28
  member_name, member_ref = shape.member_by_location_name(key)
29
29
  if member_ref
30
30
  target[member_name] = parse_ref(member_ref, value)
31
- elsif shape.union
31
+ elsif shape.union && key != '__type'
32
32
  target[:unknown] = { 'name' => key, 'value' => value }
33
33
  end
34
34
  end
@@ -6,7 +6,7 @@ module Aws
6
6
 
7
7
  include Seahorse::Model::Shapes
8
8
 
9
- EXPECTED_GOT = "expected %s to be %s, got value %s (class: %s) instead."
9
+ EXPECTED_GOT = 'expected %s to be %s, got class %s instead.'
10
10
 
11
11
  # @param [Seahorse::Model::Shapes::ShapeRef] rules
12
12
  # @param [Hash] params
@@ -230,7 +230,7 @@ module Aws
230
230
  end
231
231
 
232
232
  def expected_got(context, expected, got)
233
- EXPECTED_GOT % [context, expected, got.inspect, got.class.name]
233
+ EXPECTED_GOT % [context, expected, got.class.name]
234
234
  end
235
235
 
236
236
  end
@@ -169,9 +169,9 @@ module Aws
169
169
 
170
170
  # Source a custom configured endpoint from the shared configuration file
171
171
  #
172
- # @param [Hash] options
173
- # @option options [String] :profile
174
- # @option options [String] :service_id
172
+ # @param [Hash] opts
173
+ # @option opts [String] :profile
174
+ # @option opts [String] :service_id
175
175
  def configured_endpoint(opts = {})
176
176
  # services section is only allowed in the shared config file (not credentials)
177
177
  profile = opts[:profile] || @profile_name
@@ -359,12 +359,8 @@ module Aws
359
359
  !(prof_config.keys & SSO_CREDENTIAL_PROFILE_KEYS).empty?
360
360
 
361
361
  if sso_session_name = prof_config['sso_session']
362
- sso_session = cfg["sso-session #{sso_session_name}"]
363
- unless sso_session
364
- raise ArgumentError,
365
- "sso-session #{sso_session_name} must be defined in the config file. " \
366
- "Referenced by profile #{profile}"
367
- end
362
+ sso_session = sso_session(cfg, profile, sso_session_name)
363
+
368
364
  sso_region = sso_session['sso_region']
369
365
  sso_start_url = sso_session['sso_start_url']
370
366
 
@@ -389,7 +385,7 @@ module Aws
389
385
  sso_role_name: prof_config['sso_role_name'],
390
386
  sso_session: prof_config['sso_session'],
391
387
  sso_region: sso_region,
392
- sso_start_url: prof_config['sso_start_url']
388
+ sso_start_url: sso_start_url
393
389
  )
394
390
  end
395
391
  end
@@ -402,16 +398,7 @@ module Aws
402
398
  !(prof_config.keys & SSO_TOKEN_PROFILE_KEYS).empty?
403
399
 
404
400
  sso_session_name = prof_config['sso_session']
405
- sso_session = cfg["sso-session #{sso_session_name}"]
406
- unless sso_session
407
- raise ArgumentError,
408
- "sso-session #{sso_session_name} must be defined in the config file." \
409
- "Referenced by profile #{profile}"
410
- end
411
-
412
- unless sso_session['sso_region']
413
- raise ArgumentError, "sso-session #{sso_session_name} missing required parameter: sso_region"
414
- end
401
+ sso_session = sso_session(cfg, profile, sso_session_name)
415
402
 
416
403
  SSOTokenProvider.new(
417
404
  sso_session: sso_session_name,
@@ -469,5 +456,22 @@ module Aws
469
456
  ret ||= 'default'
470
457
  ret
471
458
  end
459
+
460
+ def sso_session(cfg, profile, sso_session_name)
461
+ # aws sso-configure may add quotes around sso session names with whitespace
462
+ sso_session = cfg["sso-session #{sso_session_name}"] || cfg["sso-session '#{sso_session_name}'"]
463
+
464
+ unless sso_session
465
+ raise ArgumentError,
466
+ "sso-session #{sso_session_name} must be defined in the config file. " \
467
+ "Referenced by profile #{profile}"
468
+ end
469
+
470
+ unless sso_session['sso_region']
471
+ raise ArgumentError, "sso-session #{sso_session_name} missing required parameter: sso_region"
472
+ end
473
+
474
+ sso_session
475
+ end
472
476
  end
473
477
  end
@@ -13,12 +13,23 @@ module Aws
13
13
  def stub(data = {})
14
14
  stub = EmptyStub.new(@rules).stub
15
15
  remove_paging_tokens(stub)
16
+ remove_checksums(stub)
16
17
  apply_data(data, stub)
17
18
  stub
18
19
  end
19
20
 
20
21
  private
21
22
 
23
+ def remove_checksums(stub)
24
+ if @rules && @rules.shape.is_a?(Seahorse::Model::Shapes::StructureShape)
25
+ @rules.shape.members.each do |key, member|
26
+ if member.location == 'header' && member.location_name.start_with?('x-amz-checksum-')
27
+ stub[key] = nil
28
+ end
29
+ end
30
+ end
31
+ end
32
+
22
33
  def remove_paging_tokens(stub)
23
34
  if @pager
24
35
  @pager.instance_variable_get("@tokens").keys.each do |path|
@@ -605,7 +605,7 @@ module Aws::SSO
605
605
  params: params,
606
606
  config: config)
607
607
  context[:gem_name] = 'aws-sdk-core'
608
- context[:gem_version] = '3.178.0'
608
+ context[:gem_version] = '3.185.1'
609
609
  Seahorse::Client::Request.new(handlers, context)
610
610
  end
611
611
 
@@ -14,36 +14,42 @@ module Aws::SSO
14
14
  use_dual_stack = parameters.use_dual_stack
15
15
  use_fips = parameters.use_fips
16
16
  endpoint = parameters.endpoint
17
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
18
- if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
19
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
20
- raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
21
- end
22
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
23
- raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
24
- end
25
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
26
- end
27
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
28
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
29
- return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
30
- end
31
- raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
32
- end
17
+ if Aws::Endpoints::Matchers.set?(endpoint)
33
18
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
34
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
35
- return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
36
- end
37
- raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
19
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
38
20
  end
39
21
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
40
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
41
- return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
22
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
+ end
24
+ return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
25
+ end
26
+ if Aws::Endpoints::Matchers.set?(region)
27
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
29
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
+ end
32
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
+ end
34
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
+ if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
37
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.amazonaws.com", headers: {}, properties: {})
38
+ end
39
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
+ end
41
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
+ end
43
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
44
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
45
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
+ end
47
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
42
48
  end
43
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
49
+ return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
44
50
  end
45
- return Aws::Endpoints::Endpoint.new(url: "https://portal.sso.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
46
51
  end
52
+ raise ArgumentError, "Invalid Configuration: Missing Region"
47
53
  raise ArgumentError, 'No endpoint could be resolved'
48
54
 
49
55
  end
data/lib/aws-sdk-sso.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sso/customizations'
54
54
  # @!group service
55
55
  module Aws::SSO
56
56
 
57
- GEM_VERSION = '3.178.0'
57
+ GEM_VERSION = '3.185.1'
58
58
 
59
59
  end
@@ -601,7 +601,7 @@ module Aws::SSOOIDC
601
601
  params: params,
602
602
  config: config)
603
603
  context[:gem_name] = 'aws-sdk-core'
604
- context[:gem_version] = '3.178.0'
604
+ context[:gem_version] = '3.185.1'
605
605
  Seahorse::Client::Request.new(handlers, context)
606
606
  end
607
607
 
@@ -14,36 +14,42 @@ module Aws::SSOOIDC
14
14
  use_dual_stack = parameters.use_dual_stack
15
15
  use_fips = parameters.use_fips
16
16
  endpoint = parameters.endpoint
17
- if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
18
- if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
19
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
20
- raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
21
- end
22
- if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
23
- raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
24
- end
25
- return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
26
- end
27
- if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
28
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
29
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
30
- end
31
- raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
32
- end
17
+ if Aws::Endpoints::Matchers.set?(endpoint)
33
18
  if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
34
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
35
- return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
36
- end
37
- raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
19
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
38
20
  end
39
21
  if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
40
- if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
41
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
22
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
+ end
24
+ return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
25
+ end
26
+ if Aws::Endpoints::Matchers.set?(region)
27
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
29
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
+ end
32
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
+ end
34
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
+ if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
37
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.amazonaws.com", headers: {}, properties: {})
38
+ end
39
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
+ end
41
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
+ end
43
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
44
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
45
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
+ end
47
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
42
48
  end
43
- raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
49
+ return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
44
50
  end
45
- return Aws::Endpoints::Endpoint.new(url: "https://oidc.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
46
51
  end
52
+ raise ArgumentError, "Invalid Configuration: Missing Region"
47
53
  raise ArgumentError, 'No endpoint could be resolved'
48
54
 
49
55
  end
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-ssooidc/customizations'
54
54
  # @!group service
55
55
  module Aws::SSOOIDC
56
56
 
57
- GEM_VERSION = '3.178.0'
57
+ GEM_VERSION = '3.185.1'
58
58
 
59
59
  end
@@ -766,6 +766,9 @@ module Aws::STS
766
766
  #
767
767
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
768
768
  #
769
+ # @option params [Array<Types::ProvidedContext>] :provided_contexts
770
+ # Reserved for future use.
771
+ #
769
772
  # @return [Types::AssumeRoleResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
770
773
  #
771
774
  # * {Types::AssumeRoleResponse#credentials #credentials} => Types::Credentials
@@ -826,7 +829,7 @@ module Aws::STS
826
829
  # arn: "arnType",
827
830
  # },
828
831
  # ],
829
- # policy: "sessionPolicyDocumentType",
832
+ # policy: "unrestrictedSessionPolicyDocumentType",
830
833
  # duration_seconds: 1,
831
834
  # tags: [
832
835
  # {
@@ -839,6 +842,12 @@ module Aws::STS
839
842
  # serial_number: "serialNumberType",
840
843
  # token_code: "tokenCodeType",
841
844
  # source_identity: "sourceIdentityType",
845
+ # provided_contexts: [
846
+ # {
847
+ # provider_arn: "arnType",
848
+ # context_assertion: "contextAssertionType",
849
+ # },
850
+ # ],
842
851
  # })
843
852
  #
844
853
  # @example Response structure
@@ -1401,7 +1410,8 @@ module Aws::STS
1401
1410
  # by the identity provider. Your application must get this token by
1402
1411
  # authenticating the user who is using your application with a web
1403
1412
  # identity provider before the application makes an
1404
- # `AssumeRoleWithWebIdentity` call.
1413
+ # `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
1414
+ # (RS256) are supported.
1405
1415
  #
1406
1416
  # @option params [String] :provider_id
1407
1417
  # The fully qualified host component of the domain name of the OAuth 2.0
@@ -2334,7 +2344,7 @@ module Aws::STS
2334
2344
  params: params,
2335
2345
  config: config)
2336
2346
  context[:gem_name] = 'aws-sdk-core'
2337
- context[:gem_version] = '3.178.0'
2347
+ context[:gem_version] = '3.185.1'
2338
2348
  Seahorse::Client::Request.new(handlers, context)
2339
2349
  end
2340
2350
 
@@ -43,6 +43,8 @@ module Aws::STS
43
43
  NameQualifier = Shapes::StringShape.new(name: 'NameQualifier')
44
44
  PackedPolicyTooLargeException = Shapes::StructureShape.new(name: 'PackedPolicyTooLargeException')
45
45
  PolicyDescriptorType = Shapes::StructureShape.new(name: 'PolicyDescriptorType')
46
+ ProvidedContext = Shapes::StructureShape.new(name: 'ProvidedContext')
47
+ ProvidedContextsListType = Shapes::ListShape.new(name: 'ProvidedContextsListType')
46
48
  RegionDisabledException = Shapes::StructureShape.new(name: 'RegionDisabledException')
47
49
  SAMLAssertionType = Shapes::StringShape.new(name: 'SAMLAssertionType')
48
50
  Subject = Shapes::StringShape.new(name: 'Subject')
@@ -54,6 +56,7 @@ module Aws::STS
54
56
  arnType = Shapes::StringShape.new(name: 'arnType')
55
57
  assumedRoleIdType = Shapes::StringShape.new(name: 'assumedRoleIdType')
56
58
  clientTokenType = Shapes::StringShape.new(name: 'clientTokenType')
59
+ contextAssertionType = Shapes::StringShape.new(name: 'contextAssertionType')
57
60
  dateType = Shapes::TimestampShape.new(name: 'dateType')
58
61
  decodedMessageType = Shapes::StringShape.new(name: 'decodedMessageType')
59
62
  durationSecondsType = Shapes::IntegerShape.new(name: 'durationSecondsType')
@@ -81,6 +84,7 @@ module Aws::STS
81
84
  tagValueType = Shapes::StringShape.new(name: 'tagValueType')
82
85
  tokenCodeType = Shapes::StringShape.new(name: 'tokenCodeType')
83
86
  tokenType = Shapes::StringShape.new(name: 'tokenType')
87
+ unrestrictedSessionPolicyDocumentType = Shapes::StringShape.new(name: 'unrestrictedSessionPolicyDocumentType')
84
88
  urlType = Shapes::StringShape.new(name: 'urlType')
85
89
  userIdType = Shapes::StringShape.new(name: 'userIdType')
86
90
  userNameType = Shapes::StringShape.new(name: 'userNameType')
@@ -89,7 +93,7 @@ module Aws::STS
89
93
  AssumeRoleRequest.add_member(:role_arn, Shapes::ShapeRef.new(shape: arnType, required: true, location_name: "RoleArn"))
90
94
  AssumeRoleRequest.add_member(:role_session_name, Shapes::ShapeRef.new(shape: roleSessionNameType, required: true, location_name: "RoleSessionName"))
91
95
  AssumeRoleRequest.add_member(:policy_arns, Shapes::ShapeRef.new(shape: policyDescriptorListType, location_name: "PolicyArns"))
92
- AssumeRoleRequest.add_member(:policy, Shapes::ShapeRef.new(shape: sessionPolicyDocumentType, location_name: "Policy"))
96
+ AssumeRoleRequest.add_member(:policy, Shapes::ShapeRef.new(shape: unrestrictedSessionPolicyDocumentType, location_name: "Policy"))
93
97
  AssumeRoleRequest.add_member(:duration_seconds, Shapes::ShapeRef.new(shape: roleDurationSecondsType, location_name: "DurationSeconds"))
94
98
  AssumeRoleRequest.add_member(:tags, Shapes::ShapeRef.new(shape: tagListType, location_name: "Tags"))
95
99
  AssumeRoleRequest.add_member(:transitive_tag_keys, Shapes::ShapeRef.new(shape: tagKeyListType, location_name: "TransitiveTagKeys"))
@@ -97,6 +101,7 @@ module Aws::STS
97
101
  AssumeRoleRequest.add_member(:serial_number, Shapes::ShapeRef.new(shape: serialNumberType, location_name: "SerialNumber"))
98
102
  AssumeRoleRequest.add_member(:token_code, Shapes::ShapeRef.new(shape: tokenCodeType, location_name: "TokenCode"))
99
103
  AssumeRoleRequest.add_member(:source_identity, Shapes::ShapeRef.new(shape: sourceIdentityType, location_name: "SourceIdentity"))
104
+ AssumeRoleRequest.add_member(:provided_contexts, Shapes::ShapeRef.new(shape: ProvidedContextsListType, location_name: "ProvidedContexts"))
100
105
  AssumeRoleRequest.struct_class = Types::AssumeRoleRequest
101
106
 
102
107
  AssumeRoleResponse.add_member(:credentials, Shapes::ShapeRef.new(shape: Credentials, location_name: "Credentials"))
@@ -219,6 +224,12 @@ module Aws::STS
219
224
  PolicyDescriptorType.add_member(:arn, Shapes::ShapeRef.new(shape: arnType, location_name: "arn"))
220
225
  PolicyDescriptorType.struct_class = Types::PolicyDescriptorType
221
226
 
227
+ ProvidedContext.add_member(:provider_arn, Shapes::ShapeRef.new(shape: arnType, location_name: "ProviderArn"))
228
+ ProvidedContext.add_member(:context_assertion, Shapes::ShapeRef.new(shape: contextAssertionType, location_name: "ContextAssertion"))
229
+ ProvidedContext.struct_class = Types::ProvidedContext
230
+
231
+ ProvidedContextsListType.member = Shapes::ShapeRef.new(shape: ProvidedContext)
232
+
222
233
  RegionDisabledException.add_member(:message, Shapes::ShapeRef.new(shape: regionDisabledMessage, location_name: "message"))
223
234
  RegionDisabledException.struct_class = Types::RegionDisabledException
224
235
 
@@ -287,6 +287,10 @@ module Aws::STS
287
287
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html
288
288
  # @return [String]
289
289
  #
290
+ # @!attribute [rw] provided_contexts
291
+ # Reserved for future use.
292
+ # @return [Array<Types::ProvidedContext>]
293
+ #
290
294
  # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleRequest AWS API Documentation
291
295
  #
292
296
  class AssumeRoleRequest < Struct.new(
@@ -300,7 +304,8 @@ module Aws::STS
300
304
  :external_id,
301
305
  :serial_number,
302
306
  :token_code,
303
- :source_identity)
307
+ :source_identity,
308
+ :provided_contexts)
304
309
  SENSITIVE = []
305
310
  include Aws::Structure
306
311
  end
@@ -652,7 +657,8 @@ module Aws::STS
652
657
  # provided by the identity provider. Your application must get this
653
658
  # token by authenticating the user who is using your application with
654
659
  # a web identity provider before the application makes an
655
- # `AssumeRoleWithWebIdentity` call.
660
+ # `AssumeRoleWithWebIdentity` call. Only tokens with RSA algorithms
661
+ # (RS256) are supported.
656
662
  # @return [String]
657
663
  #
658
664
  # @!attribute [rw] provider_id
@@ -1497,6 +1503,25 @@ module Aws::STS
1497
1503
  include Aws::Structure
1498
1504
  end
1499
1505
 
1506
+ # Reserved for future use.
1507
+ #
1508
+ # @!attribute [rw] provider_arn
1509
+ # Reserved for future use.
1510
+ # @return [String]
1511
+ #
1512
+ # @!attribute [rw] context_assertion
1513
+ # Reserved for future use.
1514
+ # @return [String]
1515
+ #
1516
+ # @see http://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/ProvidedContext AWS API Documentation
1517
+ #
1518
+ class ProvidedContext < Struct.new(
1519
+ :provider_arn,
1520
+ :context_assertion)
1521
+ SENSITIVE = []
1522
+ include Aws::Structure
1523
+ end
1524
+
1500
1525
  # STS is not activated in the requested region for the account that is
1501
1526
  # being asked to generate credentials. The account administrator must
1502
1527
  # use the IAM console to activate STS in that region. For more
data/lib/aws-sdk-sts.rb CHANGED
@@ -54,6 +54,6 @@ require_relative 'aws-sdk-sts/customizations'
54
54
  # @!group service
55
55
  module Aws::STS
56
56
 
57
- GEM_VERSION = '3.178.0'
57
+ GEM_VERSION = '3.185.1'
58
58
 
59
59
  end
@@ -60,6 +60,16 @@ the number of bytes read from the body, and the total number of
60
60
  bytes in the body.
61
61
  DOCS
62
62
 
63
+ option(:on_chunk_received,
64
+ default: nil,
65
+ doc_type: 'Proc',
66
+ docstring: <<-DOCS)
67
+ When a Proc object is provided, it will be used as callback when each chunk
68
+ of the response body is received. It provides three arguments: the chunk,
69
+ the number of bytes received, and the total number of
70
+ bytes in the response (or nil if the server did not send a `content-length`).
71
+ DOCS
72
+
63
73
  # @api private
64
74
  class OptionHandler < Client::Handler
65
75
  def call(context)
@@ -68,8 +78,29 @@ bytes in the body.
68
78
  end
69
79
  on_chunk_sent = context.config.on_chunk_sent if on_chunk_sent.nil?
70
80
  context[:on_chunk_sent] = on_chunk_sent if on_chunk_sent
81
+
82
+ if context.params.is_a?(Hash) && context.params[:on_chunk_received]
83
+ on_chunk_received = context.params.delete(:on_chunk_received)
84
+ end
85
+ on_chunk_received = context.config.on_chunk_received if on_chunk_received.nil?
86
+
87
+ add_response_events(on_chunk_received, context) if on_chunk_received
88
+
71
89
  @handler.call(context)
72
90
  end
91
+
92
+ def add_response_events(on_chunk_received, context)
93
+ shared_data = {bytes_received: 0}
94
+
95
+ context.http_response.on_headers do |_status, headers|
96
+ shared_data[:content_length] = headers['content-length']&.to_i
97
+ end
98
+
99
+ context.http_response.on_data do |chunk|
100
+ shared_data[:bytes_received] += chunk.bytesize if chunk && chunk.respond_to?(:bytesize)
101
+ on_chunk_received.call(chunk, shared_data[:bytes_received], shared_data[:content_length])
102
+ end
103
+ end
73
104
  end
74
105
 
75
106
  # @api private
@@ -30,6 +30,12 @@ module Seahorse
30
30
  # @return [StandardError, nil]
31
31
  attr_accessor :error
32
32
 
33
+ # @return [String, nil] returns the algorithm used to validate
34
+ # the response checksum. Returns nil if no verification was done.
35
+ def checksum_validated
36
+ context[:http_checksum][:validated] if context[:http_checksum]
37
+ end
38
+
33
39
  # @overload on(status_code, &block)
34
40
  # @param [Integer] status_code The block will be
35
41
  # triggered only for responses with the given status code.
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.178.0
4
+ version: 3.185.1
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: 2023-07-11 00:00:00.000000000 Z
11
+ date: 2023-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath