capacity_manager_metric_dimensions
Creates, updates, deletes, gets or lists a capacity_manager_metric_dimensions resource.
Overview
| Name | capacity_manager_metric_dimensions |
| Type | Resource |
| Id | aws.ec2.capacity_manager_metric_dimensions |
Fields
The following fields are returned by SELECT queries:
- get_capacity_manager_metric_dimensions
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Amazon Web Services account ID that owns the capacity resource. |
account_name | string | The 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_id | string | The unique identifier of the Availability Zone where the capacity resource is located. |
instance_family | string | The EC2 instance family of the capacity resource. |
instance_platform | string | The platform or operating system of the instance. |
instance_type | string | The specific EC2 instance type of the capacity resource. |
reservation_arn | string | The 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_timestamp | string | The 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_type | string | The 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_timestamp | string | The 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_id | string | The unique identifier of the capacity reservation. |
reservation_instance_match_criteria | string | The instance matching criteria for the capacity reservation, determining how instances are matched to the reservation. |
reservation_start_timestamp | string | The timestamp when the capacity reservation becomes active and available for use, in milliseconds since epoch. This is when the reservation begins providing capacity. |
reservation_state | string | The current state of the capacity reservation. |
reservation_type | string | The type of capacity reservation. |
reservation_unused_financial_owner | string | The Amazon Web Services account ID that is financially responsible for unused capacity reservation costs. |
resource_region | string | The Amazon Web Services Region where the capacity resource is located. |
tags | string | The tags associated with the capacity resource, represented as key-value pairs. Only tags that have been activated for monitoring via UpdateCapacityManagerMonitoredTagKeys are included. |
tenancy | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_capacity_manager_metric_dimensions | select | GroupBy, StartTime, EndTime, MetricName, region | FilterBy, MaxResults, NextToken, DryRun | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
EndTime | string (date-time) | The end time for the dimension query, in ISO 8601 format. Only dimensions with data in this time range will be returned. |
GroupBy | array | The dimensions to group by when retrieving available dimension values. This determines which dimension combinations are returned. Required parameter. |
MetricName | array | The 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. |
StartTime | string (date-time) | The start time for the dimension query, in ISO 8601 format. Only dimensions with data in this time range will be returned. |
region | string | AWS region (default: us-east-1) |
DryRun | boolean | Checks 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. |
FilterBy | array | Conditions to filter which dimension values are returned. Each filter specifies a dimension, comparison operator, and values to match against. |
MaxResults | integer | The maximum number of dimension combinations to return. Valid range is 1 to 1000. Use with NextToken for pagination. |
NextToken | string | The token for the next page of results. Use this value in a subsequent call to retrieve additional dimension values. |
SELECT examples
- get_capacity_manager_metric_dimensions
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 }}'
;