Actions for CloudWatch using Amazon SDKs
The following code examples demonstrate how to perform individual CloudWatch actions with Amazon SDKs. These excerpts call the CloudWatch API and are code excerpts from larger programs that must be run in context. Each example includes a link to GitHub, where you can find instructions for setting up and running the code.
The following examples include only the most commonly used actions. For a complete list, see the Amazon CloudWatch API Reference.
Examples
- Create a dashboard
- Create a metric alarm
- Create an anomaly detector
- Delete alarms
- Delete an anomaly detector
- Delete dashboards
- Describe alarm history
- Describe alarms
- Describe alarms for a metric
- Describe anomaly detectors
- Disable alarm actions
- Enable alarm actions
- Get a metric data image
- Get dashboard details
- Get metric data
- Get metric statistics
- List dashboards
- List metrics
- Put a set of data into a metric
- Put data into a metric