aws-sdk-costexplorer 1.26.0 → 1.27.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e9c9fd9afbc201ac00c1603a73a0b52b053111d2
4
- data.tar.gz: d04a8b4f144ee4ad8881a6aa10ba6fa81e33b219
3
+ metadata.gz: e16f1050824d5d201ed443d6c3f4124856bafde4
4
+ data.tar.gz: 7386405acc2d198edf0ab04777bb3c4b56c1185e
5
5
  SHA512:
6
- metadata.gz: dc9c0ac8e95172ecaebfa1ad9679ff5381f69670f69683671213423dc9abe9cc86717e977f8680ddbc9c5d451bb27d725cb974a4cc5edc7b054d95b497e97c63
7
- data.tar.gz: 1da613748501dcb8949a8aeb5cc9f691a788547e5c8e9202d0112109ff8ceefb488939656b19c1fd3bd45a19f081f643e83145f6b982fe388dc8580df4d99814
6
+ metadata.gz: 41ab766d9983ce7297ef14018da0cef1f71fc2d0e9685736db96966edf2de6b80f24931a2652c6a06dc6c09e33ceab457489664e1fa58923af8ed4184715e29b
7
+ data.tar.gz: 01a52f60d50e672872a3ccd25fc3041787de4b0eb8f40636a5da9fcddbc0dd429b98f09d6c221d8c8fd6120b256c22f582e93455cb194f1a31d443743a293b97
@@ -42,6 +42,6 @@ require_relative 'aws-sdk-costexplorer/customizations'
42
42
  # @service
43
43
  module Aws::CostExplorer
44
44
 
45
- GEM_VERSION = '1.26.0'
45
+ GEM_VERSION = '1.27.0'
46
46
 
47
47
  end
@@ -434,15 +434,15 @@ module Aws::CostExplorer
434
434
  #
435
435
  # Valid values for a `GetCostForecast` call are the following:
436
436
  #
437
- # * AmortizedCost
437
+ # * AMORTIZED\_COST
438
438
  #
439
- # * BlendedCost
439
+ # * BLENDED\_COST
440
440
  #
441
- # * NetAmortizedCost
441
+ # * NET\_AMORTIZED\_COST
442
442
  #
443
- # * NetUnblendedCost
443
+ # * NET\_UNBLENDED\_COST
444
444
  #
445
- # * UnblendedCost
445
+ # * UNBLENDED\_COST
446
446
  #
447
447
  #
448
448
  #
@@ -1287,6 +1287,106 @@ module Aws::CostExplorer
1287
1287
  req.send_request(options)
1288
1288
  end
1289
1289
 
1290
+ # Retrieves a forecast for how much Amazon Web Services predicts that
1291
+ # you will use over the forecast time period that you select, based on
1292
+ # your past usage.
1293
+ #
1294
+ # @option params [required, Types::DateInterval] :time_period
1295
+ # The start and end dates of the period that you want to retrieve usage
1296
+ # forecast for. The start date is inclusive, but the end date is
1297
+ # exclusive. For example, if `start` is `2017-01-01` and `end` is
1298
+ # `2017-05-01`, then the cost and usage data is retrieved from
1299
+ # `2017-01-01` up to and including `2017-04-30` but not including
1300
+ # `2017-05-01`.
1301
+ #
1302
+ # @option params [required, String] :metric
1303
+ # Which metric Cost Explorer uses to create your forecast.
1304
+ #
1305
+ # Valid values for a `GetUsageForecast` call are the following:
1306
+ #
1307
+ # * USAGE\_QUANTITY
1308
+ #
1309
+ # * NORMALIZED\_USAGE\_AMOUNT
1310
+ #
1311
+ # @option params [required, String] :granularity
1312
+ # How granular you want the forecast to be. You can get 3 months of
1313
+ # `DAILY` forecasts or 12 months of `MONTHLY` forecasts.
1314
+ #
1315
+ # The `GetUsageForecast` operation supports only `DAILY` and `MONTHLY`
1316
+ # granularities.
1317
+ #
1318
+ # @option params [Types::Expression] :filter
1319
+ # The filters that you want to use to filter your forecast. Cost
1320
+ # Explorer API supports all of the Cost Explorer filters.
1321
+ #
1322
+ # @option params [Integer] :prediction_interval_level
1323
+ # Cost Explorer always returns the mean forecast as a single point. You
1324
+ # can request a prediction interval around the mean by specifying a
1325
+ # confidence level. The higher the confidence level, the more confident
1326
+ # Cost Explorer is about the actual value falling in the prediction
1327
+ # interval. Higher confidence levels result in wider prediction
1328
+ # intervals.
1329
+ #
1330
+ # @return [Types::GetUsageForecastResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1331
+ #
1332
+ # * {Types::GetUsageForecastResponse#total #total} => Types::MetricValue
1333
+ # * {Types::GetUsageForecastResponse#forecast_results_by_time #forecast_results_by_time} => Array<Types::ForecastResult>
1334
+ #
1335
+ # @example Request syntax with placeholder values
1336
+ #
1337
+ # resp = client.get_usage_forecast({
1338
+ # time_period: { # required
1339
+ # start: "YearMonthDay", # required
1340
+ # end: "YearMonthDay", # required
1341
+ # },
1342
+ # metric: "BLENDED_COST", # required, accepts BLENDED_COST, UNBLENDED_COST, AMORTIZED_COST, NET_UNBLENDED_COST, NET_AMORTIZED_COST, USAGE_QUANTITY, NORMALIZED_USAGE_AMOUNT
1343
+ # granularity: "DAILY", # required, accepts DAILY, MONTHLY, HOURLY
1344
+ # filter: {
1345
+ # or: [
1346
+ # {
1347
+ # # recursive Expression
1348
+ # },
1349
+ # ],
1350
+ # and: [
1351
+ # {
1352
+ # # recursive Expression
1353
+ # },
1354
+ # ],
1355
+ # not: {
1356
+ # # recursive Expression
1357
+ # },
1358
+ # dimensions: {
1359
+ # 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, LEGAL_ENTITY_NAME, DEPLOYMENT_OPTION, DATABASE_ENGINE, CACHE_ENGINE, INSTANCE_TYPE_FAMILY, BILLING_ENTITY, RESERVATION_ID
1360
+ # values: ["Value"],
1361
+ # },
1362
+ # tags: {
1363
+ # key: "TagKey",
1364
+ # values: ["Value"],
1365
+ # },
1366
+ # },
1367
+ # prediction_interval_level: 1,
1368
+ # })
1369
+ #
1370
+ # @example Response structure
1371
+ #
1372
+ # resp.total.amount #=> String
1373
+ # resp.total.unit #=> String
1374
+ # resp.forecast_results_by_time #=> Array
1375
+ # resp.forecast_results_by_time[0].time_period.start #=> String
1376
+ # resp.forecast_results_by_time[0].time_period.end #=> String
1377
+ # resp.forecast_results_by_time[0].mean_value #=> String
1378
+ # resp.forecast_results_by_time[0].prediction_interval_lower_bound #=> String
1379
+ # resp.forecast_results_by_time[0].prediction_interval_upper_bound #=> String
1380
+ #
1381
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetUsageForecast AWS API Documentation
1382
+ #
1383
+ # @overload get_usage_forecast(params = {})
1384
+ # @param [Hash] params ({})
1385
+ def get_usage_forecast(params = {}, options = {})
1386
+ req = build_request(:get_usage_forecast, params)
1387
+ req.send_request(options)
1388
+ end
1389
+
1290
1390
  # @!endgroup
1291
1391
 
1292
1392
  # @param params ({})
@@ -1300,7 +1400,7 @@ module Aws::CostExplorer
1300
1400
  params: params,
1301
1401
  config: config)
1302
1402
  context[:gem_name] = 'aws-sdk-costexplorer'
1303
- context[:gem_version] = '1.26.0'
1403
+ context[:gem_version] = '1.27.0'
1304
1404
  Seahorse::Client::Request.new(handlers, context)
1305
1405
  end
1306
1406
 
@@ -60,6 +60,8 @@ module Aws::CostExplorer
60
60
  GetReservationUtilizationResponse = Shapes::StructureShape.new(name: 'GetReservationUtilizationResponse')
61
61
  GetTagsRequest = Shapes::StructureShape.new(name: 'GetTagsRequest')
62
62
  GetTagsResponse = Shapes::StructureShape.new(name: 'GetTagsResponse')
63
+ GetUsageForecastRequest = Shapes::StructureShape.new(name: 'GetUsageForecastRequest')
64
+ GetUsageForecastResponse = Shapes::StructureShape.new(name: 'GetUsageForecastResponse')
63
65
  Granularity = Shapes::StringShape.new(name: 'Granularity')
64
66
  Group = Shapes::StructureShape.new(name: 'Group')
65
67
  GroupDefinition = Shapes::StructureShape.new(name: 'GroupDefinition')
@@ -125,6 +127,7 @@ module Aws::CostExplorer
125
127
  TotalPotentialRISavings = Shapes::StringShape.new(name: 'TotalPotentialRISavings')
126
128
  TotalRunningHours = Shapes::StringShape.new(name: 'TotalRunningHours')
127
129
  TotalRunningNormalizedUnits = Shapes::StringShape.new(name: 'TotalRunningNormalizedUnits')
130
+ UnresolvableUsageUnitException = Shapes::StructureShape.new(name: 'UnresolvableUsageUnitException')
128
131
  UnusedHours = Shapes::StringShape.new(name: 'UnusedHours')
129
132
  UnusedUnits = Shapes::StringShape.new(name: 'UnusedUnits')
130
133
  UtilizationByTime = Shapes::StructureShape.new(name: 'UtilizationByTime')
@@ -320,6 +323,17 @@ module Aws::CostExplorer
320
323
  GetTagsResponse.add_member(:total_size, Shapes::ShapeRef.new(shape: PageSize, required: true, location_name: "TotalSize"))
321
324
  GetTagsResponse.struct_class = Types::GetTagsResponse
322
325
 
326
+ GetUsageForecastRequest.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, required: true, location_name: "TimePeriod"))
327
+ GetUsageForecastRequest.add_member(:metric, Shapes::ShapeRef.new(shape: Metric, required: true, location_name: "Metric"))
328
+ GetUsageForecastRequest.add_member(:granularity, Shapes::ShapeRef.new(shape: Granularity, required: true, location_name: "Granularity"))
329
+ GetUsageForecastRequest.add_member(:filter, Shapes::ShapeRef.new(shape: Expression, location_name: "Filter"))
330
+ GetUsageForecastRequest.add_member(:prediction_interval_level, Shapes::ShapeRef.new(shape: PredictionIntervalLevel, location_name: "PredictionIntervalLevel"))
331
+ GetUsageForecastRequest.struct_class = Types::GetUsageForecastRequest
332
+
333
+ GetUsageForecastResponse.add_member(:total, Shapes::ShapeRef.new(shape: MetricValue, location_name: "Total"))
334
+ GetUsageForecastResponse.add_member(:forecast_results_by_time, Shapes::ShapeRef.new(shape: ForecastResultsByTime, location_name: "ForecastResultsByTime"))
335
+ GetUsageForecastResponse.struct_class = Types::GetUsageForecastResponse
336
+
323
337
  Group.add_member(:keys, Shapes::ShapeRef.new(shape: Keys, location_name: "Keys"))
324
338
  Group.add_member(:metrics, Shapes::ShapeRef.new(shape: Metrics, location_name: "Metrics"))
325
339
  Group.struct_class = Types::Group
@@ -467,6 +481,9 @@ module Aws::CostExplorer
467
481
  TagValues.add_member(:values, Shapes::ShapeRef.new(shape: Values, location_name: "Values"))
468
482
  TagValues.struct_class = Types::TagValues
469
483
 
484
+ UnresolvableUsageUnitException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
485
+ UnresolvableUsageUnitException.struct_class = Types::UnresolvableUsageUnitException
486
+
470
487
  UtilizationByTime.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, location_name: "TimePeriod"))
471
488
  UtilizationByTime.add_member(:groups, Shapes::ShapeRef.new(shape: ReservationUtilizationGroups, location_name: "Groups"))
472
489
  UtilizationByTime.add_member(:total, Shapes::ShapeRef.new(shape: ReservationAggregates, location_name: "Total"))
@@ -577,6 +594,17 @@ module Aws::CostExplorer
577
594
  o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
578
595
  o.errors << Shapes::ShapeRef.new(shape: RequestChangedException)
579
596
  end)
597
+
598
+ api.add_operation(:get_usage_forecast, Seahorse::Model::Operation.new.tap do |o|
599
+ o.name = "GetUsageForecast"
600
+ o.http_method = "POST"
601
+ o.http_request_uri = "/"
602
+ o.input = Shapes::ShapeRef.new(shape: GetUsageForecastRequest)
603
+ o.output = Shapes::ShapeRef.new(shape: GetUsageForecastResponse)
604
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
605
+ o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
606
+ o.errors << Shapes::ShapeRef.new(shape: UnresolvableUsageUnitException)
607
+ end)
580
608
  end
581
609
 
582
610
  end
@@ -90,5 +90,21 @@ module Aws::CostExplorer
90
90
 
91
91
  end
92
92
 
93
+ class UnresolvableUsageUnitException < ServiceError
94
+
95
+ # @param [Seahorse::Client::RequestContext] context
96
+ # @param [String] message
97
+ # @param [Aws::CostExplorer::Types::UnresolvableUsageUnitException] data
98
+ def initialize(context, message, data = Aws::EmptyStructure.new)
99
+ super(context, message, data)
100
+ end
101
+
102
+ # @return [String]
103
+ def message
104
+ @message || @data[:message]
105
+ end
106
+
107
+ end
108
+
93
109
  end
94
110
  end
@@ -774,15 +774,15 @@ module Aws::CostExplorer
774
774
  #
775
775
  # Valid values for a `GetCostForecast` call are the following:
776
776
  #
777
- # * AmortizedCost
777
+ # * AMORTIZED\_COST
778
778
  #
779
- # * BlendedCost
779
+ # * BLENDED\_COST
780
780
  #
781
- # * NetAmortizedCost
781
+ # * NET\_AMORTIZED\_COST
782
782
  #
783
- # * NetUnblendedCost
783
+ # * NET\_UNBLENDED\_COST
784
784
  #
785
- # * UnblendedCost
785
+ # * UNBLENDED\_COST
786
786
  #
787
787
  #
788
788
  #
@@ -1576,6 +1576,112 @@ module Aws::CostExplorer
1576
1576
  include Aws::Structure
1577
1577
  end
1578
1578
 
1579
+ # @note When making an API call, you may pass GetUsageForecastRequest
1580
+ # data as a hash:
1581
+ #
1582
+ # {
1583
+ # time_period: { # required
1584
+ # start: "YearMonthDay", # required
1585
+ # end: "YearMonthDay", # required
1586
+ # },
1587
+ # metric: "BLENDED_COST", # required, accepts BLENDED_COST, UNBLENDED_COST, AMORTIZED_COST, NET_UNBLENDED_COST, NET_AMORTIZED_COST, USAGE_QUANTITY, NORMALIZED_USAGE_AMOUNT
1588
+ # granularity: "DAILY", # required, accepts DAILY, MONTHLY, HOURLY
1589
+ # filter: {
1590
+ # or: [
1591
+ # {
1592
+ # # recursive Expression
1593
+ # },
1594
+ # ],
1595
+ # and: [
1596
+ # {
1597
+ # # recursive Expression
1598
+ # },
1599
+ # ],
1600
+ # not: {
1601
+ # # recursive Expression
1602
+ # },
1603
+ # dimensions: {
1604
+ # 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, LEGAL_ENTITY_NAME, DEPLOYMENT_OPTION, DATABASE_ENGINE, CACHE_ENGINE, INSTANCE_TYPE_FAMILY, BILLING_ENTITY, RESERVATION_ID
1605
+ # values: ["Value"],
1606
+ # },
1607
+ # tags: {
1608
+ # key: "TagKey",
1609
+ # values: ["Value"],
1610
+ # },
1611
+ # },
1612
+ # prediction_interval_level: 1,
1613
+ # }
1614
+ #
1615
+ # @!attribute [rw] time_period
1616
+ # The start and end dates of the period that you want to retrieve
1617
+ # usage forecast for. The start date is inclusive, but the end date is
1618
+ # exclusive. For example, if `start` is `2017-01-01` and `end` is
1619
+ # `2017-05-01`, then the cost and usage data is retrieved from
1620
+ # `2017-01-01` up to and including `2017-04-30` but not including
1621
+ # `2017-05-01`.
1622
+ # @return [Types::DateInterval]
1623
+ #
1624
+ # @!attribute [rw] metric
1625
+ # Which metric Cost Explorer uses to create your forecast.
1626
+ #
1627
+ # Valid values for a `GetUsageForecast` call are the following:
1628
+ #
1629
+ # * USAGE\_QUANTITY
1630
+ #
1631
+ # * NORMALIZED\_USAGE\_AMOUNT
1632
+ # @return [String]
1633
+ #
1634
+ # @!attribute [rw] granularity
1635
+ # How granular you want the forecast to be. You can get 3 months of
1636
+ # `DAILY` forecasts or 12 months of `MONTHLY` forecasts.
1637
+ #
1638
+ # The `GetUsageForecast` operation supports only `DAILY` and `MONTHLY`
1639
+ # granularities.
1640
+ # @return [String]
1641
+ #
1642
+ # @!attribute [rw] filter
1643
+ # The filters that you want to use to filter your forecast. Cost
1644
+ # Explorer API supports all of the Cost Explorer filters.
1645
+ # @return [Types::Expression]
1646
+ #
1647
+ # @!attribute [rw] prediction_interval_level
1648
+ # Cost Explorer always returns the mean forecast as a single point.
1649
+ # You can request a prediction interval around the mean by specifying
1650
+ # a confidence level. The higher the confidence level, the more
1651
+ # confident Cost Explorer is about the actual value falling in the
1652
+ # prediction interval. Higher confidence levels result in wider
1653
+ # prediction intervals.
1654
+ # @return [Integer]
1655
+ #
1656
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetUsageForecastRequest AWS API Documentation
1657
+ #
1658
+ class GetUsageForecastRequest < Struct.new(
1659
+ :time_period,
1660
+ :metric,
1661
+ :granularity,
1662
+ :filter,
1663
+ :prediction_interval_level)
1664
+ include Aws::Structure
1665
+ end
1666
+
1667
+ # @!attribute [rw] total
1668
+ # How much you're forecasted to use over the forecast period.
1669
+ # @return [Types::MetricValue]
1670
+ #
1671
+ # @!attribute [rw] forecast_results_by_time
1672
+ # The forecasts for your query, in order. For `DAILY` forecasts, this
1673
+ # is a list of days. For `MONTHLY` forecasts, this is a list of
1674
+ # months.
1675
+ # @return [Array<Types::ForecastResult>]
1676
+ #
1677
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetUsageForecastResponse AWS API Documentation
1678
+ #
1679
+ class GetUsageForecastResponse < Struct.new(
1680
+ :total,
1681
+ :forecast_results_by_time)
1682
+ include Aws::Structure
1683
+ end
1684
+
1579
1685
  # One level of grouped data in the results.
1580
1686
  #
1581
1687
  # @!attribute [rw] keys
@@ -2232,6 +2338,20 @@ module Aws::CostExplorer
2232
2338
  include Aws::Structure
2233
2339
  end
2234
2340
 
2341
+ # Cost Explorer was unable to identify the usage unit. Provide
2342
+ # `UsageType/UsageTypeGroup` filter selections that contain matching
2343
+ # units, for example: `hours`.(
2344
+ #
2345
+ # @!attribute [rw] message
2346
+ # @return [String]
2347
+ #
2348
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/UnresolvableUsageUnitException AWS API Documentation
2349
+ #
2350
+ class UnresolvableUsageUnitException < Struct.new(
2351
+ :message)
2352
+ include Aws::Structure
2353
+ end
2354
+
2235
2355
  # The amount of utilization, in hours.
2236
2356
  #
2237
2357
  # @!attribute [rw] time_period
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-costexplorer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.26.0
4
+ version: 1.27.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: 2019-07-01 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core