kotlin/services/cloudwatch/README.md
Shows how to use the AWS SDK for Kotlin to work with Amazon CloudWatch.
<!--custom.overview.start--> <!--custom.overview.end-->CloudWatch provides a reliable, scalable, and flexible monitoring solution that you can start using within minutes.
For prerequisites, see the README in the kotlin folder.
To run these examples, you must have the following three JSON files: jsonWidgets.json, CloudDashboard.json, and settings.json. Find these files in this GitHub repository. The CloudWatch scenario depends on these files. In addition, to enable billing metrics and statistics for the scenario example, make sure billing alerts are enabled for your account. For more information, see Enabling billing alerts.
Be very careful when running an operation that deletes or modifies AWS resources in your account. We recommend creating separate test-only resources when experimenting with these examples.
<!--custom.prerequisites.end-->ListMetrics)Code examples that show you how to perform the essential operations within a service.
Code excerpts that show you how to call individual service functions.
This example shows you how to get started using CloudWatch.
This example shows you how to do the following:
⚠ Running tests might result in charges to your AWS account.
To find instructions for running these tests, see the README
in the kotlin folder.
You can test the Kotlin code example for Amazon CloudWatch by running a test file named CloudWatchTest. This file uses JUnit 5 to run the JUnit tests and is located in the src/test/java folder. For more information, see https://junit.org/junit5/.
To successfully run the tests, define the following values in the test:
You can run the JUnit tests from an IDE, such as IntelliJ, or from the command line. As each test runs, you can view messages that inform you if the various tests succeed or fail. For example, the following message informs you that Test 3 passed.
Test 3 passed
WARNING: Running these JUnit tests manipulates real AWS resources and might incur charges on your account.
<!--custom.tests.end-->Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0