Get Cost And Usage Comparisons
| costexplorer_get_cost_and_usage_comparisons | R Documentation |
Retrieves cost and usage comparisons for your account between two periods within the last 13 months¶
Description¶
Retrieves cost and usage comparisons for your account between two periods within the last 13 months. If you have enabled multi-year data at monthly granularity, you can go back up to 38 months.
Usage¶
costexplorer_get_cost_and_usage_comparisons(BillingViewArn,
BaselineTimePeriod, ComparisonTimePeriod, MetricForComparison, Filter,
GroupBy, MaxResults, NextPageToken)
Arguments¶
BillingViewArn |
The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API. |
BaselineTimePeriod |
[required] The reference time period for comparison. This time period serves as the baseline against which other cost and usage data will be compared. The interval must start and end on the first day of a month, with a duration of exactly one month. |
ComparisonTimePeriod |
[required] The comparison time period for analysis. This time period's cost and usage data will be compared against the baseline time period. The interval must start and end on the first day of a month, with a duration of exactly one month. |
MetricForComparison |
[required] The cost and usage metric to compare. Valid values are
|
Filter |
Use Not all There are two patterns:
For the For the |
GroupBy |
You can group results using the attributes
|
MaxResults |
The maximum number of results that are returned for the request. |
NextPageToken |
The token to retrieve the next set of paginated results. |
Value¶
A list with the following syntax:
list(
CostAndUsageComparisons = list(
list(
CostAndUsageSelector = list(
Or = list(
list()
),
And = list(
list()
),
Not = list(),
Dimensions = list(
Key = "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"PAYER_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",
Values = list(
"string"
),
MatchOptions = list(
"EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"|"GREATER_THAN_OR_EQUAL"
)
),
Tags = list(
Key = "string",
Values = list(
"string"
),
MatchOptions = list(
"EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"|"GREATER_THAN_OR_EQUAL"
)
),
CostCategories = list(
Key = "string",
Values = list(
"string"
),
MatchOptions = list(
"EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"|"GREATER_THAN_OR_EQUAL"
)
)
),
Metrics = list(
list(
BaselineTimePeriodAmount = "string",
ComparisonTimePeriodAmount = "string",
Difference = "string",
Unit = "string"
)
)
)
),
TotalCostAndUsage = list(
list(
BaselineTimePeriodAmount = "string",
ComparisonTimePeriodAmount = "string",
Difference = "string",
Unit = "string"
)
),
NextPageToken = "string"
)
Request syntax¶
svc$get_cost_and_usage_comparisons(
BillingViewArn = "string",
BaselineTimePeriod = list(
Start = "string",
End = "string"
),
ComparisonTimePeriod = list(
Start = "string",
End = "string"
),
MetricForComparison = "string",
Filter = list(
Or = list(
list()
),
And = list(
list()
),
Not = list(),
Dimensions = list(
Key = "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"PAYER_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",
Values = list(
"string"
),
MatchOptions = list(
"EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"|"GREATER_THAN_OR_EQUAL"
)
),
Tags = list(
Key = "string",
Values = list(
"string"
),
MatchOptions = list(
"EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"|"GREATER_THAN_OR_EQUAL"
)
),
CostCategories = list(
Key = "string",
Values = list(
"string"
),
MatchOptions = list(
"EQUALS"|"ABSENT"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CASE_SENSITIVE"|"CASE_INSENSITIVE"|"GREATER_THAN_OR_EQUAL"
)
)
),
GroupBy = list(
list(
Type = "DIMENSION"|"TAG"|"COST_CATEGORY",
Key = "string"
)
),
MaxResults = 123,
NextPageToken = "string"
)