Skip to main content

capacity_manager_monitored_tag_keys

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

Overview

Namecapacity_manager_monitored_tag_keys
TypeResource
Idaws.ec2.capacity_manager_monitored_tag_keys

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
capacity_manager_providedbooleanIndicates whether this tag key is provided by Capacity Manager by default, rather than being user-activated.
earliest_datapoint_timestampstringThe earliest timestamp from which tag data is available for queries, in UTC ISO 8601 format.
statusstringThe current status of the monitored tag key. Valid values are activating, activated, deactivating, and suspended.
status_messagestringA message providing additional details about the current status of the monitored tag key.
tag_keystringThe tag key being monitored.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_capacity_manager_monitored_tag_keysselectregionMaxResults, NextToken, DryRunRetrieves 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_keysupdateregionActivateTagKey, DeactivateTagKey, DryRun, ClientTokenActivates 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
ActivateTagKeyarrayThe tag keys to activate for monitoring. Once activated, these tag keys will be included as dimensions in capacity metric data.
ClientTokenstringUnique, case-sensitive identifier that you provide to ensure the idempotency of the request.
DeactivateTagKeyarrayThe tag keys to deactivate. Deactivated tag keys will no longer be included as dimensions in capacity metric data.
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.
MaxResultsintegerThe 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.
NextTokenstringThe token for the next page of results. Use the value returned from a previous call to retrieve additional results.

SELECT examples

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

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;