

# Code examples for CloudWatch using AWS SDKs
<a name="service_code_examples"></a>

The following code examples show how to use CloudWatch with an AWS software development kit (SDK). 

*Basics* are code examples that show you how to perform the essential operations within a service.

*Actions* are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.

*Scenarios* are code examples that show you how to accomplish specific tasks by calling multiple functions within a service or combined with other AWS services.

For a complete list of AWS SDK developer guides and code examples, see [Using CloudWatch with an AWS SDK](sdk-general-information-section.md). This topic also includes information about getting started and details about previous SDK versions.

**Contents**
+ [Basics](service_code_examples_basics.md)
  + [Hello CloudWatch](example_cloudwatch_Hello_section.md)
  + [Learn the basics](example_cloudwatch_GetStartedMetricsDashboardsAlarms_section.md)
  + [Actions](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)
+ [Scenarios](service_code_examples_scenarios.md)
  + [Creating a CloudWatch dashboard with function name as a variable](example_cloudwatch_GettingStarted_031_section.md)
  + [Get started with alarms](example_cloudwatch_Scenario_GettingStarted_section.md)
  + [Manage metrics and alarms](example_cloudwatch_Usage_MetricsAlarms_section.md)
  + [Monitor DynamoDB performance](example_cross_MonitorDynamoDB_section.md)
  + [Run CPU stress tests on EC2 instances using FIS](example_iam_GettingStarted_069_section.md)
  + [Using property variables in CloudWatch dashboards to monitor multiple Lambda functions](example_iam_GettingStarted_032_section.md)