aws ec2 monitor-instances
Enables detailed monitoring for a running instance. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To enable detailed monitoring for an instance
The following monitor-instances example enables detailed monitoring for the specified instance.
aws ec2 monitor-instances --instance-ids i-1234567890abcdef0Identify--instance-idsThe IDs of the instances.Its output
{
"InstanceMonitorings": [
{
"InstanceId": "i-1234567890abcdef0",
"Monitoring": {
"State": "pending"
}
}
]
}For more information, see Manage detailed monitoring for your EC2 instances in the Amazon EC2 User Guide.
Options
--dry-runChecks whether you have the required permissions for the operation, without actually making the request, and provides an error response.--instance-idsThe IDs of the instances.