DATASOURCE::CMS::SlsGroups类型用于查询Logstore组的基本信息。
语法
{
  "Type": "DATASOURCE::CMS::SlsGroups",
  "Properties": {
    "SlsGroupName": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| SlsGroupName | String | 否 | 是 | Logstore组名称。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 取值: 
 | 
返回值
Fn::GetAtt
- SlsGroups:Logstore组详细信息列表。 
- SlsGroupNames:Logstore组名称列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| SlsGroupNames | List | Logstore组名称列表。 | 无 | 
| SlsGroups | List | Logstore组详细信息列表。 | 无 | 
| SlsGroupName | String | Logstore组名称。 | 无 | 
| SlsGroupConfig | List | Logstore组配置信息。 | 无 | 
| SlsGroupDescription | String | Logstore组描述。 | 无 | 
| CreateTime | String | 创建Logstore组的时间戳。 | 单位:毫秒。 | 
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SlsGroupName:
    Description: The name of the Logstore group.
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      SlsGroupName:
        Ref: SlsGroupName
    Type: DATASOURCE::CMS::SlsGroups
Outputs:
  SlsGroupNames:
    Description: The list of sls group names.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - SlsGroupNames
  SlsGroups:
    Description: The list of sls groups.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - SlsGroupsJSON格式
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SlsGroupName": {
      "Type": "String",
      "Description": "The name of the Logstore group."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::CMS::SlsGroups",
      "Properties": {
        "SlsGroupName": {
          "Ref": "SlsGroupName"
        }
      }
    }
  },
  "Outputs": {
    "SlsGroups": {
      "Description": "The list of sls groups.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SlsGroups"
        ]
      }
    },
    "SlsGroupNames": {
      "Description": "The list of sls group names.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SlsGroupNames"
        ]
      }
    }
  }
}该文章对您有帮助吗?