

# 使用 AWS SDK 的 CloudWatch 操作
<a name="service_code_examples_actions"></a>

以下代码示例演示了如何使用 AWS SDK 来执行单个 CloudWatch 操作。每个示例都包含一个指向 GitHub 的链接，您可以在其中找到有关设置和运行代码的说明。

这些代码节选将调用 CloudWatch API，是必须在上下文中运行的大型程序的代码节选。您可以在[使用 AWS SDK 的 CloudWatch 场景](service_code_examples_scenarios.md)中结合上下文查看操作。

 以下示例仅包括最常用的操作。有关完整列表，请参阅 [Amazon CloudWatch API 参考](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html)。

**Topics**
+ [`DeleteAlarms`](example_cloudwatch_DeleteAlarms_section.md)
+ [`DeleteAnomalyDetector`](example_cloudwatch_DeleteAnomalyDetector_section.md)
+ [`DeleteDashboards`](example_cloudwatch_DeleteDashboards_section.md)
+ [`DescribeAlarmHistory`](example_cloudwatch_DescribeAlarmHistory_section.md)
+ [`DescribeAlarms`](example_cloudwatch_DescribeAlarms_section.md)
+ [`DescribeAlarmsForMetric`](example_cloudwatch_DescribeAlarmsForMetric_section.md)
+ [`DescribeAnomalyDetectors`](example_cloudwatch_DescribeAnomalyDetectors_section.md)
+ [`DisableAlarmActions`](example_cloudwatch_DisableAlarmActions_section.md)
+ [`EnableAlarmActions`](example_cloudwatch_EnableAlarmActions_section.md)
+ [`GetDashboard`](example_cloudwatch_GetDashboard_section.md)
+ [`GetMetricData`](example_cloudwatch_GetMetricData_section.md)
+ [`GetMetricStatistics`](example_cloudwatch_GetMetricStatistics_section.md)
+ [`GetMetricWidgetImage`](example_cloudwatch_GetMetricWidgetImage_section.md)
+ [`ListDashboards`](example_cloudwatch_ListDashboards_section.md)
+ [`ListMetrics`](example_cloudwatch_ListMetrics_section.md)
+ [`PutAnomalyDetector`](example_cloudwatch_PutAnomalyDetector_section.md)
+ [`PutDashboard`](example_cloudwatch_PutDashboard_section.md)
+ [`PutMetricAlarm`](example_cloudwatch_PutMetricAlarm_section.md)
+ [`PutMetricData`](example_cloudwatch_PutMetricData_section.md)