All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::SLS::Dashboard

Last Updated:Jun 17, 2026

Membuat dashboard Simple Log Service (SLS).

Sintaks

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

Properti

Properti Tipe Wajib Boleh Diperbarui Deskripsi Batasan
DashboardName String Ya Tidak ID dashboard. ID dashboard harus unik dalam proyek yang sama.
Description String Tidak Ya Deskripsi dashboard. Tidak ada
ProjectName String Ya Tidak Nama proyek. Tidak ada
DisplayName String Tidak Ya Nama tampilan dashboard. Tidak ada
Charts List Ya Ya Grafik pada dashboard. Tidak ada

Nilai kembalian

Fn::GetAtt

  • DashboardName: ID dashboard.
  • DisplayName: Nama tampilan 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 diawali dan diakhiri dengan huruf kecil atau 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 diawali dan diakhiri dengan huruf kecil atau 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