GetReservationCoverageRequest
¶
Source code in docs_src/capo_cost_explorer/types/get_reservation_coverage_request.py
filter
instance-attribute
¶
filter: NotRequired[Expression]
Filters coverage data by dimensions. You can filter by the following dimensions:
-
AZ
-
CACHE_ENGINE
-
DATABASE_ENGINE
-
DEPLOYMENT_OPTION
-
INSTANCE_TYPE
-
INSTANCE_TYPE_FAMILY
-
LINKED_ACCOUNT
-
PLATFORM
-
REGION
-
SERVICE
Supported values for
SERVICEare Amazon Elastic Compute Cloud - Compute, Amazon Relational Database Service, Amazon ElastiCache, Amazon MemoryDB, Amazon Redshift, Amazon Elasticsearch Service, and Amazon OpenSearch Service. You can specify up to twoSERVICEvalues. -
TAG
-
TENANCY
The dimensions that you can use depend on the service in the SERVICE filter. CACHE_ENGINE applies only to Amazon ElastiCache and Amazon MemoryDB. DATABASE_ENGINE and DEPLOYMENT_OPTION apply only to Amazon Relational Database Service. INSTANCE_TYPE_FAMILY, PLATFORM, and TENANCY apply only to Amazon Elastic Compute Cloud - Compute. If you specify two SERVICE values, use only dimensions that both services support.
GetReservationCoverage uses the same Expression object as the other operations, with the following limits. Filter accepts one Dimensions, Tags, or CostCategories expression, a Not of one of these expressions, or one And of two or more of these. The operation doesn't support Or, an And inside an And, or a Not around any other expression.
Each dimension can appear only once in a filter, including inside a Not. Tags is the only exception: you can filter on more than one tag key. You can use only one CostCategories expression. To filter on several values of a dimension, put them in one expression. The operation ORs multiple values for a dimension together.
If you don't provide a SERVICE filter, Cost Explorer defaults to EC2.
granularity
instance-attribute
¶
granularity: NotRequired[Granularity]
The granularity of the Amazon Web Services cost data for the reservation. Valid values are MONTHLY and DAILY.
If GroupBy is set, Granularity can't be set. If Granularity isn't set, the response object doesn't include Granularity, either MONTHLY or DAILY.
The GetReservationCoverage operation supports only DAILY and MONTHLY granularities.
group_by
instance-attribute
¶
group_by: NotRequired[GroupDefinitions]
You can group the data by the following attributes. The attributes that you can use depend on the service in the SERVICE filter. If you don't provide a SERVICE filter, Cost Explorer uses Amazon Elastic Compute Cloud - Compute.
-
Amazon Elastic Compute Cloud - Compute:
AZ,INSTANCE_TYPE,INSTANCE_TYPE_FAMILY,LINKED_ACCOUNT,PLATFORM,REGION, andTENANCY -
Amazon Relational Database Service:
AZ,DATABASE_ENGINE,DEPLOYMENT_OPTION,INSTANCE_TYPE,LINKED_ACCOUNT, andREGION -
Amazon ElastiCache and Amazon MemoryDB:
AZ,CACHE_ENGINE,INSTANCE_TYPE,LINKED_ACCOUNT, andREGION -
Amazon Redshift, Amazon Elasticsearch Service, and Amazon OpenSearch Service:
AZ,INSTANCE_TYPE,LINKED_ACCOUNT, andREGION
If you specify two SERVICE values, use only attributes that both services support. You can specify up to four attributes, and only the DIMENSION type is supported.
max_results
instance-attribute
¶
max_results: NotRequired[MaxResults]
The maximum number of objects that you returned for this request. If more objects are available, in the response, Amazon Web Services provides a NextPageToken value that you can use in a subsequent call to get the next batch of objects.
metrics
instance-attribute
¶
metrics: NotRequired[MetricNames]
The measurement that you want your reservation coverage reported in.
Valid values are Hour, Unit, and Cost. You can use multiple values in a request. Hour returns CoverageHours, Unit returns CoverageNormalizedUnits, and Cost returns CoverageCost. Unit is supported only for Amazon Elastic Compute Cloud - Compute. If you don't specify Metrics, the response includes only CoverageHours.
next_page_token
instance-attribute
¶
next_page_token: NotRequired[NextPageToken]
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
sort_by
instance-attribute
¶
sort_by: NotRequired[SortDefinition]
The value by which you want to sort the data.
The following values are supported for Key:
-
OnDemandCost -
CoverageHoursPercentage -
OnDemandHours -
ReservedHours -
TotalRunningHours -
CoverageNormalizedUnitsPercentage -
OnDemandNormalizedUnits -
ReservedNormalizedUnits -
TotalRunningNormalizedUnits -
Time
If you specify SortBy, you must also specify SortOrder. There is no default. Supported values for SortOrder are ASCENDING or DESCENDING.
time_period
instance-attribute
¶
time_period: DateInterval
The start and end dates of the period that you want to retrieve data about reservation coverage for. You can retrieve data for a maximum of 13 months: the last 12 months and the current month. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01.