aws-sdk-pricing 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/aws-sdk-pricing.rb +47 -0
- data/lib/aws-sdk-pricing/client.rb +448 -0
- data/lib/aws-sdk-pricing/client_api.rb +169 -0
- data/lib/aws-sdk-pricing/customizations.rb +0 -0
- data/lib/aws-sdk-pricing/errors.rb +14 -0
- data/lib/aws-sdk-pricing/resource.rb +23 -0
- data/lib/aws-sdk-pricing/types.rb +292 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4015dd19dd9c0bca69f9cb0078416ec97f2d5b34
|
4
|
+
data.tar.gz: 593713776cf1a559ec6dd379e9f9222d806272e4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7b29304c2bb9178ad1eea2e63029f44737b6f39341de13d5195d0fcc237b11d2579ce266cea54276c14bdcb19f49983a3ae8ce617961074021f0cb11c8667d36
|
7
|
+
data.tar.gz: ee55743a319d8f7358c6757484bb200f21b2f2986ee45ba62a5f16492e76fda01ac92fa8326357316dc96b57e152d06aaded6ad6a805bb9c40879cadc0d98405
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-pricing/types'
|
12
|
+
require_relative 'aws-sdk-pricing/client_api'
|
13
|
+
require_relative 'aws-sdk-pricing/client'
|
14
|
+
require_relative 'aws-sdk-pricing/errors'
|
15
|
+
require_relative 'aws-sdk-pricing/resource'
|
16
|
+
require_relative 'aws-sdk-pricing/customizations'
|
17
|
+
|
18
|
+
# This module provides support for AWS Price List Service. This module is available in the
|
19
|
+
# `aws-sdk-pricing` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from AWS Price List Service all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::Pricing::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::Pricing
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,448 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
19
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
20
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
21
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
22
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
23
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
24
|
+
|
25
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:pricing)
|
26
|
+
|
27
|
+
module Aws::Pricing
|
28
|
+
class Client < Seahorse::Client::Base
|
29
|
+
|
30
|
+
include Aws::ClientStubs
|
31
|
+
|
32
|
+
@identifier = :pricing
|
33
|
+
|
34
|
+
set_api(ClientApi::API)
|
35
|
+
|
36
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
37
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
38
|
+
add_plugin(Aws::Plugins::Logging)
|
39
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
40
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
41
|
+
add_plugin(Aws::Plugins::UserAgent)
|
42
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
43
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
44
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
45
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
46
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
47
|
+
add_plugin(Aws::Plugins::StubResponses)
|
48
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
49
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
50
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
51
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
52
|
+
|
53
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
54
|
+
# Your AWS credentials. This can be an instance of any one of the
|
55
|
+
# following classes:
|
56
|
+
#
|
57
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
58
|
+
# credentials.
|
59
|
+
#
|
60
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
61
|
+
# from an EC2 IMDS on an EC2 instance.
|
62
|
+
#
|
63
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
64
|
+
# shared file, such as `~/.aws/config`.
|
65
|
+
#
|
66
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
67
|
+
#
|
68
|
+
# When `:credentials` are not configured directly, the following
|
69
|
+
# locations will be searched for credentials:
|
70
|
+
#
|
71
|
+
# * `Aws.config[:credentials]`
|
72
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
73
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
74
|
+
# * `~/.aws/credentials`
|
75
|
+
# * `~/.aws/config`
|
76
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
77
|
+
# very aggressive. Construct and pass an instance of
|
78
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
79
|
+
# timeouts.
|
80
|
+
#
|
81
|
+
# @option options [required, String] :region
|
82
|
+
# The AWS region to connect to. The configured `:region` is
|
83
|
+
# used to determine the service `:endpoint`. When not passed,
|
84
|
+
# a default `:region` is search for in the following locations:
|
85
|
+
#
|
86
|
+
# * `Aws.config[:region]`
|
87
|
+
# * `ENV['AWS_REGION']`
|
88
|
+
# * `ENV['AMAZON_REGION']`
|
89
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
90
|
+
# * `~/.aws/credentials`
|
91
|
+
# * `~/.aws/config`
|
92
|
+
#
|
93
|
+
# @option options [String] :access_key_id
|
94
|
+
#
|
95
|
+
# @option options [Boolean] :convert_params (true)
|
96
|
+
# When `true`, an attempt is made to coerce request parameters into
|
97
|
+
# the required types.
|
98
|
+
#
|
99
|
+
# @option options [String] :endpoint
|
100
|
+
# The client endpoint is normally constructed from the `:region`
|
101
|
+
# option. You should only configure an `:endpoint` when connecting
|
102
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
103
|
+
#
|
104
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
105
|
+
# The log formatter.
|
106
|
+
#
|
107
|
+
# @option options [Symbol] :log_level (:info)
|
108
|
+
# The log level to send messages to the `:logger` at.
|
109
|
+
#
|
110
|
+
# @option options [Logger] :logger
|
111
|
+
# The Logger instance to send log messages to. If this option
|
112
|
+
# is not set, logging will be disabled.
|
113
|
+
#
|
114
|
+
# @option options [String] :profile ("default")
|
115
|
+
# Used when loading credentials from the shared credentials file
|
116
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
117
|
+
#
|
118
|
+
# @option options [Integer] :retry_limit (3)
|
119
|
+
# The maximum number of times to retry failed requests. Only
|
120
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
121
|
+
# are retried. Generally, these are throttling errors, data
|
122
|
+
# checksum errors, networking errors, timeout errors and auth
|
123
|
+
# errors from expired credentials.
|
124
|
+
#
|
125
|
+
# @option options [String] :secret_access_key
|
126
|
+
#
|
127
|
+
# @option options [String] :session_token
|
128
|
+
#
|
129
|
+
# @option options [Boolean] :simple_json (false)
|
130
|
+
# Disables request parameter conversion, validation, and formatting.
|
131
|
+
# Also disable response data type conversions. This option is useful
|
132
|
+
# when you want to ensure the highest level of performance by
|
133
|
+
# avoiding overhead of walking request parameters and response data
|
134
|
+
# structures.
|
135
|
+
#
|
136
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
137
|
+
# be formatted exactly as the DynamoDB API expects.
|
138
|
+
#
|
139
|
+
# @option options [Boolean] :stub_responses (false)
|
140
|
+
# Causes the client to return stubbed responses. By default
|
141
|
+
# fake responses are generated and returned. You can specify
|
142
|
+
# the response data to return or errors to raise by calling
|
143
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
144
|
+
#
|
145
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
146
|
+
# requests are made, and retries are disabled.
|
147
|
+
#
|
148
|
+
# @option options [Boolean] :validate_params (true)
|
149
|
+
# When `true`, request parameters are validated before
|
150
|
+
# sending the request.
|
151
|
+
#
|
152
|
+
def initialize(*args)
|
153
|
+
super
|
154
|
+
end
|
155
|
+
|
156
|
+
# @!group API Operations
|
157
|
+
|
158
|
+
# Returns the metadata for one service or a list of the metadata for all
|
159
|
+
# services. Use this without a service code to get the service codes for
|
160
|
+
# all services. Use it with a service code, such as `AmazonEC2`, to get
|
161
|
+
# information specific to that service, such as the attribute names
|
162
|
+
# available for that service. For example, some of the attribute names
|
163
|
+
# available for EC2 are `volumeType`, `maxIopsVolume`, `operation`,
|
164
|
+
# `locationType`, and `instanceCapacity10xlarge`.
|
165
|
+
#
|
166
|
+
# @option params [String] :service_code
|
167
|
+
# The code for the service whose information you want to retrieve, such
|
168
|
+
# as `AmazonEC2`. You can use the `ServiceCode` to filter the results in
|
169
|
+
# a `GetProducts` call. To retrieve a list of all services, leave this
|
170
|
+
# blank.
|
171
|
+
#
|
172
|
+
# @option params [String] :format_version
|
173
|
+
# The format version that you want the response to be in.
|
174
|
+
#
|
175
|
+
# Valid values are: `aws_v1`
|
176
|
+
#
|
177
|
+
# @option params [String] :next_token
|
178
|
+
# The pagination token that indicates the next set of results that you
|
179
|
+
# want to retrieve.
|
180
|
+
#
|
181
|
+
# @option params [Integer] :max_results
|
182
|
+
# The maximum number of results that you want returned in the response.
|
183
|
+
#
|
184
|
+
# @return [Types::DescribeServicesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
185
|
+
#
|
186
|
+
# * {Types::DescribeServicesResponse#services #services} => Array<Types::Service>
|
187
|
+
# * {Types::DescribeServicesResponse#format_version #format_version} => String
|
188
|
+
# * {Types::DescribeServicesResponse#next_token #next_token} => String
|
189
|
+
#
|
190
|
+
#
|
191
|
+
# @example Example: To retrieve a list of services and service codes
|
192
|
+
#
|
193
|
+
# resp = client.describe_services({
|
194
|
+
# format_version: "aws_v1",
|
195
|
+
# max_results: 1,
|
196
|
+
# service_code: "AmazonEC2",
|
197
|
+
# })
|
198
|
+
#
|
199
|
+
# resp.to_h outputs the following:
|
200
|
+
# {
|
201
|
+
# format_version: "aws_v1",
|
202
|
+
# next_token: "abcdefg123",
|
203
|
+
# services: [
|
204
|
+
# {
|
205
|
+
# attribute_names: [
|
206
|
+
# "volumeType",
|
207
|
+
# "maxIopsvolume",
|
208
|
+
# "instanceCapacity10xlarge",
|
209
|
+
# "locationType",
|
210
|
+
# "operation",
|
211
|
+
# ],
|
212
|
+
# service_code: "AmazonEC2",
|
213
|
+
# },
|
214
|
+
# ],
|
215
|
+
# }
|
216
|
+
#
|
217
|
+
# @example Request syntax with placeholder values
|
218
|
+
#
|
219
|
+
# resp = client.describe_services({
|
220
|
+
# service_code: "String",
|
221
|
+
# format_version: "String",
|
222
|
+
# next_token: "String",
|
223
|
+
# max_results: 1,
|
224
|
+
# })
|
225
|
+
#
|
226
|
+
# @example Response structure
|
227
|
+
#
|
228
|
+
# resp.services #=> Array
|
229
|
+
# resp.services[0].service_code #=> String
|
230
|
+
# resp.services[0].attribute_names #=> Array
|
231
|
+
# resp.services[0].attribute_names[0] #=> String
|
232
|
+
# resp.format_version #=> String
|
233
|
+
# resp.next_token #=> String
|
234
|
+
#
|
235
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServices AWS API Documentation
|
236
|
+
#
|
237
|
+
# @overload describe_services(params = {})
|
238
|
+
# @param [Hash] params ({})
|
239
|
+
def describe_services(params = {}, options = {})
|
240
|
+
req = build_request(:describe_services, params)
|
241
|
+
req.send_request(options)
|
242
|
+
end
|
243
|
+
|
244
|
+
# Returns a list of attribute values. Attibutes are similar to the
|
245
|
+
# details in a Price List API offer file. For a list of available
|
246
|
+
# attributes, see [Offer File Definitions][1] in the [AWS Billing and
|
247
|
+
# Cost Management User Guide][2].
|
248
|
+
#
|
249
|
+
#
|
250
|
+
#
|
251
|
+
# [1]: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs
|
252
|
+
# [2]: http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html
|
253
|
+
#
|
254
|
+
# @option params [required, String] :service_code
|
255
|
+
# The service code for the service whose attributes you want to
|
256
|
+
# retrieve. For example, if you want the retrieve an EC2 attribute, use
|
257
|
+
# `AmazonEC2`.
|
258
|
+
#
|
259
|
+
# @option params [required, String] :attribute_name
|
260
|
+
# The name of the attribute that you want to retrieve the values for,
|
261
|
+
# such as `volumeType`.
|
262
|
+
#
|
263
|
+
# @option params [String] :next_token
|
264
|
+
# The pagination token that indicates the next set of results that you
|
265
|
+
# want to retrieve.
|
266
|
+
#
|
267
|
+
# @option params [Integer] :max_results
|
268
|
+
# The maximum number of results to return in response.
|
269
|
+
#
|
270
|
+
# @return [Types::GetAttributeValuesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
271
|
+
#
|
272
|
+
# * {Types::GetAttributeValuesResponse#attribute_values #attribute_values} => Array<Types::AttributeValue>
|
273
|
+
# * {Types::GetAttributeValuesResponse#next_token #next_token} => String
|
274
|
+
#
|
275
|
+
#
|
276
|
+
# @example Example: To retrieve a list of attribute values
|
277
|
+
#
|
278
|
+
# # This operation returns a list of values available for the given attribute.
|
279
|
+
#
|
280
|
+
# resp = client.get_attribute_values({
|
281
|
+
# attribute_name: "volumeType",
|
282
|
+
# max_results: 2,
|
283
|
+
# service_code: "AmazonEC2",
|
284
|
+
# })
|
285
|
+
#
|
286
|
+
# resp.to_h outputs the following:
|
287
|
+
# {
|
288
|
+
# attribute_values: [
|
289
|
+
# {
|
290
|
+
# value: "Throughput Optimized HDD",
|
291
|
+
# },
|
292
|
+
# {
|
293
|
+
# value: "Provisioned IOPS",
|
294
|
+
# },
|
295
|
+
# ],
|
296
|
+
# next_token: "GpgauEXAMPLEezucl5LV0w==:7GzYJ0nw0DBTJ2J66EoTIIynE6O1uXwQtTRqioJzQadBnDVgHPzI1en4BUQnPCLpzeBk9RQQAWaFieA4+DapFAGLgk+Z/9/cTw9GldnPOHN98+FdmJP7wKU3QQpQ8MQr5KOeBkIsAqvAQYdL0DkL7tHwPtE5iCEByAmg9gcC/yBU1vAOsf7R3VaNN4M5jMDv3woSWqASSIlBVB6tgW78YL22KhssoItM/jWW+aP6Jqtq4mldxp/ct6DWAl+xLFwHU/CbketimPPXyqHF3/UXDw==",
|
297
|
+
# }
|
298
|
+
#
|
299
|
+
# @example Request syntax with placeholder values
|
300
|
+
#
|
301
|
+
# resp = client.get_attribute_values({
|
302
|
+
# service_code: "String", # required
|
303
|
+
# attribute_name: "String", # required
|
304
|
+
# next_token: "String",
|
305
|
+
# max_results: 1,
|
306
|
+
# })
|
307
|
+
#
|
308
|
+
# @example Response structure
|
309
|
+
#
|
310
|
+
# resp.attribute_values #=> Array
|
311
|
+
# resp.attribute_values[0] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
|
312
|
+
# resp.next_token #=> String
|
313
|
+
#
|
314
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValues AWS API Documentation
|
315
|
+
#
|
316
|
+
# @overload get_attribute_values(params = {})
|
317
|
+
# @param [Hash] params ({})
|
318
|
+
def get_attribute_values(params = {}, options = {})
|
319
|
+
req = build_request(:get_attribute_values, params)
|
320
|
+
req.send_request(options)
|
321
|
+
end
|
322
|
+
|
323
|
+
# Returns a list of all products that match the filter criteria.
|
324
|
+
#
|
325
|
+
# @option params [String] :service_code
|
326
|
+
# The code for the service whose products you want to retrieve.
|
327
|
+
#
|
328
|
+
# @option params [Array<Types::Filter>] :filters
|
329
|
+
# The list of filters that limit the returned products. only products
|
330
|
+
# that match all filters are returned.
|
331
|
+
#
|
332
|
+
# @option params [String] :format_version
|
333
|
+
# The format version that you want the response to be in.
|
334
|
+
#
|
335
|
+
# Valid values are: `aws_v1`
|
336
|
+
#
|
337
|
+
# @option params [String] :next_token
|
338
|
+
# The pagination token that indicates the next set of results that you
|
339
|
+
# want to retrieve.
|
340
|
+
#
|
341
|
+
# @option params [Integer] :max_results
|
342
|
+
# The maximum number of results to return in the response.
|
343
|
+
#
|
344
|
+
# @return [Types::GetProductsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
345
|
+
#
|
346
|
+
# * {Types::GetProductsResponse#format_version #format_version} => String
|
347
|
+
# * {Types::GetProductsResponse#price_list #price_list} => Array<String>
|
348
|
+
# * {Types::GetProductsResponse#next_token #next_token} => String
|
349
|
+
#
|
350
|
+
#
|
351
|
+
# @example Example: To retrieve a list of products
|
352
|
+
#
|
353
|
+
# # This operation returns a list of products that match the given criteria.
|
354
|
+
#
|
355
|
+
# resp = client.get_products({
|
356
|
+
# filters: [
|
357
|
+
# {
|
358
|
+
# field: "ServiceCode",
|
359
|
+
# type: "TERM_MATCH",
|
360
|
+
# value: "AmazonEC2",
|
361
|
+
# },
|
362
|
+
# {
|
363
|
+
# field: "volumeType",
|
364
|
+
# type: "TERM_MATCH",
|
365
|
+
# value: "Provisioned IOPS",
|
366
|
+
# },
|
367
|
+
# ],
|
368
|
+
# format_version: "aws_v1",
|
369
|
+
# max_results: 1,
|
370
|
+
# })
|
371
|
+
#
|
372
|
+
# resp.to_h outputs the following:
|
373
|
+
# {
|
374
|
+
# format_version: "aws_v1",
|
375
|
+
# next_token: "57r3EXAMPLEujbzWfHF7Ciw==:ywSmZsD3mtpQmQLQ5XfOsIMkYybSj+vAT+kGmwMFq+K9DGmIoJkz7lunVeamiOPgthdWSO2a7YKojCO+zY4dJmuNl2QvbNhXs+AJ2Ufn7xGmJncNI2TsEuAsVCUfTAvAQNcwwamtk6XuZ4YdNnooV62FjkV3ZAn40d9+wAxV7+FImvhUHi/+f8afgZdGh2zPUlH8jlV9uUtj0oHp8+DhPUuHXh+WBII1E/aoKpPSm3c=",
|
376
|
+
# price_list: [
|
377
|
+
# "{\"product\":{\"productFamily\":\"Storage\",\"attributes\":{\"storageMedia\":\"SSD-backed\",\"maxThroughputvolume\":\"320 MB/sec\",\"volumeType\":\"Provisioned IOPS\",\"maxIopsvolume\":\"20000\",\"servicecode\":\"AmazonEC2\",\"usagetype\":\"CAN1-EBS:VolumeUsage.piops\",\"locationType\":\"AWS Region\",\"location\":\"Canada (Central)\",\"servicename\":\"Amazon Elastic Compute Cloud\",\"maxVolumeSize\":\"16 TiB\",\"operation\":\"\"},\"sku\":\"WQGC34PB2AWS8R4U\"},\"serviceCode\":\"AmazonEC2\",\"terms\":{\"OnDemand\":{\"WQGC34PB2AWS8R4U.JRTCKXETXF\":{\"priceDimensions\":{\"WQGC34PB2AWS8R4U.JRTCKXETXF.6YS6EN2CT7\":{\"unit\":\"GB-Mo\",\"endRange\":\"Inf\",\"description\":\"$0.138 per GB-month of Provisioned IOPS SSD (io1) provisioned storage - Canada (Central)\",\"appliesTo\":[],\"rateCode\":\"WQGC34PB2AWS8R4U.JRTCKXETXF.6YS6EN2CT7\",\"beginRange\":\"0\",\"pricePerUnit\":{\"USD\":\"0.1380000000\"}}},\"sku\":\"WQGC34PB2AWS8R4U\",\"effectiveDate\":\"2017-08-01T00:00:00Z\",\"offerTermCode\":\"JRTCKXETXF\",\"termAttributes\":{}}}},\"version\":\"20170901182201\",\"publicationDate\":\"2017-09-01T18:22:01Z\"}",
|
378
|
+
# ],
|
379
|
+
# }
|
380
|
+
#
|
381
|
+
# @example Request syntax with placeholder values
|
382
|
+
#
|
383
|
+
# resp = client.get_products({
|
384
|
+
# service_code: "String",
|
385
|
+
# filters: [
|
386
|
+
# {
|
387
|
+
# type: "TERM_MATCH", # required, accepts TERM_MATCH
|
388
|
+
# field: "String", # required
|
389
|
+
# value: "String", # required
|
390
|
+
# },
|
391
|
+
# ],
|
392
|
+
# format_version: "String",
|
393
|
+
# next_token: "String",
|
394
|
+
# max_results: 1,
|
395
|
+
# })
|
396
|
+
#
|
397
|
+
# @example Response structure
|
398
|
+
#
|
399
|
+
# resp.format_version #=> String
|
400
|
+
# resp.price_list #=> Array
|
401
|
+
# resp.price_list[0] #=> String
|
402
|
+
# resp.next_token #=> String
|
403
|
+
#
|
404
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProducts AWS API Documentation
|
405
|
+
#
|
406
|
+
# @overload get_products(params = {})
|
407
|
+
# @param [Hash] params ({})
|
408
|
+
def get_products(params = {}, options = {})
|
409
|
+
req = build_request(:get_products, params)
|
410
|
+
req.send_request(options)
|
411
|
+
end
|
412
|
+
|
413
|
+
# @!endgroup
|
414
|
+
|
415
|
+
# @param params ({})
|
416
|
+
# @api private
|
417
|
+
def build_request(operation_name, params = {})
|
418
|
+
handlers = @handlers.for(operation_name)
|
419
|
+
context = Seahorse::Client::RequestContext.new(
|
420
|
+
operation_name: operation_name,
|
421
|
+
operation: config.api.operation(operation_name),
|
422
|
+
client: self,
|
423
|
+
params: params,
|
424
|
+
config: config)
|
425
|
+
context[:gem_name] = 'aws-sdk-pricing'
|
426
|
+
context[:gem_version] = '1.0.0'
|
427
|
+
Seahorse::Client::Request.new(handlers, context)
|
428
|
+
end
|
429
|
+
|
430
|
+
# @api private
|
431
|
+
# @deprecated
|
432
|
+
def waiter_names
|
433
|
+
[]
|
434
|
+
end
|
435
|
+
|
436
|
+
class << self
|
437
|
+
|
438
|
+
# @api private
|
439
|
+
attr_reader :identifier
|
440
|
+
|
441
|
+
# @api private
|
442
|
+
def errors_module
|
443
|
+
Errors
|
444
|
+
end
|
445
|
+
|
446
|
+
end
|
447
|
+
end
|
448
|
+
end
|
@@ -0,0 +1,169 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::Pricing
|
9
|
+
# @api private
|
10
|
+
module ClientApi
|
11
|
+
|
12
|
+
include Seahorse::Model
|
13
|
+
|
14
|
+
AttributeNameList = Shapes::ListShape.new(name: 'AttributeNameList')
|
15
|
+
AttributeValue = Shapes::StructureShape.new(name: 'AttributeValue')
|
16
|
+
AttributeValueList = Shapes::ListShape.new(name: 'AttributeValueList')
|
17
|
+
BoxedInteger = Shapes::IntegerShape.new(name: 'BoxedInteger')
|
18
|
+
DescribeServicesRequest = Shapes::StructureShape.new(name: 'DescribeServicesRequest')
|
19
|
+
DescribeServicesResponse = Shapes::StructureShape.new(name: 'DescribeServicesResponse')
|
20
|
+
ExpiredNextTokenException = Shapes::StructureShape.new(name: 'ExpiredNextTokenException')
|
21
|
+
Filter = Shapes::StructureShape.new(name: 'Filter')
|
22
|
+
FilterType = Shapes::StringShape.new(name: 'FilterType')
|
23
|
+
Filters = Shapes::ListShape.new(name: 'Filters')
|
24
|
+
GetAttributeValuesRequest = Shapes::StructureShape.new(name: 'GetAttributeValuesRequest')
|
25
|
+
GetAttributeValuesResponse = Shapes::StructureShape.new(name: 'GetAttributeValuesResponse')
|
26
|
+
GetProductsRequest = Shapes::StructureShape.new(name: 'GetProductsRequest')
|
27
|
+
GetProductsResponse = Shapes::StructureShape.new(name: 'GetProductsResponse')
|
28
|
+
InternalErrorException = Shapes::StructureShape.new(name: 'InternalErrorException')
|
29
|
+
InvalidNextTokenException = Shapes::StructureShape.new(name: 'InvalidNextTokenException')
|
30
|
+
InvalidParameterException = Shapes::StructureShape.new(name: 'InvalidParameterException')
|
31
|
+
NotFoundException = Shapes::StructureShape.new(name: 'NotFoundException')
|
32
|
+
PriceList = Shapes::ListShape.new(name: 'PriceList')
|
33
|
+
PriceListItemJSON = Shapes::StringShape.new(name: 'PriceListItemJSON')
|
34
|
+
Service = Shapes::StructureShape.new(name: 'Service')
|
35
|
+
ServiceList = Shapes::ListShape.new(name: 'ServiceList')
|
36
|
+
String = Shapes::StringShape.new(name: 'String')
|
37
|
+
errorMessage = Shapes::StringShape.new(name: 'errorMessage')
|
38
|
+
|
39
|
+
AttributeNameList.member = Shapes::ShapeRef.new(shape: String)
|
40
|
+
|
41
|
+
AttributeValue.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "Value"))
|
42
|
+
AttributeValue.struct_class = Types::AttributeValue
|
43
|
+
|
44
|
+
AttributeValueList.member = Shapes::ShapeRef.new(shape: AttributeValue)
|
45
|
+
|
46
|
+
DescribeServicesRequest.add_member(:service_code, Shapes::ShapeRef.new(shape: String, location_name: "ServiceCode"))
|
47
|
+
DescribeServicesRequest.add_member(:format_version, Shapes::ShapeRef.new(shape: String, location_name: "FormatVersion"))
|
48
|
+
DescribeServicesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
49
|
+
DescribeServicesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: BoxedInteger, location_name: "MaxResults", metadata: {"box"=>true}))
|
50
|
+
DescribeServicesRequest.struct_class = Types::DescribeServicesRequest
|
51
|
+
|
52
|
+
DescribeServicesResponse.add_member(:services, Shapes::ShapeRef.new(shape: ServiceList, location_name: "Services"))
|
53
|
+
DescribeServicesResponse.add_member(:format_version, Shapes::ShapeRef.new(shape: String, location_name: "FormatVersion"))
|
54
|
+
DescribeServicesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
55
|
+
DescribeServicesResponse.struct_class = Types::DescribeServicesResponse
|
56
|
+
|
57
|
+
Filter.add_member(:type, Shapes::ShapeRef.new(shape: FilterType, required: true, location_name: "Type"))
|
58
|
+
Filter.add_member(:field, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Field"))
|
59
|
+
Filter.add_member(:value, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Value"))
|
60
|
+
Filter.struct_class = Types::Filter
|
61
|
+
|
62
|
+
Filters.member = Shapes::ShapeRef.new(shape: Filter)
|
63
|
+
|
64
|
+
GetAttributeValuesRequest.add_member(:service_code, Shapes::ShapeRef.new(shape: String, required: true, location_name: "ServiceCode"))
|
65
|
+
GetAttributeValuesRequest.add_member(:attribute_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "AttributeName"))
|
66
|
+
GetAttributeValuesRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
67
|
+
GetAttributeValuesRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: BoxedInteger, location_name: "MaxResults", metadata: {"box"=>true}))
|
68
|
+
GetAttributeValuesRequest.struct_class = Types::GetAttributeValuesRequest
|
69
|
+
|
70
|
+
GetAttributeValuesResponse.add_member(:attribute_values, Shapes::ShapeRef.new(shape: AttributeValueList, location_name: "AttributeValues"))
|
71
|
+
GetAttributeValuesResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
72
|
+
GetAttributeValuesResponse.struct_class = Types::GetAttributeValuesResponse
|
73
|
+
|
74
|
+
GetProductsRequest.add_member(:service_code, Shapes::ShapeRef.new(shape: String, location_name: "ServiceCode"))
|
75
|
+
GetProductsRequest.add_member(:filters, Shapes::ShapeRef.new(shape: Filters, location_name: "Filters"))
|
76
|
+
GetProductsRequest.add_member(:format_version, Shapes::ShapeRef.new(shape: String, location_name: "FormatVersion"))
|
77
|
+
GetProductsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
78
|
+
GetProductsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: BoxedInteger, location_name: "MaxResults", metadata: {"box"=>true}))
|
79
|
+
GetProductsRequest.struct_class = Types::GetProductsRequest
|
80
|
+
|
81
|
+
GetProductsResponse.add_member(:format_version, Shapes::ShapeRef.new(shape: String, location_name: "FormatVersion"))
|
82
|
+
GetProductsResponse.add_member(:price_list, Shapes::ShapeRef.new(shape: PriceList, location_name: "PriceList"))
|
83
|
+
GetProductsResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: String, location_name: "NextToken"))
|
84
|
+
GetProductsResponse.struct_class = Types::GetProductsResponse
|
85
|
+
|
86
|
+
PriceList.member = Shapes::ShapeRef.new(shape: PriceListItemJSON, metadata: {"jsonvalue"=>true})
|
87
|
+
|
88
|
+
Service.add_member(:service_code, Shapes::ShapeRef.new(shape: String, location_name: "ServiceCode"))
|
89
|
+
Service.add_member(:attribute_names, Shapes::ShapeRef.new(shape: AttributeNameList, location_name: "AttributeNames"))
|
90
|
+
Service.struct_class = Types::Service
|
91
|
+
|
92
|
+
ServiceList.member = Shapes::ShapeRef.new(shape: Service)
|
93
|
+
|
94
|
+
|
95
|
+
# @api private
|
96
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
97
|
+
|
98
|
+
api.version = "2017-10-15"
|
99
|
+
|
100
|
+
api.metadata = {
|
101
|
+
"endpointPrefix" => "api.pricing",
|
102
|
+
"jsonVersion" => "1.1",
|
103
|
+
"protocol" => "json",
|
104
|
+
"serviceFullName" => "AWS Price List Service",
|
105
|
+
"signatureVersion" => "v4",
|
106
|
+
"signingName" => "pricing",
|
107
|
+
"targetPrefix" => "AWSPriceListService",
|
108
|
+
}
|
109
|
+
|
110
|
+
api.add_operation(:describe_services, Seahorse::Model::Operation.new.tap do |o|
|
111
|
+
o.name = "DescribeServices"
|
112
|
+
o.http_method = "POST"
|
113
|
+
o.http_request_uri = "/"
|
114
|
+
o.input = Shapes::ShapeRef.new(shape: DescribeServicesRequest)
|
115
|
+
o.output = Shapes::ShapeRef.new(shape: DescribeServicesResponse)
|
116
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
|
117
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
118
|
+
o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
|
119
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
|
120
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredNextTokenException)
|
121
|
+
o[:pager] = Aws::Pager.new(
|
122
|
+
limit_key: "max_results",
|
123
|
+
tokens: {
|
124
|
+
"next_token" => "next_token"
|
125
|
+
}
|
126
|
+
)
|
127
|
+
end)
|
128
|
+
|
129
|
+
api.add_operation(:get_attribute_values, Seahorse::Model::Operation.new.tap do |o|
|
130
|
+
o.name = "GetAttributeValues"
|
131
|
+
o.http_method = "POST"
|
132
|
+
o.http_request_uri = "/"
|
133
|
+
o.input = Shapes::ShapeRef.new(shape: GetAttributeValuesRequest)
|
134
|
+
o.output = Shapes::ShapeRef.new(shape: GetAttributeValuesResponse)
|
135
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
|
136
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
137
|
+
o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
|
138
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
|
139
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredNextTokenException)
|
140
|
+
o[:pager] = Aws::Pager.new(
|
141
|
+
limit_key: "max_results",
|
142
|
+
tokens: {
|
143
|
+
"next_token" => "next_token"
|
144
|
+
}
|
145
|
+
)
|
146
|
+
end)
|
147
|
+
|
148
|
+
api.add_operation(:get_products, Seahorse::Model::Operation.new.tap do |o|
|
149
|
+
o.name = "GetProducts"
|
150
|
+
o.http_method = "POST"
|
151
|
+
o.http_request_uri = "/"
|
152
|
+
o.input = Shapes::ShapeRef.new(shape: GetProductsRequest)
|
153
|
+
o.output = Shapes::ShapeRef.new(shape: GetProductsResponse)
|
154
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalErrorException)
|
155
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
|
156
|
+
o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
|
157
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
|
158
|
+
o.errors << Shapes::ShapeRef.new(shape: ExpiredNextTokenException)
|
159
|
+
o[:pager] = Aws::Pager.new(
|
160
|
+
limit_key: "max_results",
|
161
|
+
tokens: {
|
162
|
+
"next_token" => "next_token"
|
163
|
+
}
|
164
|
+
)
|
165
|
+
end)
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
end
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::Pricing
|
9
|
+
module Errors
|
10
|
+
|
11
|
+
extend Aws::Errors::DynamicErrors
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::Pricing
|
9
|
+
class Resource
|
10
|
+
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
16
|
+
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,292 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::Pricing
|
9
|
+
module Types
|
10
|
+
|
11
|
+
# The values of a given attribute, such as `Throughput Optimized HDD` or
|
12
|
+
# `Provisioned IOPS` for the `Amazon EC2` `volumeType` attribute.
|
13
|
+
#
|
14
|
+
# @!attribute [rw] value
|
15
|
+
# The specific value of an `attributeName`.
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/AttributeValue AWS API Documentation
|
19
|
+
#
|
20
|
+
class AttributeValue < Struct.new(
|
21
|
+
:value)
|
22
|
+
include Aws::Structure
|
23
|
+
end
|
24
|
+
|
25
|
+
# @note When making an API call, you may pass DescribeServicesRequest
|
26
|
+
# data as a hash:
|
27
|
+
#
|
28
|
+
# {
|
29
|
+
# service_code: "String",
|
30
|
+
# format_version: "String",
|
31
|
+
# next_token: "String",
|
32
|
+
# max_results: 1,
|
33
|
+
# }
|
34
|
+
#
|
35
|
+
# @!attribute [rw] service_code
|
36
|
+
# The code for the service whose information you want to retrieve,
|
37
|
+
# such as `AmazonEC2`. You can use the `ServiceCode` to filter the
|
38
|
+
# results in a `GetProducts` call. To retrieve a list of all services,
|
39
|
+
# leave this blank.
|
40
|
+
# @return [String]
|
41
|
+
#
|
42
|
+
# @!attribute [rw] format_version
|
43
|
+
# The format version that you want the response to be in.
|
44
|
+
#
|
45
|
+
# Valid values are: `aws_v1`
|
46
|
+
# @return [String]
|
47
|
+
#
|
48
|
+
# @!attribute [rw] next_token
|
49
|
+
# The pagination token that indicates the next set of results that you
|
50
|
+
# want to retrieve.
|
51
|
+
# @return [String]
|
52
|
+
#
|
53
|
+
# @!attribute [rw] max_results
|
54
|
+
# The maximum number of results that you want returned in the
|
55
|
+
# response.
|
56
|
+
# @return [Integer]
|
57
|
+
#
|
58
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServicesRequest AWS API Documentation
|
59
|
+
#
|
60
|
+
class DescribeServicesRequest < Struct.new(
|
61
|
+
:service_code,
|
62
|
+
:format_version,
|
63
|
+
:next_token,
|
64
|
+
:max_results)
|
65
|
+
include Aws::Structure
|
66
|
+
end
|
67
|
+
|
68
|
+
# @!attribute [rw] services
|
69
|
+
# The service metadata for the service or services in the response.
|
70
|
+
# @return [Array<Types::Service>]
|
71
|
+
#
|
72
|
+
# @!attribute [rw] format_version
|
73
|
+
# The format version of the response. For example, `aws_v1`.
|
74
|
+
# @return [String]
|
75
|
+
#
|
76
|
+
# @!attribute [rw] next_token
|
77
|
+
# The pagination token for the next set of retreivable results.
|
78
|
+
# @return [String]
|
79
|
+
#
|
80
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/DescribeServicesResponse AWS API Documentation
|
81
|
+
#
|
82
|
+
class DescribeServicesResponse < Struct.new(
|
83
|
+
:services,
|
84
|
+
:format_version,
|
85
|
+
:next_token)
|
86
|
+
include Aws::Structure
|
87
|
+
end
|
88
|
+
|
89
|
+
# The constraints that you want all returned products to match.
|
90
|
+
#
|
91
|
+
# @note When making an API call, you may pass Filter
|
92
|
+
# data as a hash:
|
93
|
+
#
|
94
|
+
# {
|
95
|
+
# type: "TERM_MATCH", # required, accepts TERM_MATCH
|
96
|
+
# field: "String", # required
|
97
|
+
# value: "String", # required
|
98
|
+
# }
|
99
|
+
#
|
100
|
+
# @!attribute [rw] type
|
101
|
+
# The type of filter that you want to use.
|
102
|
+
#
|
103
|
+
# Valid values are: `TERM_MATCH`. `TERM_MATCH` returns only products
|
104
|
+
# that match both the given filter field and the given value.
|
105
|
+
# @return [String]
|
106
|
+
#
|
107
|
+
# @!attribute [rw] field
|
108
|
+
# The product metadata field that you want to filter on. You can
|
109
|
+
# filter by just the service code to see all products for a specific
|
110
|
+
# service, filter by just the attribute name to see a specific
|
111
|
+
# attribute for multiple services, or use both a service code and an
|
112
|
+
# attribute name to retrieve only products that match both fields.
|
113
|
+
#
|
114
|
+
# Valid values include: `ServiceCode`, and all attribute names
|
115
|
+
#
|
116
|
+
# For example, you can filter by the `AmazonEC2` service code and the
|
117
|
+
# `volumeType` attribute name to get the prices for only Amazon EC2
|
118
|
+
# volumes.
|
119
|
+
# @return [String]
|
120
|
+
#
|
121
|
+
# @!attribute [rw] value
|
122
|
+
# The service code or attribute value that you want to filter by. If
|
123
|
+
# you are filtering by service code this is the actual service code,
|
124
|
+
# such as `AmazonEC2`. If you are filtering by attribute name, this is
|
125
|
+
# the attribute value that you want the returned products to match,
|
126
|
+
# such as a `Provisioned IOPS` volume.
|
127
|
+
# @return [String]
|
128
|
+
#
|
129
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/Filter AWS API Documentation
|
130
|
+
#
|
131
|
+
class Filter < Struct.new(
|
132
|
+
:type,
|
133
|
+
:field,
|
134
|
+
:value)
|
135
|
+
include Aws::Structure
|
136
|
+
end
|
137
|
+
|
138
|
+
# @note When making an API call, you may pass GetAttributeValuesRequest
|
139
|
+
# data as a hash:
|
140
|
+
#
|
141
|
+
# {
|
142
|
+
# service_code: "String", # required
|
143
|
+
# attribute_name: "String", # required
|
144
|
+
# next_token: "String",
|
145
|
+
# max_results: 1,
|
146
|
+
# }
|
147
|
+
#
|
148
|
+
# @!attribute [rw] service_code
|
149
|
+
# The service code for the service whose attributes you want to
|
150
|
+
# retrieve. For example, if you want the retrieve an EC2 attribute,
|
151
|
+
# use `AmazonEC2`.
|
152
|
+
# @return [String]
|
153
|
+
#
|
154
|
+
# @!attribute [rw] attribute_name
|
155
|
+
# The name of the attribute that you want to retrieve the values for,
|
156
|
+
# such as `volumeType`.
|
157
|
+
# @return [String]
|
158
|
+
#
|
159
|
+
# @!attribute [rw] next_token
|
160
|
+
# The pagination token that indicates the next set of results that you
|
161
|
+
# want to retrieve.
|
162
|
+
# @return [String]
|
163
|
+
#
|
164
|
+
# @!attribute [rw] max_results
|
165
|
+
# The maximum number of results to return in response.
|
166
|
+
# @return [Integer]
|
167
|
+
#
|
168
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValuesRequest AWS API Documentation
|
169
|
+
#
|
170
|
+
class GetAttributeValuesRequest < Struct.new(
|
171
|
+
:service_code,
|
172
|
+
:attribute_name,
|
173
|
+
:next_token,
|
174
|
+
:max_results)
|
175
|
+
include Aws::Structure
|
176
|
+
end
|
177
|
+
|
178
|
+
# @!attribute [rw] attribute_values
|
179
|
+
# The list of values for an attribute. For example, `Throughput
|
180
|
+
# Optimized HDD` and `Provisioned IOPS` are two available values for
|
181
|
+
# the `AmazonEC2` `volumeType`.
|
182
|
+
# @return [Array<Types::AttributeValue>]
|
183
|
+
#
|
184
|
+
# @!attribute [rw] next_token
|
185
|
+
# The pagination token that indicates the next set of results to
|
186
|
+
# retrieve.
|
187
|
+
# @return [String]
|
188
|
+
#
|
189
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetAttributeValuesResponse AWS API Documentation
|
190
|
+
#
|
191
|
+
class GetAttributeValuesResponse < Struct.new(
|
192
|
+
:attribute_values,
|
193
|
+
:next_token)
|
194
|
+
include Aws::Structure
|
195
|
+
end
|
196
|
+
|
197
|
+
# @note When making an API call, you may pass GetProductsRequest
|
198
|
+
# data as a hash:
|
199
|
+
#
|
200
|
+
# {
|
201
|
+
# service_code: "String",
|
202
|
+
# filters: [
|
203
|
+
# {
|
204
|
+
# type: "TERM_MATCH", # required, accepts TERM_MATCH
|
205
|
+
# field: "String", # required
|
206
|
+
# value: "String", # required
|
207
|
+
# },
|
208
|
+
# ],
|
209
|
+
# format_version: "String",
|
210
|
+
# next_token: "String",
|
211
|
+
# max_results: 1,
|
212
|
+
# }
|
213
|
+
#
|
214
|
+
# @!attribute [rw] service_code
|
215
|
+
# The code for the service whose products you want to retrieve.
|
216
|
+
# @return [String]
|
217
|
+
#
|
218
|
+
# @!attribute [rw] filters
|
219
|
+
# The list of filters that limit the returned products. only products
|
220
|
+
# that match all filters are returned.
|
221
|
+
# @return [Array<Types::Filter>]
|
222
|
+
#
|
223
|
+
# @!attribute [rw] format_version
|
224
|
+
# The format version that you want the response to be in.
|
225
|
+
#
|
226
|
+
# Valid values are: `aws_v1`
|
227
|
+
# @return [String]
|
228
|
+
#
|
229
|
+
# @!attribute [rw] next_token
|
230
|
+
# The pagination token that indicates the next set of results that you
|
231
|
+
# want to retrieve.
|
232
|
+
# @return [String]
|
233
|
+
#
|
234
|
+
# @!attribute [rw] max_results
|
235
|
+
# The maximum number of results to return in the response.
|
236
|
+
# @return [Integer]
|
237
|
+
#
|
238
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProductsRequest AWS API Documentation
|
239
|
+
#
|
240
|
+
class GetProductsRequest < Struct.new(
|
241
|
+
:service_code,
|
242
|
+
:filters,
|
243
|
+
:format_version,
|
244
|
+
:next_token,
|
245
|
+
:max_results)
|
246
|
+
include Aws::Structure
|
247
|
+
end
|
248
|
+
|
249
|
+
# @!attribute [rw] format_version
|
250
|
+
# The format version of the response. For example, aws\_v1.
|
251
|
+
# @return [String]
|
252
|
+
#
|
253
|
+
# @!attribute [rw] price_list
|
254
|
+
# The list of products that match your filters. The list contains both
|
255
|
+
# the product metadata and the price information.
|
256
|
+
# @return [Array<String>]
|
257
|
+
#
|
258
|
+
# @!attribute [rw] next_token
|
259
|
+
# The pagination token that indicates the next set of results to
|
260
|
+
# retrieve.
|
261
|
+
# @return [String]
|
262
|
+
#
|
263
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/GetProductsResponse AWS API Documentation
|
264
|
+
#
|
265
|
+
class GetProductsResponse < Struct.new(
|
266
|
+
:format_version,
|
267
|
+
:price_list,
|
268
|
+
:next_token)
|
269
|
+
include Aws::Structure
|
270
|
+
end
|
271
|
+
|
272
|
+
# The metadata for a service, such as the service code and available
|
273
|
+
# attribute names.
|
274
|
+
#
|
275
|
+
# @!attribute [rw] service_code
|
276
|
+
# The code for the AWS service.
|
277
|
+
# @return [String]
|
278
|
+
#
|
279
|
+
# @!attribute [rw] attribute_names
|
280
|
+
# The attributes that are available for this service.
|
281
|
+
# @return [Array<String>]
|
282
|
+
#
|
283
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/pricing-2017-10-15/Service AWS API Documentation
|
284
|
+
#
|
285
|
+
class Service < Struct.new(
|
286
|
+
:service_code,
|
287
|
+
:attribute_names)
|
288
|
+
include Aws::Structure
|
289
|
+
end
|
290
|
+
|
291
|
+
end
|
292
|
+
end
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-sdk-pricing
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Amazon Web Services
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aws-sigv4
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
description: Official AWS Ruby gem for AWS Price List Service (AWS Pricing). This
|
42
|
+
gem is part of the AWS SDK for Ruby.
|
43
|
+
email:
|
44
|
+
- trevrowe@amazon.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- lib/aws-sdk-pricing.rb
|
50
|
+
- lib/aws-sdk-pricing/client.rb
|
51
|
+
- lib/aws-sdk-pricing/client_api.rb
|
52
|
+
- lib/aws-sdk-pricing/customizations.rb
|
53
|
+
- lib/aws-sdk-pricing/errors.rb
|
54
|
+
- lib/aws-sdk-pricing/resource.rb
|
55
|
+
- lib/aws-sdk-pricing/types.rb
|
56
|
+
homepage: http://github.com/aws/aws-sdk-ruby
|
57
|
+
licenses:
|
58
|
+
- Apache-2.0
|
59
|
+
metadata:
|
60
|
+
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-pricing
|
61
|
+
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-pricing/CHANGELOG.md
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 2.5.1
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: AWS SDK for Ruby - AWS Pricing
|
82
|
+
test_files: []
|