Skip to content

GetReservationCoverageRequest

Source code in docs_src/capo_cost_explorer/types/get_reservation_coverage_request.py
class GetReservationCoverageRequest(TypedDict, closed=True):
    time_period: "capo_cost_explorer.types.date_interval.DateInterval"
    """<p>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 <code>start</code> is <code>2017-01-01</code> and <code>end</code> is <code>2017-05-01</code>, then the cost and usage data is retrieved from <code>2017-01-01</code> up to and including <code>2017-04-30</code> but not including <code>2017-05-01</code>. </p>"""
    group_by: NotRequired["capo_cost_explorer.types.group_definitions.GroupDefinitions"]
    """<p>You can group the data by the following attributes. The attributes that you can use depend on the service in the <code>SERVICE</code> filter. If you don't provide a <code>SERVICE</code> filter, Cost Explorer uses Amazon Elastic Compute Cloud - Compute.</p> <ul> <li> <p>Amazon Elastic Compute Cloud - Compute: <code>AZ</code>, <code>INSTANCE_TYPE</code>, <code>INSTANCE_TYPE_FAMILY</code>, <code>LINKED_ACCOUNT</code>, <code>PLATFORM</code>, <code>REGION</code>, and <code>TENANCY</code> </p> </li> <li> <p>Amazon Relational Database Service: <code>AZ</code>, <code>DATABASE_ENGINE</code>, <code>DEPLOYMENT_OPTION</code>, <code>INSTANCE_TYPE</code>, <code>LINKED_ACCOUNT</code>, and <code>REGION</code> </p> </li> <li> <p>Amazon ElastiCache and Amazon MemoryDB: <code>AZ</code>, <code>CACHE_ENGINE</code>, <code>INSTANCE_TYPE</code>, <code>LINKED_ACCOUNT</code>, and <code>REGION</code> </p> </li> <li> <p>Amazon Redshift, Amazon Elasticsearch Service, and Amazon OpenSearch Service: <code>AZ</code>, <code>INSTANCE_TYPE</code>, <code>LINKED_ACCOUNT</code>, and <code>REGION</code> </p> </li> </ul> <p>If you specify two <code>SERVICE</code> values, use only attributes that both services support. You can specify up to four attributes, and only the <code>DIMENSION</code> type is supported.</p>"""
    granularity: NotRequired["capo_cost_explorer.types.granularity.Granularity"]
    """<p>The granularity of the Amazon Web Services cost data for the reservation. Valid values are <code>MONTHLY</code> and <code>DAILY</code>.</p> <p>If <code>GroupBy</code> is set, <code>Granularity</code> can't be set. If <code>Granularity</code> isn't set, the response object doesn't include <code>Granularity</code>, either <code>MONTHLY</code> or <code>DAILY</code>.</p> <p>The <code>GetReservationCoverage</code> operation supports only <code>DAILY</code> and <code>MONTHLY</code> granularities.</p>"""
    filter: NotRequired["capo_cost_explorer.types.expression.Expression"]
    """<p>Filters coverage data by dimensions. You can filter by the following dimensions:</p> <ul> <li> <p>AZ</p> </li> <li> <p>CACHE_ENGINE</p> </li> <li> <p>DATABASE_ENGINE</p> </li> <li> <p>DEPLOYMENT_OPTION</p> </li> <li> <p>INSTANCE_TYPE</p> </li> <li> <p>INSTANCE_TYPE_FAMILY</p> </li> <li> <p>LINKED_ACCOUNT</p> </li> <li> <p>PLATFORM</p> </li> <li> <p>REGION</p> </li> <li> <p>SERVICE</p> <note> <p>Supported values for <code>SERVICE</code> are 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 two <code>SERVICE</code> values.</p> </note> </li> <li> <p>TAG</p> </li> <li> <p>TENANCY</p> </li> </ul> <p>The dimensions that you can use depend on the service in the <code>SERVICE</code> filter. <code>CACHE_ENGINE</code> applies only to Amazon ElastiCache and Amazon MemoryDB. <code>DATABASE_ENGINE</code> and <code>DEPLOYMENT_OPTION</code> apply only to Amazon Relational Database Service. <code>INSTANCE_TYPE_FAMILY</code>, <code>PLATFORM</code>, and <code>TENANCY</code> apply only to Amazon Elastic Compute Cloud - Compute. If you specify two <code>SERVICE</code> values, use only dimensions that both services support.</p> <p> <code>GetReservationCoverage</code> uses the same <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a> object as the other operations, with the following limits. <code>Filter</code> accepts one <code>Dimensions</code>, <code>Tags</code>, or <code>CostCategories</code> expression, a <code>Not</code> of one of these expressions, or one <code>And</code> of two or more of these. The operation doesn't support <code>Or</code>, an <code>And</code> inside an <code>And</code>, or a <code>Not</code> around any other expression.</p> <p>Each dimension can appear only once in a filter, including inside a <code>Not</code>. <code>Tags</code> is the only exception: you can filter on more than one tag key. You can use only one <code>CostCategories</code> expression. To filter on several values of a dimension, put them in one expression. The operation ORs multiple values for a dimension together.</p> <p>If you don't provide a <code>SERVICE</code> filter, Cost Explorer defaults to EC2.</p>"""
    metrics: NotRequired["capo_cost_explorer.types.metric_names.MetricNames"]
    """<p>The measurement that you want your reservation coverage reported in.</p> <p>Valid values are <code>Hour</code>, <code>Unit</code>, and <code>Cost</code>. You can use multiple values in a request. <code>Hour</code> returns <code>CoverageHours</code>, <code>Unit</code> returns <code>CoverageNormalizedUnits</code>, and <code>Cost</code> returns <code>CoverageCost</code>. <code>Unit</code> is supported only for Amazon Elastic Compute Cloud - Compute. If you don't specify <code>Metrics</code>, the response includes only <code>CoverageHours</code>.</p>"""
    next_page_token: NotRequired[
        "capo_cost_explorer.types.next_page_token.NextPageToken"
    ]
    """<p>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.</p>"""
    sort_by: NotRequired["capo_cost_explorer.types.sort_definition.SortDefinition"]
    """<p>The value by which you want to sort the data.</p> <p>The following values are supported for <code>Key</code>:</p> <ul> <li> <p> <code>OnDemandCost</code> </p> </li> <li> <p> <code>CoverageHoursPercentage</code> </p> </li> <li> <p> <code>OnDemandHours</code> </p> </li> <li> <p> <code>ReservedHours</code> </p> </li> <li> <p> <code>TotalRunningHours</code> </p> </li> <li> <p> <code>CoverageNormalizedUnitsPercentage</code> </p> </li> <li> <p> <code>OnDemandNormalizedUnits</code> </p> </li> <li> <p> <code>ReservedNormalizedUnits</code> </p> </li> <li> <p> <code>TotalRunningNormalizedUnits</code> </p> </li> <li> <p> <code>Time</code> </p> </li> </ul> <p>If you specify <code>SortBy</code>, you must also specify <code>SortOrder</code>. There is no default. Supported values for <code>SortOrder</code> are <code>ASCENDING</code> or <code>DESCENDING</code>.</p>"""
    max_results: NotRequired["capo_cost_explorer.types.max_results.MaxResults"]
    """<p>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.</p>"""

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 SERVICE are 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 two SERVICE values.

  • 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, and TENANCY

  • Amazon Relational Database Service: AZ, DATABASE_ENGINE, DEPLOYMENT_OPTION, INSTANCE_TYPE, LINKED_ACCOUNT, and REGION

  • Amazon ElastiCache and Amazon MemoryDB: AZ, CACHE_ENGINE, INSTANCE_TYPE, LINKED_ACCOUNT, and REGION

  • Amazon Redshift, Amazon Elasticsearch Service, and Amazon OpenSearch Service: AZ, INSTANCE_TYPE, LINKED_ACCOUNT, and REGION

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.