DATASOURCE::ThreatDetection::Instances类型用于查询云安全中心实例基础信息。
语法
{
  "Type": "DATASOURCE::ThreatDetection::Instances",
  "Properties": {
    "InstanceId": String,
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| InstanceId | String | 否 | 是 | 资源实例ID。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
Fn::GetAtt
- Instances:安全中心实例基础信息列表。 
- InstanceIds:安全中心实例ID列表。 - 属性名称 - 类型 - 描述 - 约束 - InstanceIds - List - 安全中心实例ID列表。 - 无 - Instances - List - 安全中心实例基础信息列表。 - 无 - Status - String - 资源状态。 - 无 - InstanceId - String - 安全中心实例ID。 - 无 - CreateTime - String - 创建时间。 - 无 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Description:
      en: The first ID of the resource.
    Type: String
Resources:
  ExtensionDataSource:
    Properties:
      InstanceId:
        Ref: InstanceId
    Type: DATASOURCE::ThreatDetection::Instances
Outputs:
  InstanceIds:
    Description: The list of instance IDs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - InstanceIds
  Instances:
    Description: The list of instances.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Instances
                        {
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The first ID of the resource."
      }
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ThreatDetection::Instances",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        }
      }
    }
  },
  "Outputs": {
    "Instances": {
      "Description": "The list of instances.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Instances"
        ]
      }
    },
    "InstanceIds": {
      "Description": "The list of instance IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceIds"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?