给出此cloudwatch仪表板json片段:
import numpy as np
A = np.matrix([[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
[10, 11, 12]])
u, s, vt = np.linalg.svd(A, full_matrices=False)
print(np.dot(u, np.dot(np.diag(s), vt)))
窗口小部件默认显示“最新值”。我想要看到“时间范围值”,如下面的屏幕截图所示。如何使用cloudwatch仪表板json指定该设置?
答案 0 :(得分:1)
将此添加到properties
对象:
"setPeriodToTimeRange": true
在您的示例中:
{
"type": "metric",
"x": 3,
"y": 0,
"width": 3,
"height": 3,
"properties": {
"metrics": [
[
"AWS/ApiGateway",
"Count",
"ApiName",
"my-api",
{
"stat": "Sum"
}
]
],
"view": "singleValue",
"region": "eu-west-1",
"period": 300,
"title": "Number of api calls",
"setPeriodToTimeRange": true
}
}