DATASOURCE::ROS::StackGroups类型用于查询资源栈组列表详情。
语法
{
  "Type": "DATASOURCE::ROS::StackGroups",
  "Properties": {
    "ResourceGroupId": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
Fn::GetAtt
- StackGroups:资源栈组列表。 
- StackGroupNames:资源栈组名称列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| StackGroupNames | List | 资源栈组名称列表。 | 无 | 
| StackGroups | List | 资源栈组列表。 | 无 | 
| Status | String | 资源栈组状态。 | 取值: 
 | 
| PermissionModel | String | 授权模式。 | 取值: 
 | 
| Description | String | 资源栈组描述。 | 无 | 
| Tags | List | 资源栈组的标签。 | 例如:  | 
| StackGroupId | String | 资源栈组ID。 | 无 | 
| ResourceGroupId | String | 资源组ID。 | 无 | 
| AutoDeployment | Map | 自动部署设置信息。 | 例如:  | 
| StackGroupName | String | 资源栈组名称。 | 无 | 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceGroupId:
    Description: The ID of the resource group.
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      ResourceGroupId:
        Ref: ResourceGroupId
    Type: DATASOURCE::ROS::StackGroups
Outputs:
  StackGroupNames:
    Description: The list of stack group names.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - StackGroupNames
  StackGroups:
    Description: The list of stack groups.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - StackGroups{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceGroupId": {
      "Type": "String",
      "Description": "The ID of the resource group."
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ROS::StackGroups",
      "Properties": {
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        }
      }
    }
  },
  "Outputs": {
    "StackGroups": {
      "Description": "The list of stack groups.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "StackGroups"
        ]
      }
    },
    "StackGroupNames": {
      "Description": "The list of stack group names.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "StackGroupNames"
        ]
      }
    }
  }
}该文章对您有帮助吗?