aws-sdk-costexplorer 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.
@@ -0,0 +1,265 @@
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::CostExplorer
9
+ # @api private
10
+ module ClientApi
11
+
12
+ include Seahorse::Model
13
+
14
+ AttributeType = Shapes::StringShape.new(name: 'AttributeType')
15
+ AttributeValue = Shapes::StringShape.new(name: 'AttributeValue')
16
+ Attributes = Shapes::MapShape.new(name: 'Attributes')
17
+ Context = Shapes::StringShape.new(name: 'Context')
18
+ DateInterval = Shapes::StructureShape.new(name: 'DateInterval')
19
+ Dimension = Shapes::StringShape.new(name: 'Dimension')
20
+ DimensionValues = Shapes::StructureShape.new(name: 'DimensionValues')
21
+ DimensionValuesWithAttributes = Shapes::StructureShape.new(name: 'DimensionValuesWithAttributes')
22
+ DimensionValuesWithAttributesList = Shapes::ListShape.new(name: 'DimensionValuesWithAttributesList')
23
+ Entity = Shapes::StringShape.new(name: 'Entity')
24
+ ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
25
+ Estimated = Shapes::BooleanShape.new(name: 'Estimated')
26
+ Expression = Shapes::StructureShape.new(name: 'Expression')
27
+ Expressions = Shapes::ListShape.new(name: 'Expressions')
28
+ GetCostAndUsageRequest = Shapes::StructureShape.new(name: 'GetCostAndUsageRequest')
29
+ GetCostAndUsageResponse = Shapes::StructureShape.new(name: 'GetCostAndUsageResponse')
30
+ GetDimensionValuesRequest = Shapes::StructureShape.new(name: 'GetDimensionValuesRequest')
31
+ GetDimensionValuesResponse = Shapes::StructureShape.new(name: 'GetDimensionValuesResponse')
32
+ GetReservationUtilizationRequest = Shapes::StructureShape.new(name: 'GetReservationUtilizationRequest')
33
+ GetReservationUtilizationResponse = Shapes::StructureShape.new(name: 'GetReservationUtilizationResponse')
34
+ GetTagsRequest = Shapes::StructureShape.new(name: 'GetTagsRequest')
35
+ GetTagsResponse = Shapes::StructureShape.new(name: 'GetTagsResponse')
36
+ Granularity = Shapes::StringShape.new(name: 'Granularity')
37
+ Group = Shapes::StructureShape.new(name: 'Group')
38
+ GroupDefinition = Shapes::StructureShape.new(name: 'GroupDefinition')
39
+ GroupDefinitionKey = Shapes::StringShape.new(name: 'GroupDefinitionKey')
40
+ GroupDefinitionType = Shapes::StringShape.new(name: 'GroupDefinitionType')
41
+ GroupDefinitions = Shapes::ListShape.new(name: 'GroupDefinitions')
42
+ Groups = Shapes::ListShape.new(name: 'Groups')
43
+ Key = Shapes::StringShape.new(name: 'Key')
44
+ Keys = Shapes::ListShape.new(name: 'Keys')
45
+ LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
46
+ MetricAmount = Shapes::StringShape.new(name: 'MetricAmount')
47
+ MetricName = Shapes::StringShape.new(name: 'MetricName')
48
+ MetricNames = Shapes::ListShape.new(name: 'MetricNames')
49
+ MetricUnit = Shapes::StringShape.new(name: 'MetricUnit')
50
+ MetricValue = Shapes::StructureShape.new(name: 'MetricValue')
51
+ Metrics = Shapes::MapShape.new(name: 'Metrics')
52
+ NextPageToken = Shapes::StringShape.new(name: 'NextPageToken')
53
+ PageSize = Shapes::IntegerShape.new(name: 'PageSize')
54
+ PurchasedHours = Shapes::StringShape.new(name: 'PurchasedHours')
55
+ ReservationAggregates = Shapes::StructureShape.new(name: 'ReservationAggregates')
56
+ ReservationGroupKey = Shapes::StringShape.new(name: 'ReservationGroupKey')
57
+ ReservationGroupValue = Shapes::StringShape.new(name: 'ReservationGroupValue')
58
+ ReservationUtilizationGroup = Shapes::StructureShape.new(name: 'ReservationUtilizationGroup')
59
+ ReservationUtilizationGroups = Shapes::ListShape.new(name: 'ReservationUtilizationGroups')
60
+ ResultByTime = Shapes::StructureShape.new(name: 'ResultByTime')
61
+ ResultsByTime = Shapes::ListShape.new(name: 'ResultsByTime')
62
+ SearchString = Shapes::StringShape.new(name: 'SearchString')
63
+ TagKey = Shapes::StringShape.new(name: 'TagKey')
64
+ TagList = Shapes::ListShape.new(name: 'TagList')
65
+ TagValues = Shapes::StructureShape.new(name: 'TagValues')
66
+ TotalActualHours = Shapes::StringShape.new(name: 'TotalActualHours')
67
+ UnusedHours = Shapes::StringShape.new(name: 'UnusedHours')
68
+ UtilizationByTime = Shapes::StructureShape.new(name: 'UtilizationByTime')
69
+ UtilizationPercentage = Shapes::StringShape.new(name: 'UtilizationPercentage')
70
+ UtilizationsByTime = Shapes::ListShape.new(name: 'UtilizationsByTime')
71
+ Value = Shapes::StringShape.new(name: 'Value')
72
+ Values = Shapes::ListShape.new(name: 'Values')
73
+ YearMonthDay = Shapes::StringShape.new(name: 'YearMonthDay')
74
+
75
+ Attributes.key = Shapes::ShapeRef.new(shape: AttributeType)
76
+ Attributes.value = Shapes::ShapeRef.new(shape: AttributeValue)
77
+
78
+ DateInterval.add_member(:start, Shapes::ShapeRef.new(shape: YearMonthDay, required: true, location_name: "Start"))
79
+ DateInterval.add_member(:end, Shapes::ShapeRef.new(shape: YearMonthDay, required: true, location_name: "End"))
80
+ DateInterval.struct_class = Types::DateInterval
81
+
82
+ DimensionValues.add_member(:key, Shapes::ShapeRef.new(shape: Dimension, location_name: "Key"))
83
+ DimensionValues.add_member(:values, Shapes::ShapeRef.new(shape: Values, location_name: "Values"))
84
+ DimensionValues.struct_class = Types::DimensionValues
85
+
86
+ DimensionValuesWithAttributes.add_member(:value, Shapes::ShapeRef.new(shape: Value, location_name: "Value"))
87
+ DimensionValuesWithAttributes.add_member(:attributes, Shapes::ShapeRef.new(shape: Attributes, location_name: "Attributes"))
88
+ DimensionValuesWithAttributes.struct_class = Types::DimensionValuesWithAttributes
89
+
90
+ DimensionValuesWithAttributesList.member = Shapes::ShapeRef.new(shape: DimensionValuesWithAttributes)
91
+
92
+ Expression.add_member(:or, Shapes::ShapeRef.new(shape: Expressions, location_name: "Or"))
93
+ Expression.add_member(:and, Shapes::ShapeRef.new(shape: Expressions, location_name: "And"))
94
+ Expression.add_member(:not, Shapes::ShapeRef.new(shape: Expression, location_name: "Not"))
95
+ Expression.add_member(:dimensions, Shapes::ShapeRef.new(shape: DimensionValues, location_name: "Dimensions"))
96
+ Expression.add_member(:tags, Shapes::ShapeRef.new(shape: TagValues, location_name: "Tags"))
97
+ Expression.struct_class = Types::Expression
98
+
99
+ Expressions.member = Shapes::ShapeRef.new(shape: Expression)
100
+
101
+ GetCostAndUsageRequest.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, location_name: "TimePeriod"))
102
+ GetCostAndUsageRequest.add_member(:granularity, Shapes::ShapeRef.new(shape: Granularity, location_name: "Granularity"))
103
+ GetCostAndUsageRequest.add_member(:filter, Shapes::ShapeRef.new(shape: Expression, location_name: "Filter"))
104
+ GetCostAndUsageRequest.add_member(:metrics, Shapes::ShapeRef.new(shape: MetricNames, location_name: "Metrics"))
105
+ GetCostAndUsageRequest.add_member(:group_by, Shapes::ShapeRef.new(shape: GroupDefinitions, location_name: "GroupBy"))
106
+ GetCostAndUsageRequest.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
107
+ GetCostAndUsageRequest.struct_class = Types::GetCostAndUsageRequest
108
+
109
+ GetCostAndUsageResponse.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
110
+ GetCostAndUsageResponse.add_member(:group_definitions, Shapes::ShapeRef.new(shape: GroupDefinitions, location_name: "GroupDefinitions"))
111
+ GetCostAndUsageResponse.add_member(:results_by_time, Shapes::ShapeRef.new(shape: ResultsByTime, location_name: "ResultsByTime"))
112
+ GetCostAndUsageResponse.struct_class = Types::GetCostAndUsageResponse
113
+
114
+ GetDimensionValuesRequest.add_member(:search_string, Shapes::ShapeRef.new(shape: SearchString, location_name: "SearchString"))
115
+ GetDimensionValuesRequest.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, required: true, location_name: "TimePeriod"))
116
+ GetDimensionValuesRequest.add_member(:dimension, Shapes::ShapeRef.new(shape: Dimension, required: true, location_name: "Dimension"))
117
+ GetDimensionValuesRequest.add_member(:context, Shapes::ShapeRef.new(shape: Context, location_name: "Context"))
118
+ GetDimensionValuesRequest.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
119
+ GetDimensionValuesRequest.struct_class = Types::GetDimensionValuesRequest
120
+
121
+ GetDimensionValuesResponse.add_member(:dimension_values, Shapes::ShapeRef.new(shape: DimensionValuesWithAttributesList, required: true, location_name: "DimensionValues"))
122
+ GetDimensionValuesResponse.add_member(:return_size, Shapes::ShapeRef.new(shape: PageSize, required: true, location_name: "ReturnSize"))
123
+ GetDimensionValuesResponse.add_member(:total_size, Shapes::ShapeRef.new(shape: PageSize, required: true, location_name: "TotalSize"))
124
+ GetDimensionValuesResponse.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
125
+ GetDimensionValuesResponse.struct_class = Types::GetDimensionValuesResponse
126
+
127
+ GetReservationUtilizationRequest.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, required: true, location_name: "TimePeriod"))
128
+ GetReservationUtilizationRequest.add_member(:group_by, Shapes::ShapeRef.new(shape: GroupDefinitions, location_name: "GroupBy"))
129
+ GetReservationUtilizationRequest.add_member(:granularity, Shapes::ShapeRef.new(shape: Granularity, location_name: "Granularity"))
130
+ GetReservationUtilizationRequest.add_member(:filter, Shapes::ShapeRef.new(shape: Expression, location_name: "Filter"))
131
+ GetReservationUtilizationRequest.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
132
+ GetReservationUtilizationRequest.struct_class = Types::GetReservationUtilizationRequest
133
+
134
+ GetReservationUtilizationResponse.add_member(:utilizations_by_time, Shapes::ShapeRef.new(shape: UtilizationsByTime, required: true, location_name: "UtilizationsByTime"))
135
+ GetReservationUtilizationResponse.add_member(:total, Shapes::ShapeRef.new(shape: ReservationAggregates, location_name: "Total"))
136
+ GetReservationUtilizationResponse.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
137
+ GetReservationUtilizationResponse.struct_class = Types::GetReservationUtilizationResponse
138
+
139
+ GetTagsRequest.add_member(:search_string, Shapes::ShapeRef.new(shape: SearchString, location_name: "SearchString"))
140
+ GetTagsRequest.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, required: true, location_name: "TimePeriod"))
141
+ GetTagsRequest.add_member(:tag_key, Shapes::ShapeRef.new(shape: TagKey, location_name: "TagKey"))
142
+ GetTagsRequest.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
143
+ GetTagsRequest.struct_class = Types::GetTagsRequest
144
+
145
+ GetTagsResponse.add_member(:next_page_token, Shapes::ShapeRef.new(shape: NextPageToken, location_name: "NextPageToken"))
146
+ GetTagsResponse.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, required: true, location_name: "Tags"))
147
+ GetTagsResponse.add_member(:return_size, Shapes::ShapeRef.new(shape: PageSize, required: true, location_name: "ReturnSize"))
148
+ GetTagsResponse.add_member(:total_size, Shapes::ShapeRef.new(shape: PageSize, required: true, location_name: "TotalSize"))
149
+ GetTagsResponse.struct_class = Types::GetTagsResponse
150
+
151
+ Group.add_member(:keys, Shapes::ShapeRef.new(shape: Keys, location_name: "Keys"))
152
+ Group.add_member(:metrics, Shapes::ShapeRef.new(shape: Metrics, location_name: "Metrics"))
153
+ Group.struct_class = Types::Group
154
+
155
+ GroupDefinition.add_member(:type, Shapes::ShapeRef.new(shape: GroupDefinitionType, location_name: "Type"))
156
+ GroupDefinition.add_member(:key, Shapes::ShapeRef.new(shape: GroupDefinitionKey, location_name: "Key"))
157
+ GroupDefinition.struct_class = Types::GroupDefinition
158
+
159
+ GroupDefinitions.member = Shapes::ShapeRef.new(shape: GroupDefinition)
160
+
161
+ Groups.member = Shapes::ShapeRef.new(shape: Group)
162
+
163
+ Keys.member = Shapes::ShapeRef.new(shape: Key)
164
+
165
+ MetricNames.member = Shapes::ShapeRef.new(shape: MetricName)
166
+
167
+ MetricValue.add_member(:amount, Shapes::ShapeRef.new(shape: MetricAmount, location_name: "Amount"))
168
+ MetricValue.add_member(:unit, Shapes::ShapeRef.new(shape: MetricUnit, location_name: "Unit"))
169
+ MetricValue.struct_class = Types::MetricValue
170
+
171
+ Metrics.key = Shapes::ShapeRef.new(shape: MetricName)
172
+ Metrics.value = Shapes::ShapeRef.new(shape: MetricValue)
173
+
174
+ ReservationAggregates.add_member(:utilization_percentage, Shapes::ShapeRef.new(shape: UtilizationPercentage, location_name: "UtilizationPercentage"))
175
+ ReservationAggregates.add_member(:purchased_hours, Shapes::ShapeRef.new(shape: PurchasedHours, location_name: "PurchasedHours"))
176
+ ReservationAggregates.add_member(:total_actual_hours, Shapes::ShapeRef.new(shape: TotalActualHours, location_name: "TotalActualHours"))
177
+ ReservationAggregates.add_member(:unused_hours, Shapes::ShapeRef.new(shape: UnusedHours, location_name: "UnusedHours"))
178
+ ReservationAggregates.struct_class = Types::ReservationAggregates
179
+
180
+ ReservationUtilizationGroup.add_member(:key, Shapes::ShapeRef.new(shape: ReservationGroupKey, location_name: "Key"))
181
+ ReservationUtilizationGroup.add_member(:value, Shapes::ShapeRef.new(shape: ReservationGroupValue, location_name: "Value"))
182
+ ReservationUtilizationGroup.add_member(:attributes, Shapes::ShapeRef.new(shape: Attributes, location_name: "Attributes"))
183
+ ReservationUtilizationGroup.add_member(:utilization, Shapes::ShapeRef.new(shape: ReservationAggregates, location_name: "Utilization"))
184
+ ReservationUtilizationGroup.struct_class = Types::ReservationUtilizationGroup
185
+
186
+ ReservationUtilizationGroups.member = Shapes::ShapeRef.new(shape: ReservationUtilizationGroup)
187
+
188
+ ResultByTime.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, location_name: "TimePeriod"))
189
+ ResultByTime.add_member(:total, Shapes::ShapeRef.new(shape: Metrics, location_name: "Total"))
190
+ ResultByTime.add_member(:groups, Shapes::ShapeRef.new(shape: Groups, location_name: "Groups"))
191
+ ResultByTime.add_member(:estimated, Shapes::ShapeRef.new(shape: Estimated, location_name: "Estimated"))
192
+ ResultByTime.struct_class = Types::ResultByTime
193
+
194
+ ResultsByTime.member = Shapes::ShapeRef.new(shape: ResultByTime)
195
+
196
+ TagList.member = Shapes::ShapeRef.new(shape: Entity)
197
+
198
+ TagValues.add_member(:key, Shapes::ShapeRef.new(shape: TagKey, location_name: "Key"))
199
+ TagValues.add_member(:values, Shapes::ShapeRef.new(shape: Values, location_name: "Values"))
200
+ TagValues.struct_class = Types::TagValues
201
+
202
+ UtilizationByTime.add_member(:time_period, Shapes::ShapeRef.new(shape: DateInterval, location_name: "TimePeriod"))
203
+ UtilizationByTime.add_member(:groups, Shapes::ShapeRef.new(shape: ReservationUtilizationGroups, location_name: "Groups"))
204
+ UtilizationByTime.add_member(:total, Shapes::ShapeRef.new(shape: ReservationAggregates, location_name: "Total"))
205
+ UtilizationByTime.struct_class = Types::UtilizationByTime
206
+
207
+ UtilizationsByTime.member = Shapes::ShapeRef.new(shape: UtilizationByTime)
208
+
209
+ Values.member = Shapes::ShapeRef.new(shape: Value)
210
+
211
+
212
+ # @api private
213
+ API = Seahorse::Model::Api.new.tap do |api|
214
+
215
+ api.version = "2017-10-25"
216
+
217
+ api.metadata = {
218
+ "endpointPrefix" => "ce",
219
+ "jsonVersion" => "1.1",
220
+ "protocol" => "json",
221
+ "serviceFullName" => "AWS Cost Explorer Service",
222
+ "signatureVersion" => "v4",
223
+ "signingName" => "ce",
224
+ "targetPrefix" => "AWSInsightsIndexService",
225
+ }
226
+
227
+ api.add_operation(:get_cost_and_usage, Seahorse::Model::Operation.new.tap do |o|
228
+ o.name = "GetCostAndUsage"
229
+ o.http_method = "POST"
230
+ o.http_request_uri = "/"
231
+ o.input = Shapes::ShapeRef.new(shape: GetCostAndUsageRequest)
232
+ o.output = Shapes::ShapeRef.new(shape: GetCostAndUsageResponse)
233
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
234
+ end)
235
+
236
+ api.add_operation(:get_dimension_values, Seahorse::Model::Operation.new.tap do |o|
237
+ o.name = "GetDimensionValues"
238
+ o.http_method = "POST"
239
+ o.http_request_uri = "/"
240
+ o.input = Shapes::ShapeRef.new(shape: GetDimensionValuesRequest)
241
+ o.output = Shapes::ShapeRef.new(shape: GetDimensionValuesResponse)
242
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
243
+ end)
244
+
245
+ api.add_operation(:get_reservation_utilization, Seahorse::Model::Operation.new.tap do |o|
246
+ o.name = "GetReservationUtilization"
247
+ o.http_method = "POST"
248
+ o.http_request_uri = "/"
249
+ o.input = Shapes::ShapeRef.new(shape: GetReservationUtilizationRequest)
250
+ o.output = Shapes::ShapeRef.new(shape: GetReservationUtilizationResponse)
251
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
252
+ end)
253
+
254
+ api.add_operation(:get_tags, Seahorse::Model::Operation.new.tap do |o|
255
+ o.name = "GetTags"
256
+ o.http_method = "POST"
257
+ o.http_request_uri = "/"
258
+ o.input = Shapes::ShapeRef.new(shape: GetTagsRequest)
259
+ o.output = Shapes::ShapeRef.new(shape: GetTagsResponse)
260
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
261
+ end)
262
+ end
263
+
264
+ end
265
+ end
@@ -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::CostExplorer
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::CostExplorer
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,948 @@
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::CostExplorer
9
+ module Types
10
+
11
+ # The time period that you want the usage and costs for.
12
+ #
13
+ # @note When making an API call, you may pass DateInterval
14
+ # data as a hash:
15
+ #
16
+ # {
17
+ # start: "YearMonthDay", # required
18
+ # end: "YearMonthDay", # required
19
+ # }
20
+ #
21
+ # @!attribute [rw] start
22
+ # The beginning of the time period that you want the usage and costs
23
+ # for. The start date is inclusive. For example, if `start` is
24
+ # `2017-01-01`, then the cost and usage data is retrieved starting at
25
+ # `2017-01-01` up to the end date.
26
+ # @return [String]
27
+ #
28
+ # @!attribute [rw] end
29
+ # The end of the time period that you want the usage and costs for.
30
+ # The end date is exclusive. For example, if the `end` is
31
+ # `2017-05-01`, then the cost and usage data is retrieved from the
32
+ # start date but not including `2017-05-01`.
33
+ # @return [String]
34
+ #
35
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/DateInterval AWS API Documentation
36
+ #
37
+ class DateInterval < Struct.new(
38
+ :start,
39
+ :end)
40
+ include Aws::Structure
41
+ end
42
+
43
+ # The metadata that you can use to filter and group your results. You
44
+ # can use `GetDimensionValues` to find specific values.
45
+ #
46
+ # @note When making an API call, you may pass DimensionValues
47
+ # data as a hash:
48
+ #
49
+ # {
50
+ # 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
51
+ # values: ["Value"],
52
+ # }
53
+ #
54
+ # @!attribute [rw] key
55
+ # The names of the metadata types that you can use to filter and group
56
+ # your results. For example, `AZ` returns a list of Availability
57
+ # Zones.
58
+ # @return [String]
59
+ #
60
+ # @!attribute [rw] values
61
+ # The metadata values that you can use to filter and group your
62
+ # results. You can use `GetDimensionValues` to find specific values.
63
+ # @return [Array<String>]
64
+ #
65
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/DimensionValues AWS API Documentation
66
+ #
67
+ class DimensionValues < Struct.new(
68
+ :key,
69
+ :values)
70
+ include Aws::Structure
71
+ end
72
+
73
+ # The metadata of a specific type that you can use to filter and group
74
+ # your results. You can use `GetDimensionValues` to find specific
75
+ # values.
76
+ #
77
+ # @!attribute [rw] value
78
+ # The value of a dimension with a specific attribute.
79
+ # @return [String]
80
+ #
81
+ # @!attribute [rw] attributes
82
+ # The attribute that applies to a specific `Dimension`.
83
+ # @return [Hash<String,String>]
84
+ #
85
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/DimensionValuesWithAttributes AWS API Documentation
86
+ #
87
+ class DimensionValuesWithAttributes < Struct.new(
88
+ :value,
89
+ :attributes)
90
+ include Aws::Structure
91
+ end
92
+
93
+ # Use `Expression` to filter by cost or by usage. There are two
94
+ # patterns:
95
+ #
96
+ # * Simple dimension values - You can set the dimension name and values
97
+ # for the filters that you plan to use. For example, you can filter
98
+ # for `InstanceType==m4.xlarge OR InstanceType==c4.large`. The
99
+ # `Expression` for that looks like this.
100
+ #
101
+ # `\{ "Dimensions": \{ "Key": "InstanceType", "Values": [ "m4.xlarge",
102
+ # “c4.large” ] \} \}`
103
+ #
104
+ # The list of dimension values are OR'd together to retrieve cost or
105
+ # usage data. You can create `Expression` and `DimensionValues`
106
+ # objects using either `with*` methods or `set*` methods in multiple
107
+ # lines.
108
+ #
109
+ # * Compound dimension values with logical operations - You can use
110
+ # multiple `Expression` types and the logical operators `AND/OR/NOT`
111
+ # to create a list of one or more `Expression` objects. This allows
112
+ # you to filter on more advanced options. For example, you can filter
113
+ # on `((InstanceType == m4.large OR InstanceType == m3.large) OR
114
+ # (Tag.Type == Type1)) AND (UsageType != DataTransfer)`. The
115
+ # `Expression` for that looks like this.
116
+ #
117
+ # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "InstanceType",
118
+ # "Values": [ "m4.x.large", "c4.large" ] \}\}, \{"Tag": \{ "Key":
119
+ # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not": \{"dimensions":
120
+ # \{ "Key": "UsageType", "Values": ["DataTransfer"] \}\}\} ] \} `
121
+ #
122
+ # <note markdown="1"> Because each `Expression` can have only one operator, the service
123
+ # returns an error if more than one is specified. The following
124
+ # example shows an Expression object that will create an error.
125
+ #
126
+ # </note>
127
+ #
128
+ # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension": "UsageType",
129
+ # "Values": [ "DataTransfer" ] \} \} `
130
+ #
131
+ # @note When making an API call, you may pass Expression
132
+ # data as a hash:
133
+ #
134
+ # {
135
+ # or: [
136
+ # {
137
+ # or: {
138
+ # # recursive Expressions
139
+ # },
140
+ # and: {
141
+ # # recursive Expressions
142
+ # },
143
+ # not: {
144
+ # # recursive Expression
145
+ # },
146
+ # dimensions: {
147
+ # 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
148
+ # values: ["Value"],
149
+ # },
150
+ # tags: {
151
+ # key: "TagKey",
152
+ # values: ["Value"],
153
+ # },
154
+ # },
155
+ # ],
156
+ # and: [
157
+ # {
158
+ # or: {
159
+ # # recursive Expressions
160
+ # },
161
+ # and: {
162
+ # # recursive Expressions
163
+ # },
164
+ # not: {
165
+ # # recursive Expression
166
+ # },
167
+ # dimensions: {
168
+ # 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
169
+ # values: ["Value"],
170
+ # },
171
+ # tags: {
172
+ # key: "TagKey",
173
+ # values: ["Value"],
174
+ # },
175
+ # },
176
+ # ],
177
+ # not: {
178
+ # or: [
179
+ # {
180
+ # # recursive Expression
181
+ # },
182
+ # ],
183
+ # and: [
184
+ # {
185
+ # # recursive Expression
186
+ # },
187
+ # ],
188
+ # not: {
189
+ # # recursive Expression
190
+ # },
191
+ # dimensions: {
192
+ # 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
193
+ # values: ["Value"],
194
+ # },
195
+ # tags: {
196
+ # key: "TagKey",
197
+ # values: ["Value"],
198
+ # },
199
+ # },
200
+ # dimensions: {
201
+ # 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
202
+ # values: ["Value"],
203
+ # },
204
+ # tags: {
205
+ # key: "TagKey",
206
+ # values: ["Value"],
207
+ # },
208
+ # }
209
+ #
210
+ # @!attribute [rw] or
211
+ # Return results that match either `Dimension`.
212
+ # @return [Array<Types::Expression>]
213
+ #
214
+ # @!attribute [rw] and
215
+ # Return results that match both `Dimension` objects.
216
+ # @return [Array<Types::Expression>]
217
+ #
218
+ # @!attribute [rw] not
219
+ # Return results that don't match `Dimension`.
220
+ # @return [Types::Expression]
221
+ #
222
+ # @!attribute [rw] dimensions
223
+ # The specific `Dimension` to use for `Expression`.
224
+ # @return [Types::DimensionValues]
225
+ #
226
+ # @!attribute [rw] tags
227
+ # The specific `Tag` to use for `Expression`.
228
+ # @return [Types::TagValues]
229
+ #
230
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/Expression AWS API Documentation
231
+ #
232
+ class Expression < Struct.new(
233
+ :or,
234
+ :and,
235
+ :not,
236
+ :dimensions,
237
+ :tags)
238
+ include Aws::Structure
239
+ end
240
+
241
+ # @note When making an API call, you may pass GetCostAndUsageRequest
242
+ # data as a hash:
243
+ #
244
+ # {
245
+ # time_period: {
246
+ # start: "YearMonthDay", # required
247
+ # end: "YearMonthDay", # required
248
+ # },
249
+ # granularity: "DAILY", # accepts DAILY, MONTHLY
250
+ # filter: {
251
+ # or: [
252
+ # {
253
+ # # recursive Expression
254
+ # },
255
+ # ],
256
+ # and: [
257
+ # {
258
+ # # recursive Expression
259
+ # },
260
+ # ],
261
+ # not: {
262
+ # # recursive Expression
263
+ # },
264
+ # dimensions: {
265
+ # 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
266
+ # values: ["Value"],
267
+ # },
268
+ # tags: {
269
+ # key: "TagKey",
270
+ # values: ["Value"],
271
+ # },
272
+ # },
273
+ # metrics: ["MetricName"],
274
+ # group_by: [
275
+ # {
276
+ # type: "DIMENSION", # accepts DIMENSION, TAG
277
+ # key: "GroupDefinitionKey",
278
+ # },
279
+ # ],
280
+ # next_page_token: "NextPageToken",
281
+ # }
282
+ #
283
+ # @!attribute [rw] time_period
284
+ # Sets the start and end dates for retrieving AWS costs. The start
285
+ # date is inclusive, but the end date is exclusive. For example, if
286
+ # `start` is `2017-01-01` and `end` is `2017-05-01`, then the cost and
287
+ # usage data is retrieved from `2017-01-01` up to and including
288
+ # `2017-04-30` but not including `2017-05-01`.
289
+ # @return [Types::DateInterval]
290
+ #
291
+ # @!attribute [rw] granularity
292
+ # Sets the AWS cost granularity to `MONTHLY` or `DAILY`.
293
+ # @return [String]
294
+ #
295
+ # @!attribute [rw] filter
296
+ # Filters AWS costs by different dimensions. For example, you can
297
+ # specify `Service` and `Linked Account` and get the costs associated
298
+ # with that account's usage of that service. You can nest
299
+ # `Expression` objects to define any combination of dimension filters.
300
+ # For more information, see the `Expression` object or `More
301
+ # Examples`.
302
+ # @return [Types::Expression]
303
+ #
304
+ # @!attribute [rw] metrics
305
+ # Which metrics are returned in the query. For more information about
306
+ # blended and unblended rates, see
307
+ # https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
308
+ #
309
+ # Valid values are `BlendedCost`, `UnblendedCost`, and
310
+ # `UsageQuantity`.
311
+ #
312
+ # <note markdown="1"> If you return the `UsageQuantity` metric, the service aggregates all
313
+ # usage numbers without taking into account the units. For example, if
314
+ # you aggregate `usageQuantity` across all of EC2, the results aren't
315
+ # meaningful because EC2 compute hours and data transfer are measured
316
+ # in different units (for example, hours vs. GB). To get more
317
+ # meaningful `UsageQuantity` metrics, filter by `UsageType` or
318
+ # `UsageTypeGroups`.
319
+ #
320
+ # </note>
321
+ # @return [Array<String>]
322
+ #
323
+ # @!attribute [rw] group_by
324
+ # You can group AWS costs using up to two different groups, either
325
+ # dimensions, tag keys, or both.
326
+ #
327
+ # When you group by tag key, you get all tag values, including empty
328
+ # strings.
329
+ #
330
+ # Valid values are: `AZ`, `INSTANCE_TYPE`, `LINKED_ACCCOUNT`,
331
+ # `OPERATION`, `PURCHASE_TYPE`, `SERVICE`, `USAGE_TYPE`, `TAGS`, and
332
+ # `PLATFORM`.
333
+ # @return [Array<Types::GroupDefinition>]
334
+ #
335
+ # @!attribute [rw] next_page_token
336
+ # The token to retrieve the next set of results. AWS provides the
337
+ # token when the response from a previous call has more results than
338
+ # the maximum page size.
339
+ # @return [String]
340
+ #
341
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsageRequest AWS API Documentation
342
+ #
343
+ class GetCostAndUsageRequest < Struct.new(
344
+ :time_period,
345
+ :granularity,
346
+ :filter,
347
+ :metrics,
348
+ :group_by,
349
+ :next_page_token)
350
+ include Aws::Structure
351
+ end
352
+
353
+ # @!attribute [rw] next_page_token
354
+ # The token for the next set of retrievable results. AWS provides the
355
+ # token when the response from a previous call has more results than
356
+ # the maximum page size.
357
+ # @return [String]
358
+ #
359
+ # @!attribute [rw] group_definitions
360
+ # The groups specified by the the `Filter` or `GroupBy` parameters in
361
+ # the request.
362
+ # @return [Array<Types::GroupDefinition>]
363
+ #
364
+ # @!attribute [rw] results_by_time
365
+ # The time period covered by the results in the response.
366
+ # @return [Array<Types::ResultByTime>]
367
+ #
368
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsageResponse AWS API Documentation
369
+ #
370
+ class GetCostAndUsageResponse < Struct.new(
371
+ :next_page_token,
372
+ :group_definitions,
373
+ :results_by_time)
374
+ include Aws::Structure
375
+ end
376
+
377
+ # @note When making an API call, you may pass GetDimensionValuesRequest
378
+ # data as a hash:
379
+ #
380
+ # {
381
+ # search_string: "SearchString",
382
+ # time_period: { # required
383
+ # start: "YearMonthDay", # required
384
+ # end: "YearMonthDay", # required
385
+ # },
386
+ # 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
387
+ # context: "COST_AND_USAGE", # accepts COST_AND_USAGE, RESERVATIONS
388
+ # next_page_token: "NextPageToken",
389
+ # }
390
+ #
391
+ # @!attribute [rw] search_string
392
+ # The value that you want to search the filter values for.
393
+ # @return [String]
394
+ #
395
+ # @!attribute [rw] time_period
396
+ # The start and end dates for retrieving the dimension values. The
397
+ # start date is inclusive, but the end date is exclusive. For example,
398
+ # if `start` is `2017-01-01` and `end` is `2017-05-01`, then the cost
399
+ # and usage data is retrieved from `2017-01-01` up to and including
400
+ # `2017-04-30` but not including `2017-05-01`.
401
+ # @return [Types::DateInterval]
402
+ #
403
+ # @!attribute [rw] dimension
404
+ # The name of the dimension. Different `Dimensions`are available for
405
+ # different `Context`s. For more information, see `Context`.
406
+ # @return [String]
407
+ #
408
+ # @!attribute [rw] context
409
+ # The context for the call to `GetDimensionValues`. This can be
410
+ # `RESERVED_INSTANCE` or `COST_AND_USAGE`. The default value is
411
+ # `COST_AND_USAGE`. If the context is set to `RESERVED_INSTANCE`, the
412
+ # resulting dimension values can be used in the
413
+ # `GetReservationUtilization` action. If the context is set to
414
+ # `COST_AND_USAGE`, , the resulting dimension values can be used in
415
+ # the `GetCostAndUsage` operation.
416
+ #
417
+ # If you set the context to `CostAndUsage`, you can use the following
418
+ # dimensions for searching:
419
+ #
420
+ # * AZ - The Availability Zone. An example is us-east-1a.
421
+ #
422
+ # * InstanceType - The type of EC2 instance. An example is m4.xlarge.
423
+ #
424
+ # * LinkedAccount - The description in the attribute map that includes
425
+ # the full name of the member account. The value field contains the
426
+ # AWS ID of the member account
427
+ #
428
+ # * Operation - The action performed. Examples include RunInstance and
429
+ # CreateBucket.
430
+ #
431
+ # * PurchaseType - The reservation type of the purchase to which this
432
+ # usage is related. Examples include: On Demand Instances and
433
+ # Standard Reserved Instances
434
+ #
435
+ # * Service - The AWS service such as DynamoDB.
436
+ #
437
+ # * UsageType -The type of usage. An example is DataTransfer-In-Bytes.
438
+ # The response for the GetDimensionValues action includes a unit
439
+ # attribute, examples of which include GB and Hrs.
440
+ #
441
+ # * UsageTypeGroup - The grouping of common usage types. An example is
442
+ # EC2: CloudWatch – Alarms. The response for this action includes a
443
+ # unit attribute.
444
+ #
445
+ # * RecordType - The different types of charges such as RI fees, usage
446
+ # costs, tax refunds, and credits
447
+ #
448
+ # If you set the context to `ReservedInstance`, you can use the
449
+ # following dimensions for searching:
450
+ #
451
+ # * AZ - The Availability Zone. An example is us-east-1a.
452
+ #
453
+ # * InstanceType - The type of EC2 instance. An example is m4.xlarge.
454
+ #
455
+ # * LinkedAccount - The description in the attribute map that includes
456
+ # the full name of the member account. The value field contains the
457
+ # AWS ID of the member account
458
+ #
459
+ # * Platform - The operating system. Examples are Windows or Linux.
460
+ #
461
+ # * Region - The AWS region.
462
+ #
463
+ # * Scope - The scope of a reserved instance (RI). Values are regional
464
+ # or a single availability zone.
465
+ #
466
+ # * Tenancy - The tenancy of a resource. Examples are shared or
467
+ # dedicated.
468
+ # @return [String]
469
+ #
470
+ # @!attribute [rw] next_page_token
471
+ # The token to retrieve the next set of results. AWS provides the
472
+ # token when the response from a previous call has more results than
473
+ # the maximum page size.
474
+ # @return [String]
475
+ #
476
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetDimensionValuesRequest AWS API Documentation
477
+ #
478
+ class GetDimensionValuesRequest < Struct.new(
479
+ :search_string,
480
+ :time_period,
481
+ :dimension,
482
+ :context,
483
+ :next_page_token)
484
+ include Aws::Structure
485
+ end
486
+
487
+ # @!attribute [rw] dimension_values
488
+ # The filters that you used to filter your request. Some dimensions
489
+ # are available only for a specific context:
490
+ #
491
+ # If you set the context to `CostAndUsage`, you can use the following
492
+ # dimensions for searching:
493
+ #
494
+ # * AZ - The Availability Zone. An example is us-east-1a.
495
+ #
496
+ # * InstanceType - The type of EC2 instance. An example is m4.xlarge.
497
+ #
498
+ # * LinkedAccount - The description in the attribute map that includes
499
+ # the full name of the member account. The value field contains the
500
+ # AWS ID of the member account
501
+ #
502
+ # * Operation - The action performed. Examples include RunInstance and
503
+ # CreateBucket.
504
+ #
505
+ # * PurchaseType - The reservation type of the purchase to which this
506
+ # usage is related. Examples include: On Demand Instances and
507
+ # Standard Reserved Instances
508
+ #
509
+ # * Service - The AWS service such as DynamoDB.
510
+ #
511
+ # * UsageType -The type of usage. An example is DataTransfer-In-Bytes.
512
+ # The response for the GetDimensionValues action includes a unit
513
+ # attribute, examples of which include GB and Hrs.
514
+ #
515
+ # * UsageTypeGroup - The grouping of common usage types. An example is
516
+ # EC2: CloudWatch – Alarms. The response for this action includes a
517
+ # unit attribute.
518
+ #
519
+ # * RecordType - The different types of charges such as RI fees, usage
520
+ # costs, tax refunds, and credits
521
+ #
522
+ # If you set the context to `ReservedInstance`, you can use the
523
+ # following dimensions for searching:
524
+ #
525
+ # * AZ - The Availability Zone. An example is us-east-1a.
526
+ #
527
+ # * InstanceType - The type of EC2 instance. An example is m4.xlarge.
528
+ #
529
+ # * LinkedAccount - The description in the attribute map that includes
530
+ # the full name of the member account. The value field contains the
531
+ # AWS ID of the member account
532
+ #
533
+ # * Platform - The operating system. Examples are Windows or Linux.
534
+ #
535
+ # * Region - The AWS region.
536
+ #
537
+ # * Scope - The scope of a reserved instance (RI). Values are regional
538
+ # or a single availability zone.
539
+ #
540
+ # * Tenancy - The tenancy of a resource. Examples are shared or
541
+ # dedicated.
542
+ # @return [Array<Types::DimensionValuesWithAttributes>]
543
+ #
544
+ # @!attribute [rw] return_size
545
+ # The number of results that AWS returned at one time.
546
+ # @return [Integer]
547
+ #
548
+ # @!attribute [rw] total_size
549
+ # The total number of search results.
550
+ # @return [Integer]
551
+ #
552
+ # @!attribute [rw] next_page_token
553
+ # The token for the next set of retrievable results. AWS provides the
554
+ # token when the response from a previous call has more results than
555
+ # the maximum page size.
556
+ # @return [String]
557
+ #
558
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetDimensionValuesResponse AWS API Documentation
559
+ #
560
+ class GetDimensionValuesResponse < Struct.new(
561
+ :dimension_values,
562
+ :return_size,
563
+ :total_size,
564
+ :next_page_token)
565
+ include Aws::Structure
566
+ end
567
+
568
+ # @note When making an API call, you may pass GetReservationUtilizationRequest
569
+ # data as a hash:
570
+ #
571
+ # {
572
+ # time_period: { # required
573
+ # start: "YearMonthDay", # required
574
+ # end: "YearMonthDay", # required
575
+ # },
576
+ # group_by: [
577
+ # {
578
+ # type: "DIMENSION", # accepts DIMENSION, TAG
579
+ # key: "GroupDefinitionKey",
580
+ # },
581
+ # ],
582
+ # granularity: "DAILY", # accepts DAILY, MONTHLY
583
+ # filter: {
584
+ # or: [
585
+ # {
586
+ # # recursive Expression
587
+ # },
588
+ # ],
589
+ # and: [
590
+ # {
591
+ # # recursive Expression
592
+ # },
593
+ # ],
594
+ # not: {
595
+ # # recursive Expression
596
+ # },
597
+ # dimensions: {
598
+ # 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
599
+ # values: ["Value"],
600
+ # },
601
+ # tags: {
602
+ # key: "TagKey",
603
+ # values: ["Value"],
604
+ # },
605
+ # },
606
+ # next_page_token: "NextPageToken",
607
+ # }
608
+ #
609
+ # @!attribute [rw] time_period
610
+ # Sets the start and end dates for retrieving reserve instance (RI)
611
+ # utilization. The start date is inclusive, but the end date is
612
+ # exclusive. For example, if `start` is `2017-01-01` and `end` is
613
+ # `2017-05-01`, then the cost and usage data is retrieved from
614
+ # `2017-01-01` up to and including `2017-04-30` but not including
615
+ # `2017-05-01`.
616
+ # @return [Types::DateInterval]
617
+ #
618
+ # @!attribute [rw] group_by
619
+ # Groups only by `SubscriptionId`. Metadata is included.
620
+ # @return [Array<Types::GroupDefinition>]
621
+ #
622
+ # @!attribute [rw] granularity
623
+ # Sets the AWS cost granularity to `MONTHLY` or `DAILY`. If both
624
+ # `GroupBy` and `granularity` are not set, `GetReservationUtilization`
625
+ # defaults to `DAILY`. If `GroupBy` is set, `Granularity` can't be
626
+ # set, and the response object doesn't include `MONTHLY` or `DAILY`
627
+ # granularity.
628
+ # @return [String]
629
+ #
630
+ # @!attribute [rw] filter
631
+ # Filters utilization data by using different dimensions.
632
+ # `GetReservationUtilization` uses the same `Expression` object as the
633
+ # other operations, but only `AND` is supported among each dimension,
634
+ # and nesting is supported up to only one level deep. If there are
635
+ # multiple values for a dimension, they are OR'd together.
636
+ # @return [Types::Expression]
637
+ #
638
+ # @!attribute [rw] next_page_token
639
+ # The token to retrieve the next set of results. AWS provides the
640
+ # token when the response from a previous call has more results than
641
+ # the maximum page size.
642
+ # @return [String]
643
+ #
644
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationUtilizationRequest AWS API Documentation
645
+ #
646
+ class GetReservationUtilizationRequest < Struct.new(
647
+ :time_period,
648
+ :group_by,
649
+ :granularity,
650
+ :filter,
651
+ :next_page_token)
652
+ include Aws::Structure
653
+ end
654
+
655
+ # @!attribute [rw] utilizations_by_time
656
+ # The amount of time that you utilized your RIs.
657
+ # @return [Array<Types::UtilizationByTime>]
658
+ #
659
+ # @!attribute [rw] total
660
+ # The total amount of time that you utilized your RIs.
661
+ # @return [Types::ReservationAggregates]
662
+ #
663
+ # @!attribute [rw] next_page_token
664
+ # The token for the next set of retrievable results. AWS provides the
665
+ # token when the response from a previous call has more results than
666
+ # the maximum page size.
667
+ # @return [String]
668
+ #
669
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetReservationUtilizationResponse AWS API Documentation
670
+ #
671
+ class GetReservationUtilizationResponse < Struct.new(
672
+ :utilizations_by_time,
673
+ :total,
674
+ :next_page_token)
675
+ include Aws::Structure
676
+ end
677
+
678
+ # @note When making an API call, you may pass GetTagsRequest
679
+ # data as a hash:
680
+ #
681
+ # {
682
+ # search_string: "SearchString",
683
+ # time_period: { # required
684
+ # start: "YearMonthDay", # required
685
+ # end: "YearMonthDay", # required
686
+ # },
687
+ # tag_key: "TagKey",
688
+ # next_page_token: "NextPageToken",
689
+ # }
690
+ #
691
+ # @!attribute [rw] search_string
692
+ # The value that you want to search for.
693
+ # @return [String]
694
+ #
695
+ # @!attribute [rw] time_period
696
+ # The start and end dates for retrieving the dimension values. The
697
+ # start date is inclusive, but the end date is exclusive. For example,
698
+ # if `start` is `2017-01-01` and `end` is `2017-05-01`, then the cost
699
+ # and usage data is retrieved from `2017-01-01` up to and including
700
+ # `2017-04-30` but not including `2017-05-01`.
701
+ # @return [Types::DateInterval]
702
+ #
703
+ # @!attribute [rw] tag_key
704
+ # The key of the tag that you want to return values for.
705
+ # @return [String]
706
+ #
707
+ # @!attribute [rw] next_page_token
708
+ # The token to retrieve the next set of results. AWS provides the
709
+ # token when the response from a previous call has more results than
710
+ # the maximum page size.
711
+ # @return [String]
712
+ #
713
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetTagsRequest AWS API Documentation
714
+ #
715
+ class GetTagsRequest < Struct.new(
716
+ :search_string,
717
+ :time_period,
718
+ :tag_key,
719
+ :next_page_token)
720
+ include Aws::Structure
721
+ end
722
+
723
+ # @!attribute [rw] next_page_token
724
+ # The token for the next set of retrievable results. AWS provides the
725
+ # token when the response from a previous call has more results than
726
+ # the maximum page size.
727
+ # @return [String]
728
+ #
729
+ # @!attribute [rw] tags
730
+ # The tags that match your request.
731
+ # @return [Array<String>]
732
+ #
733
+ # @!attribute [rw] return_size
734
+ # The number of query results that AWS returns at a time.
735
+ # @return [Integer]
736
+ #
737
+ # @!attribute [rw] total_size
738
+ # The total number of query results.
739
+ # @return [Integer]
740
+ #
741
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetTagsResponse AWS API Documentation
742
+ #
743
+ class GetTagsResponse < Struct.new(
744
+ :next_page_token,
745
+ :tags,
746
+ :return_size,
747
+ :total_size)
748
+ include Aws::Structure
749
+ end
750
+
751
+ # One level of grouped data within the results.
752
+ #
753
+ # @!attribute [rw] keys
754
+ # The keys included in this group.
755
+ # @return [Array<String>]
756
+ #
757
+ # @!attribute [rw] metrics
758
+ # The metrics included in this group.
759
+ # @return [Hash<String,Types::MetricValue>]
760
+ #
761
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/Group AWS API Documentation
762
+ #
763
+ class Group < Struct.new(
764
+ :keys,
765
+ :metrics)
766
+ include Aws::Structure
767
+ end
768
+
769
+ # Represents a group when you specify a group by criteria, or in the
770
+ # response to a query with a specific grouping.
771
+ #
772
+ # @note When making an API call, you may pass GroupDefinition
773
+ # data as a hash:
774
+ #
775
+ # {
776
+ # type: "DIMENSION", # accepts DIMENSION, TAG
777
+ # key: "GroupDefinitionKey",
778
+ # }
779
+ #
780
+ # @!attribute [rw] type
781
+ # The string that represents the type of group.
782
+ # @return [String]
783
+ #
784
+ # @!attribute [rw] key
785
+ # The string that represents a key for a specified group.
786
+ # @return [String]
787
+ #
788
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GroupDefinition AWS API Documentation
789
+ #
790
+ class GroupDefinition < Struct.new(
791
+ :type,
792
+ :key)
793
+ include Aws::Structure
794
+ end
795
+
796
+ # The aggregated value for a metric.
797
+ #
798
+ # @!attribute [rw] amount
799
+ # The actual number that represents the metric.
800
+ # @return [String]
801
+ #
802
+ # @!attribute [rw] unit
803
+ # The unit that the metric is given in.
804
+ # @return [String]
805
+ #
806
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/MetricValue AWS API Documentation
807
+ #
808
+ class MetricValue < Struct.new(
809
+ :amount,
810
+ :unit)
811
+ include Aws::Structure
812
+ end
813
+
814
+ # The aggregated numbers for your RI usage.
815
+ #
816
+ # @!attribute [rw] utilization_percentage
817
+ # The percentage of RI time that you used.
818
+ # @return [String]
819
+ #
820
+ # @!attribute [rw] purchased_hours
821
+ # How many RI hours you purchased.
822
+ # @return [String]
823
+ #
824
+ # @!attribute [rw] total_actual_hours
825
+ # The total number of RI hours that you used.
826
+ # @return [String]
827
+ #
828
+ # @!attribute [rw] unused_hours
829
+ # The number of RI hours that you didn't use.
830
+ # @return [String]
831
+ #
832
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/ReservationAggregates AWS API Documentation
833
+ #
834
+ class ReservationAggregates < Struct.new(
835
+ :utilization_percentage,
836
+ :purchased_hours,
837
+ :total_actual_hours,
838
+ :unused_hours)
839
+ include Aws::Structure
840
+ end
841
+
842
+ # A group of RIs that share a set of attributes.
843
+ #
844
+ # @!attribute [rw] key
845
+ # The key for a specific RI attribute.
846
+ # @return [String]
847
+ #
848
+ # @!attribute [rw] value
849
+ # The value of a specific RI attribute.
850
+ # @return [String]
851
+ #
852
+ # @!attribute [rw] attributes
853
+ # The attributes for this group of RIs.
854
+ # @return [Hash<String,String>]
855
+ #
856
+ # @!attribute [rw] utilization
857
+ # How much you used this group of RIs.
858
+ # @return [Types::ReservationAggregates]
859
+ #
860
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/ReservationUtilizationGroup AWS API Documentation
861
+ #
862
+ class ReservationUtilizationGroup < Struct.new(
863
+ :key,
864
+ :value,
865
+ :attributes,
866
+ :utilization)
867
+ include Aws::Structure
868
+ end
869
+
870
+ # The result that is associated with a time period.
871
+ #
872
+ # @!attribute [rw] time_period
873
+ # The time period covered by a result.
874
+ # @return [Types::DateInterval]
875
+ #
876
+ # @!attribute [rw] total
877
+ # The total amount of cost or usage accrued during the time period.
878
+ # @return [Hash<String,Types::MetricValue>]
879
+ #
880
+ # @!attribute [rw] groups
881
+ # The groups that are included in this time period.
882
+ # @return [Array<Types::Group>]
883
+ #
884
+ # @!attribute [rw] estimated
885
+ # Whether or not this result is estimated.
886
+ # @return [Boolean]
887
+ #
888
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/ResultByTime AWS API Documentation
889
+ #
890
+ class ResultByTime < Struct.new(
891
+ :time_period,
892
+ :total,
893
+ :groups,
894
+ :estimated)
895
+ include Aws::Structure
896
+ end
897
+
898
+ # The values that are available for a tag.
899
+ #
900
+ # @note When making an API call, you may pass TagValues
901
+ # data as a hash:
902
+ #
903
+ # {
904
+ # key: "TagKey",
905
+ # values: ["Value"],
906
+ # }
907
+ #
908
+ # @!attribute [rw] key
909
+ # The key for a tag.
910
+ # @return [String]
911
+ #
912
+ # @!attribute [rw] values
913
+ # The specific value of a tag.
914
+ # @return [Array<String>]
915
+ #
916
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/TagValues AWS API Documentation
917
+ #
918
+ class TagValues < Struct.new(
919
+ :key,
920
+ :values)
921
+ include Aws::Structure
922
+ end
923
+
924
+ # The amount of utilization, in hours.
925
+ #
926
+ # @!attribute [rw] time_period
927
+ # The period of time over which this utilization was used.
928
+ # @return [Types::DateInterval]
929
+ #
930
+ # @!attribute [rw] groups
931
+ # The groups that are included in this utilization result.
932
+ # @return [Array<Types::ReservationUtilizationGroup>]
933
+ #
934
+ # @!attribute [rw] total
935
+ # The total number of RI hours that were used.
936
+ # @return [Types::ReservationAggregates]
937
+ #
938
+ # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/UtilizationByTime AWS API Documentation
939
+ #
940
+ class UtilizationByTime < Struct.new(
941
+ :time_period,
942
+ :groups,
943
+ :total)
944
+ include Aws::Structure
945
+ end
946
+
947
+ end
948
+ end