

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# CloudWatch AWS SDKs的程式碼範例
<a name="service_code_examples"></a>

下列程式碼範例示範如何搭配 AWS 軟體開發套件 (SDK) 使用 CloudWatch。

*基本概念*是程式碼範例，這些範例說明如何在服務內執行基本操作。

*Actions* 是大型程式的程式碼摘錄，必須在內容中執行。雖然動作會告訴您如何呼叫個別服務函數，但您可以在其相關情境中查看內容中的動作。

*案例*是向您展示如何呼叫服務中的多個函數或與其他 AWS 服務組合來完成特定任務的程式碼範例。

如需 AWS SDK 開發人員指南和程式碼範例的完整清單，請參閱 [搭配 AWS SDK 使用 CloudWatch](sdk-general-information-section.md)。此主題也包含有關入門的資訊和舊版 SDK 的詳細資訊。

**Contents**
+ [基本概念](service_code_examples_basics.md)
  + [Hello CloudWatch](example_cloudwatch_Hello_section.md)
  + [了解基本概念](example_cloudwatch_GetStartedMetricsDashboardsAlarms_section.md)
  + [動作](service_code_examples_actions.md)
    + [`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)
+ [案例](service_code_examples_scenarios.md)
  + [使用函數名稱做為變數建立 CloudWatch 儀表板](example_cloudwatch_GettingStarted_031_section.md)
  + [開始使用警示](example_cloudwatch_Scenario_GettingStarted_section.md)
  + [管理指標和警示](example_cloudwatch_Usage_MetricsAlarms_section.md)
  + [監控 DynamoDB 效能](example_cross_MonitorDynamoDB_section.md)
  + [使用 FIS 在 EC2 執行個體上執行 CPU 壓力測試](example_iam_GettingStarted_069_section.md)
  + [在 CloudWatch 儀表板中使用屬性變數來監控多個 Lambda 函數](example_iam_GettingStarted_032_section.md)