aws-sdk-core 3.164.0 → 3.165.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 +11 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-core/arn.rb +13 -0
- data/lib/aws-sdk-core/binary/encode_handler.rb +12 -1
- data/lib/aws-sdk-core/endpoints/condition.rb +36 -0
- data/lib/aws-sdk-core/endpoints/endpoint.rb +17 -0
- data/lib/aws-sdk-core/endpoints/endpoint_rule.rb +71 -0
- data/lib/aws-sdk-core/endpoints/error_rule.rb +37 -0
- data/lib/aws-sdk-core/endpoints/function.rb +75 -0
- data/lib/aws-sdk-core/endpoints/matchers.rb +127 -0
- data/lib/aws-sdk-core/endpoints/reference.rb +26 -0
- data/lib/aws-sdk-core/endpoints/rule.rb +20 -0
- data/lib/aws-sdk-core/endpoints/rule_set.rb +47 -0
- data/lib/aws-sdk-core/endpoints/rules_provider.rb +32 -0
- data/lib/aws-sdk-core/endpoints/templater.rb +52 -0
- data/lib/aws-sdk-core/endpoints/tree_rule.rb +40 -0
- data/lib/aws-sdk-core/endpoints/url.rb +59 -0
- data/lib/aws-sdk-core/endpoints.rb +74 -0
- data/lib/aws-sdk-core/plugins/credentials_configuration.rb +24 -0
- data/lib/aws-sdk-core/plugins/endpoint_discovery.rb +6 -2
- data/lib/aws-sdk-core/plugins/regional_endpoint.rb +5 -0
- data/lib/aws-sdk-core/plugins/sign.rb +190 -0
- data/lib/aws-sdk-core/plugins/signature_v2.rb +1 -0
- data/lib/aws-sdk-core/plugins/signature_v4.rb +1 -0
- data/lib/aws-sdk-core/rest/request/headers.rb +2 -6
- data/lib/aws-sdk-core.rb +3 -0
- data/lib/aws-sdk-sso/client.rb +20 -3
- data/lib/aws-sdk-sso/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-sso/endpoint_provider.rb +112 -0
- data/lib/aws-sdk-sso/endpoints.rb +71 -0
- data/lib/aws-sdk-sso/plugins/endpoints.rb +76 -0
- data/lib/aws-sdk-sso.rb +5 -1
- data/lib/aws-sdk-ssooidc/client.rb +20 -3
- data/lib/aws-sdk-ssooidc/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-ssooidc/endpoint_provider.rb +111 -0
- data/lib/aws-sdk-ssooidc/endpoints.rb +57 -0
- data/lib/aws-sdk-ssooidc/plugins/endpoints.rb +74 -0
- data/lib/aws-sdk-ssooidc.rb +5 -1
- data/lib/aws-sdk-sts/client.rb +20 -3
- data/lib/aws-sdk-sts/endpoint_parameters.rb +78 -0
- data/lib/aws-sdk-sts/endpoint_provider.rb +229 -0
- data/lib/aws-sdk-sts/endpoints.rb +135 -0
- data/lib/aws-sdk-sts/plugins/endpoints.rb +84 -0
- data/lib/aws-sdk-sts/presigner.rb +13 -15
- data/lib/aws-sdk-sts.rb +5 -1
- data/lib/seahorse/client/async_base.rb +0 -1
- data/lib/seahorse/client/configuration.rb +2 -2
- data/lib/seahorse/util.rb +4 -0
- metadata +31 -4
@@ -0,0 +1,78 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::STS
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
# @!attribute use_global_endpoint
|
34
|
+
# Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.
|
35
|
+
#
|
36
|
+
# @return [Boolean]
|
37
|
+
#
|
38
|
+
EndpointParameters = Struct.new(
|
39
|
+
:region,
|
40
|
+
:use_dual_stack,
|
41
|
+
:use_fips,
|
42
|
+
:endpoint,
|
43
|
+
:use_global_endpoint,
|
44
|
+
) do
|
45
|
+
include Aws::Structure
|
46
|
+
|
47
|
+
# @api private
|
48
|
+
class << self
|
49
|
+
PARAM_MAP = {
|
50
|
+
'Region' => :region,
|
51
|
+
'UseDualStack' => :use_dual_stack,
|
52
|
+
'UseFIPS' => :use_fips,
|
53
|
+
'Endpoint' => :endpoint,
|
54
|
+
'UseGlobalEndpoint' => :use_global_endpoint,
|
55
|
+
}.freeze
|
56
|
+
end
|
57
|
+
|
58
|
+
def initialize(options = {})
|
59
|
+
self[:region] = options[:region]
|
60
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
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
|
+
self[:use_fips] = options[:use_fips]
|
66
|
+
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
|
+
self[:endpoint] = options[:endpoint]
|
71
|
+
self[:use_global_endpoint] = options[:use_global_endpoint]
|
72
|
+
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
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::STS
|
11
|
+
class EndpointProvider
|
12
|
+
def initialize(rule_set = nil)
|
13
|
+
@@rule_set ||= begin
|
14
|
+
endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
|
15
|
+
Aws::Endpoints::RuleSet.new(
|
16
|
+
version: endpoint_rules['version'],
|
17
|
+
service_id: endpoint_rules['serviceId'],
|
18
|
+
parameters: endpoint_rules['parameters'],
|
19
|
+
rules: endpoint_rules['rules']
|
20
|
+
)
|
21
|
+
end
|
22
|
+
@provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
|
23
|
+
end
|
24
|
+
|
25
|
+
def resolve_endpoint(parameters)
|
26
|
+
@provider.resolve_endpoint(parameters)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @api private
|
30
|
+
RULES = <<-JSON
|
31
|
+
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
+
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
|
33
|
+
dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZCB0byBkaXNwYXRjaCB0aGUg
|
34
|
+
cmVxdWVzdC4iLCJ0eXBlIjoiU3RyaW5nIn0sIlVzZUR1YWxTdGFjayI6eyJi
|
35
|
+
dWlsdEluIjoiQVdTOjpVc2VEdWFsU3RhY2siLCJyZXF1aXJlZCI6dHJ1ZSwi
|
36
|
+
ZGVmYXVsdCI6Z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aW5nUmVnaW9uIjoi
|
221
|
+
dXMtZWFzdC0xIn1dfSwiaGVhZGVycyI6e319LCJ0eXBlIjoiZW5kcG9pbnQi
|
222
|
+
fSx7ImNvbmRpdGlvbnMiOltdLCJlbmRwb2ludCI6eyJ1cmwiOiJodHRwczov
|
223
|
+
L3N0cy57UmVnaW9ufS57UGFydGl0aW9uUmVzdWx0I2Ruc1N1ZmZpeH0iLCJw
|
224
|
+
cm9wZXJ0aWVzIjp7fSwiaGVhZGVycyI6e319LCJ0eXBlIjoiZW5kcG9pbnQi
|
225
|
+
fV19XX1dfQ==
|
226
|
+
|
227
|
+
JSON
|
228
|
+
end
|
229
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::STS
|
12
|
+
module Endpoints
|
13
|
+
|
14
|
+
class AssumeRole
|
15
|
+
def self.build(context)
|
16
|
+
unless context.config.regional_endpoint
|
17
|
+
endpoint = context.config.endpoint.to_s
|
18
|
+
end
|
19
|
+
Aws::STS::EndpointParameters.new(
|
20
|
+
region: context.config.region,
|
21
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
22
|
+
use_fips: context.config.use_fips_endpoint,
|
23
|
+
endpoint: endpoint,
|
24
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class AssumeRoleWithSAML
|
30
|
+
def self.build(context)
|
31
|
+
unless context.config.regional_endpoint
|
32
|
+
endpoint = context.config.endpoint.to_s
|
33
|
+
end
|
34
|
+
Aws::STS::EndpointParameters.new(
|
35
|
+
region: context.config.region,
|
36
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
37
|
+
use_fips: context.config.use_fips_endpoint,
|
38
|
+
endpoint: endpoint,
|
39
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
40
|
+
)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class AssumeRoleWithWebIdentity
|
45
|
+
def self.build(context)
|
46
|
+
unless context.config.regional_endpoint
|
47
|
+
endpoint = context.config.endpoint.to_s
|
48
|
+
end
|
49
|
+
Aws::STS::EndpointParameters.new(
|
50
|
+
region: context.config.region,
|
51
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
52
|
+
use_fips: context.config.use_fips_endpoint,
|
53
|
+
endpoint: endpoint,
|
54
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
class DecodeAuthorizationMessage
|
60
|
+
def self.build(context)
|
61
|
+
unless context.config.regional_endpoint
|
62
|
+
endpoint = context.config.endpoint.to_s
|
63
|
+
end
|
64
|
+
Aws::STS::EndpointParameters.new(
|
65
|
+
region: context.config.region,
|
66
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
67
|
+
use_fips: context.config.use_fips_endpoint,
|
68
|
+
endpoint: endpoint,
|
69
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
70
|
+
)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
class GetAccessKeyInfo
|
75
|
+
def self.build(context)
|
76
|
+
unless context.config.regional_endpoint
|
77
|
+
endpoint = context.config.endpoint.to_s
|
78
|
+
end
|
79
|
+
Aws::STS::EndpointParameters.new(
|
80
|
+
region: context.config.region,
|
81
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
82
|
+
use_fips: context.config.use_fips_endpoint,
|
83
|
+
endpoint: endpoint,
|
84
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
85
|
+
)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
class GetCallerIdentity
|
90
|
+
def self.build(context)
|
91
|
+
unless context.config.regional_endpoint
|
92
|
+
endpoint = context.config.endpoint.to_s
|
93
|
+
end
|
94
|
+
Aws::STS::EndpointParameters.new(
|
95
|
+
region: context.config.region,
|
96
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
97
|
+
use_fips: context.config.use_fips_endpoint,
|
98
|
+
endpoint: endpoint,
|
99
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
100
|
+
)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
class GetFederationToken
|
105
|
+
def self.build(context)
|
106
|
+
unless context.config.regional_endpoint
|
107
|
+
endpoint = context.config.endpoint.to_s
|
108
|
+
end
|
109
|
+
Aws::STS::EndpointParameters.new(
|
110
|
+
region: context.config.region,
|
111
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
112
|
+
use_fips: context.config.use_fips_endpoint,
|
113
|
+
endpoint: endpoint,
|
114
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
115
|
+
)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
class GetSessionToken
|
120
|
+
def self.build(context)
|
121
|
+
unless context.config.regional_endpoint
|
122
|
+
endpoint = context.config.endpoint.to_s
|
123
|
+
end
|
124
|
+
Aws::STS::EndpointParameters.new(
|
125
|
+
region: context.config.region,
|
126
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
127
|
+
use_fips: context.config.use_fips_endpoint,
|
128
|
+
endpoint: endpoint,
|
129
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy',
|
130
|
+
)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::STS
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::STS::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::STS::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::STS::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :assume_role
|
60
|
+
Aws::STS::Endpoints::AssumeRole.build(context)
|
61
|
+
when :assume_role_with_saml
|
62
|
+
Aws::STS::Endpoints::AssumeRoleWithSAML.build(context)
|
63
|
+
when :assume_role_with_web_identity
|
64
|
+
Aws::STS::Endpoints::AssumeRoleWithWebIdentity.build(context)
|
65
|
+
when :decode_authorization_message
|
66
|
+
Aws::STS::Endpoints::DecodeAuthorizationMessage.build(context)
|
67
|
+
when :get_access_key_info
|
68
|
+
Aws::STS::Endpoints::GetAccessKeyInfo.build(context)
|
69
|
+
when :get_caller_identity
|
70
|
+
Aws::STS::Endpoints::GetCallerIdentity.build(context)
|
71
|
+
when :get_federation_token
|
72
|
+
Aws::STS::Endpoints::GetFederationToken.build(context)
|
73
|
+
when :get_session_token
|
74
|
+
Aws::STS::Endpoints::GetSessionToken.build(context)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def add_handlers(handlers, _config)
|
80
|
+
handlers.add(Handler, step: :build, priority: 75)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -38,7 +38,8 @@ module Aws
|
|
38
38
|
# {https://ruby-doc.org/stdlib-2.3.1/libdoc/base64/rdoc/Base64.html#method-i-encode64}
|
39
39
|
# "k8s-aws-v1." + Base64.urlsafe_encode64(url).chomp("==")
|
40
40
|
def get_caller_identity_presigned_url(options = {})
|
41
|
-
req = @client.build_request(:
|
41
|
+
req = @client.build_request(:get_caller_identity, {})
|
42
|
+
context = req.context
|
42
43
|
|
43
44
|
param_list = Aws::Query::ParamList.new
|
44
45
|
param_list.set('Action', 'GetCallerIdentity')
|
@@ -46,26 +47,23 @@ module Aws
|
|
46
47
|
Aws::Query::EC2ParamBuilder.new(param_list)
|
47
48
|
.apply(req.context.operation.input, {})
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
endpoint_params = Aws::STS::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
|
+
use_global_endpoint: context.config.sts_regional_endpoints == 'legacy'
|
53
55
|
)
|
56
|
+
endpoint = context.config.endpoint_provider
|
57
|
+
.resolve_endpoint(endpoint_params)
|
58
|
+
auth_scheme = Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
54
59
|
|
55
|
-
|
56
|
-
|
57
|
-
'sts',
|
58
|
-
req.context.config.sts_regional_endpoints,
|
59
|
-
{
|
60
|
-
dualstack: req.context.config.use_dualstack_endpoint,
|
61
|
-
fips: req.context.config.use_fips_endpoint
|
62
|
-
}
|
60
|
+
signer = Aws::Plugins::Sign.signer_for(
|
61
|
+
auth_scheme, context.config
|
63
62
|
)
|
64
|
-
url += "/?#{param_list}"
|
65
63
|
|
66
64
|
signer.presign_url(
|
67
65
|
http_method: 'GET',
|
68
|
-
url: url,
|
66
|
+
url: "#{endpoint.url}/?#{param_list}",
|
69
67
|
body: '',
|
70
68
|
headers: options[:headers]
|
71
69
|
).to_s
|
data/lib/aws-sdk-sts.rb
CHANGED
@@ -15,9 +15,13 @@ end
|
|
15
15
|
|
16
16
|
require_relative 'aws-sdk-sts/types'
|
17
17
|
require_relative 'aws-sdk-sts/client_api'
|
18
|
+
require_relative 'aws-sdk-sts/plugins/endpoints.rb'
|
18
19
|
require_relative 'aws-sdk-sts/client'
|
19
20
|
require_relative 'aws-sdk-sts/errors'
|
20
21
|
require_relative 'aws-sdk-sts/resource'
|
22
|
+
require_relative 'aws-sdk-sts/endpoint_parameters'
|
23
|
+
require_relative 'aws-sdk-sts/endpoint_provider'
|
24
|
+
require_relative 'aws-sdk-sts/endpoints'
|
21
25
|
require_relative 'aws-sdk-sts/customizations'
|
22
26
|
|
23
27
|
# This module provides support for AWS Security Token Service. This module is available in the
|
@@ -50,6 +54,6 @@ require_relative 'aws-sdk-sts/customizations'
|
|
50
54
|
# @!group service
|
51
55
|
module Aws::STS
|
52
56
|
|
53
|
-
GEM_VERSION = '3.
|
57
|
+
GEM_VERSION = '3.165.0'
|
54
58
|
|
55
59
|
end
|
@@ -68,7 +68,7 @@ module Seahorse
|
|
68
68
|
@block = block
|
69
69
|
end
|
70
70
|
|
71
|
-
def call(*args)
|
71
|
+
def call(*args)
|
72
72
|
@block.call(*args)
|
73
73
|
end
|
74
74
|
end
|
@@ -204,7 +204,7 @@ module Seahorse
|
|
204
204
|
def value_at(opt_name)
|
205
205
|
value = @struct[opt_name]
|
206
206
|
if value.is_a?(Defaults)
|
207
|
-
#
|
207
|
+
# Legacy endpoints must continue to exist.
|
208
208
|
if opt_name == :endpoint && @struct.members.include?(:regional_endpoint)
|
209
209
|
@struct[:regional_endpoint] = true
|
210
210
|
end
|
data/lib/seahorse/util.rb
CHANGED
@@ -14,6 +14,10 @@ module Seahorse
|
|
14
14
|
path.gsub(/[^\/]+/) { |part| uri_escape(part) }
|
15
15
|
end
|
16
16
|
|
17
|
+
def escape_header_list_string(s)
|
18
|
+
s.include?('"') || s.include?(',') ? "\"#{s.gsub('"', '\"')}\"" : s
|
19
|
+
end
|
20
|
+
|
17
21
|
# Checks for a valid host label
|
18
22
|
# @see https://tools.ietf.org/html/rfc3986#section-3.2.2
|
19
23
|
# @see https://tools.ietf.org/html/rfc1123#page-13
|