aws-sdk-core 3.171.0 → 3.186.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +155 -0
- data/VERSION +1 -1
- data/lib/aws-defaults/default_configuration.rb +4 -4
- data/lib/aws-sdk-core/credential_provider.rb +3 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +13 -9
- data/lib/aws-sdk-core/endpoints.rb +5 -1
- data/lib/aws-sdk-core/errors.rb +1 -1
- data/lib/aws-sdk-core/ini_parser.rb +7 -0
- data/lib/aws-sdk-core/instance_profile_credentials.rb +52 -30
- data/lib/aws-sdk-core/json/error_handler.rb +15 -5
- data/lib/aws-sdk-core/json/parser.rb +1 -1
- data/lib/aws-sdk-core/log/formatter.rb +6 -0
- data/lib/aws-sdk-core/pageable_response.rb +3 -1
- data/lib/aws-sdk-core/param_validator.rb +2 -2
- data/lib/aws-sdk-core/plugins/checksum_algorithm.rb +1 -1
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +109 -33
- data/lib/aws-sdk-core/plugins/request_compression.rb +217 -0
- data/lib/aws-sdk-core/plugins/sign.rb +1 -0
- data/lib/aws-sdk-core/plugins/user_agent.rb +117 -14
- data/lib/aws-sdk-core/refreshing_credentials.rb +0 -6
- data/lib/aws-sdk-core/rest/request/querystring_builder.rb +43 -29
- data/lib/aws-sdk-core/shared_config.rb +47 -18
- data/lib/aws-sdk-core/sso_credentials.rb +1 -1
- data/lib/aws-sdk-core/stubbing/stub_data.rb +11 -0
- data/lib/aws-sdk-core/waiters/poller.rb +3 -1
- data/lib/aws-sdk-sso/client.rb +21 -1
- data/lib/aws-sdk-sso/endpoint_provider.rb +30 -24
- data/lib/aws-sdk-sso/endpoints.rb +1 -0
- data/lib/aws-sdk-sso.rb +1 -1
- data/lib/aws-sdk-ssooidc/client.rb +21 -1
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +30 -24
- data/lib/aws-sdk-ssooidc/endpoints.rb +1 -0
- data/lib/aws-sdk-ssooidc.rb +1 -1
- data/lib/aws-sdk-sts/client.rb +138 -112
- data/lib/aws-sdk-sts/client_api.rb +12 -1
- data/lib/aws-sdk-sts/endpoint_provider.rb +81 -78
- data/lib/aws-sdk-sts/endpoints.rb +1 -0
- data/lib/aws-sdk-sts/types.rb +35 -11
- data/lib/aws-sdk-sts.rb +1 -1
- data/lib/seahorse/client/configuration.rb +0 -4
- data/lib/seahorse/client/plugins/request_callback.rb +31 -0
- data/lib/seahorse/client/response.rb +6 -0
- data/lib/seahorse/model/operation.rb +3 -0
- metadata +3 -2
@@ -15,93 +15,96 @@ module Aws::STS
|
|
15
15
|
use_fips = parameters.use_fips
|
16
16
|
endpoint = parameters.endpoint
|
17
17
|
use_global_endpoint = parameters.use_global_endpoint
|
18
|
-
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
19
|
-
if Aws::Endpoints::Matchers.
|
20
|
-
|
21
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
22
|
-
end
|
23
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "ap-south-1")
|
24
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
25
|
-
end
|
26
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "ap-southeast-1")
|
27
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
28
|
-
end
|
29
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "ap-southeast-2")
|
30
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
31
|
-
end
|
32
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
|
33
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
34
|
-
end
|
35
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "ca-central-1")
|
36
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
37
|
-
end
|
38
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "eu-central-1")
|
39
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
40
|
-
end
|
41
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "eu-north-1")
|
42
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
43
|
-
end
|
44
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-1")
|
45
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
46
|
-
end
|
47
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-2")
|
48
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
49
|
-
end
|
50
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-3")
|
51
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
52
|
-
end
|
53
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "sa-east-1")
|
54
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
55
|
-
end
|
56
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
|
57
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
58
|
-
end
|
59
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-2")
|
60
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
61
|
-
end
|
62
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "us-west-1")
|
63
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
64
|
-
end
|
65
|
-
if Aws::Endpoints::Matchers.string_equals?(region, "us-west-2")
|
66
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"us-east-1", "signingName"=>"sts"}]})
|
67
|
-
end
|
68
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingRegion"=>"#{region}", "signingName"=>"sts"}]})
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_global_endpoint, true) && Aws::Endpoints::Matchers.not(Aws::Endpoints::Matchers.set?(endpoint)) && Aws::Endpoints::Matchers.set?(region) && (partition_result = Aws::Endpoints::Matchers.aws_partition(region)) && Aws::Endpoints::Matchers.boolean_equals?(use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, false)
|
19
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-northeast-1")
|
20
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
69
21
|
end
|
70
|
-
if Aws::Endpoints::Matchers.
|
71
|
-
|
72
|
-
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
73
|
-
end
|
74
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
75
|
-
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
76
|
-
end
|
77
|
-
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
22
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-south-1")
|
23
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
78
24
|
end
|
79
|
-
if Aws::Endpoints::Matchers.
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
25
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-southeast-1")
|
26
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
27
|
+
end
|
28
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ap-southeast-2")
|
29
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
30
|
+
end
|
31
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
|
32
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "ca-central-1")
|
35
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
84
36
|
end
|
37
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-central-1")
|
38
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-north-1")
|
41
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
42
|
+
end
|
43
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-1")
|
44
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
45
|
+
end
|
46
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-2")
|
47
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
48
|
+
end
|
49
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "eu-west-3")
|
50
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
51
|
+
end
|
52
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "sa-east-1")
|
53
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
54
|
+
end
|
55
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-1")
|
56
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
57
|
+
end
|
58
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-east-2")
|
59
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
60
|
+
end
|
61
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-west-1")
|
62
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
63
|
+
end
|
64
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "us-west-2")
|
65
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
66
|
+
end
|
67
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"#{region}"}]})
|
68
|
+
end
|
69
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
85
70
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
86
|
-
|
87
|
-
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
88
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
89
|
-
end
|
90
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
91
|
-
end
|
92
|
-
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
71
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
93
72
|
end
|
94
73
|
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
95
|
-
|
96
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
97
|
-
end
|
98
|
-
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
74
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
99
75
|
end
|
100
|
-
|
101
|
-
|
76
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
77
|
+
end
|
78
|
+
if Aws::Endpoints::Matchers.set?(region)
|
79
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
80
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
81
|
+
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"))
|
82
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
83
|
+
end
|
84
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
85
|
+
end
|
86
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
87
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
88
|
+
if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
|
89
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.amazonaws.com", headers: {}, properties: {})
|
90
|
+
end
|
91
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
92
|
+
end
|
93
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
94
|
+
end
|
95
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
96
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
97
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
98
|
+
end
|
99
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
100
|
+
end
|
101
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
|
102
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"sts", "signingRegion"=>"us-east-1"}]})
|
103
|
+
end
|
104
|
+
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
102
105
|
end
|
103
|
-
return Aws::Endpoints::Endpoint.new(url: "https://sts.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
104
106
|
end
|
107
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
105
108
|
raise ArgumentError, 'No endpoint could be resolved'
|
106
109
|
|
107
110
|
end
|
data/lib/aws-sdk-sts/types.rb
CHANGED
@@ -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
|
@@ -508,7 +513,7 @@ module Aws::STS
|
|
508
513
|
:policy_arns,
|
509
514
|
:policy,
|
510
515
|
:duration_seconds)
|
511
|
-
SENSITIVE = []
|
516
|
+
SENSITIVE = [:saml_assertion]
|
512
517
|
include Aws::Structure
|
513
518
|
end
|
514
519
|
|
@@ -576,7 +581,7 @@ module Aws::STS
|
|
576
581
|
# in IAM.
|
577
582
|
#
|
578
583
|
# The combination of `NameQualifier` and `Subject` can be used to
|
579
|
-
# uniquely identify a
|
584
|
+
# uniquely identify a user.
|
580
585
|
#
|
581
586
|
# The following pseudocode shows how the hash value is calculated:
|
582
587
|
#
|
@@ -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
|
@@ -780,7 +786,7 @@ module Aws::STS
|
|
780
786
|
:policy_arns,
|
781
787
|
:policy,
|
782
788
|
:duration_seconds)
|
783
|
-
SENSITIVE = []
|
789
|
+
SENSITIVE = [:web_identity_token]
|
784
790
|
include Aws::Structure
|
785
791
|
end
|
786
792
|
|
@@ -941,7 +947,7 @@ module Aws::STS
|
|
941
947
|
:secret_access_key,
|
942
948
|
:session_token,
|
943
949
|
:expiration)
|
944
|
-
SENSITIVE = []
|
950
|
+
SENSITIVE = [:secret_access_key]
|
945
951
|
include Aws::Structure
|
946
952
|
end
|
947
953
|
|
@@ -1200,11 +1206,10 @@ module Aws::STS
|
|
1200
1206
|
# The duration, in seconds, that the session should last. Acceptable
|
1201
1207
|
# durations for federation sessions range from 900 seconds (15
|
1202
1208
|
# minutes) to 129,600 seconds (36 hours), with 43,200 seconds (12
|
1203
|
-
# hours) as the default. Sessions obtained using
|
1204
|
-
#
|
1205
|
-
#
|
1206
|
-
#
|
1207
|
-
# to one hour.
|
1209
|
+
# hours) as the default. Sessions obtained using root user credentials
|
1210
|
+
# are restricted to a maximum of 3,600 seconds (one hour). If the
|
1211
|
+
# specified duration is longer than one hour, the session obtained by
|
1212
|
+
# using root user credentials defaults to one hour.
|
1208
1213
|
# @return [Integer]
|
1209
1214
|
#
|
1210
1215
|
# @!attribute [rw] tags
|
@@ -1498,6 +1503,25 @@ module Aws::STS
|
|
1498
1503
|
include Aws::Structure
|
1499
1504
|
end
|
1500
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
|
+
|
1501
1525
|
# STS is not activated in the requested region for the account that is
|
1502
1526
|
# being asked to generate credentials. The account administrator must
|
1503
1527
|
# use the IAM console to activate STS in that region. For more
|
data/lib/aws-sdk-sts.rb
CHANGED
@@ -204,10 +204,6 @@ module Seahorse
|
|
204
204
|
def value_at(opt_name)
|
205
205
|
value = @struct[opt_name]
|
206
206
|
if value.is_a?(Defaults)
|
207
|
-
# Legacy endpoints must continue to exist.
|
208
|
-
if opt_name == :endpoint && @struct.members.include?(:regional_endpoint)
|
209
|
-
@struct[:regional_endpoint] = true
|
210
|
-
end
|
211
207
|
resolve_defaults(opt_name, value)
|
212
208
|
else
|
213
209
|
value
|
@@ -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.
|
4
|
+
version: 3.186.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: 2023-
|
11
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jmespath
|
@@ -185,6 +185,7 @@ files:
|
|
185
185
|
- lib/aws-sdk-core/plugins/protocols/rest_xml.rb
|
186
186
|
- lib/aws-sdk-core/plugins/recursion_detection.rb
|
187
187
|
- lib/aws-sdk-core/plugins/regional_endpoint.rb
|
188
|
+
- lib/aws-sdk-core/plugins/request_compression.rb
|
188
189
|
- lib/aws-sdk-core/plugins/response_paging.rb
|
189
190
|
- lib/aws-sdk-core/plugins/retries/client_rate_limiter.rb
|
190
191
|
- lib/aws-sdk-core/plugins/retries/clock_skew.rb
|