Closed rlhagerm closed 9 months ago
I am confused by this part:
Get statistics for the selected metric over the last day. (GetMetricStatistics)
Different metrics support different statistics. Present the user with a list of stats to choose from, such as SampleCount, Average, Sum, Minimum, and Maximum.
Present the stats with timestamps and values, sorted by time.
Specifically, the Present the stats with timestamps and values, sorted by time
.
This is the CLI output you copied:
Select a metric statistic by entering a number from the preceding list:
5
1. Timestamp 1/9/2023 2:21:00 PM Maximum: 13
2. Timestamp 1/9/2023 2:22:00 PM Maximum: 6
3. Timestamp 1/9/2023 2:23:00 PM Maximum: 120
5. Timestamp 1/9/2023 2:24:00 PM Maximum: 120
6. Timestamp 1/9/2023 2:25:00 PM Maximum: 120
7. Timestamp 1/9/2023 2:26:00 PM Maximum: 52
8. Timestamp 1/9/2023 2:27:00 PM Maximum: 120
9. Timestamp 1/9/2023 2:28:00 PM Maximum: 120
10. Timestamp 1/9/2023 2:29:00 PM Maximum: 120
11. Timestamp 1/9/2023 2:30:00 PM Maximum: 120
Assuming the range is 1 day and you set the Period to 1 day, you will just get 1 single data point and sorting is not required. If I'm understanding this correctly, this example is showing a range of 9 minutes with a 1 minute period. If this is true, perhaps it would be clear to inform the user which period you're using.
If you look at the .NET code, the period is not 1 day, the start and end time have a difference of one day. The period is set to 60 seconds. I have limited the list here, but that's why you see a data point for each minute. You are welcome to add more context to the output for the user. I also recommend looking at the .NET code used to generate the output, it will help you see what parameters were used.
Reached minimum quote of SDK languages.
CloudWatch documentation references:
To enable billing metrics and statistics for this example, make sure billing alerts are enabled for your account.
Reference implementation of scenario and actions in .NET: /dotnetv3/CloudWatch and in PR 4293
Service actions
Service actions can either be pulled out as individual functions or can be incorporated into the scenario, but each service action must be included as an excerpt in the SOS output.
ListMetrics GetMetricStatistics PutDashboard PutMetricData GetMetricData PutMetricAlarm DescribeAlarms DescribeAlarmsForMetric DescribeAlarmHistory DeleteAlarms PutAnomalyDetector GetMetricWidgetImage DescribeAnomalyDetectors DeleteAnomalyDetector DeleteDashboards
Hello Service
The Hello Service example should demonstrate how to set up the client and make an example call using the SDK.
Hello CloudWatch
Initialize the client and call ListMetrics for at least one namespace, such as “AWS/Billing”. Display the first 5 available metrics.
General info for Hello Service example snippets: This section of the MVP should be a streamlined, simple example with enough detail to be as close to “copy/paste” runnable as possible. This example may include namespaces and other setup in order to focus on getting the user up and running with the new service.
Sample output:
Scenario
A scenario runs at a command prompt and prints output to the user on the result of each service action. A scenario can run in one of two ways: straight through printing out progress as it goes, or as an interactive question/answer script.
Working with metrics, dashboards, and alarms
(ListMetrics)
(ListMetrics)
(GetMetricStatistics)
(GetMetricStatistics)
(PutDashboard)
(ListDashboards)
(PutMetricData)
(PutDashboard)
(PutMetricAlarm)
(DescribeAlarms)
(GetMetricData)
(PutMetricData)
(DescribeAlarmsForMetric)
(DescribeAlarmHistory)
(PutAnomalyDetector)
(DescribeAnomalyDetectors)
(GetMetricWidgetImage)
(DeleteAnomalyDetector)
(DeleteAlarms)
(DeleteDashboards)
See the attached sample output from the .NET MVP.
Metadata
In cloudwatch_metadata.yaml:
cloudwatch_Hello cloudwatch_DeleteAlarms cloudwatch_DeleteAnomalyDetector cloudwatch_DeleteDashboards cloudwatch_DescribeAlarmHistory cloudwatch_DescribeAlarms cloudwatch_DescribeAlarmsForMetric cloudwatch_DescribeAnomalyDetectors cloudwatch_GetMetricData cloudwatch_GetMetricStatistics cloudwatch_GetMetricImage cloudwatch_ListDashboards cloudwatch_ListMetrics cloudwatch_PutAnomalyDetector cloudwatch_PutDashboard cloudwatch_PutMetricAlarm cloudwatch_PutMetricData cloudwatch_GetStartedMetricsDashboardsAlarms
SDKs
Acceptance criteria
Sample output from .NET