aws-sdk-savingsplans 1.26.0 → 1.28.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 +13 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-savingsplans/client.rb +20 -3
- data/lib/aws-sdk-savingsplans/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-savingsplans/endpoint_provider.rb +75 -0
- data/lib/aws-sdk-savingsplans/endpoints.rb +141 -0
- data/lib/aws-sdk-savingsplans/plugins/endpoints.rb +86 -0
- data/lib/aws-sdk-savingsplans/types.rb +0 -155
- data/lib/aws-sdk-savingsplans.rb +5 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b223ef7bc8871b4c3782f7d9bf65a364419778792f58ffa2ec7e954687060b9e
|
4
|
+
data.tar.gz: 315252d24d4702613a4288e2b3e5829bce55676512fcf0ae6fe2da11cc7031ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b05c7dd7c6c23a327818cdf1e1c44e82d26345cbbed10ec38f1d120e341f24deba91b42711527f9dbdb6b22b4e2e7ce47f939fc1220031b3a10a44032cdd249
|
7
|
+
data.tar.gz: ff9d77ce363bc1bf03f69b12c15809118aaa19dc554a1e9d175ff184ded65e7330600dab438be7b5aba4f3b53d1997e43170e2e2f5b1b54da6b558a82f026b5d
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.28.0 (2023-01-18)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
* Issue - Replace runtime endpoint resolution approach with generated ruby code.
|
10
|
+
|
11
|
+
1.27.0 (2022-10-25)
|
12
|
+
------------------
|
13
|
+
|
14
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
15
|
+
|
4
16
|
1.26.0 (2022-02-24)
|
5
17
|
------------------
|
6
18
|
|
@@ -140,4 +152,4 @@ Unreleased Changes
|
|
140
152
|
1.0.0 (2019-11-06)
|
141
153
|
------------------
|
142
154
|
|
143
|
-
* Feature - Initial release of `aws-sdk-savingsplans`.
|
155
|
+
* Feature - Initial release of `aws-sdk-savingsplans`.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.28.0
|
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
32
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
|
-
require 'aws-sdk-core/plugins/
|
33
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
34
34
|
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
35
35
|
|
36
36
|
Aws::Plugins::GlobalConfiguration.add_identifier(:savingsplans)
|
@@ -79,8 +79,9 @@ module Aws::SavingsPlans
|
|
79
79
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
80
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
81
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
|
-
add_plugin(Aws::Plugins::
|
82
|
+
add_plugin(Aws::Plugins::Sign)
|
83
83
|
add_plugin(Aws::Plugins::Protocols::RestJson)
|
84
|
+
add_plugin(Aws::SavingsPlans::Plugins::Endpoints)
|
84
85
|
|
85
86
|
# @overload initialize(options)
|
86
87
|
# @param [Hash] options
|
@@ -287,6 +288,19 @@ module Aws::SavingsPlans
|
|
287
288
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
288
289
|
# requests are made, and retries are disabled.
|
289
290
|
#
|
291
|
+
# @option options [Aws::TokenProvider] :token_provider
|
292
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
293
|
+
# following classes:
|
294
|
+
#
|
295
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
296
|
+
# tokens.
|
297
|
+
#
|
298
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
299
|
+
# access token generated from `aws login`.
|
300
|
+
#
|
301
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
302
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
303
|
+
#
|
290
304
|
# @option options [Boolean] :use_dualstack_endpoint
|
291
305
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
292
306
|
# will be used if available.
|
@@ -300,6 +314,9 @@ module Aws::SavingsPlans
|
|
300
314
|
# When `true`, request parameters are validated before
|
301
315
|
# sending the request.
|
302
316
|
#
|
317
|
+
# @option options [Aws::SavingsPlans::EndpointProvider] :endpoint_provider
|
318
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::SavingsPlans::EndpointParameters`
|
319
|
+
#
|
303
320
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
304
321
|
# requests through. Formatted like 'http://proxy.com:123'.
|
305
322
|
#
|
@@ -854,7 +871,7 @@ module Aws::SavingsPlans
|
|
854
871
|
params: params,
|
855
872
|
config: config)
|
856
873
|
context[:gem_name] = 'aws-sdk-savingsplans'
|
857
|
-
context[:gem_version] = '1.
|
874
|
+
context[:gem_version] = '1.28.0'
|
858
875
|
Seahorse::Client::Request.new(handlers, context)
|
859
876
|
end
|
860
877
|
|
@@ -0,0 +1,66 @@
|
|
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::SavingsPlans
|
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
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
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
|
+
self[:use_fips] = options[:use_fips]
|
59
|
+
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
|
+
self[:endpoint] = options[:endpoint]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,75 @@
|
|
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::SavingsPlans
|
11
|
+
class EndpointProvider
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
region = parameters.region
|
14
|
+
use_dual_stack = parameters.use_dual_stack
|
15
|
+
use_fips = parameters.use_fips
|
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.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws")
|
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://savingsplans-fips.#{region}.api.aws", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"savingsplans", "signingRegion"=>"us-east-1"}]})
|
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
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans-fips.#{region}.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"savingsplans", "signingRegion"=>"us-east-1"}]})
|
37
|
+
end
|
38
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
41
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans.#{region}.api.aws", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"savingsplans", "signingRegion"=>"us-east-1"}]})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
45
|
+
end
|
46
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"savingsplans", "signingRegion"=>"us-east-1"}]})
|
47
|
+
end
|
48
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
49
|
+
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"))
|
50
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
51
|
+
end
|
52
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
53
|
+
end
|
54
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
55
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
56
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
57
|
+
end
|
58
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
59
|
+
end
|
60
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
61
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
62
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
63
|
+
end
|
64
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
65
|
+
end
|
66
|
+
if Aws::Endpoints::Matchers.string_equals?(region, "aws-global")
|
67
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans.amazonaws.com", headers: {}, properties: {"authSchemes"=>[{"name"=>"sigv4", "signingName"=>"savingsplans", "signingRegion"=>"us-east-1"}]})
|
68
|
+
end
|
69
|
+
return Aws::Endpoints::Endpoint.new(url: "https://savingsplans.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
70
|
+
end
|
71
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
72
|
+
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,141 @@
|
|
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::SavingsPlans
|
12
|
+
module Endpoints
|
13
|
+
|
14
|
+
class CreateSavingsPlan
|
15
|
+
def self.build(context)
|
16
|
+
unless context.config.regional_endpoint
|
17
|
+
endpoint = context.config.endpoint.to_s
|
18
|
+
end
|
19
|
+
Aws::SavingsPlans::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
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
class DeleteQueuedSavingsPlan
|
29
|
+
def self.build(context)
|
30
|
+
unless context.config.regional_endpoint
|
31
|
+
endpoint = context.config.endpoint.to_s
|
32
|
+
end
|
33
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
34
|
+
region: context.config.region,
|
35
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
36
|
+
use_fips: context.config.use_fips_endpoint,
|
37
|
+
endpoint: endpoint,
|
38
|
+
)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class DescribeSavingsPlanRates
|
43
|
+
def self.build(context)
|
44
|
+
unless context.config.regional_endpoint
|
45
|
+
endpoint = context.config.endpoint.to_s
|
46
|
+
end
|
47
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
48
|
+
region: context.config.region,
|
49
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
50
|
+
use_fips: context.config.use_fips_endpoint,
|
51
|
+
endpoint: endpoint,
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
class DescribeSavingsPlans
|
57
|
+
def self.build(context)
|
58
|
+
unless context.config.regional_endpoint
|
59
|
+
endpoint = context.config.endpoint.to_s
|
60
|
+
end
|
61
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
62
|
+
region: context.config.region,
|
63
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
64
|
+
use_fips: context.config.use_fips_endpoint,
|
65
|
+
endpoint: endpoint,
|
66
|
+
)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
class DescribeSavingsPlansOfferingRates
|
71
|
+
def self.build(context)
|
72
|
+
unless context.config.regional_endpoint
|
73
|
+
endpoint = context.config.endpoint.to_s
|
74
|
+
end
|
75
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
76
|
+
region: context.config.region,
|
77
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
78
|
+
use_fips: context.config.use_fips_endpoint,
|
79
|
+
endpoint: endpoint,
|
80
|
+
)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
class DescribeSavingsPlansOfferings
|
85
|
+
def self.build(context)
|
86
|
+
unless context.config.regional_endpoint
|
87
|
+
endpoint = context.config.endpoint.to_s
|
88
|
+
end
|
89
|
+
Aws::SavingsPlans::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: endpoint,
|
94
|
+
)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
class ListTagsForResource
|
99
|
+
def self.build(context)
|
100
|
+
unless context.config.regional_endpoint
|
101
|
+
endpoint = context.config.endpoint.to_s
|
102
|
+
end
|
103
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
104
|
+
region: context.config.region,
|
105
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
106
|
+
use_fips: context.config.use_fips_endpoint,
|
107
|
+
endpoint: endpoint,
|
108
|
+
)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
class TagResource
|
113
|
+
def self.build(context)
|
114
|
+
unless context.config.regional_endpoint
|
115
|
+
endpoint = context.config.endpoint.to_s
|
116
|
+
end
|
117
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
118
|
+
region: context.config.region,
|
119
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
120
|
+
use_fips: context.config.use_fips_endpoint,
|
121
|
+
endpoint: endpoint,
|
122
|
+
)
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
class UntagResource
|
127
|
+
def self.build(context)
|
128
|
+
unless context.config.regional_endpoint
|
129
|
+
endpoint = context.config.endpoint.to_s
|
130
|
+
end
|
131
|
+
Aws::SavingsPlans::EndpointParameters.new(
|
132
|
+
region: context.config.region,
|
133
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
134
|
+
use_fips: context.config.use_fips_endpoint,
|
135
|
+
endpoint: endpoint,
|
136
|
+
)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
end
|
@@ -0,0 +1,86 @@
|
|
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::SavingsPlans
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::SavingsPlans::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::SavingsPlans::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::SavingsPlans::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 :create_savings_plan
|
60
|
+
Aws::SavingsPlans::Endpoints::CreateSavingsPlan.build(context)
|
61
|
+
when :delete_queued_savings_plan
|
62
|
+
Aws::SavingsPlans::Endpoints::DeleteQueuedSavingsPlan.build(context)
|
63
|
+
when :describe_savings_plan_rates
|
64
|
+
Aws::SavingsPlans::Endpoints::DescribeSavingsPlanRates.build(context)
|
65
|
+
when :describe_savings_plans
|
66
|
+
Aws::SavingsPlans::Endpoints::DescribeSavingsPlans.build(context)
|
67
|
+
when :describe_savings_plans_offering_rates
|
68
|
+
Aws::SavingsPlans::Endpoints::DescribeSavingsPlansOfferingRates.build(context)
|
69
|
+
when :describe_savings_plans_offerings
|
70
|
+
Aws::SavingsPlans::Endpoints::DescribeSavingsPlansOfferings.build(context)
|
71
|
+
when :list_tags_for_resource
|
72
|
+
Aws::SavingsPlans::Endpoints::ListTagsForResource.build(context)
|
73
|
+
when :tag_resource
|
74
|
+
Aws::SavingsPlans::Endpoints::TagResource.build(context)
|
75
|
+
when :untag_resource
|
76
|
+
Aws::SavingsPlans::Endpoints::UntagResource.build(context)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def add_handlers(handlers, _config)
|
82
|
+
handlers.add(Handler, step: :build, priority: 75)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -10,20 +10,6 @@
|
|
10
10
|
module Aws::SavingsPlans
|
11
11
|
module Types
|
12
12
|
|
13
|
-
# @note When making an API call, you may pass CreateSavingsPlanRequest
|
14
|
-
# data as a hash:
|
15
|
-
#
|
16
|
-
# {
|
17
|
-
# savings_plan_offering_id: "SavingsPlanOfferingId", # required
|
18
|
-
# commitment: "Amount", # required
|
19
|
-
# upfront_payment_amount: "Amount",
|
20
|
-
# purchase_time: Time.now,
|
21
|
-
# client_token: "ClientToken",
|
22
|
-
# tags: {
|
23
|
-
# "TagKey" => "TagValue",
|
24
|
-
# },
|
25
|
-
# }
|
26
|
-
#
|
27
13
|
# @!attribute [rw] savings_plan_offering_id
|
28
14
|
# The ID of the offering.
|
29
15
|
# @return [String]
|
@@ -82,13 +68,6 @@ module Aws::SavingsPlans
|
|
82
68
|
include Aws::Structure
|
83
69
|
end
|
84
70
|
|
85
|
-
# @note When making an API call, you may pass DeleteQueuedSavingsPlanRequest
|
86
|
-
# data as a hash:
|
87
|
-
#
|
88
|
-
# {
|
89
|
-
# savings_plan_id: "SavingsPlanId", # required
|
90
|
-
# }
|
91
|
-
#
|
92
71
|
# @!attribute [rw] savings_plan_id
|
93
72
|
# The ID of the Savings Plan.
|
94
73
|
# @return [String]
|
@@ -105,21 +84,6 @@ module Aws::SavingsPlans
|
|
105
84
|
#
|
106
85
|
class DeleteQueuedSavingsPlanResponse < Aws::EmptyStructure; end
|
107
86
|
|
108
|
-
# @note When making an API call, you may pass DescribeSavingsPlanRatesRequest
|
109
|
-
# data as a hash:
|
110
|
-
#
|
111
|
-
# {
|
112
|
-
# savings_plan_id: "SavingsPlanId", # required
|
113
|
-
# filters: [
|
114
|
-
# {
|
115
|
-
# name: "region", # accepts region, instanceType, productDescription, tenancy, productType, serviceCode, usageType, operation
|
116
|
-
# values: ["String"],
|
117
|
-
# },
|
118
|
-
# ],
|
119
|
-
# next_token: "PaginationToken",
|
120
|
-
# max_results: 1,
|
121
|
-
# }
|
122
|
-
#
|
123
87
|
# @!attribute [rw] savings_plan_id
|
124
88
|
# The ID of the Savings Plan.
|
125
89
|
# @return [String]
|
@@ -172,27 +136,6 @@ module Aws::SavingsPlans
|
|
172
136
|
include Aws::Structure
|
173
137
|
end
|
174
138
|
|
175
|
-
# @note When making an API call, you may pass DescribeSavingsPlansOfferingRatesRequest
|
176
|
-
# data as a hash:
|
177
|
-
#
|
178
|
-
# {
|
179
|
-
# savings_plan_offering_ids: ["UUID"],
|
180
|
-
# savings_plan_payment_options: ["All Upfront"], # accepts All Upfront, Partial Upfront, No Upfront
|
181
|
-
# savings_plan_types: ["Compute"], # accepts Compute, EC2Instance, SageMaker
|
182
|
-
# products: ["EC2"], # accepts EC2, Fargate, Lambda, SageMaker
|
183
|
-
# service_codes: ["AmazonEC2"], # accepts AmazonEC2, AmazonECS, AmazonEKS, AWSLambda, AmazonSageMaker
|
184
|
-
# usage_types: ["SavingsPlanRateUsageType"],
|
185
|
-
# operations: ["SavingsPlanRateOperation"],
|
186
|
-
# filters: [
|
187
|
-
# {
|
188
|
-
# name: "region", # accepts region, instanceFamily, instanceType, productDescription, tenancy, productId
|
189
|
-
# values: ["JsonSafeFilterValueString"],
|
190
|
-
# },
|
191
|
-
# ],
|
192
|
-
# next_token: "PaginationToken",
|
193
|
-
# max_results: 1,
|
194
|
-
# }
|
195
|
-
#
|
196
139
|
# @!attribute [rw] savings_plan_offering_ids
|
197
140
|
# The IDs of the offerings.
|
198
141
|
# @return [Array<String>]
|
@@ -270,30 +213,6 @@ module Aws::SavingsPlans
|
|
270
213
|
include Aws::Structure
|
271
214
|
end
|
272
215
|
|
273
|
-
# @note When making an API call, you may pass DescribeSavingsPlansOfferingsRequest
|
274
|
-
# data as a hash:
|
275
|
-
#
|
276
|
-
# {
|
277
|
-
# offering_ids: ["UUID"],
|
278
|
-
# payment_options: ["All Upfront"], # accepts All Upfront, Partial Upfront, No Upfront
|
279
|
-
# product_type: "EC2", # accepts EC2, Fargate, Lambda, SageMaker
|
280
|
-
# plan_types: ["Compute"], # accepts Compute, EC2Instance, SageMaker
|
281
|
-
# durations: [1],
|
282
|
-
# currencies: ["CNY"], # accepts CNY, USD
|
283
|
-
# descriptions: ["SavingsPlanDescription"],
|
284
|
-
# service_codes: ["SavingsPlanServiceCode"],
|
285
|
-
# usage_types: ["SavingsPlanUsageType"],
|
286
|
-
# operations: ["SavingsPlanOperation"],
|
287
|
-
# filters: [
|
288
|
-
# {
|
289
|
-
# name: "region", # accepts region, instanceFamily
|
290
|
-
# values: ["JsonSafeFilterValueString"],
|
291
|
-
# },
|
292
|
-
# ],
|
293
|
-
# next_token: "PaginationToken",
|
294
|
-
# max_results: 1,
|
295
|
-
# }
|
296
|
-
#
|
297
216
|
# @!attribute [rw] offering_ids
|
298
217
|
# The IDs of the offerings.
|
299
218
|
# @return [Array<String>]
|
@@ -386,23 +305,6 @@ module Aws::SavingsPlans
|
|
386
305
|
include Aws::Structure
|
387
306
|
end
|
388
307
|
|
389
|
-
# @note When making an API call, you may pass DescribeSavingsPlansRequest
|
390
|
-
# data as a hash:
|
391
|
-
#
|
392
|
-
# {
|
393
|
-
# savings_plan_arns: ["SavingsPlanArn"],
|
394
|
-
# savings_plan_ids: ["SavingsPlanId"],
|
395
|
-
# next_token: "PaginationToken",
|
396
|
-
# max_results: 1,
|
397
|
-
# states: ["payment-pending"], # accepts payment-pending, payment-failed, active, retired, queued, queued-deleted
|
398
|
-
# filters: [
|
399
|
-
# {
|
400
|
-
# name: "region", # accepts region, ec2-instance-family, commitment, upfront, term, savings-plan-type, payment-option, start, end
|
401
|
-
# values: ["String"],
|
402
|
-
# },
|
403
|
-
# ],
|
404
|
-
# }
|
405
|
-
#
|
406
308
|
# @!attribute [rw] savings_plan_arns
|
407
309
|
# The Amazon Resource Names (ARN) of the Savings Plans.
|
408
310
|
# @return [Array<String>]
|
@@ -473,13 +375,6 @@ module Aws::SavingsPlans
|
|
473
375
|
include Aws::Structure
|
474
376
|
end
|
475
377
|
|
476
|
-
# @note When making an API call, you may pass ListTagsForResourceRequest
|
477
|
-
# data as a hash:
|
478
|
-
#
|
479
|
-
# {
|
480
|
-
# resource_arn: "SavingsPlanArn", # required
|
481
|
-
# }
|
482
|
-
#
|
483
378
|
# @!attribute [rw] resource_arn
|
484
379
|
# The Amazon Resource Name (ARN) of the resource.
|
485
380
|
# @return [String]
|
@@ -657,14 +552,6 @@ module Aws::SavingsPlans
|
|
657
552
|
|
658
553
|
# Information about a filter.
|
659
554
|
#
|
660
|
-
# @note When making an API call, you may pass SavingsPlanFilter
|
661
|
-
# data as a hash:
|
662
|
-
#
|
663
|
-
# {
|
664
|
-
# name: "region", # accepts region, ec2-instance-family, commitment, upfront, term, savings-plan-type, payment-option, start, end
|
665
|
-
# values: ["String"],
|
666
|
-
# }
|
667
|
-
#
|
668
555
|
# @!attribute [rw] name
|
669
556
|
# The filter name.
|
670
557
|
# @return [String]
|
@@ -748,14 +635,6 @@ module Aws::SavingsPlans
|
|
748
635
|
|
749
636
|
# Information about a filter.
|
750
637
|
#
|
751
|
-
# @note When making an API call, you may pass SavingsPlanOfferingFilterElement
|
752
|
-
# data as a hash:
|
753
|
-
#
|
754
|
-
# {
|
755
|
-
# name: "region", # accepts region, instanceFamily
|
756
|
-
# values: ["JsonSafeFilterValueString"],
|
757
|
-
# }
|
758
|
-
#
|
759
638
|
# @!attribute [rw] name
|
760
639
|
# The filter name.
|
761
640
|
# @return [String]
|
@@ -843,14 +722,6 @@ module Aws::SavingsPlans
|
|
843
722
|
|
844
723
|
# Information about a filter.
|
845
724
|
#
|
846
|
-
# @note When making an API call, you may pass SavingsPlanOfferingRateFilterElement
|
847
|
-
# data as a hash:
|
848
|
-
#
|
849
|
-
# {
|
850
|
-
# name: "region", # accepts region, instanceFamily, instanceType, productDescription, tenancy, productId
|
851
|
-
# values: ["JsonSafeFilterValueString"],
|
852
|
-
# }
|
853
|
-
#
|
854
725
|
# @!attribute [rw] name
|
855
726
|
# The filter name.
|
856
727
|
# @return [String]
|
@@ -938,14 +809,6 @@ module Aws::SavingsPlans
|
|
938
809
|
|
939
810
|
# Information about a filter.
|
940
811
|
#
|
941
|
-
# @note When making an API call, you may pass SavingsPlanRateFilter
|
942
|
-
# data as a hash:
|
943
|
-
#
|
944
|
-
# {
|
945
|
-
# name: "region", # accepts region, instanceType, productDescription, tenancy, productType, serviceCode, usageType, operation
|
946
|
-
# values: ["String"],
|
947
|
-
# }
|
948
|
-
#
|
949
812
|
# @!attribute [rw] name
|
950
813
|
# The filter name.
|
951
814
|
# @return [String]
|
@@ -995,16 +858,6 @@ module Aws::SavingsPlans
|
|
995
858
|
include Aws::Structure
|
996
859
|
end
|
997
860
|
|
998
|
-
# @note When making an API call, you may pass TagResourceRequest
|
999
|
-
# data as a hash:
|
1000
|
-
#
|
1001
|
-
# {
|
1002
|
-
# resource_arn: "SavingsPlanArn", # required
|
1003
|
-
# tags: { # required
|
1004
|
-
# "TagKey" => "TagValue",
|
1005
|
-
# },
|
1006
|
-
# }
|
1007
|
-
#
|
1008
861
|
# @!attribute [rw] resource_arn
|
1009
862
|
# The Amazon Resource Name (ARN) of the resource.
|
1010
863
|
# @return [String]
|
@@ -1027,14 +880,6 @@ module Aws::SavingsPlans
|
|
1027
880
|
#
|
1028
881
|
class TagResourceResponse < Aws::EmptyStructure; end
|
1029
882
|
|
1030
|
-
# @note When making an API call, you may pass UntagResourceRequest
|
1031
|
-
# data as a hash:
|
1032
|
-
#
|
1033
|
-
# {
|
1034
|
-
# resource_arn: "SavingsPlanArn", # required
|
1035
|
-
# tag_keys: ["TagKey"], # required
|
1036
|
-
# }
|
1037
|
-
#
|
1038
883
|
# @!attribute [rw] resource_arn
|
1039
884
|
# The Amazon Resource Name (ARN) of the resource.
|
1040
885
|
# @return [String]
|
data/lib/aws-sdk-savingsplans.rb
CHANGED
@@ -13,9 +13,13 @@ require 'aws-sigv4'
|
|
13
13
|
|
14
14
|
require_relative 'aws-sdk-savingsplans/types'
|
15
15
|
require_relative 'aws-sdk-savingsplans/client_api'
|
16
|
+
require_relative 'aws-sdk-savingsplans/plugins/endpoints.rb'
|
16
17
|
require_relative 'aws-sdk-savingsplans/client'
|
17
18
|
require_relative 'aws-sdk-savingsplans/errors'
|
18
19
|
require_relative 'aws-sdk-savingsplans/resource'
|
20
|
+
require_relative 'aws-sdk-savingsplans/endpoint_parameters'
|
21
|
+
require_relative 'aws-sdk-savingsplans/endpoint_provider'
|
22
|
+
require_relative 'aws-sdk-savingsplans/endpoints'
|
19
23
|
require_relative 'aws-sdk-savingsplans/customizations'
|
20
24
|
|
21
25
|
# This module provides support for AWS Savings Plans. This module is available in the
|
@@ -48,6 +52,6 @@ require_relative 'aws-sdk-savingsplans/customizations'
|
|
48
52
|
# @!group service
|
49
53
|
module Aws::SavingsPlans
|
50
54
|
|
51
|
-
GEM_VERSION = '1.
|
55
|
+
GEM_VERSION = '1.28.0'
|
52
56
|
|
53
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-savingsplans
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.28.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:
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.
|
22
|
+
version: 3.165.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 3.
|
32
|
+
version: 3.165.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,11 @@ files:
|
|
59
59
|
- lib/aws-sdk-savingsplans/client.rb
|
60
60
|
- lib/aws-sdk-savingsplans/client_api.rb
|
61
61
|
- lib/aws-sdk-savingsplans/customizations.rb
|
62
|
+
- lib/aws-sdk-savingsplans/endpoint_parameters.rb
|
63
|
+
- lib/aws-sdk-savingsplans/endpoint_provider.rb
|
64
|
+
- lib/aws-sdk-savingsplans/endpoints.rb
|
62
65
|
- lib/aws-sdk-savingsplans/errors.rb
|
66
|
+
- lib/aws-sdk-savingsplans/plugins/endpoints.rb
|
63
67
|
- lib/aws-sdk-savingsplans/resource.rb
|
64
68
|
- lib/aws-sdk-savingsplans/types.rb
|
65
69
|
homepage: https://github.com/aws/aws-sdk-ruby
|