Skip to main content

capacity_manager_metric_dimensions

Creates, updates, deletes, gets or lists a capacity_manager_metric_dimensions resource.

Overview

Namecapacity_manager_metric_dimensions
TypeResource
Idaws.ec2.capacity_manager_metric_dimensions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe Amazon Web Services account ID that owns the capacity resource.
account_namestringThe name of the Amazon Web Services account that owns the capacity resource. This dimension is only available when Organizations access is enabled for Capacity Manager.
availability_zone_idstringThe unique identifier of the Availability Zone where the capacity resource is located.
instance_familystringThe EC2 instance family of the capacity resource.
instance_platformstringThe platform or operating system of the instance.
instance_typestringThe specific EC2 instance type of the capacity resource.
reservation_arnstringThe Amazon Resource Name (ARN) of the capacity reservation. This provides a unique identifier that can be used across Amazon Web Services services to reference the specific reservation.
reservation_create_timestampstringThe timestamp when the capacity reservation was originally created, in milliseconds since epoch. This differs from the start timestamp as reservations can be created before they become active.
reservation_end_date_typestringThe type of end date for the capacity reservation. This indicates whether the reservation has a fixed end date, is open-ended, or follows a specific termination pattern.
reservation_end_timestampstringThe timestamp when the capacity reservation expires and is no longer available, in milliseconds since epoch. After this time, the reservation will not provide any capacity.
reservation_idstringThe unique identifier of the capacity reservation.
reservation_instance_match_criteriastringThe instance matching criteria for the capacity reservation, determining how instances are matched to the reservation.
reservation_start_timestampstringThe timestamp when the capacity reservation becomes active and available for use, in milliseconds since epoch. This is when the reservation begins providing capacity.
reservation_statestringThe current state of the capacity reservation.
reservation_typestringThe type of capacity reservation.
reservation_unused_financial_ownerstringThe Amazon Web Services account ID that is financially responsible for unused capacity reservation costs.
resource_regionstringThe Amazon Web Services Region where the capacity resource is located.
tagsstringThe tags associated with the capacity resource, represented as key-value pairs. Only tags that have been activated for monitoring via UpdateCapacityManagerMonitoredTagKeys are included.
tenancystringThe tenancy of the EC2 instances associated with this capacity dimension. Valid values are 'default' for shared tenancy, 'dedicated' for dedicated instances, or 'host' for dedicated hosts.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_capacity_manager_metric_dimensionsselectGroupBy, StartTime, EndTime, MetricName, regionFilterBy, MaxResults, NextToken, DryRunRetrieves the available dimension values for capacity metrics within a specified time range. This is useful for discovering what accounts, regions, instance families, and other dimensions have data available for filtering and grouping.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
EndTimestring (date-time)The end time for the dimension query, in ISO 8601 format. Only dimensions with data in this time range will be returned.
GroupByarrayThe dimensions to group by when retrieving available dimension values. This determines which dimension combinations are returned. Required parameter.
MetricNamearrayThe metric names to use as an additional filter when retrieving dimensions. Only dimensions that have data for these metrics will be returned. Required parameter with maximum size of 1 for v1.
StartTimestring (date-time)The start time for the dimension query, in ISO 8601 format. Only dimensions with data in this time range will be returned.
regionstringAWS region (default: us-east-1)
DryRunbooleanChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.
FilterByarrayConditions to filter which dimension values are returned. Each filter specifies a dimension, comparison operator, and values to match against.
MaxResultsintegerThe maximum number of dimension combinations to return. Valid range is 1 to 1000. Use with NextToken for pagination.
NextTokenstringThe token for the next page of results. Use this value in a subsequent call to retrieve additional dimension values.

SELECT examples

Retrieves the available dimension values for capacity metrics within a specified time range. This is useful for discovering what accounts, regions, instance families, and other dimensions have data available for filtering and grouping.

SELECT
account_id,
account_name,
availability_zone_id,
instance_family,
instance_platform,
instance_type,
reservation_arn,
reservation_create_timestamp,
reservation_end_date_type,
reservation_end_timestamp,
reservation_id,
reservation_instance_match_criteria,
reservation_start_timestamp,
reservation_state,
reservation_type,
reservation_unused_financial_owner,
resource_region,
tags,
tenancy
FROM aws.ec2.capacity_manager_metric_dimensions
WHERE GroupBy = '{{ GroupBy }}' -- required
AND StartTime = '{{ StartTime }}' -- required
AND EndTime = '{{ EndTime }}' -- required
AND MetricName = '{{ MetricName }}' -- required
AND region = '{{ region }}' -- required
AND FilterBy = '{{ FilterBy }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;