Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::SLS::Dashboard

Última atualização: Jun 27, 2026

Cria um painel do Simple Log Service (SLS).

Sintaxe

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

Propriedades

Propriedade Tipo Obrigatório Atualização Permitida Descrição Restrições
DashboardName String Sim Não O ID do painel. O ID do painel deve ser exclusivo no mesmo projeto.
Description String Não Sim A descrição do painel. Nenhum
ProjectName String Sim Não O nome do projeto. Nenhum
DisplayName String Não Sim O nome de exibição do painel. Nenhum
Charts List Sim Sim Os gráficos do painel. Nenhum

Valores de retorno

Fn::GetAtt

  • DashboardName: O ID do painel.
  • DisplayName: O nome de exibição do painel.

Exemplos

  • formato 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"
            ]
          }
        }
      }
    }
  • formato YAML

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      DashboardName:
        Type: String
        Description: Dashboard name.
      ProjectName:
        Type: String
        Description: |-
          Project name:
          1. Only supports lowercase letters, numbers, hyphens (-) and underscores (_).
          2. Must start and end with lowercase letters and numbers.
          3. 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