我无法在小部件中引用服务名称。
使用给定代码出现以下错误:仪表板正文无效,存在 1 个验证错误:[ { "dataPath": "/widgets/0/properties/metrics/0", "message": "Should NOT have more than 3 项“}](服务:AmazonCloudWatch;状态代码:400;错误代码:InvalidParameterInput
"CloudwatchDashboard": {
"Type": "AWS::CloudWatch::Dashboard",
"Properties": {
"{ \"widgets\":
[{ \"type\":\"metric\",
\"x\":0,
\"y\":0,
\"width\":12,
\"height\":6,
\"properties\":
{ \"metrics\":
[[ \"AWS/ECS\", \"CPUUtilization\", \"ServiceName\",
{ \"Fn::Sub\": [ \"${Service}\", { \"Service\": {\"Ref\" : \"AWS::StackName\" }} ]}]],
\"region\": \"us-east-1\",
\"stat\":\"Average\",
\"period\": 300,
\"view\": \"timeSeries\",
\"title\":\"CPUUtilization\",
\"stacked\": false } }]}"
}
}