Class: Aws::CostExplorer::Types::ProductAttributeValues
- Inherits:
-
Struct
- Object
- Struct
- Aws::CostExplorer::Types::ProductAttributeValues
- Defined in:
- gems/aws-sdk-costexplorer/lib/aws-sdk-costexplorer/types.rb
Overview
The product attribute values that you can use to filter the costs of supported services. Currently, Amazon Bedrock is the only supported service.
The following product attribute keys are available for each supported service:
Amazon Bedrock
provider- The model provider, such asAnthropic,Cohere, orOpenAI.model- The model, such asClaude Sonnet 5orClaude Haiku 4.5.inferenceType- The type of inference usage, such asInput tokensorOutput tokens.feature- The feature that was used, such asOn-demand InferenceorReranker.
The following operations support product attributes:
GetCostAndUsage, GetCostAndUsageWithResources,
GetDimensionValues (in the COST_AND_USAGE context), GetTags, and
GetCostCategories.
Product attribute data is available for time periods that start on or
after September 1, 2026. Requests for earlier time periods that use
product attributes fail with a DataUnavailableException.
The SERVICE filter rules for product attributes depend on the
operation:
GetCostAndUsageandGetCostAndUsageWithResources- Optional.GetDimensionValues- Required when the filter includesProductAttributes, for anyDimension. Otherwise, optional.GetTagsandGetCostCategories- Required when the filter includesProductAttributes.
A SERVICE filter must contain only supported services, or the
request fails with a ValidationException. Service names are matched
exactly. To list them, use GetDimensionValues with Dimension set
to SERVICE and the same TimePeriod, for example with
SearchString set to Bedrock.
The costs of a supported service can appear under multiple service
names. When the SERVICE filter is optional, omit it so that your
results include all of those costs.
For example, the following Expression filters for the costs of one
model: { "ProductAttributes": { "Key": "model", "Values": [ "Claude
Sonnet 5" ], "MatchOptions": [ "EQUALS" ] } }
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#key ⇒ String
The name of the product attribute, such as
model. -
#match_options ⇒ Array<String>
The match options that you can use to filter your results.
-
#values ⇒ Array<String>
The specific values of the product attribute, such as
Claude Sonnet 5for themodelkey.
Instance Attribute Details
#key ⇒ String
The name of the product attribute, such as model. The keys that
are available depend on the service. For the keys of each supported
service, see ProductAttributeValues .
Keys are case-sensitive. A key that doesn't exist doesn't return
an error: EQUALS matches no costs, and ABSENT matches all costs
of supported services.
6393 6394 6395 6396 6397 6398 6399 |
# File 'gems/aws-sdk-costexplorer/lib/aws-sdk-costexplorer/types.rb', line 6393 class ProductAttributeValues < Struct.new( :key, :values, :match_options) SENSITIVE = [] include Aws::Structure end |
#match_options ⇒ Array<String>
The match options that you can use to filter your results. Valid values:
EQUALS- Matches the values that you specify.ABSENT- Matches costs that have no value for the key. OmitValues.CASE_SENSITIVE- Use only withEQUALS. Values are always matched case-sensitively.
Default values are EQUALS and CASE_SENSITIVE.
6393 6394 6395 6396 6397 6398 6399 |
# File 'gems/aws-sdk-costexplorer/lib/aws-sdk-costexplorer/types.rb', line 6393 class ProductAttributeValues < Struct.new( :key, :values, :match_options) SENSITIVE = [] include Aws::Structure end |
#values ⇒ Array<String>
The specific values of the product attribute, such as Claude Sonnet
5 for the model key. Values are matched exactly, including case.
To list the values of a key, use GetDimensionValues with
Dimension set to PRODUCT_ATTRIBUTE and DimensionKey set to the
key.
To match costs that have no value for the key, set MatchOptions to
ABSENT and omit Values. Otherwise, Values is required.
6393 6394 6395 6396 6397 6398 6399 |
# File 'gems/aws-sdk-costexplorer/lib/aws-sdk-costexplorer/types.rb', line 6393 class ProductAttributeValues < Struct.new( :key, :values, :match_options) SENSITIVE = [] include Aws::Structure end |