aws-sdk-costexplorer 1.125.0 → 1.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-costexplorer/client.rb +473 -1
- data/lib/aws-sdk-costexplorer/client_api.rb +108 -0
- data/lib/aws-sdk-costexplorer/types.rb +636 -0
- data/lib/aws-sdk-costexplorer.rb +1 -1
- data/sig/client.rbs +105 -0
- data/sig/types.rbs +65 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a245e704a6d57bedfd0ac0ed931f853267b915715bf1fb891e08cfdb9e8f52f6
|
4
|
+
data.tar.gz: 42fc67d7154afd7d0c48f8d56d2a143f1f3eb895b2d8c0166714d009e7a0b4cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26cc04741b195e7539c9bc87385b2cdb1d6ed75b604169781c77683694d9c33e367688688fbb80b067f9b5b15cf62b6c6a816a3782a772b29ed8e7db2489cf5f
|
7
|
+
data.tar.gz: 3c72f2d267f789538d6e72ae3e26d9ca9166cdeef8ca6518e1a976ccbecb4ba56004c3fa7d48cacedd0ce2714eb4612f5307ece15d127a906f323f6934b19bb4
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.126.0 (2025-05-27)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This release introduces Cost Comparison feature (GetCostAndUsageComparisons, GetCostComparisonDrivers) allowing you find cost variations across multiple dimensions and identify key drivers of spending changes.
|
8
|
+
|
4
9
|
1.125.0 (2025-05-12)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.126.0
|
@@ -1552,6 +1552,240 @@ module Aws::CostExplorer
|
|
1552
1552
|
req.send_request(options)
|
1553
1553
|
end
|
1554
1554
|
|
1555
|
+
# Retrieves cost and usage comparisons for your account between two
|
1556
|
+
# periods within the last 13 months. If you have enabled multi-year data
|
1557
|
+
# at monthly granularity, you can go back up to 38 months.
|
1558
|
+
#
|
1559
|
+
# @option params [String] :billing_view_arn
|
1560
|
+
# The Amazon Resource Name (ARN) that uniquely identifies a specific
|
1561
|
+
# billing view. The ARN is used to specify which particular billing view
|
1562
|
+
# you want to interact with or retrieve information from when making API
|
1563
|
+
# calls related to Amazon Web Services Billing and Cost Management
|
1564
|
+
# features. The BillingViewArn can be retrieved by calling the
|
1565
|
+
# ListBillingViews API.
|
1566
|
+
#
|
1567
|
+
# @option params [required, Types::DateInterval] :baseline_time_period
|
1568
|
+
# The reference time period for comparison. This time period serves as
|
1569
|
+
# the baseline against which other cost and usage data will be compared.
|
1570
|
+
# The interval must start and end on the first day of a month, with a
|
1571
|
+
# duration of exactly one month.
|
1572
|
+
#
|
1573
|
+
# @option params [required, Types::DateInterval] :comparison_time_period
|
1574
|
+
# The comparison time period for analysis. This time period's cost and
|
1575
|
+
# usage data will be compared against the baseline time period. The
|
1576
|
+
# interval must start and end on the first day of a month, with a
|
1577
|
+
# duration of exactly one month.
|
1578
|
+
#
|
1579
|
+
# @option params [required, String] :metric_for_comparison
|
1580
|
+
# The cost and usage metric to compare. Valid values are
|
1581
|
+
# `AmortizedCost`, `BlendedCost`, `NetAmortizedCost`,
|
1582
|
+
# `NetUnblendedCost`, `NormalizedUsageAmount`, `UnblendedCost`, and
|
1583
|
+
# `UsageQuantity`.
|
1584
|
+
#
|
1585
|
+
# @option params [Types::Expression] :filter
|
1586
|
+
# Use `Expression` to filter in various Cost Explorer APIs.
|
1587
|
+
#
|
1588
|
+
# Not all `Expression` types are supported in each API. Refer to the
|
1589
|
+
# documentation for each specific API to see what is supported.
|
1590
|
+
#
|
1591
|
+
# There are two patterns:
|
1592
|
+
#
|
1593
|
+
# * Simple dimension values.
|
1594
|
+
#
|
1595
|
+
# * There are three types of simple dimension values:
|
1596
|
+
# `CostCategories`, `Tags`, and `Dimensions`.
|
1597
|
+
#
|
1598
|
+
# * Specify the `CostCategories` field to define a filter that acts
|
1599
|
+
# on Cost Categories.
|
1600
|
+
#
|
1601
|
+
# * Specify the `Tags` field to define a filter that acts on Cost
|
1602
|
+
# Allocation Tags.
|
1603
|
+
#
|
1604
|
+
# * Specify the `Dimensions` field to define a filter that acts on
|
1605
|
+
# the [ `DimensionValues` ][1].
|
1606
|
+
# * For each filter type, you can set the dimension name and values
|
1607
|
+
# for the filters that you plan to use.
|
1608
|
+
#
|
1609
|
+
# * For example, you can filter for `REGION==us-east-1 OR
|
1610
|
+
# REGION==us-west-1`. For `GetRightsizingRecommendation`, the
|
1611
|
+
# Region is a full name (for example, `REGION==US East (N.
|
1612
|
+
# Virginia)`.
|
1613
|
+
#
|
1614
|
+
# * The corresponding `Expression` for this example is as follows:
|
1615
|
+
# `{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1",
|
1616
|
+
# "us-west-1" ] } }`
|
1617
|
+
#
|
1618
|
+
# * As shown in the previous example, lists of dimension values are
|
1619
|
+
# combined with `OR` when applying the filter.
|
1620
|
+
# * You can also set different match options to further control how
|
1621
|
+
# the filter behaves. Not all APIs support match options. Refer to
|
1622
|
+
# the documentation for each specific API to see what is supported.
|
1623
|
+
#
|
1624
|
+
# * For example, you can filter for linked account names that start
|
1625
|
+
# with "a".
|
1626
|
+
#
|
1627
|
+
# * The corresponding `Expression` for this example is as follows:
|
1628
|
+
# `{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions":
|
1629
|
+
# [ "STARTS_WITH" ], "Values": [ "a" ] } }`
|
1630
|
+
# * Compound `Expression` types with logical operations.
|
1631
|
+
#
|
1632
|
+
# * You can use multiple `Expression` types and the logical operators
|
1633
|
+
# `AND/OR/NOT` to create a list of one or more `Expression` objects.
|
1634
|
+
# By doing this, you can filter by more advanced options.
|
1635
|
+
#
|
1636
|
+
# * For example, you can filter by `((REGION == us-east-1 OR REGION ==
|
1637
|
+
# us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
|
1638
|
+
# DataTransfer)`.
|
1639
|
+
#
|
1640
|
+
# * The corresponding `Expression` for this example is as follows: `{
|
1641
|
+
# "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [
|
1642
|
+
# "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName",
|
1643
|
+
# "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key":
|
1644
|
+
# "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } `
|
1645
|
+
# <note markdown="1"> Because each `Expression` can have only one operator, the service
|
1646
|
+
# returns an error if more than one is specified. The following
|
1647
|
+
# example shows an `Expression` object that creates an error: ` {
|
1648
|
+
# "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [
|
1649
|
+
# "DataTransfer" ] } } `
|
1650
|
+
#
|
1651
|
+
# The following is an example of the corresponding error message:
|
1652
|
+
# `"Expression has more than one roots. Only one root operator is
|
1653
|
+
# allowed for each expression: And, Or, Not, Dimensions, Tags,
|
1654
|
+
# CostCategories"`
|
1655
|
+
#
|
1656
|
+
# </note>
|
1657
|
+
#
|
1658
|
+
# <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR and
|
1659
|
+
# NOT isn't supported. OR isn't supported between different
|
1660
|
+
# dimensions, or dimensions and tags. NOT operators aren't supported.
|
1661
|
+
# Dimensions are also limited to `LINKED_ACCOUNT`, `REGION`, or
|
1662
|
+
# `RIGHTSIZING_TYPE`.
|
1663
|
+
#
|
1664
|
+
# For the `GetReservationPurchaseRecommendation` action, only NOT is
|
1665
|
+
# supported. AND and OR aren't supported. Dimensions are limited to
|
1666
|
+
# `LINKED_ACCOUNT`.
|
1667
|
+
#
|
1668
|
+
# </note>
|
1669
|
+
#
|
1670
|
+
#
|
1671
|
+
#
|
1672
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
|
1673
|
+
#
|
1674
|
+
# @option params [Array<Types::GroupDefinition>] :group_by
|
1675
|
+
# You can group results using the attributes `DIMENSION`, `TAG`, and
|
1676
|
+
# `COST_CATEGORY`.
|
1677
|
+
#
|
1678
|
+
# @option params [Integer] :max_results
|
1679
|
+
# The maximum number of results that are returned for the request.
|
1680
|
+
#
|
1681
|
+
# @option params [String] :next_page_token
|
1682
|
+
# The token to retrieve the next set of paginated results.
|
1683
|
+
#
|
1684
|
+
# @return [Types::GetCostAndUsageComparisonsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1685
|
+
#
|
1686
|
+
# * {Types::GetCostAndUsageComparisonsResponse#cost_and_usage_comparisons #cost_and_usage_comparisons} => Array<Types::CostAndUsageComparison>
|
1687
|
+
# * {Types::GetCostAndUsageComparisonsResponse#total_cost_and_usage #total_cost_and_usage} => Hash<String,Types::ComparisonMetricValue>
|
1688
|
+
# * {Types::GetCostAndUsageComparisonsResponse#next_page_token #next_page_token} => String
|
1689
|
+
#
|
1690
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1691
|
+
#
|
1692
|
+
# @example Request syntax with placeholder values
|
1693
|
+
#
|
1694
|
+
# resp = client.get_cost_and_usage_comparisons({
|
1695
|
+
# billing_view_arn: "BillingViewArn",
|
1696
|
+
# baseline_time_period: { # required
|
1697
|
+
# start: "YearMonthDay", # required
|
1698
|
+
# end: "YearMonthDay", # required
|
1699
|
+
# },
|
1700
|
+
# comparison_time_period: { # required
|
1701
|
+
# start: "YearMonthDay", # required
|
1702
|
+
# end: "YearMonthDay", # required
|
1703
|
+
# },
|
1704
|
+
# metric_for_comparison: "MetricName", # required
|
1705
|
+
# filter: {
|
1706
|
+
# or: [
|
1707
|
+
# {
|
1708
|
+
# # recursive Expression
|
1709
|
+
# },
|
1710
|
+
# ],
|
1711
|
+
# and: [
|
1712
|
+
# {
|
1713
|
+
# # recursive Expression
|
1714
|
+
# },
|
1715
|
+
# ],
|
1716
|
+
# not: {
|
1717
|
+
# # recursive Expression
|
1718
|
+
# },
|
1719
|
+
# dimensions: {
|
1720
|
+
# key: "AZ", # accepts AZ, INSTANCE_TYPE, LINKED_ACCOUNT, LINKED_ACCOUNT_NAME, OPERATION, PURCHASE_TYPE, REGION, SERVICE, SERVICE_CODE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID, LEGAL_ENTITY_NAME, DEPLOYMENT_OPTION, DATABASE_ENGINE, CACHE_ENGINE, INSTANCE_TYPE_FAMILY, BILLING_ENTITY, RESERVATION_ID, RESOURCE_ID, RIGHTSIZING_TYPE, SAVINGS_PLANS_TYPE, SAVINGS_PLAN_ARN, PAYMENT_OPTION, AGREEMENT_END_DATE_TIME_AFTER, AGREEMENT_END_DATE_TIME_BEFORE, INVOICING_ENTITY, ANOMALY_TOTAL_IMPACT_ABSOLUTE, ANOMALY_TOTAL_IMPACT_PERCENTAGE
|
1721
|
+
# values: ["Value"],
|
1722
|
+
# match_options: ["EQUALS"], # accepts EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE, GREATER_THAN_OR_EQUAL
|
1723
|
+
# },
|
1724
|
+
# tags: {
|
1725
|
+
# key: "TagKey",
|
1726
|
+
# values: ["Value"],
|
1727
|
+
# match_options: ["EQUALS"], # accepts EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE, GREATER_THAN_OR_EQUAL
|
1728
|
+
# },
|
1729
|
+
# cost_categories: {
|
1730
|
+
# key: "CostCategoryName",
|
1731
|
+
# values: ["Value"],
|
1732
|
+
# match_options: ["EQUALS"], # accepts EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE, GREATER_THAN_OR_EQUAL
|
1733
|
+
# },
|
1734
|
+
# },
|
1735
|
+
# group_by: [
|
1736
|
+
# {
|
1737
|
+
# type: "DIMENSION", # accepts DIMENSION, TAG, COST_CATEGORY
|
1738
|
+
# key: "GroupDefinitionKey",
|
1739
|
+
# },
|
1740
|
+
# ],
|
1741
|
+
# max_results: 1,
|
1742
|
+
# next_page_token: "NextPageToken",
|
1743
|
+
# })
|
1744
|
+
#
|
1745
|
+
# @example Response structure
|
1746
|
+
#
|
1747
|
+
# resp.cost_and_usage_comparisons #=> Array
|
1748
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.or #=> Array
|
1749
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.or[0] #=> Types::Expression
|
1750
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.and #=> Array
|
1751
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.and[0] #=> Types::Expression
|
1752
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.not #=> Types::Expression
|
1753
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.dimensions.key #=> String, one of "AZ", "INSTANCE_TYPE", "LINKED_ACCOUNT", "LINKED_ACCOUNT_NAME", "OPERATION", "PURCHASE_TYPE", "REGION", "SERVICE", "SERVICE_CODE", "USAGE_TYPE", "USAGE_TYPE_GROUP", "RECORD_TYPE", "OPERATING_SYSTEM", "TENANCY", "SCOPE", "PLATFORM", "SUBSCRIPTION_ID", "LEGAL_ENTITY_NAME", "DEPLOYMENT_OPTION", "DATABASE_ENGINE", "CACHE_ENGINE", "INSTANCE_TYPE_FAMILY", "BILLING_ENTITY", "RESERVATION_ID", "RESOURCE_ID", "RIGHTSIZING_TYPE", "SAVINGS_PLANS_TYPE", "SAVINGS_PLAN_ARN", "PAYMENT_OPTION", "AGREEMENT_END_DATE_TIME_AFTER", "AGREEMENT_END_DATE_TIME_BEFORE", "INVOICING_ENTITY", "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "ANOMALY_TOTAL_IMPACT_PERCENTAGE"
|
1754
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.dimensions.values #=> Array
|
1755
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.dimensions.values[0] #=> String
|
1756
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.dimensions.match_options #=> Array
|
1757
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.dimensions.match_options[0] #=> String, one of "EQUALS", "ABSENT", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CASE_SENSITIVE", "CASE_INSENSITIVE", "GREATER_THAN_OR_EQUAL"
|
1758
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.tags.key #=> String
|
1759
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.tags.values #=> Array
|
1760
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.tags.values[0] #=> String
|
1761
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.tags.match_options #=> Array
|
1762
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.tags.match_options[0] #=> String, one of "EQUALS", "ABSENT", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CASE_SENSITIVE", "CASE_INSENSITIVE", "GREATER_THAN_OR_EQUAL"
|
1763
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.cost_categories.key #=> String
|
1764
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.cost_categories.values #=> Array
|
1765
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.cost_categories.values[0] #=> String
|
1766
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.cost_categories.match_options #=> Array
|
1767
|
+
# resp.cost_and_usage_comparisons[0].cost_and_usage_selector.cost_categories.match_options[0] #=> String, one of "EQUALS", "ABSENT", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CASE_SENSITIVE", "CASE_INSENSITIVE", "GREATER_THAN_OR_EQUAL"
|
1768
|
+
# resp.cost_and_usage_comparisons[0].metrics #=> Hash
|
1769
|
+
# resp.cost_and_usage_comparisons[0].metrics["MetricName"].baseline_time_period_amount #=> String
|
1770
|
+
# resp.cost_and_usage_comparisons[0].metrics["MetricName"].comparison_time_period_amount #=> String
|
1771
|
+
# resp.cost_and_usage_comparisons[0].metrics["MetricName"].difference #=> String
|
1772
|
+
# resp.cost_and_usage_comparisons[0].metrics["MetricName"].unit #=> String
|
1773
|
+
# resp.total_cost_and_usage #=> Hash
|
1774
|
+
# resp.total_cost_and_usage["MetricName"].baseline_time_period_amount #=> String
|
1775
|
+
# resp.total_cost_and_usage["MetricName"].comparison_time_period_amount #=> String
|
1776
|
+
# resp.total_cost_and_usage["MetricName"].difference #=> String
|
1777
|
+
# resp.total_cost_and_usage["MetricName"].unit #=> String
|
1778
|
+
# resp.next_page_token #=> String
|
1779
|
+
#
|
1780
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostAndUsageComparisons AWS API Documentation
|
1781
|
+
#
|
1782
|
+
# @overload get_cost_and_usage_comparisons(params = {})
|
1783
|
+
# @param [Hash] params ({})
|
1784
|
+
def get_cost_and_usage_comparisons(params = {}, options = {})
|
1785
|
+
req = build_request(:get_cost_and_usage_comparisons, params)
|
1786
|
+
req.send_request(options)
|
1787
|
+
end
|
1788
|
+
|
1555
1789
|
# Retrieves cost and usage metrics with resources for your account. You
|
1556
1790
|
# can specify which cost and usage-related metric, such as
|
1557
1791
|
# `BlendedCosts` or `UsageQuantity`, that you want the request to
|
@@ -1977,6 +2211,244 @@ module Aws::CostExplorer
|
|
1977
2211
|
req.send_request(options)
|
1978
2212
|
end
|
1979
2213
|
|
2214
|
+
# Retrieves key factors driving cost changes between two time periods
|
2215
|
+
# within the last 13 months, such as usage changes, discount changes,
|
2216
|
+
# and commitment-based savings. If you have enabled multi-year data at
|
2217
|
+
# monthly granularity, you can go back up to 38 months.
|
2218
|
+
#
|
2219
|
+
# @option params [String] :billing_view_arn
|
2220
|
+
# The Amazon Resource Name (ARN) that uniquely identifies a specific
|
2221
|
+
# billing view. The ARN is used to specify which particular billing view
|
2222
|
+
# you want to interact with or retrieve information from when making API
|
2223
|
+
# calls related to Amazon Web Services Billing and Cost Management
|
2224
|
+
# features. The BillingViewArn can be retrieved by calling the
|
2225
|
+
# ListBillingViews API.
|
2226
|
+
#
|
2227
|
+
# @option params [required, Types::DateInterval] :baseline_time_period
|
2228
|
+
# The reference time period for comparison. This time period serves as
|
2229
|
+
# the baseline against which other cost and usage data will be compared.
|
2230
|
+
# The interval must start and end on the first day of a month, with a
|
2231
|
+
# duration of exactly one month.
|
2232
|
+
#
|
2233
|
+
# @option params [required, Types::DateInterval] :comparison_time_period
|
2234
|
+
# The comparison time period for analysis. This time period's cost and
|
2235
|
+
# usage data will be compared against the baseline time period. The
|
2236
|
+
# interval must start and end on the first day of a month, with a
|
2237
|
+
# duration of exactly one month.
|
2238
|
+
#
|
2239
|
+
# @option params [required, String] :metric_for_comparison
|
2240
|
+
# The cost and usage metric to compare. Valid values are
|
2241
|
+
# `AmortizedCost`, `BlendedCost`, `NetAmortizedCost`,
|
2242
|
+
# `NetUnblendedCost`, `NormalizedUsageAmount`, `UnblendedCost`, and
|
2243
|
+
# `UsageQuantity`.
|
2244
|
+
#
|
2245
|
+
# @option params [Types::Expression] :filter
|
2246
|
+
# Use `Expression` to filter in various Cost Explorer APIs.
|
2247
|
+
#
|
2248
|
+
# Not all `Expression` types are supported in each API. Refer to the
|
2249
|
+
# documentation for each specific API to see what is supported.
|
2250
|
+
#
|
2251
|
+
# There are two patterns:
|
2252
|
+
#
|
2253
|
+
# * Simple dimension values.
|
2254
|
+
#
|
2255
|
+
# * There are three types of simple dimension values:
|
2256
|
+
# `CostCategories`, `Tags`, and `Dimensions`.
|
2257
|
+
#
|
2258
|
+
# * Specify the `CostCategories` field to define a filter that acts
|
2259
|
+
# on Cost Categories.
|
2260
|
+
#
|
2261
|
+
# * Specify the `Tags` field to define a filter that acts on Cost
|
2262
|
+
# Allocation Tags.
|
2263
|
+
#
|
2264
|
+
# * Specify the `Dimensions` field to define a filter that acts on
|
2265
|
+
# the [ `DimensionValues` ][1].
|
2266
|
+
# * For each filter type, you can set the dimension name and values
|
2267
|
+
# for the filters that you plan to use.
|
2268
|
+
#
|
2269
|
+
# * For example, you can filter for `REGION==us-east-1 OR
|
2270
|
+
# REGION==us-west-1`. For `GetRightsizingRecommendation`, the
|
2271
|
+
# Region is a full name (for example, `REGION==US East (N.
|
2272
|
+
# Virginia)`.
|
2273
|
+
#
|
2274
|
+
# * The corresponding `Expression` for this example is as follows:
|
2275
|
+
# `{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1",
|
2276
|
+
# "us-west-1" ] } }`
|
2277
|
+
#
|
2278
|
+
# * As shown in the previous example, lists of dimension values are
|
2279
|
+
# combined with `OR` when applying the filter.
|
2280
|
+
# * You can also set different match options to further control how
|
2281
|
+
# the filter behaves. Not all APIs support match options. Refer to
|
2282
|
+
# the documentation for each specific API to see what is supported.
|
2283
|
+
#
|
2284
|
+
# * For example, you can filter for linked account names that start
|
2285
|
+
# with "a".
|
2286
|
+
#
|
2287
|
+
# * The corresponding `Expression` for this example is as follows:
|
2288
|
+
# `{ "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions":
|
2289
|
+
# [ "STARTS_WITH" ], "Values": [ "a" ] } }`
|
2290
|
+
# * Compound `Expression` types with logical operations.
|
2291
|
+
#
|
2292
|
+
# * You can use multiple `Expression` types and the logical operators
|
2293
|
+
# `AND/OR/NOT` to create a list of one or more `Expression` objects.
|
2294
|
+
# By doing this, you can filter by more advanced options.
|
2295
|
+
#
|
2296
|
+
# * For example, you can filter by `((REGION == us-east-1 OR REGION ==
|
2297
|
+
# us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE !=
|
2298
|
+
# DataTransfer)`.
|
2299
|
+
#
|
2300
|
+
# * The corresponding `Expression` for this example is as follows: `{
|
2301
|
+
# "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [
|
2302
|
+
# "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName",
|
2303
|
+
# "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key":
|
2304
|
+
# "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] } `
|
2305
|
+
# <note markdown="1"> Because each `Expression` can have only one operator, the service
|
2306
|
+
# returns an error if more than one is specified. The following
|
2307
|
+
# example shows an `Expression` object that creates an error: ` {
|
2308
|
+
# "And": [ ... ], "Dimensions": { "Key": "USAGE_TYPE", "Values": [
|
2309
|
+
# "DataTransfer" ] } } `
|
2310
|
+
#
|
2311
|
+
# The following is an example of the corresponding error message:
|
2312
|
+
# `"Expression has more than one roots. Only one root operator is
|
2313
|
+
# allowed for each expression: And, Or, Not, Dimensions, Tags,
|
2314
|
+
# CostCategories"`
|
2315
|
+
#
|
2316
|
+
# </note>
|
2317
|
+
#
|
2318
|
+
# <note markdown="1"> For the `GetRightsizingRecommendation` action, a combination of OR and
|
2319
|
+
# NOT isn't supported. OR isn't supported between different
|
2320
|
+
# dimensions, or dimensions and tags. NOT operators aren't supported.
|
2321
|
+
# Dimensions are also limited to `LINKED_ACCOUNT`, `REGION`, or
|
2322
|
+
# `RIGHTSIZING_TYPE`.
|
2323
|
+
#
|
2324
|
+
# For the `GetReservationPurchaseRecommendation` action, only NOT is
|
2325
|
+
# supported. AND and OR aren't supported. Dimensions are limited to
|
2326
|
+
# `LINKED_ACCOUNT`.
|
2327
|
+
#
|
2328
|
+
# </note>
|
2329
|
+
#
|
2330
|
+
#
|
2331
|
+
#
|
2332
|
+
# [1]: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_DimensionValues.html
|
2333
|
+
#
|
2334
|
+
# @option params [Array<Types::GroupDefinition>] :group_by
|
2335
|
+
# You can group results using the attributes `DIMENSION`, `TAG`, and
|
2336
|
+
# `COST_CATEGORY`. Note that `SERVICE` and `USAGE_TYPE` dimensions are
|
2337
|
+
# automatically included in the cost comparison drivers analysis.
|
2338
|
+
#
|
2339
|
+
# @option params [Integer] :max_results
|
2340
|
+
# The maximum number of results that are returned for the request.
|
2341
|
+
#
|
2342
|
+
# @option params [String] :next_page_token
|
2343
|
+
# The token to retrieve the next set of paginated results.
|
2344
|
+
#
|
2345
|
+
# @return [Types::GetCostComparisonDriversResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2346
|
+
#
|
2347
|
+
# * {Types::GetCostComparisonDriversResponse#cost_comparison_drivers #cost_comparison_drivers} => Array<Types::CostComparisonDriver>
|
2348
|
+
# * {Types::GetCostComparisonDriversResponse#next_page_token #next_page_token} => String
|
2349
|
+
#
|
2350
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
2351
|
+
#
|
2352
|
+
# @example Request syntax with placeholder values
|
2353
|
+
#
|
2354
|
+
# resp = client.get_cost_comparison_drivers({
|
2355
|
+
# billing_view_arn: "BillingViewArn",
|
2356
|
+
# baseline_time_period: { # required
|
2357
|
+
# start: "YearMonthDay", # required
|
2358
|
+
# end: "YearMonthDay", # required
|
2359
|
+
# },
|
2360
|
+
# comparison_time_period: { # required
|
2361
|
+
# start: "YearMonthDay", # required
|
2362
|
+
# end: "YearMonthDay", # required
|
2363
|
+
# },
|
2364
|
+
# metric_for_comparison: "MetricName", # required
|
2365
|
+
# filter: {
|
2366
|
+
# or: [
|
2367
|
+
# {
|
2368
|
+
# # recursive Expression
|
2369
|
+
# },
|
2370
|
+
# ],
|
2371
|
+
# and: [
|
2372
|
+
# {
|
2373
|
+
# # recursive Expression
|
2374
|
+
# },
|
2375
|
+
# ],
|
2376
|
+
# not: {
|
2377
|
+
# # recursive Expression
|
2378
|
+
# },
|
2379
|
+
# dimensions: {
|
2380
|
+
# key: "AZ", # accepts AZ, INSTANCE_TYPE, LINKED_ACCOUNT, LINKED_ACCOUNT_NAME, OPERATION, PURCHASE_TYPE, REGION, SERVICE, SERVICE_CODE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID, LEGAL_ENTITY_NAME, DEPLOYMENT_OPTION, DATABASE_ENGINE, CACHE_ENGINE, INSTANCE_TYPE_FAMILY, BILLING_ENTITY, RESERVATION_ID, RESOURCE_ID, RIGHTSIZING_TYPE, SAVINGS_PLANS_TYPE, SAVINGS_PLAN_ARN, PAYMENT_OPTION, AGREEMENT_END_DATE_TIME_AFTER, AGREEMENT_END_DATE_TIME_BEFORE, INVOICING_ENTITY, ANOMALY_TOTAL_IMPACT_ABSOLUTE, ANOMALY_TOTAL_IMPACT_PERCENTAGE
|
2381
|
+
# values: ["Value"],
|
2382
|
+
# match_options: ["EQUALS"], # accepts EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE, GREATER_THAN_OR_EQUAL
|
2383
|
+
# },
|
2384
|
+
# tags: {
|
2385
|
+
# key: "TagKey",
|
2386
|
+
# values: ["Value"],
|
2387
|
+
# match_options: ["EQUALS"], # accepts EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE, GREATER_THAN_OR_EQUAL
|
2388
|
+
# },
|
2389
|
+
# cost_categories: {
|
2390
|
+
# key: "CostCategoryName",
|
2391
|
+
# values: ["Value"],
|
2392
|
+
# match_options: ["EQUALS"], # accepts EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE, GREATER_THAN_OR_EQUAL
|
2393
|
+
# },
|
2394
|
+
# },
|
2395
|
+
# group_by: [
|
2396
|
+
# {
|
2397
|
+
# type: "DIMENSION", # accepts DIMENSION, TAG, COST_CATEGORY
|
2398
|
+
# key: "GroupDefinitionKey",
|
2399
|
+
# },
|
2400
|
+
# ],
|
2401
|
+
# max_results: 1,
|
2402
|
+
# next_page_token: "NextPageToken",
|
2403
|
+
# })
|
2404
|
+
#
|
2405
|
+
# @example Response structure
|
2406
|
+
#
|
2407
|
+
# resp.cost_comparison_drivers #=> Array
|
2408
|
+
# resp.cost_comparison_drivers[0].cost_selector.or #=> Array
|
2409
|
+
# resp.cost_comparison_drivers[0].cost_selector.or[0] #=> Types::Expression
|
2410
|
+
# resp.cost_comparison_drivers[0].cost_selector.and #=> Array
|
2411
|
+
# resp.cost_comparison_drivers[0].cost_selector.and[0] #=> Types::Expression
|
2412
|
+
# resp.cost_comparison_drivers[0].cost_selector.not #=> Types::Expression
|
2413
|
+
# resp.cost_comparison_drivers[0].cost_selector.dimensions.key #=> String, one of "AZ", "INSTANCE_TYPE", "LINKED_ACCOUNT", "LINKED_ACCOUNT_NAME", "OPERATION", "PURCHASE_TYPE", "REGION", "SERVICE", "SERVICE_CODE", "USAGE_TYPE", "USAGE_TYPE_GROUP", "RECORD_TYPE", "OPERATING_SYSTEM", "TENANCY", "SCOPE", "PLATFORM", "SUBSCRIPTION_ID", "LEGAL_ENTITY_NAME", "DEPLOYMENT_OPTION", "DATABASE_ENGINE", "CACHE_ENGINE", "INSTANCE_TYPE_FAMILY", "BILLING_ENTITY", "RESERVATION_ID", "RESOURCE_ID", "RIGHTSIZING_TYPE", "SAVINGS_PLANS_TYPE", "SAVINGS_PLAN_ARN", "PAYMENT_OPTION", "AGREEMENT_END_DATE_TIME_AFTER", "AGREEMENT_END_DATE_TIME_BEFORE", "INVOICING_ENTITY", "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "ANOMALY_TOTAL_IMPACT_PERCENTAGE"
|
2414
|
+
# resp.cost_comparison_drivers[0].cost_selector.dimensions.values #=> Array
|
2415
|
+
# resp.cost_comparison_drivers[0].cost_selector.dimensions.values[0] #=> String
|
2416
|
+
# resp.cost_comparison_drivers[0].cost_selector.dimensions.match_options #=> Array
|
2417
|
+
# resp.cost_comparison_drivers[0].cost_selector.dimensions.match_options[0] #=> String, one of "EQUALS", "ABSENT", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CASE_SENSITIVE", "CASE_INSENSITIVE", "GREATER_THAN_OR_EQUAL"
|
2418
|
+
# resp.cost_comparison_drivers[0].cost_selector.tags.key #=> String
|
2419
|
+
# resp.cost_comparison_drivers[0].cost_selector.tags.values #=> Array
|
2420
|
+
# resp.cost_comparison_drivers[0].cost_selector.tags.values[0] #=> String
|
2421
|
+
# resp.cost_comparison_drivers[0].cost_selector.tags.match_options #=> Array
|
2422
|
+
# resp.cost_comparison_drivers[0].cost_selector.tags.match_options[0] #=> String, one of "EQUALS", "ABSENT", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CASE_SENSITIVE", "CASE_INSENSITIVE", "GREATER_THAN_OR_EQUAL"
|
2423
|
+
# resp.cost_comparison_drivers[0].cost_selector.cost_categories.key #=> String
|
2424
|
+
# resp.cost_comparison_drivers[0].cost_selector.cost_categories.values #=> Array
|
2425
|
+
# resp.cost_comparison_drivers[0].cost_selector.cost_categories.values[0] #=> String
|
2426
|
+
# resp.cost_comparison_drivers[0].cost_selector.cost_categories.match_options #=> Array
|
2427
|
+
# resp.cost_comparison_drivers[0].cost_selector.cost_categories.match_options[0] #=> String, one of "EQUALS", "ABSENT", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "CASE_SENSITIVE", "CASE_INSENSITIVE", "GREATER_THAN_OR_EQUAL"
|
2428
|
+
# resp.cost_comparison_drivers[0].metrics #=> Hash
|
2429
|
+
# resp.cost_comparison_drivers[0].metrics["MetricName"].baseline_time_period_amount #=> String
|
2430
|
+
# resp.cost_comparison_drivers[0].metrics["MetricName"].comparison_time_period_amount #=> String
|
2431
|
+
# resp.cost_comparison_drivers[0].metrics["MetricName"].difference #=> String
|
2432
|
+
# resp.cost_comparison_drivers[0].metrics["MetricName"].unit #=> String
|
2433
|
+
# resp.cost_comparison_drivers[0].cost_drivers #=> Array
|
2434
|
+
# resp.cost_comparison_drivers[0].cost_drivers[0].type #=> String
|
2435
|
+
# resp.cost_comparison_drivers[0].cost_drivers[0].name #=> String
|
2436
|
+
# resp.cost_comparison_drivers[0].cost_drivers[0].metrics #=> Hash
|
2437
|
+
# resp.cost_comparison_drivers[0].cost_drivers[0].metrics["MetricName"].baseline_time_period_amount #=> String
|
2438
|
+
# resp.cost_comparison_drivers[0].cost_drivers[0].metrics["MetricName"].comparison_time_period_amount #=> String
|
2439
|
+
# resp.cost_comparison_drivers[0].cost_drivers[0].metrics["MetricName"].difference #=> String
|
2440
|
+
# resp.cost_comparison_drivers[0].cost_drivers[0].metrics["MetricName"].unit #=> String
|
2441
|
+
# resp.next_page_token #=> String
|
2442
|
+
#
|
2443
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostComparisonDrivers AWS API Documentation
|
2444
|
+
#
|
2445
|
+
# @overload get_cost_comparison_drivers(params = {})
|
2446
|
+
# @param [Hash] params ({})
|
2447
|
+
def get_cost_comparison_drivers(params = {}, options = {})
|
2448
|
+
req = build_request(:get_cost_comparison_drivers, params)
|
2449
|
+
req.send_request(options)
|
2450
|
+
end
|
2451
|
+
|
1980
2452
|
# Retrieves a forecast for how much Amazon Web Services predicts that
|
1981
2453
|
# you will spend over the forecast time period that you select, based on
|
1982
2454
|
# your past costs.
|
@@ -5634,7 +6106,7 @@ module Aws::CostExplorer
|
|
5634
6106
|
tracer: tracer
|
5635
6107
|
)
|
5636
6108
|
context[:gem_name] = 'aws-sdk-costexplorer'
|
5637
|
-
context[:gem_version] = '1.
|
6109
|
+
context[:gem_version] = '1.126.0'
|
5638
6110
|
Seahorse::Client::Request.new(handlers, context)
|
5639
6111
|
end
|
5640
6112
|
|