capacity_manager_monitored_tag_keys
Creates, updates, deletes, gets or lists a capacity_manager_monitored_tag_keys resource.
Overview
| Name | capacity_manager_monitored_tag_keys |
| Type | Resource |
| Id | aws.ec2.capacity_manager_monitored_tag_keys |
Fields
The following fields are returned by SELECT queries:
- get_capacity_manager_monitored_tag_keys
| Name | Datatype | Description |
|---|---|---|
capacity_manager_provided | boolean | Indicates whether this tag key is provided by Capacity Manager by default, rather than being user-activated. |
earliest_datapoint_timestamp | string | The earliest timestamp from which tag data is available for queries, in UTC ISO 8601 format. |
status | string | The current status of the monitored tag key. Valid values are activating, activated, deactivating, and suspended. |
status_message | string | A message providing additional details about the current status of the monitored tag key. |
tag_key | string | The tag key being monitored. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_capacity_manager_monitored_tag_keys | select | region | MaxResults, NextToken, DryRun | Retrieves the tag keys that are currently being monitored by EC2 Capacity Manager. Monitored tag keys are included as dimensions in capacity metric data, enabling you to group and filter metrics by tag values. |
update_capacity_manager_monitored_tag_keys | update | region | ActivateTagKey, DeactivateTagKey, DryRun, ClientToken | Activates or deactivates tag keys for monitoring by EC2 Capacity Manager. Activated tag keys are included as dimensions in capacity metric data, enabling you to group and filter metrics by tag values. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
ActivateTagKey | array | The tag keys to activate for monitoring. Once activated, these tag keys will be included as dimensions in capacity metric data. |
ClientToken | string | Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. |
DeactivateTagKey | array | The tag keys to deactivate. Deactivated tag keys will no longer be included as dimensions in capacity metric data. |
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. |
MaxResults | integer | The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. If not specified, up to 1000 results are returned. |
NextToken | string | The token for the next page of results. Use the value returned from a previous call to retrieve additional results. |
SELECT examples
- get_capacity_manager_monitored_tag_keys
Retrieves the tag keys that are currently being monitored by EC2 Capacity Manager. Monitored tag keys are included as dimensions in capacity metric data, enabling you to group and filter metrics by tag values.
SELECT
capacity_manager_provided,
earliest_datapoint_timestamp,
status,
status_message,
tag_key
FROM aws.ec2.capacity_manager_monitored_tag_keys
WHERE region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND DryRun = '{{ DryRun }}'
;
UPDATE examples
- update_capacity_manager_monitored_tag_keys
Activates or deactivates tag keys for monitoring by EC2 Capacity Manager. Activated tag keys are included as dimensions in capacity metric data, enabling you to group and filter metrics by tag values.
UPDATE aws.ec2.capacity_manager_monitored_tag_keys
SET
-- No updatable properties
WHERE
region = '{{ region }}' --required
AND ActivateTagKey = '{{ ActivateTagKey}}'
AND DeactivateTagKey = '{{ DeactivateTagKey}}'
AND DryRun = {{ DryRun}}
AND ClientToken = '{{ ClientToken}}'
RETURNING
capacity_manager_tag_keys;