Skip to content

Commit

Permalink
Update the CloudWatch scenario to meet Java standards (#6898)
Browse files Browse the repository at this point in the history
  • Loading branch information
scmacdon authored Oct 3, 2024
1 parent 3c8eb77 commit 790b580
Show file tree
Hide file tree
Showing 14 changed files with 1,964 additions and 1,655 deletions.
12 changes: 8 additions & 4 deletions .doc_gen/metadata/cloudwatch_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ cloudwatch_DeleteAlarms:
excerpts:
- description:
snippet_tags:
- cloudwatch.java2.delete_metrics.main
- cloudwatch.java2.delete_alarm.main
Python:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -227,7 +227,7 @@ cloudwatch_DescribeAlarms:
excerpts:
- description:
snippet_tags:
- cloudwatch.java2.scenario.describe.alarm.main
- cloudwatch.java2.describe_alarms.main
.NET:
versions:
- sdk_version: 3
Expand Down Expand Up @@ -1026,6 +1026,7 @@ cloudwatch_PutMetricData:
services:
cloudwatch: {PutMetricData}
cloudwatch_GetStartedMetricsDashboardsAlarms:
title: Learn core operations for &CW; using an &AWS; SDK
synopsis_list:
- List &CW; namespaces and metrics.
- Get statistics for a metric and for estimated billing.
Expand All @@ -1042,7 +1043,7 @@ cloudwatch_GetStartedMetricsDashboardsAlarms:
github: kotlin/services/cloudwatch
sdkguide:
excerpts:
- description:
- description: Run an interactive scenario demonstrating &CW; features.
snippet_tags:
- cloudwatch.kotlin.scenario.main
Java:
Expand All @@ -1051,9 +1052,12 @@ cloudwatch_GetStartedMetricsDashboardsAlarms:
github: javav2/example_code/cloudwatch
sdkguide:
excerpts:
- description:
- description: Run an interactive scenario demonstrating &CW; features.
snippet_tags:
- cloudwatch.java2.scenario.main
- description: A wrapper class for &CW; SDK methods.
snippet_tags:
- cloudwatch.java2.actions.main
.NET:
versions:
- sdk_version: 3
Expand Down
34 changes: 17 additions & 17 deletions javav2/example_code/cloudwatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,31 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav

Code examples that show you how to perform the essential operations within a service.

- [Learn the basics](src/main/java/com/example/cloudwatch/CloudWatchScenario.java)
- [Learn the basics](src/main/java/com/example/cloudwatch/scenario/CloudWatchScenario.java)


### Single actions

Code excerpts that show you how to call individual service functions.

- [DeleteAlarms](src/main/java/com/example/cloudwatch/DeleteAlarm.java#L6)
- [DeleteAnomalyDetector](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L299)
- [DeleteDashboards](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L347)
- [DescribeAlarmHistory](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L460)
- [DescribeAlarms](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L635)
- [DescribeAlarmsForMetric](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L495)
- [DescribeAnomalyDetectors](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L403)
- [DeleteAlarms](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L169)
- [DeleteAnomalyDetector](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L127)
- [DeleteDashboards](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L194)
- [DescribeAlarmHistory](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L372)
- [DescribeAlarms](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L658)
- [DescribeAlarmsForMetric](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L433)
- [DescribeAnomalyDetectors](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L276)
- [DisableAlarmActions](src/main/java/com/example/cloudwatch/DisableAlarmActions.java#L6)
- [EnableAlarmActions](src/main/java/com/example/cloudwatch/EnableAlarmActions.java#L6)
- [GetMetricData](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L576)
- [GetMetricStatistics](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L843)
- [GetMetricWidgetImage](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L363)
- [ListDashboards](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L755)
- [ListMetrics](src/main/java/com/example/cloudwatch/ListMetrics.java#L6)
- [PutAnomalyDetector](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L431)
- [PutDashboard](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L773)
- [PutMetricAlarm](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L659)
- [PutMetricData](src/main/java/com/example/cloudwatch/CloudWatchScenario.java#L530)
- [GetMetricData](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L579)
- [GetMetricStatistics](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L940)
- [GetMetricWidgetImage](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L218)
- [ListDashboards](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L828)
- [ListMetrics](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L990)
- [PutAnomalyDetector](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L325)
- [PutDashboard](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L850)
- [PutMetricAlarm](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L693)
- [PutMetricData](src/main/java/com/example/cloudwatch/scenario/CloudWatchActions.java#L510)


<!--custom.examples.start-->
Expand Down
38 changes: 37 additions & 1 deletion javav2/example_code/cloudwatch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.21.20</version>
<version>2.26.15</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>2.23.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -90,5 +97,34 @@
<groupId>software.amazon.awssdk</groupId>
<artifactId>cloudwatchlogs</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sso</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ssooidc</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>netty-nio-client</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 790b580

Please sign in to comment.