Skip to content

GetReservationUtilizationRequest

Source code in docs_src/capo_cost_explorer/types/get_reservation_utilization_request.py
class GetReservationUtilizationRequest(TypedDict, closed=True):
    time_period: "capo_cost_explorer.types.date_interval.DateInterval"
    """<p>Sets the start and end dates for retrieving Reserved Instance (RI) utilization. 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>Groups only by <code>SUBSCRIPTION_ID</code>. Metadata is included.</p>"""
    granularity: NotRequired["capo_cost_explorer.types.granularity.Granularity"]
    """<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>. If both <code>GroupBy</code> and <code>Granularity</code> aren't set, <code>GetReservationUtilization</code> defaults to <code>DAILY</code>.</p> <p>The <code>GetReservationUtilization</code> operation supports only <code>DAILY</code> and <code>MONTHLY</code> granularities.</p>"""
    filter: NotRequired["capo_cost_explorer.types.expression.Expression"]
    """<p>Filters utilization data by dimensions. You can filter by the following dimensions:</p> <ul> <li> <p>AZ</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>If not specified, the <code>SERVICE</code> filter defaults to Amazon Elastic Compute Cloud - Compute. 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.</p> </note> </li> <li> <p>SCOPE</p> <p>The valid values for <code>SCOPE</code> are the following. Use them exactly as shown, including capitalization.</p> <ul> <li> <p> <code>Region</code> - Matches reservations that aren't tied to an Availability Zone.</p> </li> <li> <p> <code>Availability Zone</code> - Matches reservations for a specific Availability Zone.</p> </li> </ul> </li> <li> <p>SUBSCRIPTION_ID</p> <note> <p>Values for <code>SUBSCRIPTION_ID</code> must contain only digits.</p> </note> </li> <li> <p>TENANCY</p> </li> </ul> <p> <code>GetReservationUtilization</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> expression, a <code>Not</code> of one <code>Dimensions</code> expression, 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>, a <code>Not</code> around any other expression, <code>Tags</code>, or <code>CostCategories</code>.</p> <p>Each dimension can appear only once in a filter, including inside a <code>Not</code>. To filter on several values of a dimension, put them in one expression. The operation ORs multiple values for a dimension together.</p>"""
    sort_by: NotRequired["capo_cost_explorer.types.sort_definition.SortDefinition"]
    """<p>The value that you want to sort the data by.</p> <p>The following values are supported for <code>Key</code>:</p> <ul> <li> <p> <code>UtilizationPercentage</code> </p> </li> <li> <p> <code>UtilizationPercentageInUnits</code> </p> </li> <li> <p> <code>PurchasedHours</code> </p> </li> <li> <p> <code>PurchasedUnits</code> </p> </li> <li> <p> <code>TotalActualHours</code> </p> </li> <li> <p> <code>TotalActualUnits</code> </p> </li> <li> <p> <code>UnusedHours</code> </p> </li> <li> <p> <code>UnusedUnits</code> </p> </li> <li> <p> <code>OnDemandCostOfRIHoursUsed</code> </p> </li> <li> <p> <code>NetRISavings</code> </p> </li> <li> <p> <code>TotalPotentialRISavings</code> </p> </li> <li> <p> <code>AmortizedUpfrontFee</code> </p> </li> <li> <p> <code>AmortizedRecurringFee</code> </p> </li> <li> <p> <code>TotalAmortizedFee</code> </p> </li> <li> <p> <code>RICostForUnusedHours</code> </p> </li> <li> <p> <code>RealizedSavings</code> </p> </li> <li> <p> <code>UnrealizedSavings</code> </p> </li> </ul> <p> <code>SortBy</code> applies only when you set <code>GroupBy</code>. If you don't set <code>GroupBy</code>, the operation ignores <code>SortBy</code>, including its <code>Key</code>.</p> <p>If you specify <code>SortBy</code> with <code>GroupBy</code>, you must also specify <code>SortOrder</code>. There is no default. The supported values for <code>SortOrder</code> are <code>ASCENDING</code> and <code>DESCENDING</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>"""
    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 utilization data by dimensions. You can filter by the following dimensions:

  • AZ

  • INSTANCE_TYPE

  • INSTANCE_TYPE_FAMILY

  • LINKED_ACCOUNT

  • PLATFORM

  • REGION

  • SERVICE

    If not specified, the SERVICE filter defaults to Amazon Elastic Compute Cloud - Compute. 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.

  • SCOPE

    The valid values for SCOPE are the following. Use them exactly as shown, including capitalization.

    • Region - Matches reservations that aren't tied to an Availability Zone.

    • Availability Zone - Matches reservations for a specific Availability Zone.

  • SUBSCRIPTION_ID

    Values for SUBSCRIPTION_ID must contain only digits.

  • TENANCY

GetReservationUtilization uses the same Expression object as the other operations, with the following limits. Filter accepts one Dimensions expression, a Not of one Dimensions expression, or one And of two or more of these. The operation doesn't support Or, an And inside an And, a Not around any other expression, Tags, or CostCategories.

Each dimension can appear only once in a filter, including inside a Not. To filter on several values of a dimension, put them in one expression. The operation ORs multiple values for a dimension together.

granularity instance-attribute

granularity: NotRequired[Granularity]

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. If both GroupBy and Granularity aren't set, GetReservationUtilization defaults to DAILY.

The GetReservationUtilization operation supports only DAILY and MONTHLY granularities.

group_by instance-attribute

group_by: NotRequired[GroupDefinitions]

Groups only by SUBSCRIPTION_ID. Metadata is included.

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.

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 that you want to sort the data by.

The following values are supported for Key:

  • UtilizationPercentage

  • UtilizationPercentageInUnits

  • PurchasedHours

  • PurchasedUnits

  • TotalActualHours

  • TotalActualUnits

  • UnusedHours

  • UnusedUnits

  • OnDemandCostOfRIHoursUsed

  • NetRISavings

  • TotalPotentialRISavings

  • AmortizedUpfrontFee

  • AmortizedRecurringFee

  • TotalAmortizedFee

  • RICostForUnusedHours

  • RealizedSavings

  • UnrealizedSavings

SortBy applies only when you set GroupBy. If you don't set GroupBy, the operation ignores SortBy, including its Key.

If you specify SortBy with GroupBy, you must also specify SortOrder. There is no default. The supported values for SortOrder are ASCENDING and DESCENDING.

time_period instance-attribute

time_period: DateInterval

Sets the start and end dates for retrieving Reserved Instance (RI) utilization. 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.