aws-sdk-costexplorer 1.80.0 → 1.82.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.
@@ -120,46 +120,84 @@ module Aws::CostExplorer
120
120
  # @return [String]
121
121
  #
122
122
  # @!attribute [rw] monitor_specification
123
- # Use `Expression` to filter by cost or by usage. There are two
124
- # patterns:
125
- #
126
- # * Simple dimension values - You can set the dimension name and
127
- # values for the filters that you plan to use. For example, you can
128
- # filter for `REGION==us-east-1 OR REGION==us-west-1`. For
129
- # `GetRightsizingRecommendation`, the Region is a full name (for
130
- # example, `REGION==US East (N. Virginia)`. The `Expression` example
131
- # is as follows:
132
- #
133
- # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
134
- # “us-west-1” ] \} \}`
135
- #
136
- # The list of dimension values are OR'd together to retrieve cost
137
- # or usage data. You can create `Expression` and `DimensionValues`
138
- # objects using either `with*` methods or `set*` methods in multiple
139
- # lines.
140
- #
141
- # * Compound dimension values with logical operations - You can use
142
- # multiple `Expression` types and the logical operators `AND/OR/NOT`
143
- # to create a list of one or more `Expression` objects. By doing
144
- # this, you can filter on more advanced options. For example, you
145
- # can filter on `((REGION == us-east-1 OR REGION == us-west-1) OR
146
- # (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)`. The
147
- # `Expression` for that is as follows:
148
- #
149
- # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
150
- # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
151
- # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
152
- # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values": ["DataTransfer"]
153
- # \}\}\} ] \} `
123
+ # Use `Expression` to filter in various Cost Explorer APIs.
124
+ #
125
+ # Not all `Expression` types are supported in each API. Refer to the
126
+ # documentation for each specific API to see what is supported.
127
+ #
128
+ # There are two patterns:
129
+ #
130
+ # * Simple dimension values.
131
+ #
132
+ # * There are three types of simple dimension values:
133
+ # `CostCategories`, `Tags`, and `Dimensions`.
134
+ #
135
+ # * Specify the `CostCategories` field to define a filter that
136
+ # acts on Cost Categories.
137
+ #
138
+ # * Specify the `Tags` field to define a filter that acts on Cost
139
+ # Allocation Tags.
140
+ #
141
+ # * Specify the `Dimensions` field to define a filter that acts on
142
+ # the [ `DimensionValues` ][1].
143
+ #
144
+ # * For each filter type, you can set the dimension name and values
145
+ # for the filters that you plan to use.
146
+ #
147
+ # * For example, you can filter for `REGION==us-east-1 OR
148
+ # REGION==us-west-1`. For `GetRightsizingRecommendation`, the
149
+ # Region is a full name (for example, `REGION==US East (N.
150
+ # Virginia)`.
151
+ #
152
+ # * The corresponding `Expression` for this example is as follows:
153
+ # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
154
+ # “us-west-1” ] \} \}`
155
+ #
156
+ # * As shown in the previous example, lists of dimension values
157
+ # are combined with `OR` when applying the filter.
158
+ #
159
+ # * You can also set different match options to further control how
160
+ # the filter behaves. Not all APIs support match options. Refer to
161
+ # the documentation for each specific API to see what is
162
+ # supported.
163
+ #
164
+ # * For example, you can filter for linked account names that
165
+ # start with “a”.
166
+ #
167
+ # * The corresponding `Expression` for this example is as follows:
168
+ # `\{ "Dimensions": \{ "Key": "LINKED_ACCOUNT_NAME",
169
+ # "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] \} \}`
170
+ #
171
+ # * Compound `Expression` types with logical operations.
172
+ #
173
+ # * You can use multiple `Expression` types and the logical
174
+ # operators `AND/OR/NOT` to create a list of one or more
175
+ # `Expression` objects. By doing this, you can filter by more
176
+ # advanced options.
177
+ #
178
+ # * For example, you can filter by `((REGION == us-east-1 OR REGION
179
+ # == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
180
+ # DataTransfer)`.
181
+ #
182
+ # * The corresponding `Expression` for this example is as follows:
183
+ # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
184
+ # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
185
+ # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
186
+ # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values":
187
+ # ["DataTransfer"] \}\}\} ] \} `
154
188
  #
155
189
  # <note markdown="1"> Because each `Expression` can have only one operator, the service
156
190
  # returns an error if more than one is specified. The following
157
- # example shows an `Expression` object that creates an error.
191
+ # example shows an `Expression` object that creates an error: ` \{
192
+ # "And": [ ... ], "Dimensions": \{ "Key": "USAGE_TYPE", "Values": [
193
+ # "DataTransfer" ] \} \} `
158
194
  #
159
- # </note>
195
+ # The following is an example of the corresponding error message:
196
+ # `"Expression has more than one roots. Only one root operator is
197
+ # allowed for each expression: And, Or, Not, Dimensions, Tags,
198
+ # CostCategories"`
160
199
  #
161
- # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension":
162
- # "USAGE_TYPE", "Values": [ "DataTransfer" ] \} \} `
200
+ # </note>
163
201
  #
164
202
  # <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR
165
203
  # and NOT isn't supported. OR isn't supported between different
@@ -172,6 +210,10 @@ module Aws::CostExplorer
172
210
  # `LINKED_ACCOUNT`.
173
211
  #
174
212
  # </note>
213
+ #
214
+ #
215
+ #
216
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
175
217
  # @return [Types::Expression]
176
218
  #
177
219
  # @!attribute [rw] dimensional_value_count
@@ -236,8 +278,17 @@ module Aws::CostExplorer
236
278
  # @return [Array<Types::Subscriber>]
237
279
  #
238
280
  # @!attribute [rw] threshold
281
+ # (deprecated)
282
+ #
239
283
  # The dollar value that triggers a notification if the threshold is
240
284
  # exceeded.
285
+ #
286
+ # This field has been deprecated. To specify a threshold, use
287
+ # ThresholdExpression. Continued use of Threshold will be treated as
288
+ # shorthand syntax for a ThresholdExpression.
289
+ #
290
+ # One of Threshold or ThresholdExpression is required for this
291
+ # resource.
241
292
  # @return [Float]
242
293
  #
243
294
  # @!attribute [rw] frequency
@@ -248,6 +299,47 @@ module Aws::CostExplorer
248
299
  # The name for the subscription.
249
300
  # @return [String]
250
301
  #
302
+ # @!attribute [rw] threshold_expression
303
+ # An [Expression][1] object used to specify the anomalies that you
304
+ # want to generate alerts for. This supports dimensions and nested
305
+ # expressions. The supported dimensions are
306
+ # `ANOMALY_TOTAL_IMPACT_ABSOLUTE` and
307
+ # `ANOMALY_TOTAL_IMPACT_PERCENTAGE`. The supported nested expression
308
+ # types are `AND` and `OR`. The match option `GREATER_THAN_OR_EQUAL`
309
+ # is required. Values must be numbers between 0 and 10,000,000,000.
310
+ #
311
+ # One of Threshold or ThresholdExpression is required for this
312
+ # resource.
313
+ #
314
+ # The following are examples of valid ThresholdExpressions:
315
+ #
316
+ # * Absolute threshold: `\{ "Dimensions": \{ "Key":
317
+ # "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [
318
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}`
319
+ #
320
+ # * Percentage threshold: `\{ "Dimensions": \{ "Key":
321
+ # "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [
322
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}`
323
+ #
324
+ # * `AND` two thresholds together: `\{ "And": [ \{ "Dimensions": \{
325
+ # "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [
326
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}, \{
327
+ # "Dimensions": \{ "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE",
328
+ # "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ]
329
+ # \} \} ] \}`
330
+ #
331
+ # * `OR` two thresholds together: `\{ "Or": [ \{ "Dimensions": \{
332
+ # "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [
333
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}, \{
334
+ # "Dimensions": \{ "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE",
335
+ # "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ]
336
+ # \} \} ] \}`
337
+ #
338
+ #
339
+ #
340
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html
341
+ # @return [Types::Expression]
342
+ #
251
343
  # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/AnomalySubscription AWS API Documentation
252
344
  #
253
345
  class AnomalySubscription < Struct.new(
@@ -257,7 +349,8 @@ module Aws::CostExplorer
257
349
  :subscribers,
258
350
  :threshold,
259
351
  :frequency,
260
- :subscription_name)
352
+ :subscription_name,
353
+ :threshold_expression)
261
354
  SENSITIVE = []
262
355
  include Aws::Structure
263
356
  end
@@ -1208,12 +1301,22 @@ module Aws::CostExplorer
1208
1301
  # @!attribute [rw] key
1209
1302
  # The names of the metadata types that you can use to filter and group
1210
1303
  # your results. For example, `AZ` returns a list of Availability
1211
- # Zones. `LINK_ACCOUNT_NAME` and `SERVICE_CODE` can only be used in
1304
+ # Zones.
1305
+ #
1306
+ # Not all dimensions are supported in each API. Refer to the
1307
+ # documentation for each specific API to see what is supported.
1308
+ #
1309
+ # `LINK_ACCOUNT_NAME` and `SERVICE_CODE` can only be used in
1212
1310
  # [CostCategoryRule][1].
1213
1311
  #
1312
+ # `ANOMALY_TOTAL_IMPACT_ABSOLUTE` and
1313
+ # `ANOMALY_TOTAL_IMPACT_PERCENTAGE` can only be used in
1314
+ # [AnomalySubscriptions][2].
1214
1315
  #
1215
1316
  #
1216
- # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/AAPI_CostCategoryRule.html
1317
+ #
1318
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategoryRule.html
1319
+ # [2]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AnomalySubscription.html
1217
1320
  # @return [String]
1218
1321
  #
1219
1322
  # @!attribute [rw] values
@@ -1223,8 +1326,12 @@ module Aws::CostExplorer
1223
1326
  #
1224
1327
  # @!attribute [rw] match_options
1225
1328
  # The match options that you can use to filter your results.
1329
+ #
1226
1330
  # `MatchOptions` is only applicable for actions related to Cost
1227
- # Category. The default values for `MatchOptions` are `EQUALS` and
1331
+ # Category and Anomaly Subscriptions. Refer to the documentation for
1332
+ # each specific API to see what is supported.
1333
+ #
1334
+ # The default values for `MatchOptions` are `EQUALS` and
1228
1335
  # `CASE_SENSITIVE`.
1229
1336
  # @return [Array<String>]
1230
1337
  #
@@ -1567,45 +1674,81 @@ module Aws::CostExplorer
1567
1674
  include Aws::Structure
1568
1675
  end
1569
1676
 
1570
- # Use `Expression` to filter by cost or by usage. There are two
1571
- # patterns:
1677
+ # Use `Expression` to filter in various Cost Explorer APIs.
1678
+ #
1679
+ # Not all `Expression` types are supported in each API. Refer to the
1680
+ # documentation for each specific API to see what is supported.
1681
+ #
1682
+ # There are two patterns:
1683
+ #
1684
+ # * Simple dimension values.
1685
+ #
1686
+ # * There are three types of simple dimension values:
1687
+ # `CostCategories`, `Tags`, and `Dimensions`.
1572
1688
  #
1573
- # * Simple dimension values - You can set the dimension name and values
1574
- # for the filters that you plan to use. For example, you can filter
1575
- # for `REGION==us-east-1 OR REGION==us-west-1`. For
1576
- # `GetRightsizingRecommendation`, the Region is a full name (for
1577
- # example, `REGION==US East (N. Virginia)`. The `Expression` example
1578
- # is as follows:
1689
+ # * Specify the `CostCategories` field to define a filter that acts
1690
+ # on Cost Categories.
1579
1691
  #
1580
- # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
1581
- # “us-west-1” ] \} \}`
1692
+ # * Specify the `Tags` field to define a filter that acts on Cost
1693
+ # Allocation Tags.
1582
1694
  #
1583
- # The list of dimension values are OR'd together to retrieve cost or
1584
- # usage data. You can create `Expression` and `DimensionValues`
1585
- # objects using either `with*` methods or `set*` methods in multiple
1586
- # lines.
1695
+ # * Specify the `Dimensions` field to define a filter that acts on
1696
+ # the [ `DimensionValues` ][1].
1587
1697
  #
1588
- # * Compound dimension values with logical operations - You can use
1589
- # multiple `Expression` types and the logical operators `AND/OR/NOT`
1590
- # to create a list of one or more `Expression` objects. By doing this,
1591
- # you can filter on more advanced options. For example, you can filter
1592
- # on `((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type ==
1593
- # Type1)) AND (USAGE_TYPE != DataTransfer)`. The `Expression` for that
1594
- # is as follows:
1698
+ # * For each filter type, you can set the dimension name and values
1699
+ # for the filters that you plan to use.
1595
1700
  #
1596
- # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION", "Values":
1597
- # [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key": "TagName",
1598
- # "Values": ["Value1"] \} \} ]\}, \{"Not": \{"Dimensions": \{ "Key":
1599
- # "USAGE_TYPE", "Values": ["DataTransfer"] \}\}\} ] \} `
1701
+ # * For example, you can filter for `REGION==us-east-1 OR
1702
+ # REGION==us-west-1`. For `GetRightsizingRecommendation`, the
1703
+ # Region is a full name (for example, `REGION==US East (N.
1704
+ # Virginia)`.
1705
+ #
1706
+ # * The corresponding `Expression` for this example is as follows:
1707
+ # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
1708
+ # “us-west-1” ] \} \}`
1709
+ #
1710
+ # * As shown in the previous example, lists of dimension values are
1711
+ # combined with `OR` when applying the filter.
1712
+ #
1713
+ # * You can also set different match options to further control how
1714
+ # the filter behaves. Not all APIs support match options. Refer to
1715
+ # the documentation for each specific API to see what is supported.
1716
+ #
1717
+ # * For example, you can filter for linked account names that start
1718
+ # with “a”.
1719
+ #
1720
+ # * The corresponding `Expression` for this example is as follows:
1721
+ # `\{ "Dimensions": \{ "Key": "LINKED_ACCOUNT_NAME",
1722
+ # "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] \} \}`
1723
+ #
1724
+ # * Compound `Expression` types with logical operations.
1725
+ #
1726
+ # * You can use multiple `Expression` types and the logical operators
1727
+ # `AND/OR/NOT` to create a list of one or more `Expression` objects.
1728
+ # By doing this, you can filter by more advanced options.
1729
+ #
1730
+ # * For example, you can filter by `((REGION == us-east-1 OR REGION ==
1731
+ # us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
1732
+ # DataTransfer)`.
1733
+ #
1734
+ # * The corresponding `Expression` for this example is as follows: `\{
1735
+ # "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION", "Values": [
1736
+ # "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key": "TagName",
1737
+ # "Values": ["Value1"] \} \} ]\}, \{"Not": \{"Dimensions": \{ "Key":
1738
+ # "USAGE_TYPE", "Values": ["DataTransfer"] \}\}\} ] \} `
1600
1739
  #
1601
1740
  # <note markdown="1"> Because each `Expression` can have only one operator, the service
1602
1741
  # returns an error if more than one is specified. The following
1603
- # example shows an `Expression` object that creates an error.
1742
+ # example shows an `Expression` object that creates an error: ` \{
1743
+ # "And": [ ... ], "Dimensions": \{ "Key": "USAGE_TYPE", "Values": [
1744
+ # "DataTransfer" ] \} \} `
1604
1745
  #
1605
- # </note>
1746
+ # The following is an example of the corresponding error message:
1747
+ # `"Expression has more than one roots. Only one root operator is
1748
+ # allowed for each expression: And, Or, Not, Dimensions, Tags,
1749
+ # CostCategories"`
1606
1750
  #
1607
- # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension":
1608
- # "USAGE_TYPE", "Values": [ "DataTransfer" ] \} \} `
1751
+ # </note>
1609
1752
  #
1610
1753
  # <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR and
1611
1754
  # NOT isn't supported. OR isn't supported between different
@@ -1619,6 +1762,10 @@ module Aws::CostExplorer
1619
1762
  #
1620
1763
  # </note>
1621
1764
  #
1765
+ #
1766
+ #
1767
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
1768
+ #
1622
1769
  # @!attribute [rw] or
1623
1770
  # Return results that match either `Dimension` object.
1624
1771
  # @return [Array<Types::Expression>]
@@ -2156,46 +2303,84 @@ module Aws::CostExplorer
2156
2303
  # @return [String]
2157
2304
  #
2158
2305
  # @!attribute [rw] filter
2159
- # Use `Expression` to filter by cost or by usage. There are two
2160
- # patterns:
2161
- #
2162
- # * Simple dimension values - You can set the dimension name and
2163
- # values for the filters that you plan to use. For example, you can
2164
- # filter for `REGION==us-east-1 OR REGION==us-west-1`. For
2165
- # `GetRightsizingRecommendation`, the Region is a full name (for
2166
- # example, `REGION==US East (N. Virginia)`. The `Expression` example
2167
- # is as follows:
2168
- #
2169
- # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
2170
- # “us-west-1” ] \} \}`
2171
- #
2172
- # The list of dimension values are OR'd together to retrieve cost
2173
- # or usage data. You can create `Expression` and `DimensionValues`
2174
- # objects using either `with*` methods or `set*` methods in multiple
2175
- # lines.
2176
- #
2177
- # * Compound dimension values with logical operations - You can use
2178
- # multiple `Expression` types and the logical operators `AND/OR/NOT`
2179
- # to create a list of one or more `Expression` objects. By doing
2180
- # this, you can filter on more advanced options. For example, you
2181
- # can filter on `((REGION == us-east-1 OR REGION == us-west-1) OR
2182
- # (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)`. The
2183
- # `Expression` for that is as follows:
2184
- #
2185
- # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
2186
- # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
2187
- # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
2188
- # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values": ["DataTransfer"]
2189
- # \}\}\} ] \} `
2306
+ # Use `Expression` to filter in various Cost Explorer APIs.
2307
+ #
2308
+ # Not all `Expression` types are supported in each API. Refer to the
2309
+ # documentation for each specific API to see what is supported.
2310
+ #
2311
+ # There are two patterns:
2312
+ #
2313
+ # * Simple dimension values.
2314
+ #
2315
+ # * There are three types of simple dimension values:
2316
+ # `CostCategories`, `Tags`, and `Dimensions`.
2317
+ #
2318
+ # * Specify the `CostCategories` field to define a filter that
2319
+ # acts on Cost Categories.
2320
+ #
2321
+ # * Specify the `Tags` field to define a filter that acts on Cost
2322
+ # Allocation Tags.
2323
+ #
2324
+ # * Specify the `Dimensions` field to define a filter that acts on
2325
+ # the [ `DimensionValues` ][1].
2326
+ #
2327
+ # * For each filter type, you can set the dimension name and values
2328
+ # for the filters that you plan to use.
2329
+ #
2330
+ # * For example, you can filter for `REGION==us-east-1 OR
2331
+ # REGION==us-west-1`. For `GetRightsizingRecommendation`, the
2332
+ # Region is a full name (for example, `REGION==US East (N.
2333
+ # Virginia)`.
2334
+ #
2335
+ # * The corresponding `Expression` for this example is as follows:
2336
+ # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
2337
+ # “us-west-1” ] \} \}`
2338
+ #
2339
+ # * As shown in the previous example, lists of dimension values
2340
+ # are combined with `OR` when applying the filter.
2341
+ #
2342
+ # * You can also set different match options to further control how
2343
+ # the filter behaves. Not all APIs support match options. Refer to
2344
+ # the documentation for each specific API to see what is
2345
+ # supported.
2346
+ #
2347
+ # * For example, you can filter for linked account names that
2348
+ # start with “a”.
2349
+ #
2350
+ # * The corresponding `Expression` for this example is as follows:
2351
+ # `\{ "Dimensions": \{ "Key": "LINKED_ACCOUNT_NAME",
2352
+ # "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] \} \}`
2353
+ #
2354
+ # * Compound `Expression` types with logical operations.
2355
+ #
2356
+ # * You can use multiple `Expression` types and the logical
2357
+ # operators `AND/OR/NOT` to create a list of one or more
2358
+ # `Expression` objects. By doing this, you can filter by more
2359
+ # advanced options.
2360
+ #
2361
+ # * For example, you can filter by `((REGION == us-east-1 OR REGION
2362
+ # == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
2363
+ # DataTransfer)`.
2364
+ #
2365
+ # * The corresponding `Expression` for this example is as follows:
2366
+ # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
2367
+ # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
2368
+ # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
2369
+ # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values":
2370
+ # ["DataTransfer"] \}\}\} ] \} `
2190
2371
  #
2191
2372
  # <note markdown="1"> Because each `Expression` can have only one operator, the service
2192
2373
  # returns an error if more than one is specified. The following
2193
- # example shows an `Expression` object that creates an error.
2374
+ # example shows an `Expression` object that creates an error: ` \{
2375
+ # "And": [ ... ], "Dimensions": \{ "Key": "USAGE_TYPE", "Values": [
2376
+ # "DataTransfer" ] \} \} `
2194
2377
  #
2195
- # </note>
2378
+ # The following is an example of the corresponding error message:
2379
+ # `"Expression has more than one roots. Only one root operator is
2380
+ # allowed for each expression: And, Or, Not, Dimensions, Tags,
2381
+ # CostCategories"`
2196
2382
  #
2197
- # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension":
2198
- # "USAGE_TYPE", "Values": [ "DataTransfer" ] \} \} `
2383
+ # </note>
2199
2384
  #
2200
2385
  # <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR
2201
2386
  # and NOT isn't supported. OR isn't supported between different
@@ -2208,6 +2393,10 @@ module Aws::CostExplorer
2208
2393
  # `LINKED_ACCOUNT`.
2209
2394
  #
2210
2395
  # </note>
2396
+ #
2397
+ #
2398
+ #
2399
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
2211
2400
  # @return [Types::Expression]
2212
2401
  #
2213
2402
  # @!attribute [rw] sort_by
@@ -2611,46 +2800,84 @@ module Aws::CostExplorer
2611
2800
  # @return [String]
2612
2801
  #
2613
2802
  # @!attribute [rw] filter
2614
- # Use `Expression` to filter by cost or by usage. There are two
2615
- # patterns:
2616
- #
2617
- # * Simple dimension values - You can set the dimension name and
2618
- # values for the filters that you plan to use. For example, you can
2619
- # filter for `REGION==us-east-1 OR REGION==us-west-1`. For
2620
- # `GetRightsizingRecommendation`, the Region is a full name (for
2621
- # example, `REGION==US East (N. Virginia)`. The `Expression` example
2622
- # is as follows:
2623
- #
2624
- # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
2625
- # “us-west-1” ] \} \}`
2626
- #
2627
- # The list of dimension values are OR'd together to retrieve cost
2628
- # or usage data. You can create `Expression` and `DimensionValues`
2629
- # objects using either `with*` methods or `set*` methods in multiple
2630
- # lines.
2631
- #
2632
- # * Compound dimension values with logical operations - You can use
2633
- # multiple `Expression` types and the logical operators `AND/OR/NOT`
2634
- # to create a list of one or more `Expression` objects. By doing
2635
- # this, you can filter on more advanced options. For example, you
2636
- # can filter on `((REGION == us-east-1 OR REGION == us-west-1) OR
2637
- # (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)`. The
2638
- # `Expression` for that is as follows:
2639
- #
2640
- # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
2641
- # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
2642
- # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
2643
- # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values": ["DataTransfer"]
2644
- # \}\}\} ] \} `
2803
+ # Use `Expression` to filter in various Cost Explorer APIs.
2804
+ #
2805
+ # Not all `Expression` types are supported in each API. Refer to the
2806
+ # documentation for each specific API to see what is supported.
2807
+ #
2808
+ # There are two patterns:
2809
+ #
2810
+ # * Simple dimension values.
2811
+ #
2812
+ # * There are three types of simple dimension values:
2813
+ # `CostCategories`, `Tags`, and `Dimensions`.
2814
+ #
2815
+ # * Specify the `CostCategories` field to define a filter that
2816
+ # acts on Cost Categories.
2817
+ #
2818
+ # * Specify the `Tags` field to define a filter that acts on Cost
2819
+ # Allocation Tags.
2820
+ #
2821
+ # * Specify the `Dimensions` field to define a filter that acts on
2822
+ # the [ `DimensionValues` ][1].
2823
+ #
2824
+ # * For each filter type, you can set the dimension name and values
2825
+ # for the filters that you plan to use.
2826
+ #
2827
+ # * For example, you can filter for `REGION==us-east-1 OR
2828
+ # REGION==us-west-1`. For `GetRightsizingRecommendation`, the
2829
+ # Region is a full name (for example, `REGION==US East (N.
2830
+ # Virginia)`.
2831
+ #
2832
+ # * The corresponding `Expression` for this example is as follows:
2833
+ # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
2834
+ # “us-west-1” ] \} \}`
2835
+ #
2836
+ # * As shown in the previous example, lists of dimension values
2837
+ # are combined with `OR` when applying the filter.
2838
+ #
2839
+ # * You can also set different match options to further control how
2840
+ # the filter behaves. Not all APIs support match options. Refer to
2841
+ # the documentation for each specific API to see what is
2842
+ # supported.
2843
+ #
2844
+ # * For example, you can filter for linked account names that
2845
+ # start with “a”.
2846
+ #
2847
+ # * The corresponding `Expression` for this example is as follows:
2848
+ # `\{ "Dimensions": \{ "Key": "LINKED_ACCOUNT_NAME",
2849
+ # "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] \} \}`
2850
+ #
2851
+ # * Compound `Expression` types with logical operations.
2852
+ #
2853
+ # * You can use multiple `Expression` types and the logical
2854
+ # operators `AND/OR/NOT` to create a list of one or more
2855
+ # `Expression` objects. By doing this, you can filter by more
2856
+ # advanced options.
2857
+ #
2858
+ # * For example, you can filter by `((REGION == us-east-1 OR REGION
2859
+ # == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
2860
+ # DataTransfer)`.
2861
+ #
2862
+ # * The corresponding `Expression` for this example is as follows:
2863
+ # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
2864
+ # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
2865
+ # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
2866
+ # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values":
2867
+ # ["DataTransfer"] \}\}\} ] \} `
2645
2868
  #
2646
2869
  # <note markdown="1"> Because each `Expression` can have only one operator, the service
2647
2870
  # returns an error if more than one is specified. The following
2648
- # example shows an `Expression` object that creates an error.
2871
+ # example shows an `Expression` object that creates an error: ` \{
2872
+ # "And": [ ... ], "Dimensions": \{ "Key": "USAGE_TYPE", "Values": [
2873
+ # "DataTransfer" ] \} \} `
2649
2874
  #
2650
- # </note>
2875
+ # The following is an example of the corresponding error message:
2876
+ # `"Expression has more than one roots. Only one root operator is
2877
+ # allowed for each expression: And, Or, Not, Dimensions, Tags,
2878
+ # CostCategories"`
2651
2879
  #
2652
- # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension":
2653
- # "USAGE_TYPE", "Values": [ "DataTransfer" ] \} \} `
2880
+ # </note>
2654
2881
  #
2655
2882
  # <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR
2656
2883
  # and NOT isn't supported. OR isn't supported between different
@@ -2663,6 +2890,10 @@ module Aws::CostExplorer
2663
2890
  # `LINKED_ACCOUNT`.
2664
2891
  #
2665
2892
  # </note>
2893
+ #
2894
+ #
2895
+ #
2896
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
2666
2897
  # @return [Types::Expression]
2667
2898
  #
2668
2899
  # @!attribute [rw] sort_by
@@ -3044,46 +3275,84 @@ module Aws::CostExplorer
3044
3275
  # @return [String]
3045
3276
  #
3046
3277
  # @!attribute [rw] filter
3047
- # Use `Expression` to filter by cost or by usage. There are two
3048
- # patterns:
3049
- #
3050
- # * Simple dimension values - You can set the dimension name and
3051
- # values for the filters that you plan to use. For example, you can
3052
- # filter for `REGION==us-east-1 OR REGION==us-west-1`. For
3053
- # `GetRightsizingRecommendation`, the Region is a full name (for
3054
- # example, `REGION==US East (N. Virginia)`. The `Expression` example
3055
- # is as follows:
3056
- #
3057
- # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
3058
- # “us-west-1” ] \} \}`
3059
- #
3060
- # The list of dimension values are OR'd together to retrieve cost
3061
- # or usage data. You can create `Expression` and `DimensionValues`
3062
- # objects using either `with*` methods or `set*` methods in multiple
3063
- # lines.
3064
- #
3065
- # * Compound dimension values with logical operations - You can use
3066
- # multiple `Expression` types and the logical operators `AND/OR/NOT`
3067
- # to create a list of one or more `Expression` objects. By doing
3068
- # this, you can filter on more advanced options. For example, you
3069
- # can filter on `((REGION == us-east-1 OR REGION == us-west-1) OR
3070
- # (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)`. The
3071
- # `Expression` for that is as follows:
3072
- #
3073
- # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
3074
- # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
3075
- # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
3076
- # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values": ["DataTransfer"]
3077
- # \}\}\} ] \} `
3278
+ # Use `Expression` to filter in various Cost Explorer APIs.
3279
+ #
3280
+ # Not all `Expression` types are supported in each API. Refer to the
3281
+ # documentation for each specific API to see what is supported.
3282
+ #
3283
+ # There are two patterns:
3284
+ #
3285
+ # * Simple dimension values.
3286
+ #
3287
+ # * There are three types of simple dimension values:
3288
+ # `CostCategories`, `Tags`, and `Dimensions`.
3289
+ #
3290
+ # * Specify the `CostCategories` field to define a filter that
3291
+ # acts on Cost Categories.
3292
+ #
3293
+ # * Specify the `Tags` field to define a filter that acts on Cost
3294
+ # Allocation Tags.
3295
+ #
3296
+ # * Specify the `Dimensions` field to define a filter that acts on
3297
+ # the [ `DimensionValues` ][1].
3298
+ #
3299
+ # * For each filter type, you can set the dimension name and values
3300
+ # for the filters that you plan to use.
3301
+ #
3302
+ # * For example, you can filter for `REGION==us-east-1 OR
3303
+ # REGION==us-west-1`. For `GetRightsizingRecommendation`, the
3304
+ # Region is a full name (for example, `REGION==US East (N.
3305
+ # Virginia)`.
3306
+ #
3307
+ # * The corresponding `Expression` for this example is as follows:
3308
+ # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
3309
+ # “us-west-1” ] \} \}`
3310
+ #
3311
+ # * As shown in the previous example, lists of dimension values
3312
+ # are combined with `OR` when applying the filter.
3313
+ #
3314
+ # * You can also set different match options to further control how
3315
+ # the filter behaves. Not all APIs support match options. Refer to
3316
+ # the documentation for each specific API to see what is
3317
+ # supported.
3318
+ #
3319
+ # * For example, you can filter for linked account names that
3320
+ # start with “a”.
3321
+ #
3322
+ # * The corresponding `Expression` for this example is as follows:
3323
+ # `\{ "Dimensions": \{ "Key": "LINKED_ACCOUNT_NAME",
3324
+ # "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] \} \}`
3325
+ #
3326
+ # * Compound `Expression` types with logical operations.
3327
+ #
3328
+ # * You can use multiple `Expression` types and the logical
3329
+ # operators `AND/OR/NOT` to create a list of one or more
3330
+ # `Expression` objects. By doing this, you can filter by more
3331
+ # advanced options.
3332
+ #
3333
+ # * For example, you can filter by `((REGION == us-east-1 OR REGION
3334
+ # == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
3335
+ # DataTransfer)`.
3336
+ #
3337
+ # * The corresponding `Expression` for this example is as follows:
3338
+ # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
3339
+ # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
3340
+ # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
3341
+ # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values":
3342
+ # ["DataTransfer"] \}\}\} ] \} `
3078
3343
  #
3079
3344
  # <note markdown="1"> Because each `Expression` can have only one operator, the service
3080
3345
  # returns an error if more than one is specified. The following
3081
- # example shows an `Expression` object that creates an error.
3346
+ # example shows an `Expression` object that creates an error: ` \{
3347
+ # "And": [ ... ], "Dimensions": \{ "Key": "USAGE_TYPE", "Values": [
3348
+ # "DataTransfer" ] \} \} `
3082
3349
  #
3083
- # </note>
3350
+ # The following is an example of the corresponding error message:
3351
+ # `"Expression has more than one roots. Only one root operator is
3352
+ # allowed for each expression: And, Or, Not, Dimensions, Tags,
3353
+ # CostCategories"`
3084
3354
  #
3085
- # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension":
3086
- # "USAGE_TYPE", "Values": [ "DataTransfer" ] \} \} `
3355
+ # </note>
3087
3356
  #
3088
3357
  # <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR
3089
3358
  # and NOT isn't supported. OR isn't supported between different
@@ -3096,6 +3365,10 @@ module Aws::CostExplorer
3096
3365
  # `LINKED_ACCOUNT`.
3097
3366
  #
3098
3367
  # </note>
3368
+ #
3369
+ #
3370
+ #
3371
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
3099
3372
  # @return [Types::Expression]
3100
3373
  #
3101
3374
  # @!attribute [rw] account_scope
@@ -3330,46 +3603,84 @@ module Aws::CostExplorer
3330
3603
  end
3331
3604
 
3332
3605
  # @!attribute [rw] filter
3333
- # Use `Expression` to filter by cost or by usage. There are two
3334
- # patterns:
3335
- #
3336
- # * Simple dimension values - You can set the dimension name and
3337
- # values for the filters that you plan to use. For example, you can
3338
- # filter for `REGION==us-east-1 OR REGION==us-west-1`. For
3339
- # `GetRightsizingRecommendation`, the Region is a full name (for
3340
- # example, `REGION==US East (N. Virginia)`. The `Expression` example
3341
- # is as follows:
3342
- #
3343
- # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
3344
- # “us-west-1” ] \} \}`
3345
- #
3346
- # The list of dimension values are OR'd together to retrieve cost
3347
- # or usage data. You can create `Expression` and `DimensionValues`
3348
- # objects using either `with*` methods or `set*` methods in multiple
3349
- # lines.
3350
- #
3351
- # * Compound dimension values with logical operations - You can use
3352
- # multiple `Expression` types and the logical operators `AND/OR/NOT`
3353
- # to create a list of one or more `Expression` objects. By doing
3354
- # this, you can filter on more advanced options. For example, you
3355
- # can filter on `((REGION == us-east-1 OR REGION == us-west-1) OR
3356
- # (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)`. The
3357
- # `Expression` for that is as follows:
3358
- #
3359
- # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
3360
- # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
3361
- # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
3362
- # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values": ["DataTransfer"]
3363
- # \}\}\} ] \} `
3606
+ # Use `Expression` to filter in various Cost Explorer APIs.
3607
+ #
3608
+ # Not all `Expression` types are supported in each API. Refer to the
3609
+ # documentation for each specific API to see what is supported.
3610
+ #
3611
+ # There are two patterns:
3612
+ #
3613
+ # * Simple dimension values.
3614
+ #
3615
+ # * There are three types of simple dimension values:
3616
+ # `CostCategories`, `Tags`, and `Dimensions`.
3617
+ #
3618
+ # * Specify the `CostCategories` field to define a filter that
3619
+ # acts on Cost Categories.
3620
+ #
3621
+ # * Specify the `Tags` field to define a filter that acts on Cost
3622
+ # Allocation Tags.
3623
+ #
3624
+ # * Specify the `Dimensions` field to define a filter that acts on
3625
+ # the [ `DimensionValues` ][1].
3626
+ #
3627
+ # * For each filter type, you can set the dimension name and values
3628
+ # for the filters that you plan to use.
3629
+ #
3630
+ # * For example, you can filter for `REGION==us-east-1 OR
3631
+ # REGION==us-west-1`. For `GetRightsizingRecommendation`, the
3632
+ # Region is a full name (for example, `REGION==US East (N.
3633
+ # Virginia)`.
3634
+ #
3635
+ # * The corresponding `Expression` for this example is as follows:
3636
+ # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
3637
+ # “us-west-1” ] \} \}`
3638
+ #
3639
+ # * As shown in the previous example, lists of dimension values
3640
+ # are combined with `OR` when applying the filter.
3641
+ #
3642
+ # * You can also set different match options to further control how
3643
+ # the filter behaves. Not all APIs support match options. Refer to
3644
+ # the documentation for each specific API to see what is
3645
+ # supported.
3646
+ #
3647
+ # * For example, you can filter for linked account names that
3648
+ # start with “a”.
3649
+ #
3650
+ # * The corresponding `Expression` for this example is as follows:
3651
+ # `\{ "Dimensions": \{ "Key": "LINKED_ACCOUNT_NAME",
3652
+ # "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] \} \}`
3653
+ #
3654
+ # * Compound `Expression` types with logical operations.
3655
+ #
3656
+ # * You can use multiple `Expression` types and the logical
3657
+ # operators `AND/OR/NOT` to create a list of one or more
3658
+ # `Expression` objects. By doing this, you can filter by more
3659
+ # advanced options.
3660
+ #
3661
+ # * For example, you can filter by `((REGION == us-east-1 OR REGION
3662
+ # == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
3663
+ # DataTransfer)`.
3664
+ #
3665
+ # * The corresponding `Expression` for this example is as follows:
3666
+ # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
3667
+ # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
3668
+ # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
3669
+ # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values":
3670
+ # ["DataTransfer"] \}\}\} ] \} `
3364
3671
  #
3365
3672
  # <note markdown="1"> Because each `Expression` can have only one operator, the service
3366
3673
  # returns an error if more than one is specified. The following
3367
- # example shows an `Expression` object that creates an error.
3674
+ # example shows an `Expression` object that creates an error: ` \{
3675
+ # "And": [ ... ], "Dimensions": \{ "Key": "USAGE_TYPE", "Values": [
3676
+ # "DataTransfer" ] \} \} `
3368
3677
  #
3369
- # </note>
3678
+ # The following is an example of the corresponding error message:
3679
+ # `"Expression has more than one roots. Only one root operator is
3680
+ # allowed for each expression: And, Or, Not, Dimensions, Tags,
3681
+ # CostCategories"`
3370
3682
  #
3371
- # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension":
3372
- # "USAGE_TYPE", "Values": [ "DataTransfer" ] \} \} `
3683
+ # </note>
3373
3684
  #
3374
3685
  # <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR
3375
3686
  # and NOT isn't supported. OR isn't supported between different
@@ -3382,6 +3693,10 @@ module Aws::CostExplorer
3382
3693
  # `LINKED_ACCOUNT`.
3383
3694
  #
3384
3695
  # </note>
3696
+ #
3697
+ #
3698
+ #
3699
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
3385
3700
  # @return [Types::Expression]
3386
3701
  #
3387
3702
  # @!attribute [rw] configuration
@@ -3882,46 +4197,84 @@ module Aws::CostExplorer
3882
4197
  # @return [String]
3883
4198
  #
3884
4199
  # @!attribute [rw] filter
3885
- # Use `Expression` to filter by cost or by usage. There are two
3886
- # patterns:
3887
- #
3888
- # * Simple dimension values - You can set the dimension name and
3889
- # values for the filters that you plan to use. For example, you can
3890
- # filter for `REGION==us-east-1 OR REGION==us-west-1`. For
3891
- # `GetRightsizingRecommendation`, the Region is a full name (for
3892
- # example, `REGION==US East (N. Virginia)`. The `Expression` example
3893
- # is as follows:
3894
- #
3895
- # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
3896
- # “us-west-1” ] \} \}`
3897
- #
3898
- # The list of dimension values are OR'd together to retrieve cost
3899
- # or usage data. You can create `Expression` and `DimensionValues`
3900
- # objects using either `with*` methods or `set*` methods in multiple
3901
- # lines.
3902
- #
3903
- # * Compound dimension values with logical operations - You can use
3904
- # multiple `Expression` types and the logical operators `AND/OR/NOT`
3905
- # to create a list of one or more `Expression` objects. By doing
3906
- # this, you can filter on more advanced options. For example, you
3907
- # can filter on `((REGION == us-east-1 OR REGION == us-west-1) OR
3908
- # (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)`. The
3909
- # `Expression` for that is as follows:
3910
- #
3911
- # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
3912
- # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
3913
- # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
3914
- # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values": ["DataTransfer"]
3915
- # \}\}\} ] \} `
4200
+ # Use `Expression` to filter in various Cost Explorer APIs.
4201
+ #
4202
+ # Not all `Expression` types are supported in each API. Refer to the
4203
+ # documentation for each specific API to see what is supported.
4204
+ #
4205
+ # There are two patterns:
4206
+ #
4207
+ # * Simple dimension values.
4208
+ #
4209
+ # * There are three types of simple dimension values:
4210
+ # `CostCategories`, `Tags`, and `Dimensions`.
4211
+ #
4212
+ # * Specify the `CostCategories` field to define a filter that
4213
+ # acts on Cost Categories.
4214
+ #
4215
+ # * Specify the `Tags` field to define a filter that acts on Cost
4216
+ # Allocation Tags.
4217
+ #
4218
+ # * Specify the `Dimensions` field to define a filter that acts on
4219
+ # the [ `DimensionValues` ][1].
4220
+ #
4221
+ # * For each filter type, you can set the dimension name and values
4222
+ # for the filters that you plan to use.
4223
+ #
4224
+ # * For example, you can filter for `REGION==us-east-1 OR
4225
+ # REGION==us-west-1`. For `GetRightsizingRecommendation`, the
4226
+ # Region is a full name (for example, `REGION==US East (N.
4227
+ # Virginia)`.
4228
+ #
4229
+ # * The corresponding `Expression` for this example is as follows:
4230
+ # `\{ "Dimensions": \{ "Key": "REGION", "Values": [ "us-east-1",
4231
+ # “us-west-1” ] \} \}`
4232
+ #
4233
+ # * As shown in the previous example, lists of dimension values
4234
+ # are combined with `OR` when applying the filter.
4235
+ #
4236
+ # * You can also set different match options to further control how
4237
+ # the filter behaves. Not all APIs support match options. Refer to
4238
+ # the documentation for each specific API to see what is
4239
+ # supported.
4240
+ #
4241
+ # * For example, you can filter for linked account names that
4242
+ # start with “a”.
4243
+ #
4244
+ # * The corresponding `Expression` for this example is as follows:
4245
+ # `\{ "Dimensions": \{ "Key": "LINKED_ACCOUNT_NAME",
4246
+ # "MatchOptions": [ "STARTS_WITH" ], "Values": [ "a" ] \} \}`
4247
+ #
4248
+ # * Compound `Expression` types with logical operations.
4249
+ #
4250
+ # * You can use multiple `Expression` types and the logical
4251
+ # operators `AND/OR/NOT` to create a list of one or more
4252
+ # `Expression` objects. By doing this, you can filter by more
4253
+ # advanced options.
4254
+ #
4255
+ # * For example, you can filter by `((REGION == us-east-1 OR REGION
4256
+ # == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
4257
+ # DataTransfer)`.
4258
+ #
4259
+ # * The corresponding `Expression` for this example is as follows:
4260
+ # `\{ "And": [ \{"Or": [ \{"Dimensions": \{ "Key": "REGION",
4261
+ # "Values": [ "us-east-1", "us-west-1" ] \}\}, \{"Tags": \{ "Key":
4262
+ # "TagName", "Values": ["Value1"] \} \} ]\}, \{"Not":
4263
+ # \{"Dimensions": \{ "Key": "USAGE_TYPE", "Values":
4264
+ # ["DataTransfer"] \}\}\} ] \} `
3916
4265
  #
3917
4266
  # <note markdown="1"> Because each `Expression` can have only one operator, the service
3918
4267
  # returns an error if more than one is specified. The following
3919
- # example shows an `Expression` object that creates an error.
4268
+ # example shows an `Expression` object that creates an error: ` \{
4269
+ # "And": [ ... ], "Dimensions": \{ "Key": "USAGE_TYPE", "Values": [
4270
+ # "DataTransfer" ] \} \} `
3920
4271
  #
3921
- # </note>
4272
+ # The following is an example of the corresponding error message:
4273
+ # `"Expression has more than one roots. Only one root operator is
4274
+ # allowed for each expression: And, Or, Not, Dimensions, Tags,
4275
+ # CostCategories"`
3922
4276
  #
3923
- # ` \{ "And": [ ... ], "DimensionValues": \{ "Dimension":
3924
- # "USAGE_TYPE", "Values": [ "DataTransfer" ] \} \} `
4277
+ # </note>
3925
4278
  #
3926
4279
  # <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR
3927
4280
  # and NOT isn't supported. OR isn't supported between different
@@ -3934,6 +4287,10 @@ module Aws::CostExplorer
3934
4287
  # `LINKED_ACCOUNT`.
3935
4288
  #
3936
4289
  # </note>
4290
+ #
4291
+ #
4292
+ #
4293
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
3937
4294
  # @return [Types::Expression]
3938
4295
  #
3939
4296
  # @!attribute [rw] sort_by
@@ -4188,14 +4545,39 @@ module Aws::CostExplorer
4188
4545
  # @return [Float]
4189
4546
  #
4190
4547
  # @!attribute [rw] total_impact
4191
- # The cumulative dollar value that's observed for an anomaly.
4548
+ # The cumulative dollar difference between the total actual spend and
4549
+ # total expected spend. It is calculated as `TotalActualSpend -
4550
+ # TotalExpectedSpend`.
4551
+ # @return [Float]
4552
+ #
4553
+ # @!attribute [rw] total_actual_spend
4554
+ # The cumulative dollar amount that was actually spent during the
4555
+ # anomaly.
4556
+ # @return [Float]
4557
+ #
4558
+ # @!attribute [rw] total_expected_spend
4559
+ # The cumulative dollar amount that was expected to be spent during
4560
+ # the anomaly. It is calculated using advanced machine learning models
4561
+ # to determine the typical spending pattern based on historical data
4562
+ # for a customer.
4563
+ # @return [Float]
4564
+ #
4565
+ # @!attribute [rw] total_impact_percentage
4566
+ # The cumulative percentage difference between the total actual spend
4567
+ # and total expected spend. It is calculated as `(TotalImpact /
4568
+ # TotalExpectedSpend) * 100`. When `TotalExpectedSpend` is zero, this
4569
+ # field is omitted. Expected spend can be zero in situations such as
4570
+ # when you start to use a service for the first time.
4192
4571
  # @return [Float]
4193
4572
  #
4194
4573
  # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/Impact AWS API Documentation
4195
4574
  #
4196
4575
  class Impact < Struct.new(
4197
4576
  :max_impact,
4198
- :total_impact)
4577
+ :total_impact,
4578
+ :total_actual_spend,
4579
+ :total_expected_spend,
4580
+ :total_impact_percentage)
4199
4581
  SENSITIVE = []
4200
4582
  include Aws::Structure
4201
4583
  end
@@ -5272,8 +5654,10 @@ module Aws::CostExplorer
5272
5654
  include Aws::Structure
5273
5655
  end
5274
5656
 
5275
- # The combination of Amazon Web Service, linked account, Region, and
5276
- # usage type where a cost anomaly is observed.
5657
+ # The combination of Amazon Web Service, linked account, linked account
5658
+ # name, Region, and usage type where a cost anomaly is observed. The
5659
+ # linked account name will only be available when the account name can
5660
+ # be identified.
5277
5661
  #
5278
5662
  # @!attribute [rw] service
5279
5663
  # The Amazon Web Service name that's associated with the cost
@@ -5293,13 +5677,19 @@ module Aws::CostExplorer
5293
5677
  # The `UsageType` value that's associated with the cost anomaly.
5294
5678
  # @return [String]
5295
5679
  #
5680
+ # @!attribute [rw] linked_account_name
5681
+ # The member account name value that's associated with the cost
5682
+ # anomaly.
5683
+ # @return [String]
5684
+ #
5296
5685
  # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/RootCause AWS API Documentation
5297
5686
  #
5298
5687
  class RootCause < Struct.new(
5299
5688
  :service,
5300
5689
  :region,
5301
5690
  :linked_account,
5302
- :usage_type)
5691
+ :usage_type,
5692
+ :linked_account_name)
5303
5693
  SENSITIVE = []
5304
5694
  include Aws::Structure
5305
5695
  end
@@ -6243,7 +6633,13 @@ module Aws::CostExplorer
6243
6633
  # @return [String]
6244
6634
  #
6245
6635
  # @!attribute [rw] threshold
6636
+ # (deprecated)
6637
+ #
6246
6638
  # The update to the threshold value for receiving notifications.
6639
+ #
6640
+ # This field has been deprecated. To update a threshold, use
6641
+ # ThresholdExpression. Continued use of Threshold will be treated as
6642
+ # shorthand syntax for a ThresholdExpression.
6247
6643
  # @return [Float]
6248
6644
  #
6249
6645
  # @!attribute [rw] frequency
@@ -6263,6 +6659,44 @@ module Aws::CostExplorer
6263
6659
  # The new name of the subscription.
6264
6660
  # @return [String]
6265
6661
  #
6662
+ # @!attribute [rw] threshold_expression
6663
+ # The update to the [Expression][1] object used to specify the
6664
+ # anomalies that you want to generate alerts for. This supports
6665
+ # dimensions and nested expressions. The supported dimensions are
6666
+ # `ANOMALY_TOTAL_IMPACT_ABSOLUTE` and
6667
+ # `ANOMALY_TOTAL_IMPACT_PERCENTAGE`. The supported nested expression
6668
+ # types are `AND` and `OR`. The match option `GREATER_THAN_OR_EQUAL`
6669
+ # is required. Values must be numbers between 0 and 10,000,000,000.
6670
+ #
6671
+ # The following are examples of valid ThresholdExpressions:
6672
+ #
6673
+ # * Absolute threshold: `\{ "Dimensions": \{ "Key":
6674
+ # "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [
6675
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}`
6676
+ #
6677
+ # * Percentage threshold: `\{ "Dimensions": \{ "Key":
6678
+ # "ANOMALY_TOTAL_IMPACT_PERCENTAGE", "MatchOptions": [
6679
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}`
6680
+ #
6681
+ # * `AND` two thresholds together: `\{ "And": [ \{ "Dimensions": \{
6682
+ # "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [
6683
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}, \{
6684
+ # "Dimensions": \{ "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE",
6685
+ # "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ]
6686
+ # \} \} ] \}`
6687
+ #
6688
+ # * `OR` two thresholds together: `\{ "Or": [ \{ "Dimensions": \{
6689
+ # "Key": "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [
6690
+ # "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ] \} \}, \{
6691
+ # "Dimensions": \{ "Key": "ANOMALY_TOTAL_IMPACT_PERCENTAGE",
6692
+ # "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], "Values": [ "100" ]
6693
+ # \} \} ] \}`
6694
+ #
6695
+ #
6696
+ #
6697
+ # [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html
6698
+ # @return [Types::Expression]
6699
+ #
6266
6700
  # @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/UpdateAnomalySubscriptionRequest AWS API Documentation
6267
6701
  #
6268
6702
  class UpdateAnomalySubscriptionRequest < Struct.new(
@@ -6271,7 +6705,8 @@ module Aws::CostExplorer
6271
6705
  :frequency,
6272
6706
  :monitor_arn_list,
6273
6707
  :subscribers,
6274
- :subscription_name)
6708
+ :subscription_name,
6709
+ :threshold_expression)
6275
6710
  SENSITIVE = []
6276
6711
  include Aws::Structure
6277
6712
  end