Frends.AmazonCloudWatch.GetMetricData / 1.0.0

Summary

Retrieves metric data from Amazon CloudWatch.

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0

Essential parameters.

Name Type Default Example Description
StartTime DateTime – 2026-11-22T00:00:00Z

Start of the time range (inclusive). Values with Kind Unspecified are treated as UTC, Local values are converted to UTC. CloudWatch rounds the value down based on the Period and the age of the data.

EndTime DateTime – 2026-11-23T00:00:00Z

End of the time range (exclusive). Values with Kind Unspecified are treated as UTC, Local values are converted to UTC. Must be later than StartTime.

QueryInputMode QueryInputMode Form Form

How the metric queries are provided. Form uses the Queries parameter, Json uses the QueriesJson parameter.

Possible values:

  • Form: Queries are defined with the form fields of the Queries parameter.

  • Json: Queries are provided as a JSON array in the format used by the AWS CLI and the CloudWatch console.

Queries MetricDataQuery[] – [{ Id = "cpu", QueryType = QueryType.Metric, Namespace = "AWS/EC2", MetricName = "CPUUtilization", Period = 300, Statistic = "Average" }]

Metric queries to run, 1 to 500 items. Each query returns its own entry in the result, identified by its Id.

QueriesJson String – [{ "Id": "cpu", "MetricStat": { "Metric": { "Namespace": "AWS/EC2", "MetricName": "CPUUtilization", "Dimensions": [{ "Name": "InstanceId", "Value": "i-1234567890abcdef0" }] }, "Period": 300, "Stat": "Average", "Unit": "Percent" } }, { "Id": "cpu2x", "Expression": "cpu * 2" }]

Metric queries provided as a JSON array matching the AWS CloudWatch MetricDataQuery structure. Supports all query properties available in the AWS SDK, including MetricStat, metric math expressions and Metrics Insights queries.

NextToken String – eyJ0b2tlbiI6IjEyMyJ9

Token returned by a previous call to fetch the next page of data. Leave empty to fetch the first page. Use the same StartTime, EndTime and Queries as in the call that returned the token.

An unhandled error has occurred. Reload 🗙
Reconnecting… Connection lost.