aws-sdk-costexplorer 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 27611725395f09a87a78c202ca035b52501b7581
4
+ data.tar.gz: 487c6d0f12b585cf004012b36390f53a9284af36
5
+ SHA512:
6
+ metadata.gz: d5e0021cf2949ad813a1d2e08f34466bb79e0dea2b177ecf9822892a8b268feb369e059c258156242741e442d8421c8adb9611b86b9e52c5deef8369ab28da1f
7
+ data.tar.gz: 989d920c43000f9522ebb18ffdd7e915ecddb7c61bfc1ec670da7818b6ebf421f93890a40a28f8553becc6240ed1a5e4b90904a0e718782046932171faa14cf7
@@ -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-costexplorer/types'
12
+ require_relative 'aws-sdk-costexplorer/client_api'
13
+ require_relative 'aws-sdk-costexplorer/client'
14
+ require_relative 'aws-sdk-costexplorer/errors'
15
+ require_relative 'aws-sdk-costexplorer/resource'
16
+ require_relative 'aws-sdk-costexplorer/customizations'
17
+
18
+ # This module provides support for AWS Cost Explorer Service. This module is available in the
19
+ # `aws-sdk-costexplorer` 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 Cost Explorer Service all
32
+ # extend {Errors::ServiceError}.
33
+ #
34
+ # begin
35
+ # # do stuff
36
+ # rescue Aws::CostExplorer::Errors::ServiceError
37
+ # # rescues all service API errors
38
+ # end
39
+ #
40
+ # See {Errors} for more information.
41
+ #
42
+ # @service
43
+ module Aws::CostExplorer
44
+
45
+ GEM_VERSION = '1.0.0'
46
+
47
+ end
@@ -0,0 +1,622 @@
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(:costexplorer)
26
+
27
+ module Aws::CostExplorer
28
+ class Client < Seahorse::Client::Base
29
+
30
+ include Aws::ClientStubs
31
+
32
+ @identifier = :costexplorer
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
+ # Retrieve cost and usage metrics for your account. You can specify
159
+ # which cost and usage-related metric, such as `BlendedCosts` or
160
+ # `UsageQuantity`, that you want the request to return. You can also
161
+ # filter and group your data by various dimensions, such as `AWS
162
+ # Service` or `AvailabilityZone`, in a specific time range. See the
163
+ # `GetDimensionValues` action for a complete list of the valid
164
+ # dimensions. Master accounts in an organization have access to all
165
+ # member accounts.
166
+ #
167
+ # @option params [Types::DateInterval] :time_period
168
+ # Sets the start and end dates for retrieving AWS costs. The start date
169
+ # is inclusive, but the end date is exclusive. For example, if `start`
170
+ # is `2017-01-01` and `end` is `2017-05-01`, then the cost and usage
171
+ # data is retrieved from `2017-01-01` up to and including `2017-04-30`
172
+ # but not including `2017-05-01`.
173
+ #
174
+ # @option params [String] :granularity
175
+ # Sets the AWS cost granularity to `MONTHLY` or `DAILY`.
176
+ #
177
+ # @option params [Types::Expression] :filter
178
+ # Filters AWS costs by different dimensions. For example, you can
179
+ # specify `Service` and `Linked Account` and get the costs associated
180
+ # with that account's usage of that service. You can nest `Expression`
181
+ # objects to define any combination of dimension filters. For more
182
+ # information, see the `Expression` object or `More Examples`.
183
+ #
184
+ # @option params [Array<String>] :metrics
185
+ # Which metrics are returned in the query. For more information about
186
+ # blended and unblended rates, see
187
+ # https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
188
+ #
189
+ # Valid values are `BlendedCost`, `UnblendedCost`, and `UsageQuantity`.
190
+ #
191
+ # <note markdown="1"> If you return the `UsageQuantity` metric, the service aggregates all
192
+ # usage numbers without taking into account the units. For example, if
193
+ # you aggregate `usageQuantity` across all of EC2, the results aren't
194
+ # meaningful because EC2 compute hours and data transfer are measured in
195
+ # different units (for example, hours vs. GB). To get more meaningful
196
+ # `UsageQuantity` metrics, filter by `UsageType` or `UsageTypeGroups`.
197
+ #
198
+ # </note>
199
+ #
200
+ # @option params [Array<Types::GroupDefinition>] :group_by
201
+ # You can group AWS costs using up to two different groups, either
202
+ # dimensions, tag keys, or both.
203
+ #
204
+ # When you group by tag key, you get all tag values, including empty
205
+ # strings.
206
+ #
207
+ # Valid values are: `AZ`, `INSTANCE_TYPE`, `LINKED_ACCCOUNT`,
208
+ # `OPERATION`, `PURCHASE_TYPE`, `SERVICE`, `USAGE_TYPE`, `TAGS`, and
209
+ # `PLATFORM`.
210
+ #
211
+ # @option params [String] :next_page_token
212
+ # The token to retrieve the next set of results. AWS provides the token
213
+ # when the response from a previous call has more results than the
214
+ # maximum page size.
215
+ #
216
+ # @return [Types::GetCostAndUsageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
217
+ #
218
+ # * {Types::GetCostAndUsageResponse#next_page_token #next_page_token} => String
219
+ # * {Types::GetCostAndUsageResponse#group_definitions #group_definitions} => Array&lt;Types::GroupDefinition&gt;
220
+ # * {Types::GetCostAndUsageResponse#results_by_time #results_by_time} => Array&lt;Types::ResultByTime&gt;
221
+ #
222
+ # @example Request syntax with placeholder values
223
+ #
224
+ # resp = client.get_cost_and_usage({
225
+ # time_period: {
226
+ # start: "YearMonthDay", # required
227
+ # end: "YearMonthDay", # required
228
+ # },
229
+ # granularity: "DAILY", # accepts DAILY, MONTHLY
230
+ # filter: {
231
+ # or: [
232
+ # {
233
+ # # recursive Expression
234
+ # },
235
+ # ],
236
+ # and: [
237
+ # {
238
+ # # recursive Expression
239
+ # },
240
+ # ],
241
+ # not: {
242
+ # # recursive Expression
243
+ # },
244
+ # dimensions: {
245
+ # key: "AZ", # accepts AZ, INSTANCE_TYPE, LINKED_ACCOUNT, OPERATION, PURCHASE_TYPE, REGION, SERVICE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID
246
+ # values: ["Value"],
247
+ # },
248
+ # tags: {
249
+ # key: "TagKey",
250
+ # values: ["Value"],
251
+ # },
252
+ # },
253
+ # metrics: ["MetricName"],
254
+ # group_by: [
255
+ # {
256
+ # type: "DIMENSION", # accepts DIMENSION, TAG
257
+ # key: "GroupDefinitionKey",
258
+ # },
259
+ # ],
260
+ # next_page_token: "NextPageToken",
261
+ # })
262
+ #
263
+ # @example Response structure
264
+ #
265
+ # resp.next_page_token #=> String
266
+ # resp.group_definitions #=> Array
267
+ # resp.group_definitions[0].type #=> String, one of "DIMENSION", "TAG"
268
+ # resp.group_definitions[0].key #=> String
269
+ # resp.results_by_time #=> Array
270
+ # resp.results_by_time[0].time_period.start #=> String
271
+ # resp.results_by_time[0].time_period.end #=> String
272
+ # resp.results_by_time[0].total #=> Hash
273
+ # resp.results_by_time[0].total["MetricName"].amount #=> String
274
+ # resp.results_by_time[0].total["MetricName"].unit #=> String
275
+ # resp.results_by_time[0].groups #=> Array
276
+ # resp.results_by_time[0].groups[0].keys #=> Array
277
+ # resp.results_by_time[0].groups[0].keys[0] #=> String
278
+ # resp.results_by_time[0].groups[0].metrics #=> Hash
279
+ # resp.results_by_time[0].groups[0].metrics["MetricName"].amount #=> String
280
+ # resp.results_by_time[0].groups[0].metrics["MetricName"].unit #=> String
281
+ # resp.results_by_time[0].estimated #=> Boolean
282
+ #
283
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsage AWS API Documentation
284
+ #
285
+ # @overload get_cost_and_usage(params = {})
286
+ # @param [Hash] params ({})
287
+ def get_cost_and_usage(params = {}, options = {})
288
+ req = build_request(:get_cost_and_usage, params)
289
+ req.send_request(options)
290
+ end
291
+
292
+ # You can use `GetDimensionValues` to retrieve all available filter
293
+ # values for a specific filter over a period of time. You can search the
294
+ # dimension values for an arbitrary string.
295
+ #
296
+ # @option params [String] :search_string
297
+ # The value that you want to search the filter values for.
298
+ #
299
+ # @option params [required, Types::DateInterval] :time_period
300
+ # The start and end dates for retrieving the dimension values. The start
301
+ # date is inclusive, but the end date is exclusive. For example, if
302
+ # `start` is `2017-01-01` and `end` is `2017-05-01`, then the cost and
303
+ # usage data is retrieved from `2017-01-01` up to and including
304
+ # `2017-04-30` but not including `2017-05-01`.
305
+ #
306
+ # @option params [required, String] :dimension
307
+ # The name of the dimension. Different `Dimensions`are available for
308
+ # different `Context`s. For more information, see `Context`.
309
+ #
310
+ # @option params [String] :context
311
+ # The context for the call to `GetDimensionValues`. This can be
312
+ # `RESERVED_INSTANCE` or `COST_AND_USAGE`. The default value is
313
+ # `COST_AND_USAGE`. If the context is set to `RESERVED_INSTANCE`, the
314
+ # resulting dimension values can be used in the
315
+ # `GetReservationUtilization` action. If the context is set to
316
+ # `COST_AND_USAGE`, , the resulting dimension values can be used in the
317
+ # `GetCostAndUsage` operation.
318
+ #
319
+ # If you set the context to `CostAndUsage`, you can use the following
320
+ # dimensions for searching:
321
+ #
322
+ # * AZ - The Availability Zone. An example is us-east-1a.
323
+ #
324
+ # * InstanceType - The type of EC2 instance. An example is m4.xlarge.
325
+ #
326
+ # * LinkedAccount - The description in the attribute map that includes
327
+ # the full name of the member account. The value field contains the
328
+ # AWS ID of the member account
329
+ #
330
+ # * Operation - The action performed. Examples include RunInstance and
331
+ # CreateBucket.
332
+ #
333
+ # * PurchaseType - The reservation type of the purchase to which this
334
+ # usage is related. Examples include: On Demand Instances and Standard
335
+ # Reserved Instances
336
+ #
337
+ # * Service - The AWS service such as DynamoDB.
338
+ #
339
+ # * UsageType -The type of usage. An example is DataTransfer-In-Bytes.
340
+ # The response for the GetDimensionValues action includes a unit
341
+ # attribute, examples of which include GB and Hrs.
342
+ #
343
+ # * UsageTypeGroup - The grouping of common usage types. An example is
344
+ # EC2: CloudWatch – Alarms. The response for this action includes a
345
+ # unit attribute.
346
+ #
347
+ # * RecordType - The different types of charges such as RI fees, usage
348
+ # costs, tax refunds, and credits
349
+ #
350
+ # If you set the context to `ReservedInstance`, you can use the
351
+ # following dimensions for searching:
352
+ #
353
+ # * AZ - The Availability Zone. An example is us-east-1a.
354
+ #
355
+ # * InstanceType - The type of EC2 instance. An example is m4.xlarge.
356
+ #
357
+ # * LinkedAccount - The description in the attribute map that includes
358
+ # the full name of the member account. The value field contains the
359
+ # AWS ID of the member account
360
+ #
361
+ # * Platform - The operating system. Examples are Windows or Linux.
362
+ #
363
+ # * Region - The AWS region.
364
+ #
365
+ # * Scope - The scope of a reserved instance (RI). Values are regional
366
+ # or a single availability zone.
367
+ #
368
+ # * Tenancy - The tenancy of a resource. Examples are shared or
369
+ # dedicated.
370
+ #
371
+ # @option params [String] :next_page_token
372
+ # The token to retrieve the next set of results. AWS provides the token
373
+ # when the response from a previous call has more results than the
374
+ # maximum page size.
375
+ #
376
+ # @return [Types::GetDimensionValuesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
377
+ #
378
+ # * {Types::GetDimensionValuesResponse#dimension_values #dimension_values} => Array&lt;Types::DimensionValuesWithAttributes&gt;
379
+ # * {Types::GetDimensionValuesResponse#return_size #return_size} => Integer
380
+ # * {Types::GetDimensionValuesResponse#total_size #total_size} => Integer
381
+ # * {Types::GetDimensionValuesResponse#next_page_token #next_page_token} => String
382
+ #
383
+ # @example Request syntax with placeholder values
384
+ #
385
+ # resp = client.get_dimension_values({
386
+ # search_string: "SearchString",
387
+ # time_period: { # required
388
+ # start: "YearMonthDay", # required
389
+ # end: "YearMonthDay", # required
390
+ # },
391
+ # dimension: "AZ", # required, accepts AZ, INSTANCE_TYPE, LINKED_ACCOUNT, OPERATION, PURCHASE_TYPE, REGION, SERVICE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID
392
+ # context: "COST_AND_USAGE", # accepts COST_AND_USAGE, RESERVATIONS
393
+ # next_page_token: "NextPageToken",
394
+ # })
395
+ #
396
+ # @example Response structure
397
+ #
398
+ # resp.dimension_values #=> Array
399
+ # resp.dimension_values[0].value #=> String
400
+ # resp.dimension_values[0].attributes #=> Hash
401
+ # resp.dimension_values[0].attributes["AttributeType"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
402
+ # resp.return_size #=> Integer
403
+ # resp.total_size #=> Integer
404
+ # resp.next_page_token #=> String
405
+ #
406
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetDimensionValues AWS API Documentation
407
+ #
408
+ # @overload get_dimension_values(params = {})
409
+ # @param [Hash] params ({})
410
+ def get_dimension_values(params = {}, options = {})
411
+ req = build_request(:get_dimension_values, params)
412
+ req.send_request(options)
413
+ end
414
+
415
+ # You can retrieve the Reservation utilization for your account. Master
416
+ # accounts in an organization have access to their associated member
417
+ # accounts. You can filter data by dimensions in a time period. You can
418
+ # use `GetDimensionValues` to determine the possible dimension values.
419
+ # Currently, you can group only by `SUBSCRIPTION_ID`.
420
+ #
421
+ # @option params [required, Types::DateInterval] :time_period
422
+ # Sets the start and end dates for retrieving reserve instance (RI)
423
+ # utilization. The start date is inclusive, but the end date is
424
+ # exclusive. For example, if `start` is `2017-01-01` and `end` is
425
+ # `2017-05-01`, then the cost and usage data is retrieved from
426
+ # `2017-01-01` up to and including `2017-04-30` but not including
427
+ # `2017-05-01`.
428
+ #
429
+ # @option params [Array<Types::GroupDefinition>] :group_by
430
+ # Groups only by `SubscriptionId`. Metadata is included.
431
+ #
432
+ # @option params [String] :granularity
433
+ # Sets the AWS cost granularity to `MONTHLY` or `DAILY`. If both
434
+ # `GroupBy` and `granularity` are not set, `GetReservationUtilization`
435
+ # defaults to `DAILY`. If `GroupBy` is set, `Granularity` can't be set,
436
+ # and the response object doesn't include `MONTHLY` or `DAILY`
437
+ # granularity.
438
+ #
439
+ # @option params [Types::Expression] :filter
440
+ # Filters utilization data by using different dimensions.
441
+ # `GetReservationUtilization` uses the same `Expression` object as the
442
+ # other operations, but only `AND` is supported among each dimension,
443
+ # and nesting is supported up to only one level deep. If there are
444
+ # multiple values for a dimension, they are OR'd together.
445
+ #
446
+ # @option params [String] :next_page_token
447
+ # The token to retrieve the next set of results. AWS provides the token
448
+ # when the response from a previous call has more results than the
449
+ # maximum page size.
450
+ #
451
+ # @return [Types::GetReservationUtilizationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
452
+ #
453
+ # * {Types::GetReservationUtilizationResponse#utilizations_by_time #utilizations_by_time} => Array&lt;Types::UtilizationByTime&gt;
454
+ # * {Types::GetReservationUtilizationResponse#total #total} => Types::ReservationAggregates
455
+ # * {Types::GetReservationUtilizationResponse#next_page_token #next_page_token} => String
456
+ #
457
+ # @example Request syntax with placeholder values
458
+ #
459
+ # resp = client.get_reservation_utilization({
460
+ # time_period: { # required
461
+ # start: "YearMonthDay", # required
462
+ # end: "YearMonthDay", # required
463
+ # },
464
+ # group_by: [
465
+ # {
466
+ # type: "DIMENSION", # accepts DIMENSION, TAG
467
+ # key: "GroupDefinitionKey",
468
+ # },
469
+ # ],
470
+ # granularity: "DAILY", # accepts DAILY, MONTHLY
471
+ # filter: {
472
+ # or: [
473
+ # {
474
+ # # recursive Expression
475
+ # },
476
+ # ],
477
+ # and: [
478
+ # {
479
+ # # recursive Expression
480
+ # },
481
+ # ],
482
+ # not: {
483
+ # # recursive Expression
484
+ # },
485
+ # dimensions: {
486
+ # key: "AZ", # accepts AZ, INSTANCE_TYPE, LINKED_ACCOUNT, OPERATION, PURCHASE_TYPE, REGION, SERVICE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID
487
+ # values: ["Value"],
488
+ # },
489
+ # tags: {
490
+ # key: "TagKey",
491
+ # values: ["Value"],
492
+ # },
493
+ # },
494
+ # next_page_token: "NextPageToken",
495
+ # })
496
+ #
497
+ # @example Response structure
498
+ #
499
+ # resp.utilizations_by_time #=> Array
500
+ # resp.utilizations_by_time[0].time_period.start #=> String
501
+ # resp.utilizations_by_time[0].time_period.end #=> String
502
+ # resp.utilizations_by_time[0].groups #=> Array
503
+ # resp.utilizations_by_time[0].groups[0].key #=> String
504
+ # resp.utilizations_by_time[0].groups[0].value #=> String
505
+ # resp.utilizations_by_time[0].groups[0].attributes #=> Hash
506
+ # resp.utilizations_by_time[0].groups[0].attributes["AttributeType"] #=> <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
507
+ # resp.utilizations_by_time[0].groups[0].utilization.utilization_percentage #=> String
508
+ # resp.utilizations_by_time[0].groups[0].utilization.purchased_hours #=> String
509
+ # resp.utilizations_by_time[0].groups[0].utilization.total_actual_hours #=> String
510
+ # resp.utilizations_by_time[0].groups[0].utilization.unused_hours #=> String
511
+ # resp.utilizations_by_time[0].total.utilization_percentage #=> String
512
+ # resp.utilizations_by_time[0].total.purchased_hours #=> String
513
+ # resp.utilizations_by_time[0].total.total_actual_hours #=> String
514
+ # resp.utilizations_by_time[0].total.unused_hours #=> String
515
+ # resp.total.utilization_percentage #=> String
516
+ # resp.total.purchased_hours #=> String
517
+ # resp.total.total_actual_hours #=> String
518
+ # resp.total.unused_hours #=> String
519
+ # resp.next_page_token #=> String
520
+ #
521
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationUtilization AWS API Documentation
522
+ #
523
+ # @overload get_reservation_utilization(params = {})
524
+ # @param [Hash] params ({})
525
+ def get_reservation_utilization(params = {}, options = {})
526
+ req = build_request(:get_reservation_utilization, params)
527
+ req.send_request(options)
528
+ end
529
+
530
+ # You can query for available tag keys and tag values for a specified
531
+ # period. You can search the tag values for an arbitrary string.
532
+ #
533
+ # @option params [String] :search_string
534
+ # The value that you want to search for.
535
+ #
536
+ # @option params [required, Types::DateInterval] :time_period
537
+ # The start and end dates for retrieving the dimension values. The start
538
+ # date is inclusive, but the end date is exclusive. For example, if
539
+ # `start` is `2017-01-01` and `end` is `2017-05-01`, then the cost and
540
+ # usage data is retrieved from `2017-01-01` up to and including
541
+ # `2017-04-30` but not including `2017-05-01`.
542
+ #
543
+ # @option params [String] :tag_key
544
+ # The key of the tag that you want to return values for.
545
+ #
546
+ # @option params [String] :next_page_token
547
+ # The token to retrieve the next set of results. AWS provides the token
548
+ # when the response from a previous call has more results than the
549
+ # maximum page size.
550
+ #
551
+ # @return [Types::GetTagsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
552
+ #
553
+ # * {Types::GetTagsResponse#next_page_token #next_page_token} => String
554
+ # * {Types::GetTagsResponse#tags #tags} => Array&lt;String&gt;
555
+ # * {Types::GetTagsResponse#return_size #return_size} => Integer
556
+ # * {Types::GetTagsResponse#total_size #total_size} => Integer
557
+ #
558
+ # @example Request syntax with placeholder values
559
+ #
560
+ # resp = client.get_tags({
561
+ # search_string: "SearchString",
562
+ # time_period: { # required
563
+ # start: "YearMonthDay", # required
564
+ # end: "YearMonthDay", # required
565
+ # },
566
+ # tag_key: "TagKey",
567
+ # next_page_token: "NextPageToken",
568
+ # })
569
+ #
570
+ # @example Response structure
571
+ #
572
+ # resp.next_page_token #=> String
573
+ # resp.tags #=> Array
574
+ # resp.tags[0] #=> String
575
+ # resp.return_size #=> Integer
576
+ # resp.total_size #=> Integer
577
+ #
578
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetTags AWS API Documentation
579
+ #
580
+ # @overload get_tags(params = {})
581
+ # @param [Hash] params ({})
582
+ def get_tags(params = {}, options = {})
583
+ req = build_request(:get_tags, params)
584
+ req.send_request(options)
585
+ end
586
+
587
+ # @!endgroup
588
+
589
+ # @param params ({})
590
+ # @api private
591
+ def build_request(operation_name, params = {})
592
+ handlers = @handlers.for(operation_name)
593
+ context = Seahorse::Client::RequestContext.new(
594
+ operation_name: operation_name,
595
+ operation: config.api.operation(operation_name),
596
+ client: self,
597
+ params: params,
598
+ config: config)
599
+ context[:gem_name] = 'aws-sdk-costexplorer'
600
+ context[:gem_version] = '1.0.0'
601
+ Seahorse::Client::Request.new(handlers, context)
602
+ end
603
+
604
+ # @api private
605
+ # @deprecated
606
+ def waiter_names
607
+ []
608
+ end
609
+
610
+ class << self
611
+
612
+ # @api private
613
+ attr_reader :identifier
614
+
615
+ # @api private
616
+ def errors_module
617
+ Errors
618
+ end
619
+
620
+ end
621
+ end
622
+ end