ALIYUN::SLS::Dashboard类型用于创建仪表盘。
语法
{
"Type": "ALIYUN::SLS::Dashboard",
"Properties": {
"DashboardName": String,
"Description": String,
"ProjectName": String,
"DisplayName": String,
"Charts": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
DashboardName | String | 是 | 否 | 仪表盘ID。 | 同一个Project下,仪表盘ID唯一。 |
Description | String | 否 | 是 | 仪表盘描述。 | 无 |
ProjectName | String | 是 | 否 | 项目名称。 | 无 |
DisplayName | String | 否 | 是 | 仪表盘显示名称。 | 无 |
Charts | List | 是 | 是 | 统计图表列表。 | 无 |
返回值
Fn::GetAtt
- DashboardName:仪表盘ID。
- DisplayName:仪表盘显示名称。
示例
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "DashboardName": { "Type": "String", "Description": "Dashboard name." }, "ProjectName": { "Type": "String", "Description": "Project name:\n1. Only supports lowercase letters, numbers, hyphens (-) and underscores (_).\n2. Must start and end with lowercase letters and numbers.\n3. The name length is 3-63 characters.", "AllowedPattern": "^[a-zA-Z0-9_-]+$", "MinLength": 3, "MaxLength": 63 } }, "Resources": { "Dashboard": { "Type": "ALIYUN::SLS::Dashboard", "Properties": { "DashboardName": { "Ref": "DashboardName" }, "ProjectName": { "Ref": "ProjectName" }, "Charts": [ { "action": {}, "title": "new_title", "type": "map", "search": { "logstore": "function-compute", "topic": "new_topic", "query": "* | SELECT type, COUNT(content) as ct_content GROUP BY type", "start": "-86400s", "end": "now" }, "display": { "xAxis": [ "type" ], "yAxis": [ "ct_content" ], "xPos": 0, "yPos": 0, "width": 10, "height": 12, "displayName": "test" } } ] } } }, "Outputs": { "DashboardName": { "Description": "Dashboard name.", "Value": { "Fn::GetAtt": [ "Dashboard", "DashboardName" ] } } } }