DATASOURCE::SLS::Logstores类型用于查询日志库。
语法
{
  "Type": "DATASOURCE::SLS::Logstores",
  "Properties": {
    "Project": String,
    "LogstoreName": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| Project | String | 是 | 是 | 项目名称。 | 无 | 
| LogstoreName | String | 否 | 是 | 日志库名称。 | 支持模糊匹配。 例如:输入test,则返回名称包含test的日志库列表。 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回数据(Fn::GetAtt)
Logstores:日志库列表信息。
| 属性名称 | 类型 | 描述 | 约束 | 
| Logstores | List | 日志库列表信息。 | 示例: | 
示例
JSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Project": {
      "Type": "String",
      "Description": "Project name."
    }
  },
  "Resources": {
    "Logstores": {
      "Type": "DATASOURCE::SLS::Logstores",
      "Properties": {
        "Project": {
          "Ref": "Project"
        }
      }
    }
  },
  "Outputs": {
    "Logstores": {
      "Description": "The list of logstores.",
      "Value": {
        "Fn::GetAtt": [
          "Logstores",
          "Logstores"
        ]
      }
    }
  }
}该文章对您有帮助吗?