aws-sdk-costexplorer 1.95.0 → 1.96.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 787b6f57e5c4098bab9035a26bdca1c467f3336385bf26bb7b19c126f613d046
4
- data.tar.gz: af884acc5a6364d6a95f7fbedd3b2b44c260c3128abfa1f2181e405525896726
3
+ metadata.gz: 3fdd409a26c89a2394e1f677f2baa41de66ca907d3417a251dd662a05053f1b7
4
+ data.tar.gz: db264641a62cb382a9b6ab324b335099bb63c25a0ccbeb4c78e66d1da613f0ea
5
5
  SHA512:
6
- metadata.gz: b6df2e47c530b982b54feaccb5b505f7a49830a53e8f64c8f556ec284646b475ffa6b1a8e6548a97d49c01c31738f0f88f16157f62cf4237ab12af5b6551c5c0
7
- data.tar.gz: 9c95a6f271219d50060cd4d5b5a00a7e04b1cec11cce6364eb37bce7790f20ff688be57fc5970fe85066ce79f5b228ae24cc8e426b86b88067dd165e8982c258
6
+ metadata.gz: f0b82b6b18c6d083511abda764d438e8eb3677c5a9d73c18959cae738e975c63aa352a4e99fc2122158fc4c4537343a8c6473bad29b092abb8bd27101ae8783f
7
+ data.tar.gz: c275f3f46e6a7f9d04104bf3ad523182b48f255ee9da717757acdd34c38bfc664776fac20f94f6b36f91006e209cf6ebdc40e726480daddb440666d80e9241f2
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.96.0 (2024-02-28)
5
+ ------------------
6
+
7
+ * Feature - This release introduces the new API 'GetApproximateUsageRecords', which retrieves estimated usage records for hourly granularity or resource-level data at daily granularity.
8
+
4
9
  1.95.0 (2024-01-26)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.95.0
1
+ 1.96.0
@@ -1149,6 +1149,53 @@ module Aws::CostExplorer
1149
1149
  req.send_request(options)
1150
1150
  end
1151
1151
 
1152
+ # Retrieves estimated usage records for hourly granularity or
1153
+ # resource-level data at daily granularity.
1154
+ #
1155
+ # @option params [required, String] :granularity
1156
+ # How granular you want the data to be. You can enable data at hourly or
1157
+ # daily granularity.
1158
+ #
1159
+ # @option params [Array<String>] :services
1160
+ # The service metadata for the service or services you want to query. If
1161
+ # not specified, all elements are returned.
1162
+ #
1163
+ # @option params [required, String] :approximation_dimension
1164
+ # The service to evaluate for the usage records. You can choose
1165
+ # resource-level data at daily granularity, or hourly granularity with
1166
+ # or without resource-level data.
1167
+ #
1168
+ # @return [Types::GetApproximateUsageRecordsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1169
+ #
1170
+ # * {Types::GetApproximateUsageRecordsResponse#services #services} => Hash&lt;String,Integer&gt;
1171
+ # * {Types::GetApproximateUsageRecordsResponse#total_records #total_records} => Integer
1172
+ # * {Types::GetApproximateUsageRecordsResponse#lookback_period #lookback_period} => Types::DateInterval
1173
+ #
1174
+ # @example Request syntax with placeholder values
1175
+ #
1176
+ # resp = client.get_approximate_usage_records({
1177
+ # granularity: "DAILY", # required, accepts DAILY, MONTHLY, HOURLY
1178
+ # services: ["GenericString"],
1179
+ # approximation_dimension: "SERVICE", # required, accepts SERVICE, RESOURCE
1180
+ # })
1181
+ #
1182
+ # @example Response structure
1183
+ #
1184
+ # resp.services #=> Hash
1185
+ # resp.services["GenericString"] #=> Integer
1186
+ # resp.total_records #=> Integer
1187
+ # resp.lookback_period.start #=> String
1188
+ # resp.lookback_period.end #=> String
1189
+ #
1190
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetApproximateUsageRecords AWS API Documentation
1191
+ #
1192
+ # @overload get_approximate_usage_records(params = {})
1193
+ # @param [Hash] params ({})
1194
+ def get_approximate_usage_records(params = {}, options = {})
1195
+ req = build_request(:get_approximate_usage_records, params)
1196
+ req.send_request(options)
1197
+ end
1198
+
1152
1199
  # Retrieves cost and usage metrics for your account. You can specify
1153
1200
  # which cost and usage-related metric that you want the request to
1154
1201
  # return. For example, you can specify `BlendedCosts` or
@@ -5157,7 +5204,7 @@ module Aws::CostExplorer
5157
5204
  params: params,
5158
5205
  config: config)
5159
5206
  context[:gem_name] = 'aws-sdk-costexplorer'
5160
- context[:gem_version] = '1.95.0'
5207
+ context[:gem_version] = '1.96.0'
5161
5208
  Seahorse::Client::Request.new(handlers, context)
5162
5209
  end
5163
5210
 
@@ -26,6 +26,8 @@ module Aws::CostExplorer
26
26
  AnomalySubscription = Shapes::StructureShape.new(name: 'AnomalySubscription')
27
27
  AnomalySubscriptionFrequency = Shapes::StringShape.new(name: 'AnomalySubscriptionFrequency')
28
28
  AnomalySubscriptions = Shapes::ListShape.new(name: 'AnomalySubscriptions')
29
+ ApproximateUsageRecordsPerService = Shapes::MapShape.new(name: 'ApproximateUsageRecordsPerService')
30
+ ApproximationDimension = Shapes::StringShape.new(name: 'ApproximationDimension')
29
31
  Arn = Shapes::StringShape.new(name: 'Arn')
30
32
  AttributeType = Shapes::StringShape.new(name: 'AttributeType')
31
33
  AttributeValue = Shapes::StringShape.new(name: 'AttributeValue')
@@ -126,6 +128,8 @@ module Aws::CostExplorer
126
128
  GetAnomalyMonitorsResponse = Shapes::StructureShape.new(name: 'GetAnomalyMonitorsResponse')
127
129
  GetAnomalySubscriptionsRequest = Shapes::StructureShape.new(name: 'GetAnomalySubscriptionsRequest')
128
130
  GetAnomalySubscriptionsResponse = Shapes::StructureShape.new(name: 'GetAnomalySubscriptionsResponse')
131
+ GetApproximateUsageRecordsRequest = Shapes::StructureShape.new(name: 'GetApproximateUsageRecordsRequest')
132
+ GetApproximateUsageRecordsResponse = Shapes::StructureShape.new(name: 'GetApproximateUsageRecordsResponse')
129
133
  GetCostAndUsageRequest = Shapes::StructureShape.new(name: 'GetCostAndUsageRequest')
130
134
  GetCostAndUsageResponse = Shapes::StructureShape.new(name: 'GetCostAndUsageResponse')
131
135
  GetCostAndUsageWithResourcesRequest = Shapes::StructureShape.new(name: 'GetCostAndUsageWithResourcesRequest')
@@ -200,6 +204,7 @@ module Aws::CostExplorer
200
204
  NetworkResourceUtilization = Shapes::StructureShape.new(name: 'NetworkResourceUtilization')
201
205
  NextPageToken = Shapes::StringShape.new(name: 'NextPageToken')
202
206
  NonNegativeInteger = Shapes::IntegerShape.new(name: 'NonNegativeInteger')
207
+ NonNegativeLong = Shapes::IntegerShape.new(name: 'NonNegativeLong')
203
208
  NullableNonNegativeDouble = Shapes::FloatShape.new(name: 'NullableNonNegativeDouble')
204
209
  NumericOperator = Shapes::StringShape.new(name: 'NumericOperator')
205
210
  OfferingClass = Shapes::StringShape.new(name: 'OfferingClass')
@@ -331,6 +336,7 @@ module Aws::CostExplorer
331
336
  UpdateCostAllocationTagsStatusResponse = Shapes::StructureShape.new(name: 'UpdateCostAllocationTagsStatusResponse')
332
337
  UpdateCostCategoryDefinitionRequest = Shapes::StructureShape.new(name: 'UpdateCostCategoryDefinitionRequest')
333
338
  UpdateCostCategoryDefinitionResponse = Shapes::StructureShape.new(name: 'UpdateCostCategoryDefinitionResponse')
339
+ UsageServices = Shapes::ListShape.new(name: 'UsageServices')
334
340
  UtilizationByTime = Shapes::StructureShape.new(name: 'UtilizationByTime')
335
341
  UtilizationPercentage = Shapes::StringShape.new(name: 'UtilizationPercentage')
336
342
  UtilizationPercentageInUnits = Shapes::StringShape.new(name: 'UtilizationPercentageInUnits')
@@ -386,6 +392,9 @@ module Aws::CostExplorer
386
392
 
387
393
  AnomalySubscriptions.member = Shapes::ShapeRef.new(shape: AnomalySubscription)
388
394
 
395
+ ApproximateUsageRecordsPerService.key = Shapes::ShapeRef.new(shape: GenericString)
396
+ ApproximateUsageRecordsPerService.value = Shapes::ShapeRef.new(shape: NonNegativeLong)
397
+
389
398
  Attributes.key = Shapes::ShapeRef.new(shape: AttributeType)
390
399
  Attributes.value = Shapes::ShapeRef.new(shape: AttributeValue)
391
400
 
@@ -708,6 +717,16 @@ module Aws::CostExplorer
708
717
  GetAnomalySubscriptionsResponse.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
709
718
  GetAnomalySubscriptionsResponse.struct_class = Types::GetAnomalySubscriptionsResponse
710
719
 
720
+ GetApproximateUsageRecordsRequest.add_member(:granularity, Shapes::ShapeRef.new(shape: Granularity, required: true, location_name: "Granularity"))
721
+ GetApproximateUsageRecordsRequest.add_member(:services, Shapes::ShapeRef.new(shape: UsageServices, location_name: "Services"))
722
+ GetApproximateUsageRecordsRequest.add_member(:approximation_dimension, Shapes::ShapeRef.new(shape: ApproximationDimension, required: true, location_name: "ApproximationDimension"))
723
+ GetApproximateUsageRecordsRequest.struct_class = Types::GetApproximateUsageRecordsRequest
724
+
725
+ GetApproximateUsageRecordsResponse.add_member(:services, Shapes::ShapeRef.new(shape: ApproximateUsageRecordsPerService, location_name: "Services"))
726
+ GetApproximateUsageRecordsResponse.add_member(:total_records, Shapes::ShapeRef.new(shape: NonNegativeLong, location_name: "TotalRecords"))
727
+ GetApproximateUsageRecordsResponse.add_member(:lookback_period, Shapes::ShapeRef.new(shape: DateInterval, location_name: "LookbackPeriod"))
728
+ GetApproximateUsageRecordsResponse.struct_class = Types::GetApproximateUsageRecordsResponse
729
+
711
730
  GetCostAndUsageRequest.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, required: true, location_name: "TimePeriod"))
712
731
  GetCostAndUsageRequest.add_member(:granularity, Shapes::ShapeRef.new(shape: Granularity, required: true, location_name: "Granularity"))
713
732
  GetCostAndUsageRequest.add_member(:filter, Shapes::ShapeRef.new(shape: Expression, location_name: "Filter"))
@@ -1463,6 +1482,8 @@ module Aws::CostExplorer
1463
1482
  UpdateCostCategoryDefinitionResponse.add_member(:effective_start, Shapes::ShapeRef.new(shape: ZonedDateTime, location_name: "EffectiveStart"))
1464
1483
  UpdateCostCategoryDefinitionResponse.struct_class = Types::UpdateCostCategoryDefinitionResponse
1465
1484
 
1485
+ UsageServices.member = Shapes::ShapeRef.new(shape: GenericString)
1486
+
1466
1487
  UtilizationByTime.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, location_name: "TimePeriod"))
1467
1488
  UtilizationByTime.add_member(:groups, Shapes::ShapeRef.new(shape: ReservationUtilizationGroups, location_name: "Groups"))
1468
1489
  UtilizationByTime.add_member(:total, Shapes::ShapeRef.new(shape: ReservationAggregates, location_name: "Total"))
@@ -1593,6 +1614,16 @@ module Aws::CostExplorer
1593
1614
  o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
1594
1615
  end)
1595
1616
 
1617
+ api.add_operation(:get_approximate_usage_records, Seahorse::Model::Operation.new.tap do |o|
1618
+ o.name = "GetApproximateUsageRecords"
1619
+ o.http_method = "POST"
1620
+ o.http_request_uri = "/"
1621
+ o.input = Shapes::ShapeRef.new(shape: GetApproximateUsageRecordsRequest)
1622
+ o.output = Shapes::ShapeRef.new(shape: GetApproximateUsageRecordsResponse)
1623
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
1624
+ o.errors << Shapes::ShapeRef.new(shape: DataUnavailableException)
1625
+ end)
1626
+
1596
1627
  api.add_operation(:get_cost_and_usage, Seahorse::Model::Operation.new.tap do |o|
1597
1628
  o.name = "GetCostAndUsage"
1598
1629
  o.http_method = "POST"
@@ -152,6 +152,20 @@ module Aws::CostExplorer
152
152
  end
153
153
  end
154
154
 
155
+ class GetApproximateUsageRecords
156
+ def self.build(context)
157
+ unless context.config.regional_endpoint
158
+ endpoint = context.config.endpoint.to_s
159
+ end
160
+ Aws::CostExplorer::EndpointParameters.new(
161
+ region: context.config.region,
162
+ use_dual_stack: context.config.use_dualstack_endpoint,
163
+ use_fips: context.config.use_fips_endpoint,
164
+ endpoint: endpoint,
165
+ )
166
+ end
167
+ end
168
+
155
169
  class GetCostAndUsage
156
170
  def self.build(context)
157
171
  unless context.config.regional_endpoint
@@ -78,6 +78,8 @@ module Aws::CostExplorer
78
78
  Aws::CostExplorer::Endpoints::GetAnomalyMonitors.build(context)
79
79
  when :get_anomaly_subscriptions
80
80
  Aws::CostExplorer::Endpoints::GetAnomalySubscriptions.build(context)
81
+ when :get_approximate_usage_records
82
+ Aws::CostExplorer::Endpoints::GetApproximateUsageRecords.build(context)
81
83
  when :get_cost_and_usage
82
84
  Aws::CostExplorer::Endpoints::GetCostAndUsage.build(context)
83
85
  when :get_cost_and_usage_with_resources
@@ -2079,6 +2079,55 @@ module Aws::CostExplorer
2079
2079
  include Aws::Structure
2080
2080
  end
2081
2081
 
2082
+ # @!attribute [rw] granularity
2083
+ # How granular you want the data to be. You can enable data at hourly
2084
+ # or daily granularity.
2085
+ # @return [String]
2086
+ #
2087
+ # @!attribute [rw] services
2088
+ # The service metadata for the service or services you want to query.
2089
+ # If not specified, all elements are returned.
2090
+ # @return [Array<String>]
2091
+ #
2092
+ # @!attribute [rw] approximation_dimension
2093
+ # The service to evaluate for the usage records. You can choose
2094
+ # resource-level data at daily granularity, or hourly granularity with
2095
+ # or without resource-level data.
2096
+ # @return [String]
2097
+ #
2098
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetApproximateUsageRecordsRequest AWS API Documentation
2099
+ #
2100
+ class GetApproximateUsageRecordsRequest < Struct.new(
2101
+ :granularity,
2102
+ :services,
2103
+ :approximation_dimension)
2104
+ SENSITIVE = []
2105
+ include Aws::Structure
2106
+ end
2107
+
2108
+ # @!attribute [rw] services
2109
+ # The service metadata for the service or services in the response.
2110
+ # @return [Hash<String,Integer>]
2111
+ #
2112
+ # @!attribute [rw] total_records
2113
+ # The total number of usage records for all services in the services
2114
+ # list.
2115
+ # @return [Integer]
2116
+ #
2117
+ # @!attribute [rw] lookback_period
2118
+ # The lookback period that's used for the estimation.
2119
+ # @return [Types::DateInterval]
2120
+ #
2121
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetApproximateUsageRecordsResponse AWS API Documentation
2122
+ #
2123
+ class GetApproximateUsageRecordsResponse < Struct.new(
2124
+ :services,
2125
+ :total_records,
2126
+ :lookback_period)
2127
+ SENSITIVE = []
2128
+ include Aws::Structure
2129
+ end
2130
+
2082
2131
  # @!attribute [rw] time_period
2083
2132
  # Sets the start date and end date for retrieving Amazon Web Services
2084
2133
  # costs. The start date is inclusive, but the end date is exclusive.
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-costexplorer/customizations'
52
52
  # @!group service
53
53
  module Aws::CostExplorer
54
54
 
55
- GEM_VERSION = '1.95.0'
55
+ GEM_VERSION = '1.96.0'
56
56
 
57
57
  end
data/sig/client.rbs CHANGED
@@ -333,6 +333,20 @@ module Aws
333
333
  ) -> _GetAnomalySubscriptionsResponseSuccess
334
334
  | (?Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetAnomalySubscriptionsResponseSuccess
335
335
 
336
+ interface _GetApproximateUsageRecordsResponseSuccess
337
+ include ::Seahorse::Client::_ResponseSuccess[Types::GetApproximateUsageRecordsResponse]
338
+ def services: () -> ::Hash[::String, ::Integer]
339
+ def total_records: () -> ::Integer
340
+ def lookback_period: () -> Types::DateInterval
341
+ end
342
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CostExplorer/Client.html#get_approximate_usage_records-instance_method
343
+ def get_approximate_usage_records: (
344
+ granularity: ("DAILY" | "MONTHLY" | "HOURLY"),
345
+ ?services: Array[::String],
346
+ approximation_dimension: ("SERVICE" | "RESOURCE")
347
+ ) -> _GetApproximateUsageRecordsResponseSuccess
348
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetApproximateUsageRecordsResponseSuccess
349
+
336
350
  interface _GetCostAndUsageResponseSuccess
337
351
  include ::Seahorse::Client::_ResponseSuccess[Types::GetCostAndUsageResponse]
338
352
  def next_page_token: () -> ::String
data/sig/types.rbs CHANGED
@@ -445,6 +445,20 @@ module Aws::CostExplorer
445
445
  SENSITIVE: []
446
446
  end
447
447
 
448
+ class GetApproximateUsageRecordsRequest
449
+ attr_accessor granularity: ("DAILY" | "MONTHLY" | "HOURLY")
450
+ attr_accessor services: ::Array[::String]
451
+ attr_accessor approximation_dimension: ("SERVICE" | "RESOURCE")
452
+ SENSITIVE: []
453
+ end
454
+
455
+ class GetApproximateUsageRecordsResponse
456
+ attr_accessor services: ::Hash[::String, ::Integer]
457
+ attr_accessor total_records: ::Integer
458
+ attr_accessor lookback_period: Types::DateInterval
459
+ SENSITIVE: []
460
+ end
461
+
448
462
  class GetCostAndUsageRequest
449
463
  attr_accessor time_period: Types::DateInterval
450
464
  attr_accessor granularity: ("DAILY" | "MONTHLY" | "HOURLY")
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.95.0
4
+ version: 1.96.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: 2024-01-26 00:00:00.000000000 Z
11
+ date: 2024-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core