Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::SLS::Savedsearch

Última atualização: Aug 25, 2026

O tipo de recurso ALIYUN::SLS::Savedsearch salva uma consulta como uma pesquisa salva.

Sintaxe

{
  "Type": "ALIYUN::SLS::Savedsearch",
  "Properties": {
    "Project": String,
    "Detail": Map
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatória

Atualizações permitidas

Descrição

Restrições

Project

String

Sim

Não

Nome do projeto.

Nenhuma

Detail

Map

Sim

Sim

Detalhes da consulta.

Para mais informações, consulte Detail properties.

Sintaxe de Detail

"Detail": {
  "SearchQuery": String,
  "Logstore": String,
  "DisplayName": String,
  "SavedsearchName": String,
  "Topic": String
}

Propriedades de Detail

Nome da propriedade

Tipo

Obrigatória

Atualizações permitidas

Descrição

Restrições

SearchQuery

String

Sim

Sim

Instrução de consulta.

Nenhuma

Logstore

String

Sim

Sim

O Logstore.

Nenhuma

DisplayName

String

Não

Sim

Nome de exibição da pesquisa salva.

O nome deve ter de 1 a 63 caracteres.

SavedsearchName

String

Sim

Não

Nome da pesquisa salva.

Nenhuma

Topic

String

Sim

Sim

Tópico do log.

Nenhuma

Valores de retorno

Fn::GetAtt

SavedsearchName: o nome da pesquisa salva.

Exemplos

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SlsProjectName:
    Type: String
    Description: Project name
    MinLength: 3
    MaxLength: 63
    Default: mytest
Resources:
  SavedSearch:
    Type: ALIYUN::SLS::Savedsearch
    Properties:
      Project:
        Ref: SlsProjectName
      Detail:
        SearchQuery: '*|select date_format(__time__-__time__%60, ''%H:%i:%s'') as time, COUNT(*) as pv group by time'
        Logstore: aliyun-test-***
        DisplayName: displayname
        SavedsearchName: test
        Topic: test

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SlsProjectName": {
      "Type": "String",
      "Description": "Project name",
      "MinLength": 3,
      "MaxLength": 63,
      "Default": "mytest"
    }
  },
  "Resources": {
    "SavedSearch": {
      "Type": "ALIYUN::SLS::Savedsearch",
      "Properties": {
        "Project": {
          "Ref": "SlsProjectName"
        },
        "Detail": {
          "SearchQuery": "*|select date_format(__time__-__time__%60, '%H:%i:%s') as time, COUNT(*) as pv group by time",
          "Logstore": "aliyun-test-***",
          "DisplayName": "displayname",
          "SavedsearchName": "test",
          "Topic": "test"
        }
      }
    }
  }
}