Skip to content

get_dimension_values async

get_dimension_values(
    time_period: DateInterval,
    dimension: Dimension,
    *,
    config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
    search_string: Optional[SearchString] = None,
    dimension_key: Optional[DimensionKey] = None,
    context: Optional[Context] = None,
    filter: Optional[Expression] = None,
    sort_by: Optional[SortDefinitions] = None,
    billing_view_arn: Optional[BillingViewArn] = None,
    max_results: Optional[MaxResults] = None,
    next_page_token: Optional[NextPageToken] = None,
) -> GetDimensionValuesResponse

Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string.

Parameters:

  • search_string (Optional[SearchString], default: None ) –

    The value that you want to search the filter values for.

  • time_period (DateInterval) –

    The start date and end date for retrieving the dimension values. 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.

  • dimension (Dimension) –

    The name of the dimension. Each Dimension is available for a different Context. For more information, see Context. LINK_ACCOUNT_NAME and SERVICE_CODE can only be used in CostCategoryRule.

    PRODUCT_ATTRIBUTE returns the product attribute keys that are available for your costs of supported services, or the values of the key that you specify in DimensionKey. PRODUCT_ATTRIBUTE is supported only in the COST_AND_USAGE context.

    IAM_PRINCIPAL, IDENTITY_CENTER_GROUP, and IDENTITY_CENTER_USER return values from your artificial intelligence (AI) usage only.

  • dimension_key (Optional[DimensionKey], default: None ) –

    The product attribute key to return values for, such as model. If you omit DimensionKey or set it to an empty string, the response lists the product attribute keys that are available for your costs of supported services instead. For the supported services, see ProductAttributeValues.

    If you specify a key, the response lists the values of that key. If some of your costs have no value for the key, the response includes an empty-string value. Keys are case-sensitive, and a key that doesn't exist returns no values other than an empty string.

    You can specify DimensionKey only when Dimension is PRODUCT_ATTRIBUTE. If you also specify SortBy, DimensionKey is required. As a result, you can't list product attribute keys when you use SortBy.

  • context (Optional[Context], default: None ) –

    The context for the call to GetDimensionValues. This can be COST_AND_USAGE, RESERVATIONS, or SAVINGS_PLANS. The default value is COST_AND_USAGE. If the context is set to RESERVATIONS, the resulting dimension values can be used in the GetReservationUtilization operation. GetReservationCoverage filters match cost and usage data, so use COST_AND_USAGE values for them. If the context is set to SAVINGS_PLANS, the resulting dimension values can be used in the GetSavingsPlansUtilization and GetSavingsPlansUtilizationDetails operations. If the context is set to COST_AND_USAGE, the resulting dimension values can be used in the GetCostAndUsage operation.

    If you set the context to COST_AND_USAGE, you can use the following dimensions for searching:

    • AZ - The Availability Zone. An example is us-east-1a.

    • BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible values are the following:

      - Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Services services.

      - AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that's an acting reseller for Amazon Web Services services in India.

      - Amazon Web Services Marketplace: The entity that supports the sale of solutions that are built on Amazon Web Services by third-party software providers.

    • CACHE_ENGINE - The Amazon ElastiCache engine. Examples are Redis, Valkey, and Memcached.

    • DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Examples are Single-AZ and Multi-AZ.

    • DATABASE_ENGINE - The Amazon Relational Database Service database engine. Examples are Aurora MySQL, Aurora PostgreSQL, and MySQL.

    • INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.

    • INSTANCE_TYPE_FAMILY - A family of instance types optimized to fit different use cases. The value is the family code, such as m5 or c6g for Amazon EC2. The casing of the code follows each service's product catalog, for example R6G for Amazon Relational Database Service.

    • INVOICING_ENTITY - The name of the entity that issues the Amazon Web Services invoice.

    • LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services services, such as Amazon Web Services.

    • LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.

    • OPERATING_SYSTEM - The operating system. Examples are Linux/UNIX, Windows (Amazon VPC), and Red Hat Enterprise Linux.

    • OPERATION - The action performed. Examples include RunInstance and CreateBucket.

    • PLATFORM - The operating system or platform of the usage. Examples are Linux/UNIX, Windows (Amazon VPC), and Red Hat Enterprise Linux.

    • PRODUCT_ATTRIBUTE - The product attributes of supported services, such as the model provider or the model for Amazon Bedrock.

    • PURCHASE_TYPE - The reservation type of the purchase that this usage is related to. Examples include On Demand Instances, Standard Reserved Instances, Spot Instances, and Savings Plans.

    • RESERVATION_ID - The unique identifier for an Amazon Web Services Reservation Instance.

    • SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

    • SAVINGS_PLANS_TYPE - Type of Savings Plans. Examples are ComputeSavingsPlans and EC2InstanceSavingsPlans.

    • SERVICE - The Amazon Web Services service such as Amazon DynamoDB.

    • TENANCY - The tenancy of a resource. Examples are Shared, Dedicated, and Host.

    • USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues operation includes a unit attribute. Examples include GB and Hrs.

    • USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.

    • REGION - The Amazon Web Services Region.

    • RECORD_TYPE - The different types of charges such as Reserved Instance (RI) fees, usage costs, tax refunds, and credits. Examples include Usage, Credit, Tax, Recurring, Upfront, and Support.

    • RESOURCE_ID - The unique identifier of the resource. ResourceId is an opt-in feature that is available for the last 14 days, for the services that you opt in to in Cost Management Console preferences.

    • IAM_PRINCIPAL – The IAM principal that made your AI requests. Cost Explorer removes the session name from an assumed role, and keeps it for an IAM Identity Center session.

    • IDENTITY_CENTER_GROUP – The IAM Identity Center group ID on your AI usage. Your usage counts under every group that its IAM Identity Center user belongs to.

    • IDENTITY_CENTER_USER – The IAM Identity Center user ID on your AI usage.

    Dimension values are case-sensitive and must match exactly when you use them in a filter. Use GetDimensionValues to list the values that are available for your account.

    If you set the context to RESERVATIONS, you can use the following dimensions for searching:

    • AZ - The Availability Zone. An example is us-east-1a.

    • INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge.

    • INSTANCE_TYPE_FAMILY - The family of the instance type. An example is m5.

    • LINKED_ACCOUNT - The Amazon Web Services ID of the member account. The name attribute contains the full name of the member account.

    • PLATFORM - The platform of the reservation. For Amazon EC2, examples are Linux/UNIX, Windows, and Red Hat Enterprise Linux. For Amazon Relational Database Service and Amazon ElastiCache, the value is the engine, such as MySQL or Redis. These values can differ from the COST_AND_USAGE values, for example Windows instead of Windows (Amazon VPC).

    • REGION - The Amazon Web Services Region.

    • SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are Region and Availability Zone.

    • SERVICE - The Amazon Web Services service of the reservation, such as Amazon Relational Database Service.

    • TENANCY - The tenancy of the reservation. Values are Shared and Dedicated.

    If you set the context to SAVINGS_PLANS, you can use the following dimensions for searching:

    • SAVINGS_PLANS_TYPE - Type of Savings Plans. Examples are ComputeSavingsPlans, EC2InstanceSavingsPlans, SageMakerSavingsPlans, and DatabaseSavingsPlans.

    • PAYMENT_OPTION - The payment option for the given Savings Plans (for example, All Upfront)

    • REGION - The Amazon Web Services Region.

    • INSTANCE_TYPE_FAMILY - The family of instances (For example, m5)

    • LINKED_ACCOUNT - The Amazon Web Services ID of the member account. The name attribute contains the full name of the member account.

    • SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.

  • filter (Optional[Expression], default: None ) –

    To filter your results, use an Expression object.

    The supported filter shapes depend on Context and on whether you specify SortBy:

    • COST_AND_USAGE without SortBy: a single Dimensions, Tags, or CostCategories expression, or one And of such expressions. Or, Not, and an And inside another And aren't supported.

    • COST_AND_USAGE with SortBy: And, Or, and Not are supported, nested up to four levels.

    • RESERVATIONS and SAVINGS_PLANS: a single Dimensions expression, a Not expression that contains one Dimensions expression, or one And of such expressions. Each dimension can appear only once. Or, Tags, CostCategories, and an And inside another And aren't supported. For RESERVATIONS, don't specify MatchOptions. For SAVINGS_PLANS, MatchOptions can be only EQUALS, or EQUALS and CASE_SENSITIVE. SortBy isn't supported in these contexts.

  • sort_by (Optional[SortDefinitions], default: None ) –

    The value that you want to sort the data by.

    The key represents cost and usage metrics. The following values are supported:

    • BlendedCost

    • UnblendedCost

    • AmortizedCost

    • NetAmortizedCost

    • NetUnblendedCost

    • UsageQuantity

    • NormalizedUsageAmount

    • BilledCost

    • ContractedCost

    • ListCost

    • PublicEquivalentBilledCost

    • PublicOnDemandCost

    The supported values for the SortOrder key are ASCENDING or DESCENDING.

    When you specify a SortBy paramater, the context must be COST_AND_USAGE. Further, when using SortBy, NextPageToken and SearchString aren't supported.

  • billing_view_arn (Optional[BillingViewArn], default: None ) –

    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.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of objects that are returned for this request. If MaxResults isn't specified with SortBy, the request returns 1000 results as the default value for this parameter. This field takes effect only when you specify SortBy in the request. If you don't specify SortBy, Cost Explorer ignores MaxResults.

    For GetDimensionValues, MaxResults has an upper limit of 1000.

  • next_page_token (Optional[NextPageToken], default: None ) –

    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.

Raises:

Source code in docs_src/capo_cost_explorer/_services/async_cost_explorer.py
async def get_dimension_values(
    self,
    time_period: "capo_cost_explorer.types.date_interval.DateInterval",
    dimension: "capo_cost_explorer.types.dimension.Dimension",
    *,
    config_overrides: Optional[AsyncCostExplorerClientConfig] = None,
    search_string: Optional[
        "capo_cost_explorer.types.search_string.SearchString"
    ] = None,
    dimension_key: Optional[
        "capo_cost_explorer.types.dimension_key.DimensionKey"
    ] = None,
    context: Optional["capo_cost_explorer.types.context.Context"] = None,
    filter: Optional["capo_cost_explorer.types.expression.Expression"] = None,
    sort_by: Optional[
        "capo_cost_explorer.types.sort_definitions.SortDefinitions"
    ] = None,
    billing_view_arn: Optional[
        "capo_cost_explorer.types.billing_view_arn.BillingViewArn"
    ] = None,
    max_results: Optional["capo_cost_explorer.types.max_results.MaxResults"] = None,
    next_page_token: Optional[
        "capo_cost_explorer.types.next_page_token.NextPageToken"
    ] = None,
) -> "capo_cost_explorer.types.get_dimension_values_response.GetDimensionValuesResponse":
    """<p>Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string. </p>

    Args:
        search_string: <p>The value that you want to search the filter values for.</p>
        time_period: <p>The start date and end date for retrieving the dimension values. 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>
        dimension: <p>The name of the dimension. Each <code>Dimension</code> is available for a different <code>Context</code>. For more information, see <code>Context</code>. <code>LINK_ACCOUNT_NAME</code> and <code>SERVICE_CODE</code> can only be used in <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/AAPI_CostCategoryRule.html">CostCategoryRule</a>. </p> <p> <code>PRODUCT_ATTRIBUTE</code> returns the product attribute keys that are available for your costs of supported services, or the values of the key that you specify in <code>DimensionKey</code>. <code>PRODUCT_ATTRIBUTE</code> is supported only in the <code>COST_AND_USAGE</code> context.</p> <p> <code>IAM_PRINCIPAL</code>, <code>IDENTITY_CENTER_GROUP</code>, and <code>IDENTITY_CENTER_USER</code> return values from your artificial intelligence (AI) usage only.</p>
        dimension_key: <p>The product attribute key to return values for, such as <code>model</code>. If you omit <code>DimensionKey</code> or set it to an empty string, the response lists the product attribute keys that are available for your costs of supported services instead. For the supported services, see <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_ProductAttributeValues.html">ProductAttributeValues</a>.</p> <p>If you specify a key, the response lists the values of that key. If some of your costs have no value for the key, the response includes an empty-string value. Keys are case-sensitive, and a key that doesn't exist returns no values other than an empty string.</p> <p>You can specify <code>DimensionKey</code> only when <code>Dimension</code> is <code>PRODUCT_ATTRIBUTE</code>. If you also specify <code>SortBy</code>, <code>DimensionKey</code> is required. As a result, you can't list product attribute keys when you use <code>SortBy</code>.</p>
        context: <p>The context for the call to <code>GetDimensionValues</code>. This can be <code>COST_AND_USAGE</code>, <code>RESERVATIONS</code>, or <code>SAVINGS_PLANS</code>. The default value is <code>COST_AND_USAGE</code>. If the context is set to <code>RESERVATIONS</code>, the resulting dimension values can be used in the <code>GetReservationUtilization</code> operation. <code>GetReservationCoverage</code> filters match cost and usage data, so use <code>COST_AND_USAGE</code> values for them. If the context is set to <code>SAVINGS_PLANS</code>, the resulting dimension values can be used in the <code>GetSavingsPlansUtilization</code> and <code>GetSavingsPlansUtilizationDetails</code> operations. If the context is set to <code>COST_AND_USAGE</code>, the resulting dimension values can be used in the <code>GetCostAndUsage</code> operation.</p> <p>If you set the context to <code>COST_AND_USAGE</code>, you can use the following dimensions for searching:</p> <ul> <li> <p>AZ - The Availability Zone. An example is <code>us-east-1a</code>.</p> </li> <li> <p>BILLING_ENTITY - The Amazon Web Services seller that your account is with. Possible values are the following:</p> <p>- Amazon Web Services(Amazon Web Services): The entity that sells Amazon Web Services services.</p> <p>- AISPL (Amazon Internet Services Pvt. Ltd.): The local Indian entity that's an acting reseller for Amazon Web Services services in India.</p> <p>- Amazon Web Services Marketplace: The entity that supports the sale of solutions that are built on Amazon Web Services by third-party software providers.</p> </li> <li> <p>CACHE_ENGINE - The Amazon ElastiCache engine. Examples are <code>Redis</code>, <code>Valkey</code>, and <code>Memcached</code>.</p> </li> <li> <p>DEPLOYMENT_OPTION - The scope of Amazon Relational Database Service deployments. Examples are <code>Single-AZ</code> and <code>Multi-AZ</code>.</p> </li> <li> <p>DATABASE_ENGINE - The Amazon Relational Database Service database engine. Examples are <code>Aurora MySQL</code>, <code>Aurora PostgreSQL</code>, and <code>MySQL</code>.</p> </li> <li> <p>INSTANCE_TYPE - The type of Amazon EC2 instance. An example is <code>m4.xlarge</code>.</p> </li> <li> <p>INSTANCE_TYPE_FAMILY - A family of instance types optimized to fit different use cases. The value is the family code, such as <code>m5</code> or <code>c6g</code> for Amazon EC2. The casing of the code follows each service's product catalog, for example <code>R6G</code> for Amazon Relational Database Service.</p> </li> <li> <p>INVOICING_ENTITY - The name of the entity that issues the Amazon Web Services invoice.</p> </li> <li> <p>LEGAL_ENTITY_NAME - The name of the organization that sells you Amazon Web Services services, such as Amazon Web Services.</p> </li> <li> <p>LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the Amazon Web Services ID of the member account.</p> </li> <li> <p>OPERATING_SYSTEM - The operating system. Examples are <code>Linux/UNIX</code>, <code>Windows (Amazon VPC)</code>, and <code>Red Hat Enterprise Linux</code>.</p> </li> <li> <p>OPERATION - The action performed. Examples include <code>RunInstance</code> and <code>CreateBucket</code>.</p> </li> <li> <p>PLATFORM - The operating system or platform of the usage. Examples are <code>Linux/UNIX</code>, <code>Windows (Amazon VPC)</code>, and <code>Red Hat Enterprise Linux</code>.</p> </li> <li> <p>PRODUCT_ATTRIBUTE - The product attributes of supported services, such as the model provider or the model for Amazon Bedrock.</p> </li> <li> <p>PURCHASE_TYPE - The reservation type of the purchase that this usage is related to. Examples include <code>On Demand Instances</code>, <code>Standard Reserved Instances</code>, <code>Spot Instances</code>, and <code>Savings Plans</code>.</p> </li> <li> <p>RESERVATION_ID - The unique identifier for an Amazon Web Services Reservation Instance.</p> </li> <li> <p>SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.</p> </li> <li> <p>SAVINGS_PLANS_TYPE - Type of Savings Plans. Examples are <code>ComputeSavingsPlans</code> and <code>EC2InstanceSavingsPlans</code>.</p> </li> <li> <p>SERVICE - The Amazon Web Services service such as Amazon DynamoDB.</p> </li> <li> <p>TENANCY - The tenancy of a resource. Examples are <code>Shared</code>, <code>Dedicated</code>, and <code>Host</code>.</p> </li> <li> <p>USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the <code>GetDimensionValues</code> operation includes a unit attribute. Examples include GB and Hrs.</p> </li> <li> <p>USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute.</p> </li> <li> <p>REGION - The Amazon Web Services Region.</p> </li> <li> <p>RECORD_TYPE - The different types of charges such as Reserved Instance (RI) fees, usage costs, tax refunds, and credits. Examples include <code>Usage</code>, <code>Credit</code>, <code>Tax</code>, <code>Recurring</code>, <code>Upfront</code>, and <code>Support</code>.</p> </li> <li> <p>RESOURCE_ID - The unique identifier of the resource. ResourceId is an opt-in feature that is available for the last 14 days, for the services that you opt in to in Cost Management Console preferences.</p> </li> <li> <p>IAM_PRINCIPAL – The IAM principal that made your AI requests. Cost Explorer removes the session name from an assumed role, and keeps it for an IAM Identity Center session.</p> </li> <li> <p>IDENTITY_CENTER_GROUP – The IAM Identity Center group ID on your AI usage. Your usage counts under every group that its IAM Identity Center user belongs to.</p> </li> <li> <p>IDENTITY_CENTER_USER – The IAM Identity Center user ID on your AI usage.</p> </li> </ul> <p>Dimension values are case-sensitive and must match exactly when you use them in a filter. Use <code>GetDimensionValues</code> to list the values that are available for your account.</p> <p>If you set the context to <code>RESERVATIONS</code>, you can use the following dimensions for searching:</p> <ul> <li> <p>AZ - The Availability Zone. An example is <code>us-east-1a</code>.</p> </li> <li> <p>INSTANCE_TYPE - The type of Amazon EC2 instance. An example is <code>m4.xlarge</code>.</p> </li> <li> <p>INSTANCE_TYPE_FAMILY - The family of the instance type. An example is <code>m5</code>.</p> </li> <li> <p>LINKED_ACCOUNT - The Amazon Web Services ID of the member account. The <code>name</code> attribute contains the full name of the member account.</p> </li> <li> <p>PLATFORM - The platform of the reservation. For Amazon EC2, examples are <code>Linux/UNIX</code>, <code>Windows</code>, and <code>Red Hat Enterprise Linux</code>. For Amazon Relational Database Service and Amazon ElastiCache, the value is the engine, such as <code>MySQL</code> or <code>Redis</code>. These values can differ from the <code>COST_AND_USAGE</code> values, for example <code>Windows</code> instead of <code>Windows (Amazon VPC)</code>.</p> </li> <li> <p>REGION - The Amazon Web Services Region.</p> </li> <li> <p>SCOPE (Utilization only) - The scope of a Reserved Instance (RI). Values are <code>Region</code> and <code>Availability Zone</code>.</p> </li> <li> <p>SERVICE - The Amazon Web Services service of the reservation, such as Amazon Relational Database Service.</p> </li> <li> <p>TENANCY - The tenancy of the reservation. Values are <code>Shared</code> and <code>Dedicated</code>.</p> </li> </ul> <p>If you set the context to <code>SAVINGS_PLANS</code>, you can use the following dimensions for searching:</p> <ul> <li> <p>SAVINGS_PLANS_TYPE - Type of Savings Plans. Examples are <code>ComputeSavingsPlans</code>, <code>EC2InstanceSavingsPlans</code>, <code>SageMakerSavingsPlans</code>, and <code>DatabaseSavingsPlans</code>.</p> </li> <li> <p>PAYMENT_OPTION - The payment option for the given Savings Plans (for example, All Upfront)</p> </li> <li> <p>REGION - The Amazon Web Services Region.</p> </li> <li> <p>INSTANCE_TYPE_FAMILY - The family of instances (For example, <code>m5</code>)</p> </li> <li> <p>LINKED_ACCOUNT - The Amazon Web Services ID of the member account. The <code>name</code> attribute contains the full name of the member account.</p> </li> <li> <p>SAVINGS_PLAN_ARN - The unique identifier for your Savings Plans.</p> </li> </ul>
        filter: <p>To filter your results, use an <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a> object.</p> <p>The supported filter shapes depend on <code>Context</code> and on whether you specify <code>SortBy</code>:</p> <ul> <li> <p> <code>COST_AND_USAGE</code> without <code>SortBy</code>: a single <code>Dimensions</code>, <code>Tags</code>, or <code>CostCategories</code> expression, or one <code>And</code> of such expressions. <code>Or</code>, <code>Not</code>, and an <code>And</code> inside another <code>And</code> aren't supported.</p> </li> <li> <p> <code>COST_AND_USAGE</code> with <code>SortBy</code>: <code>And</code>, <code>Or</code>, and <code>Not</code> are supported, nested up to four levels.</p> </li> <li> <p> <code>RESERVATIONS</code> and <code>SAVINGS_PLANS</code>: a single <code>Dimensions</code> expression, a <code>Not</code> expression that contains one <code>Dimensions</code> expression, or one <code>And</code> of such expressions. Each dimension can appear only once. <code>Or</code>, <code>Tags</code>, <code>CostCategories</code>, and an <code>And</code> inside another <code>And</code> aren't supported. For <code>RESERVATIONS</code>, don't specify <code>MatchOptions</code>. For <code>SAVINGS_PLANS</code>, <code>MatchOptions</code> can be only <code>EQUALS</code>, or <code>EQUALS</code> and <code>CASE_SENSITIVE</code>. <code>SortBy</code> isn't supported in these contexts.</p> </li> </ul>
        sort_by: <p>The value that you want to sort the data by.</p> <p>The key represents cost and usage metrics. The following values are supported:</p> <ul> <li> <p> <code>BlendedCost</code> </p> </li> <li> <p> <code>UnblendedCost</code> </p> </li> <li> <p> <code>AmortizedCost</code> </p> </li> <li> <p> <code>NetAmortizedCost</code> </p> </li> <li> <p> <code>NetUnblendedCost</code> </p> </li> <li> <p> <code>UsageQuantity</code> </p> </li> <li> <p> <code>NormalizedUsageAmount</code> </p> </li> <li> <p> <code>BilledCost</code> </p> </li> <li> <p> <code>ContractedCost</code> </p> </li> <li> <p> <code>ListCost</code> </p> </li> <li> <p> <code>PublicEquivalentBilledCost</code> </p> </li> <li> <p> <code>PublicOnDemandCost</code> </p> </li> </ul> <p>The supported values for the <code>SortOrder</code> key are <code>ASCENDING</code> or <code>DESCENDING</code>.</p> <p>When you specify a <code>SortBy</code> paramater, the context must be <code>COST_AND_USAGE</code>. Further, when using <code>SortBy</code>, <code>NextPageToken</code> and <code>SearchString</code> aren't supported.</p>
        billing_view_arn: <p>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.</p>
        max_results: <p>The maximum number of objects that are returned for this request. If MaxResults isn't specified with SortBy, the request returns 1000 results as the default value for this parameter. This field takes effect only when you specify SortBy in the request. If you don't specify SortBy, Cost Explorer ignores MaxResults.</p> <p>For <code>GetDimensionValues</code>, MaxResults has an upper limit of 1000.</p>
        next_page_token: <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>

    Raises:
        capo_cost_explorer.errors.bill_expiration_exception.BillExpirationException: <p>The requested report expired. Update the date interval and try again.</p>
        capo_cost_explorer.errors.billing_view_health_status_exception.BillingViewHealthStatusException: <p> The billing view status must be <code>HEALTHY</code> to perform this action. Try again when the status is <code>HEALTHY</code>. </p>
        capo_cost_explorer.errors.data_unavailable_exception.DataUnavailableException: <p>The requested data is unavailable.</p>
        capo_cost_explorer.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The pagination token is invalid. Try again without a pagination token.</p>
        capo_cost_explorer.errors.limit_exceeded_exception.LimitExceededException: <p>You made too many calls in a short period of time. Try again later.</p>
        capo_cost_explorer.errors.request_changed_exception.RequestChangedException: <p>Your request parameters changed between pages. Try again with the old parameters or without a pagination token.</p>
        capo_cost_explorer.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ARN in the request doesn't exist. </p>
        capo_cost_explorer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cost_explorer.types.get_dimension_values_request.GetDimensionValuesRequest]",
    ) -> AsyncOperationResponse[
        "capo_cost_explorer.types.get_dimension_values_response.GetDimensionValuesResponse"
    ]:
        import capo_cost_explorer._operations.aws_insights_index_service.get_dimension_values

        (
            output,
            http_response,
        ) = await capo_cost_explorer._operations.aws_insights_index_service.get_dimension_values.async_get_dimension_values(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDimensionValues")
    )
    input_: capo_cost_explorer.types.get_dimension_values_request.GetDimensionValuesRequest = {
        "time_period": time_period,
        "dimension": dimension,
    }
    if search_string is not None:
        input_["search_string"] = search_string
    if dimension_key is not None:
        input_["dimension_key"] = dimension_key
    if context is not None:
        input_["context"] = context
    if filter is not None:
        input_["filter"] = filter
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if billing_view_arn is not None:
        input_["billing_view_arn"] = billing_view_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_page_token is not None:
        input_["next_page_token"] = next_page_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output