IntegrationsAwsActions
Get CloudWatch metric data
Get CloudWatch metric data for up to 100 queries with MaxDatapoints 10000. Metric expressions are 1-2048 characters and must not start with SELECT (Metrics Insights deferred). Returns AWS pagination cursors without local truncation. Requires cloudwatch:GetMetricData.
cloudwatch.metric_data.get · AWS · v1
Details
Scopes
cloudwatch:GetMetricData
Input
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
region | string | No | enum us-east-1 | us-east-2 | us-west-1 | us-west-2 | af-south-1 | ap-east-1 | ap-east-2 | ap-south-1 | ap-south-2 | ap-southeast-1 | ap-southeast-2 | ap-southeast-3 | ap-southeast-4 | ap-southeast-5 | ap-southeast-6 | ap-southeast-7 | ap-northeast-1 | ap-northeast-2 | ap-northeast-3 | ca-central-1 | ca-west-1 | eu-central-1 | eu-central-2 | eu-west-1 | eu-west-2 | eu-west-3 | eu-north-1 | eu-south-1 | eu-south-2 | il-central-1 | me-central-1 | me-south-1 | mx-central-1 | sa-east-1 |
start_time | string | Yes | minLength 1; maxLength 64 |
end_time | string | Yes | minLength 1; maxLength 64 |
queries | array<object> | Yes | minItems 1; maxItems 100 |
queries[] | object | Yes | additionalProperties false; oneOf branch 1: required metric / branch 2: required expression |
queries[].id | string | Yes | minLength 1; maxLength 255; pattern ^[a-z][a-zA-Z0-9_]*$ |
queries[].label | string | No | minLength 1; maxLength 2048 |
queries[].return_data | boolean | No | — |
queries[].metric | object | No | additionalProperties false |
queries[].metric.namespace | string | Yes | minLength 1; maxLength 255 |
queries[].metric.metric_name | string | Yes | minLength 1; maxLength 255 |
queries[].metric.dimensions | array<object> | No | maxItems 30 |
queries[].metric.dimensions[] | object | Yes | additionalProperties false |
queries[].metric.dimensions[].name | string | Yes | minLength 1; maxLength 255 |
queries[].metric.dimensions[].value | string | Yes | minLength 1; maxLength 1024 |
queries[].metric.period_seconds | integer | Yes | minimum 1; maximum 86400 |
queries[].metric.stat | string | Yes | minLength 1; maxLength 100 |
queries[].metric.unit | string | No | minLength 1; maxLength 64 |
queries[].expression | string | No | minLength 1; maxLength 2048 |
queries[].period_seconds | integer | No | minimum 1; maximum 86400 |
scan_order | string | No | enum TimestampAscending | TimestampDescending |
cursor | string | No | minLength 1; maxLength 16384; pattern ^(?!.*://)[^\x00-\x1f\x7f]+$ |
Output
| Name | Type | Required | Constraints |
|---|---|---|---|
(root) | object | Yes | additionalProperties false |
results | array<object> | Yes | maxItems 100 |
results[] | object | Yes | additionalProperties false |
results[].id | string | Yes | minLength 1; maxLength 255; pattern ^[a-z][a-zA-Z0-9_]*$ |
results[].label | string | No | minLength 1; maxLength 2048 |
results[].status | string | Yes | enum complete | partial_data | internal_error | forbidden |
results[].messages | array<object> | No | maxItems 100 |
results[].messages[] | object | Yes | additionalProperties false |
results[].messages[].code | string | Yes | minLength 1; maxLength 128 |
results[].messages[].value | string | Yes | minLength 1; maxLength 2048 |
results[].points | array<object> | Yes | maxItems 10000 |
results[].points[] | object | Yes | additionalProperties false |
results[].points[].timestamp | string | Yes | minLength 1; maxLength 64 |
results[].points[].value | number | Yes | — |
next_cursor | string | No | minLength 1; maxLength 16384; pattern ^(?!.*://)[^\x00-\x1f\x7f]+$ |
Raw schema
Input
{
"type": "object",
"additionalProperties": false,
"properties": {
"region": {
"type": "string",
"enum": [
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
"af-south-1",
"ap-east-1",
"ap-east-2",
"ap-south-1",
"ap-south-2",
"ap-southeast-1",
"ap-southeast-2",
"ap-southeast-3",
"ap-southeast-4",
"ap-southeast-5",
"ap-southeast-6",
"ap-southeast-7",
"ap-northeast-1",
"ap-northeast-2",
"ap-northeast-3",
"ca-central-1",
"ca-west-1",
"eu-central-1",
"eu-central-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-north-1",
"eu-south-1",
"eu-south-2",
"il-central-1",
"me-central-1",
"me-south-1",
"mx-central-1",
"sa-east-1"
]
},
"start_time": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"end_time": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"queries": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[a-z][a-zA-Z0-9_]*$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"return_data": {
"type": "boolean"
},
"metric": {
"type": "object",
"additionalProperties": false,
"properties": {
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"metric_name": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"dimensions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 1024
}
},
"required": [
"name",
"value"
]
},
"maxItems": 30
},
"period_seconds": {
"type": "integer",
"minimum": 1,
"maximum": 86400
},
"stat": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
},
"required": [
"namespace",
"metric_name",
"period_seconds",
"stat"
]
},
"expression": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"period_seconds": {
"type": "integer",
"minimum": 1,
"maximum": 86400
}
},
"required": [
"id"
],
"oneOf": [
{
"required": [
"metric"
]
},
{
"required": [
"expression"
]
}
]
},
"minItems": 1,
"maxItems": 100
},
"scan_order": {
"type": "string",
"enum": [
"TimestampAscending",
"TimestampDescending"
]
},
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 16384,
"pattern": "^(?!.*://)[^\\x00-\\x1f\\x7f]+$"
}
},
"required": [
"start_time",
"end_time",
"queries"
]
}Output
{
"type": "object",
"additionalProperties": false,
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[a-z][a-zA-Z0-9_]*$"
},
"label": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"status": {
"type": "string",
"enum": [
"complete",
"partial_data",
"internal_error",
"forbidden"
]
},
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 2048
}
},
"required": [
"code",
"value"
]
},
"maxItems": 100
},
"points": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"timestamp": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"value": {
"type": "number"
}
},
"required": [
"timestamp",
"value"
]
},
"maxItems": 10000
}
},
"required": [
"id",
"status",
"points"
]
},
"maxItems": 100
},
"next_cursor": {
"type": "string",
"minLength": 1,
"maxLength": 16384,
"pattern": "^(?!.*://)[^\\x00-\\x1f\\x7f]+$"
}
},
"required": [
"results"
]
}