All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::SLS::Dashboard

Last Updated:Jun 26, 2025

ALIYUN::SLS::Dashboard digunakan untuk membuat dashboard.

Sintaks

{
  "Type": "ALIYUN::SLS::Dashboard",
  "Properties": {
    "DashboardName": String,
    "Description": String,
    "ProjectName": String,
    "DisplayName": String,
    "Charts": List
  }
}

Properti

PropertiTipeDiperlukanDapat DieditDeskripsiKendala
DashboardNameStringYaTidakID dari dashboard. ID dashboard harus unik dalam sebuah proyek.
DescriptionStringTidakYaDeskripsi dari dashboard. Tidak ada.
ProjectNameStringYaTidakNama dari proyek. Tidak ada.
DisplayNameStringTidakYaNama dari dashboard. Tidak ada.
ChartsListYaYaDaftar grafik. Tidak ada.

Nilai pengembalian

Fn::GetAtt

  • DashboardName: ID dari dashboard.
  • DisplayName: Nama dari dashboard.

Contoh

  • JSON Format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "DashboardName": {
          "Type": "String",
          "Description": "Nama Dashboard."
        },
        "ProjectName": {
          "Type": "String",
          "Description": "Nama Proyek:\n1. Hanya mendukung huruf kecil, angka, tanda hubung (-) dan garis bawah (_).\n2. Harus dimulai dan diakhiri dengan huruf kecil dan angka.\n3. Panjang nama adalah 3-63 karakter.",
          "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": "Nama Dashboard.",
          "Value": {
            "Fn::GetAtt": [
              "Dashboard",
              "DashboardName"
            ]
          }
        }
      }
    }
  • YAML Format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DashboardName:
        Type: String
        Description: Nama Dashboard.
      ProjectName:
        Type: String
        Description: |-
          Nama Proyek:
          1. Hanya mendukung huruf kecil, angka, tanda hubung (-) dan garis bawah (_).
          2. Harus dimulai dan diakhiri dengan huruf kecil dan angka.
          3. Panjang nama adalah 3-63 karakter.
        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: Nama Dashboard.
        Value:
          Fn::GetAtt:
            - Dashboard
            - DashboardName