UpdateCapacityManagerMonitoredTagKeys
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.
Request Parameters
The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.
- ActivateTagKey.N
-
The tag keys to activate for monitoring. Once activated, these tag keys will be included as dimensions in capacity metric data.
Type: Array of strings
Required: No
- ClientToken
-
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Type: String
Required: No
- DeactivateTagKey.N
-
The tag keys to deactivate. Deactivated tag keys will no longer be included as dimensions in capacity metric data.
Type: Array of strings
Required: No
- DryRun
-
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 isUnauthorizedOperation.Type: Boolean
Required: No
Response Elements
The following elements are returned by the service.
- capacityManagerTagKeySet
-
The list of tag keys affected by the update, including their current status and metadata.
Type: Array of CapacityManagerMonitoredTagKey objects
- requestId
-
The ID of the request.
Type: String
Errors
For information about the errors that are common to all actions, see Common client error codes.
Examples
Example
This example activates the Environment and CostCenter tag keys for monitoring, and deactivates the Team tag key.
Sample Request
https://ec2.amazonaws.com/?Action=UpdateCapacityManagerMonitoredTagKeys
&ActivateTagKey.1=Environment
&ActivateTagKey.2=CostCenter
&DeactivateTagKey.1=Team
&AUTHPARAMS
Sample Response
<UpdateCapacityManagerMonitoredTagKeysResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>d4904fd9-82c2-4ea5-adfe-a9cc3EXAMPLE</requestId>
<capacityManagerTagKeySet>
<item>
<tagKey>Environment</tagKey>
<status>activating</status>
<statusMessage/>
<capacityManagerProvided>false</capacityManagerProvided>
</item>
<item>
<tagKey>CostCenter</tagKey>
<status>activating</status>
<statusMessage/>
<capacityManagerProvided>false</capacityManagerProvided>
</item>
<item>
<tagKey>Team</tagKey>
<status>deactivating</status>
<statusMessage/>
<capacityManagerProvided>false</capacityManagerProvided>
</item>
</capacityManagerTagKeySet>
</UpdateCapacityManagerMonitoredTagKeysResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: